summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/HandleAnchorNodeChg.hxx2
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx2
-rw-r--r--sw/inc/PostItMgr.hxx2
-rw-r--r--sw/inc/accmap.hxx2
-rw-r--r--sw/inc/anchoreddrawobject.hxx2
-rw-r--r--sw/inc/bparr.hxx2
-rw-r--r--sw/inc/calc.hxx8
-rw-r--r--sw/inc/ccoll.hxx2
-rw-r--r--sw/inc/cellatr.hxx6
-rw-r--r--sw/inc/cellfml.hxx38
-rw-r--r--sw/inc/crsrsh.hxx38
-rw-r--r--sw/inc/dbmgr.hxx12
-rw-r--r--sw/inc/dcontact.hxx6
-rw-r--r--sw/inc/doc.hxx82
-rw-r--r--sw/inc/docary.hxx2
-rw-r--r--sw/inc/docfac.hxx2
-rw-r--r--sw/inc/docsh.hxx12
-rw-r--r--sw/inc/docufld.hxx2
-rw-r--r--sw/inc/dpage.hxx2
-rw-r--r--sw/inc/edglbldc.hxx4
-rw-r--r--sw/inc/editsh.hxx62
-rw-r--r--sw/inc/extinput.hxx2
-rw-r--r--sw/inc/fchrfmt.hxx6
-rw-r--r--sw/inc/fesh.hxx68
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/fmtanchr.hxx4
-rw-r--r--sw/inc/fmtautofmt.hxx4
-rw-r--r--sw/inc/fmtclbl.hxx2
-rw-r--r--sw/inc/fmtclds.hxx4
-rw-r--r--sw/inc/fmtcnct.hxx4
-rw-r--r--sw/inc/fmtcntnt.hxx4
-rw-r--r--sw/inc/fmtcol.hxx12
-rw-r--r--sw/inc/fmtcolfunc.hxx2
-rw-r--r--sw/inc/fmteiro.hxx4
-rw-r--r--sw/inc/fmtflcnt.hxx4
-rw-r--r--sw/inc/fmtfld.hxx4
-rw-r--r--sw/inc/fmtfollowtextflow.hxx4
-rw-r--r--sw/inc/fmtfordr.hxx2
-rw-r--r--sw/inc/fmtfsize.hxx4
-rw-r--r--sw/inc/fmtftn.hxx2
-rw-r--r--sw/inc/fmtftntx.hxx6
-rw-r--r--sw/inc/fmthdft.hxx8
-rw-r--r--sw/inc/fmtinfmt.hxx6
-rw-r--r--sw/inc/fmtline.hxx4
-rw-r--r--sw/inc/fmtlsplt.hxx4
-rw-r--r--sw/inc/fmtmeta.hxx8
-rw-r--r--sw/inc/fmtornt.hxx8
-rw-r--r--sw/inc/fmtpdsc.hxx6
-rw-r--r--sw/inc/fmtrfmrk.hxx2
-rw-r--r--sw/inc/fmtrowsplt.hxx4
-rw-r--r--sw/inc/fmtruby.hxx4
-rw-r--r--sw/inc/fmtsrnd.hxx4
-rw-r--r--sw/inc/fmturl.hxx4
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx2
-rw-r--r--sw/inc/format.hxx6
-rw-r--r--sw/inc/frmfmt.hxx12
-rw-r--r--sw/inc/ftnidx.hxx2
-rw-r--r--sw/inc/ftninfo.hxx4
-rw-r--r--sw/inc/grfatr.hxx42
-rw-r--r--sw/inc/hfspacingitem.hxx4
-rw-r--r--sw/inc/hints.hxx2
-rw-r--r--sw/inc/htmltbl.hxx4
-rw-r--r--sw/inc/index.hxx2
-rw-r--r--sw/inc/iodetect.hxx4
-rw-r--r--sw/inc/lineinfo.hxx2
-rw-r--r--sw/inc/mdiexp.hxx4
-rw-r--r--sw/inc/modcfg.hxx2
-rw-r--r--sw/inc/ndarr.hxx28
-rw-r--r--sw/inc/ndgrf.hxx18
-rw-r--r--sw/inc/ndhints.hxx4
-rw-r--r--sw/inc/ndnotxt.hxx8
-rw-r--r--sw/inc/ndole.hxx8
-rw-r--r--sw/inc/ndtxt.hxx14
-rw-r--r--sw/inc/node.hxx40
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/inc/pam.hxx26
-rw-r--r--sw/inc/paratr.hxx16
-rw-r--r--sw/inc/postithelper.hxx6
-rw-r--r--sw/inc/printdata.hxx10
-rw-r--r--sw/inc/redline.hxx10
-rw-r--r--sw/inc/reffld.hxx2
-rw-r--r--sw/inc/section.hxx10
-rw-r--r--sw/inc/shellio.hxx18
-rw-r--r--sw/inc/splargs.hxx4
-rw-r--r--sw/inc/swabstdlg.hxx12
-rw-r--r--sw/inc/swatrset.hxx4
-rw-r--r--sw/inc/swbaslnk.hxx4
-rw-r--r--sw/inc/swcrsr.hxx18
-rw-r--r--sw/inc/swevent.hxx8
-rw-r--r--sw/inc/swtable.hxx26
-rw-r--r--sw/inc/swunohelper.hxx4
-rw-r--r--sw/inc/tblsel.hxx10
-rw-r--r--sw/inc/tgrditem.hxx4
-rw-r--r--sw/inc/tox.hxx4
-rw-r--r--sw/inc/txtannotationfld.hxx2
-rw-r--r--sw/inc/txtrfmrk.hxx2
-rw-r--r--sw/inc/txttxmrk.hxx2
-rw-r--r--sw/inc/undobj.hxx8
-rw-r--r--sw/inc/unocrsr.hxx2
-rw-r--r--sw/inc/unocrsrhelper.hxx2
-rw-r--r--sw/inc/unodraw.hxx2
-rw-r--r--sw/inc/unoparagraph.hxx6
-rw-r--r--sw/inc/unosett.hxx10
-rw-r--r--sw/inc/unotextcursor.hxx2
-rw-r--r--sw/inc/unotxdoc.hxx4
-rw-r--r--sw/inc/view.hxx22
-rw-r--r--sw/inc/viewopt.hxx2
-rw-r--r--sw/inc/viewsh.hxx4
-rw-r--r--sw/inc/viscrs.hxx14
-rw-r--r--sw/qa/core/filters-test.cxx4
-rw-r--r--sw/qa/core/test_ToxTextGenerator.cxx12
-rw-r--r--sw/qa/core/uwriter.cxx20
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx6
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx8
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx18
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx12
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx30
-rw-r--r--sw/source/core/access/acccontext.cxx24
-rw-r--r--sw/source/core/access/acccontext.hxx8
-rw-r--r--sw/source/core/access/accdoc.cxx44
-rw-r--r--sw/source/core/access/accframe.hxx4
-rw-r--r--sw/source/core/access/accframebase.cxx10
-rw-r--r--sw/source/core/access/accfrmobj.cxx50
-rw-r--r--sw/source/core/access/accfrmobjslist.cxx8
-rw-r--r--sw/source/core/access/acchyperlink.cxx4
-rw-r--r--sw/source/core/access/accmap.cxx40
-rw-r--r--sw/source/core/access/accnotextframe.cxx6
-rw-r--r--sw/source/core/access/accnotexthyperlink.cxx10
-rw-r--r--sw/source/core/access/accpage.cxx4
-rw-r--r--sw/source/core/access/accpara.cxx98
-rw-r--r--sw/source/core/access/accpara.hxx2
-rw-r--r--sw/source/core/access/accportions.cxx14
-rw-r--r--sw/source/core/access/accportions.hxx4
-rw-r--r--sw/source/core/access/accselectionhelper.cxx20
-rw-r--r--sw/source/core/access/acctable.cxx38
-rw-r--r--sw/source/core/access/acctable.hxx2
-rw-r--r--sw/source/core/access/acctextframe.cxx6
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx24
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx10
-rw-r--r--sw/source/core/attr/cellatr.cxx8
-rw-r--r--sw/source/core/attr/format.cxx16
-rw-r--r--sw/source/core/attr/hints.cxx14
-rw-r--r--sw/source/core/attr/swatrset.cxx40
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx2
-rw-r--r--sw/source/core/bastyp/bparr.cxx4
-rw-r--r--sw/source/core/bastyp/breakit.cxx8
-rw-r--r--sw/source/core/bastyp/calc.cxx18
-rw-r--r--sw/source/core/bastyp/index.cxx30
-rw-r--r--sw/source/core/bastyp/init.cxx34
-rw-r--r--sw/source/core/bastyp/swcache.cxx38
-rw-r--r--sw/source/core/crsr/BlockCursor.cxx4
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx2
-rw-r--r--sw/source/core/crsr/annotationmark.cxx20
-rw-r--r--sw/source/core/crsr/bookmrk.cxx22
-rw-r--r--sw/source/core/crsr/callnk.cxx14
-rw-r--r--sw/source/core/crsr/crbm.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx144
-rw-r--r--sw/source/core/crsr/crstrvl.cxx172
-rw-r--r--sw/source/core/crsr/findattr.cxx38
-rw-r--r--sw/source/core/crsr/findcoll.cxx4
-rw-r--r--sw/source/core/crsr/findfmt.cxx2
-rw-r--r--sw/source/core/crsr/findtxt.cxx20
-rw-r--r--sw/source/core/crsr/pam.cxx80
-rw-r--r--sw/source/core/crsr/swcrsr.cxx58
-rw-r--r--sw/source/core/crsr/trvlcol.cxx10
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx30
-rw-r--r--sw/source/core/crsr/trvlreg.cxx14
-rw-r--r--sw/source/core/crsr/trvltbl.cxx68
-rw-r--r--sw/source/core/crsr/viscrs.cxx20
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx4
-rw-r--r--sw/source/core/doc/DocumentChartDataProviderManager.cxx8
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx158
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx12
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx4
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx70
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx28
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx38
-rw-r--r--sw/source/core/doc/DocumentListItemsManager.cxx6
-rw-r--r--sw/source/core/doc/DocumentListsManager.cxx18
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx166
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentStatisticsManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx22
-rw-r--r--sw/source/core/doc/DocumentTimerManager.cxx8
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx94
-rw-r--r--sw/source/core/doc/acmplwrd.cxx2
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx24
-rw-r--r--sw/source/core/doc/doc.cxx52
-rw-r--r--sw/source/core/doc/docbasic.cxx12
-rw-r--r--sw/source/core/doc/docbm.cxx44
-rw-r--r--sw/source/core/doc/docchart.cxx10
-rw-r--r--sw/source/core/doc/doccomp.cxx40
-rw-r--r--sw/source/core/doc/doccorr.cxx12
-rw-r--r--sw/source/core/doc/docdesc.cxx16
-rw-r--r--sw/source/core/doc/docdraw.cxx24
-rw-r--r--sw/source/core/doc/docedt.cxx24
-rw-r--r--sw/source/core/doc/docfld.cxx32
-rw-r--r--sw/source/core/doc/docfly.cxx54
-rw-r--r--sw/source/core/doc/docfmt.cxx42
-rw-r--r--sw/source/core/doc/docftn.cxx20
-rw-r--r--sw/source/core/doc/docglbl.cxx24
-rw-r--r--sw/source/core/doc/docglos.cxx8
-rw-r--r--sw/source/core/doc/doclay.cxx74
-rw-r--r--sw/source/core/doc/docnew.cxx60
-rw-r--r--sw/source/core/doc/docnum.cxx102
-rw-r--r--sw/source/core/doc/docredln.cxx70
-rw-r--r--sw/source/core/doc/docruby.cxx6
-rw-r--r--sw/source/core/doc/docsort.cxx58
-rw-r--r--sw/source/core/doc/doctxm.cxx92
-rw-r--r--sw/source/core/doc/extinput.cxx8
-rw-r--r--sw/source/core/doc/fmtcol.cxx24
-rw-r--r--sw/source/core/doc/ftnidx.cxx4
-rw-r--r--sw/source/core/doc/gctable.cxx22
-rw-r--r--sw/source/core/doc/htmltbl.cxx14
-rw-r--r--sw/source/core/doc/notxtfrm.cxx16
-rw-r--r--sw/source/core/doc/number.cxx36
-rw-r--r--sw/source/core/doc/swserv.cxx22
-rw-r--r--sw/source/core/doc/swstylemanager.cxx8
-rw-r--r--sw/source/core/doc/swstylemanager.hxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx20
-rw-r--r--sw/source/core/doc/tblcpy.cxx36
-rw-r--r--sw/source/core/doc/tblrwcl.cxx134
-rw-r--r--sw/source/core/doc/textboxhelper.cxx10
-rw-r--r--sw/source/core/doc/visiturl.cxx6
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx44
-rw-r--r--sw/source/core/docnode/ndcopy.cxx14
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx8
-rw-r--r--sw/source/core/docnode/ndsect.cxx66
-rw-r--r--sw/source/core/docnode/ndtbl.cxx314
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx74
-rw-r--r--sw/source/core/docnode/node.cxx140
-rw-r--r--sw/source/core/docnode/node2lay.cxx50
-rw-r--r--sw/source/core/docnode/nodes.cxx56
-rw-r--r--sw/source/core/docnode/section.cxx52
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx18
-rw-r--r--sw/source/core/docnode/threadmanager.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx70
-rw-r--r--sw/source/core/draw/dflyobj.cxx6
-rw-r--r--sw/source/core/draw/dpage.cxx12
-rw-r--r--sw/source/core/draw/drawdoc.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx34
-rw-r--r--sw/source/core/edit/acorrect.cxx10
-rw-r--r--sw/source/core/edit/autofmt.cxx44
-rw-r--r--sw/source/core/edit/edatmisc.cxx14
-rw-r--r--sw/source/core/edit/edattr.cxx16
-rw-r--r--sw/source/core/edit/eddel.cxx22
-rw-r--r--sw/source/core/edit/edfcol.cxx10
-rw-r--r--sw/source/core/edit/edfld.cxx20
-rw-r--r--sw/source/core/edit/edfmt.cxx2
-rw-r--r--sw/source/core/edit/edglbldc.cxx14
-rw-r--r--sw/source/core/edit/edglss.cxx8
-rw-r--r--sw/source/core/edit/editsh.cxx42
-rw-r--r--sw/source/core/edit/edlingu.cxx72
-rw-r--r--sw/source/core/edit/ednumber.cxx46
-rw-r--r--sw/source/core/edit/edredln.cxx2
-rw-r--r--sw/source/core/edit/edsect.cxx36
-rw-r--r--sw/source/core/edit/edtab.cxx26
-rw-r--r--sw/source/core/edit/edtox.cxx8
-rw-r--r--sw/source/core/edit/edundo.cxx12
-rw-r--r--sw/source/core/edit/edws.cxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx70
-rw-r--r--sw/source/core/fields/ddefld.cxx8
-rw-r--r--sw/source/core/fields/ddetbl.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx26
-rw-r--r--sw/source/core/fields/expfld.cxx34
-rw-r--r--sw/source/core/fields/fldbas.cxx4
-rw-r--r--sw/source/core/fields/postithelper.cxx14
-rw-r--r--sw/source/core/fields/reffld.cxx24
-rw-r--r--sw/source/core/fields/tblcalc.cxx6
-rw-r--r--sw/source/core/fields/textapi.cxx12
-rw-r--r--sw/source/core/fields/usrfld.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx54
-rw-r--r--sw/source/core/frmedt/fedesc.cxx20
-rw-r--r--sw/source/core/frmedt/fefly1.cxx124
-rw-r--r--sw/source/core/frmedt/feflyole.cxx6
-rw-r--r--sw/source/core/frmedt/feshview.cxx72
-rw-r--r--sw/source/core/frmedt/fetab.cxx90
-rw-r--r--sw/source/core/frmedt/fews.cxx18
-rw-r--r--sw/source/core/frmedt/tblsel.cxx76
-rw-r--r--sw/source/core/graphic/ndgrf.cxx38
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx6
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx2
-rw-r--r--sw/source/core/inc/UndoCore.hxx4
-rw-r--r--sw/source/core/inc/UndoManager.hxx2
-rw-r--r--sw/source/core/inc/UndoTable.hxx4
-rw-r--r--sw/source/core/inc/acorrect.hxx2
-rw-r--r--sw/source/core/inc/blink.hxx2
-rw-r--r--sw/source/core/inc/bodyfrm.hxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx6
-rw-r--r--sw/source/core/inc/cntfrm.hxx4
-rw-r--r--sw/source/core/inc/dbg_lay.hxx2
-rw-r--r--sw/source/core/inc/docfld.hxx24
-rw-r--r--sw/source/core/inc/docsort.hxx10
-rw-r--r--sw/source/core/inc/doctxm.hxx18
-rw-r--r--sw/source/core/inc/drawfont.hxx16
-rw-r--r--sw/source/core/inc/dview.hxx4
-rw-r--r--sw/source/core/inc/flowfrm.hxx16
-rw-r--r--sw/source/core/inc/flyfrm.hxx14
-rw-r--r--sw/source/core/inc/flyfrms.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx38
-rw-r--r--sw/source/core/inc/frminf.hxx2
-rw-r--r--sw/source/core/inc/frmtool.hxx20
-rw-r--r--sw/source/core/inc/ftnboss.hxx4
-rw-r--r--sw/source/core/inc/ftnfrm.hxx4
-rw-r--r--sw/source/core/inc/hffrm.hxx2
-rw-r--r--sw/source/core/inc/layact.hxx2
-rw-r--r--sw/source/core/inc/laycache.hxx4
-rw-r--r--sw/source/core/inc/layfrm.hxx10
-rw-r--r--sw/source/core/inc/mvsave.hxx10
-rw-r--r--sw/source/core/inc/node2lay.hxx4
-rw-r--r--sw/source/core/inc/notxtfrm.hxx12
-rw-r--r--sw/source/core/inc/objectformatter.hxx12
-rw-r--r--sw/source/core/inc/pagefrm.hxx10
-rw-r--r--sw/source/core/inc/prevwpage.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx16
-rw-r--r--sw/source/core/inc/rowfrm.hxx4
-rw-r--r--sw/source/core/inc/scriptinfo.hxx8
-rw-r--r--sw/source/core/inc/sectfrm.hxx10
-rw-r--r--sw/source/core/inc/swcache.hxx12
-rw-r--r--sw/source/core/inc/swfont.hxx70
-rw-r--r--sw/source/core/inc/tabfrm.hxx12
-rw-r--r--sw/source/core/inc/tblrwcl.hxx14
-rw-r--r--sw/source/core/inc/threadmanager.hxx2
-rw-r--r--sw/source/core/inc/txmsrt.hxx2
-rw-r--r--sw/source/core/inc/txtfrm.hxx14
-rw-r--r--sw/source/core/inc/unobookmark.hxx4
-rw-r--r--sw/source/core/inc/unofield.hxx2
-rw-r--r--sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/unosection.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx24
-rw-r--r--sw/source/core/inc/wrong.hxx6
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/anchoredobject.cxx18
-rw-r--r--sw/source/core/layout/atrfrm.cxx108
-rw-r--r--sw/source/core/layout/calcmove.cxx70
-rw-r--r--sw/source/core/layout/colfrm.cxx22
-rw-r--r--sw/source/core/layout/dbg_lay.cxx16
-rw-r--r--sw/source/core/layout/dumpfilter.cxx4
-rw-r--r--sw/source/core/layout/findfrm.cxx152
-rw-r--r--sw/source/core/layout/flowfrm.cxx122
-rw-r--r--sw/source/core/layout/fly.cxx68
-rw-r--r--sw/source/core/layout/flycnt.cxx66
-rw-r--r--sw/source/core/layout/flyincnt.cxx2
-rw-r--r--sw/source/core/layout/flylay.cxx26
-rw-r--r--sw/source/core/layout/frmtool.cxx124
-rw-r--r--sw/source/core/layout/ftnfrm.cxx158
-rw-r--r--sw/source/core/layout/hffrm.cxx2
-rw-r--r--sw/source/core/layout/layact.cxx58
-rw-r--r--sw/source/core/layout/laycache.cxx30
-rw-r--r--sw/source/core/layout/layouter.cxx22
-rw-r--r--sw/source/core/layout/newfrm.cxx44
-rw-r--r--sw/source/core/layout/objectformatter.cxx10
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.cxx4
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx14
-rw-r--r--sw/source/core/layout/pagechg.cxx58
-rw-r--r--sw/source/core/layout/pagedesc.cxx24
-rw-r--r--sw/source/core/layout/paintfrm.cxx234
-rw-r--r--sw/source/core/layout/sectfrm.cxx156
-rw-r--r--sw/source/core/layout/softpagebreak.cxx2
-rw-r--r--sw/source/core/layout/sortedobjs.cxx2
-rw-r--r--sw/source/core/layout/ssfrm.cxx8
-rw-r--r--sw/source/core/layout/tabfrm.cxx132
-rw-r--r--sw/source/core/layout/trvlfrm.cxx92
-rw-r--r--sw/source/core/layout/virtoutp.cxx6
-rw-r--r--sw/source/core/layout/virtoutp.hxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx100
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx10
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx18
-rw-r--r--sw/source/core/ole/ndole.cxx38
-rw-r--r--sw/source/core/para/paratr.cxx6
-rw-r--r--sw/source/core/sw3io/swacorr.cxx2
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx4
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx14
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx12
-rw-r--r--sw/source/core/swg/swblocks.cxx6
-rw-r--r--sw/source/core/table/swnewtable.cxx50
-rw-r--r--sw/source/core/table/swtable.cxx132
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx24
-rw-r--r--sw/source/core/text/atrstck.cxx20
-rw-r--r--sw/source/core/text/blink.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx18
-rw-r--r--sw/source/core/text/frmform.cxx32
-rw-r--r--sw/source/core/text/frminf.cxx2
-rw-r--r--sw/source/core/text/frmpaint.cxx36
-rw-r--r--sw/source/core/text/guess.cxx4
-rw-r--r--sw/source/core/text/guess.hxx4
-rw-r--r--sw/source/core/text/inftxt.cxx132
-rw-r--r--sw/source/core/text/inftxt.hxx20
-rw-r--r--sw/source/core/text/itradj.cxx20
-rw-r--r--sw/source/core/text/itratr.cxx38
-rw-r--r--sw/source/core/text/itratr.hxx22
-rw-r--r--sw/source/core/text/itrcrsr.cxx14
-rw-r--r--sw/source/core/text/itrform2.cxx76
-rw-r--r--sw/source/core/text/itrform2.hxx2
-rw-r--r--sw/source/core/text/itrpaint.cxx24
-rw-r--r--sw/source/core/text/itrpaint.hxx2
-rw-r--r--sw/source/core/text/itrtxt.cxx18
-rw-r--r--sw/source/core/text/itrtxt.hxx16
-rw-r--r--sw/source/core/text/noteurl.cxx2
-rw-r--r--sw/source/core/text/pordrop.hxx4
-rw-r--r--sw/source/core/text/porexp.cxx6
-rw-r--r--sw/source/core/text/porfld.cxx30
-rw-r--r--sw/source/core/text/porfld.hxx6
-rw-r--r--sw/source/core/text/porfly.cxx10
-rw-r--r--sw/source/core/text/porglue.cxx10
-rw-r--r--sw/source/core/text/porlay.cxx22
-rw-r--r--sw/source/core/text/porlay.hxx12
-rw-r--r--sw/source/core/text/porlin.cxx14
-rw-r--r--sw/source/core/text/porlin.hxx2
-rw-r--r--sw/source/core/text/pormulti.cxx124
-rw-r--r--sw/source/core/text/pormulti.hxx4
-rw-r--r--sw/source/core/text/porrst.cxx10
-rw-r--r--sw/source/core/text/portxt.cxx22
-rw-r--r--sw/source/core/text/redlnitr.cxx16
-rw-r--r--sw/source/core/text/redlnitr.hxx8
-rw-r--r--sw/source/core/text/txtcache.cxx4
-rw-r--r--sw/source/core/text/txtcache.hxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx20
-rw-r--r--sw/source/core/text/txtfld.cxx28
-rw-r--r--sw/source/core/text/txtfly.cxx34
-rw-r--r--sw/source/core/text/txtfrm.cxx46
-rw-r--r--sw/source/core/text/txtftn.cxx72
-rw-r--r--sw/source/core/text/txthyph.cxx4
-rw-r--r--sw/source/core/text/txtinit.cxx6
-rw-r--r--sw/source/core/text/txtpaint.hxx4
-rw-r--r--sw/source/core/text/txttab.cxx10
-rw-r--r--sw/source/core/text/wrong.cxx12
-rw-r--r--sw/source/core/text/xmldump.cxx18
-rw-r--r--sw/source/core/tox/tox.cxx14
-rw-r--r--sw/source/core/tox/txmsrt.cxx14
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx14
-rw-r--r--sw/source/core/txtnode/atrfld.cxx70
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx6
-rw-r--r--sw/source/core/txtnode/atrftn.cxx28
-rw-r--r--sw/source/core/txtnode/atrref.cxx14
-rw-r--r--sw/source/core/txtnode/atrtox.cxx6
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx46
-rw-r--r--sw/source/core/txtnode/fntcache.cxx40
-rw-r--r--sw/source/core/txtnode/fntcap.cxx24
-rw-r--r--sw/source/core/txtnode/ndhints.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx204
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx4
-rw-r--r--sw/source/core/txtnode/swfont.cxx36
-rw-r--r--sw/source/core/txtnode/thints.cxx88
-rw-r--r--sw/source/core/txtnode/txatbase.cxx4
-rw-r--r--sw/source/core/txtnode/txatritr.cxx6
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx16
-rw-r--r--sw/source/core/txtnode/txtedt.cxx66
-rw-r--r--sw/source/core/undo/SwUndoField.cxx4
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx4
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx8
-rw-r--r--sw/source/core/undo/docundo.cxx10
-rw-r--r--sw/source/core/undo/rolbck.cxx46
-rw-r--r--sw/source/core/undo/unattr.cxx18
-rw-r--r--sw/source/core/undo/undel.cxx36
-rw-r--r--sw/source/core/undo/undobj.cxx32
-rw-r--r--sw/source/core/undo/undobj1.cxx12
-rw-r--r--sw/source/core/undo/undraw.cxx28
-rw-r--r--sw/source/core/undo/unins.cxx50
-rw-r--r--sw/source/core/undo/unmove.cxx6
-rw-r--r--sw/source/core/undo/unnum.cxx18
-rw-r--r--sw/source/core/undo/unovwr.cxx10
-rw-r--r--sw/source/core/undo/unredln.cxx24
-rw-r--r--sw/source/core/undo/unsect.cxx24
-rw-r--r--sw/source/core/undo/unsort.cxx6
-rw-r--r--sw/source/core/undo/unspnd.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx138
-rw-r--r--sw/source/core/undo/untblk.cxx6
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx4
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx2
-rw-r--r--sw/source/core/unocore/unobkm.cxx30
-rw-r--r--sw/source/core/unocore/unochart.cxx58
-rw-r--r--sw/source/core/unocore/unocoll.cxx48
-rw-r--r--sw/source/core/unocore/unocrsr.cxx16
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx44
-rw-r--r--sw/source/core/unocore/unodraw.cxx88
-rw-r--r--sw/source/core/unocore/unoevent.cxx12
-rw-r--r--sw/source/core/unocore/unofield.cxx78
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx14
-rw-r--r--sw/source/core/unocore/unoframe.cxx282
-rw-r--r--sw/source/core/unocore/unoftn.cxx18
-rw-r--r--sw/source/core/unocore/unoidx.cxx50
-rw-r--r--sw/source/core/unocore/unomap.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx84
-rw-r--r--sw/source/core/unocore/unoobj2.cxx58
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx36
-rw-r--r--sw/source/core/unocore/unoport.cxx24
-rw-r--r--sw/source/core/unocore/unoportenum.cxx28
-rw-r--r--sw/source/core/unocore/unoredline.cxx20
-rw-r--r--sw/source/core/unocore/unoredlines.cxx2
-rw-r--r--sw/source/core/unocore/unorefmk.cxx56
-rw-r--r--sw/source/core/unocore/unosect.cxx46
-rw-r--r--sw/source/core/unocore/unosett.cxx56
-rw-r--r--sw/source/core/unocore/unosrch.cxx100
-rw-r--r--sw/source/core/unocore/unostyle.cxx94
-rw-r--r--sw/source/core/unocore/unotbl.cxx32
-rw-r--r--sw/source/core/unocore/unotext.cxx72
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx10
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx4
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/core/view/viewimp.cxx22
-rw-r--r--sw/source/core/view/viewpg.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx44
-rw-r--r--sw/source/core/view/vnew.cxx34
-rw-r--r--sw/source/core/view/vprint.cxx36
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/ascii/parasc.cxx12
-rw-r--r--sw/source/filter/basflt/fltini.cxx38
-rw-r--r--sw/source/filter/basflt/fltshell.cxx20
-rw-r--r--sw/source/filter/basflt/iodetect.cxx6
-rw-r--r--sw/source/filter/basflt/shellio.cxx56
-rw-r--r--sw/source/filter/html/css1atr.cxx322
-rw-r--r--sw/source/filter/html/htmlatr.cxx280
-rw-r--r--sw/source/filter/html/htmlbas.cxx2
-rw-r--r--sw/source/filter/html/htmlcss1.cxx56
-rw-r--r--sw/source/filter/html/htmlctxt.cxx10
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx6
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx8
-rw-r--r--sw/source/filter/html/htmlfld.cxx28
-rw-r--r--sw/source/filter/html/htmlfldw.cxx18
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx58
-rw-r--r--sw/source/filter/html/htmlform.cxx50
-rw-r--r--sw/source/filter/html/htmlforw.cxx20
-rw-r--r--sw/source/filter/html/htmlftn.cxx12
-rw-r--r--sw/source/filter/html/htmlgrin.cxx30
-rw-r--r--sw/source/filter/html/htmlnum.cxx2
-rw-r--r--sw/source/filter/html/htmlnum.hxx6
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx14
-rw-r--r--sw/source/filter/html/htmlnumwriter.cxx8
-rw-r--r--sw/source/filter/html/htmlplug.cxx20
-rw-r--r--sw/source/filter/html/htmlsect.cxx24
-rw-r--r--sw/source/filter/html/htmltab.cxx140
-rw-r--r--sw/source/filter/html/htmltabw.cxx12
-rw-r--r--sw/source/filter/html/parcss1.cxx18
-rw-r--r--sw/source/filter/html/parcss1.hxx6
-rw-r--r--sw/source/filter/html/svxcss1.cxx68
-rw-r--r--sw/source/filter/html/svxcss1.hxx4
-rw-r--r--sw/source/filter/html/swcss1.hxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx152
-rw-r--r--sw/source/filter/html/swhtml.hxx42
-rw-r--r--sw/source/filter/html/wrthtml.cxx74
-rw-r--r--sw/source/filter/html/wrthtml.hxx30
-rw-r--r--sw/source/filter/inc/fltshell.hxx12
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx4
-rw-r--r--sw/source/filter/writer/writer.cxx28
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx14
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx16
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx70
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx4
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx148
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx8
-rw-r--r--sw/source/filter/ww8/docxexport.cxx28
-rw-r--r--sw/source/filter/ww8/docxexport.hxx4
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx8
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx8
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx42
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx8
-rw-r--r--sw/source/filter/ww8/fields.cxx28
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx64
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx6
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx44
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx4
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx4
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx12
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx2
-rw-r--r--sw/source/filter/ww8/rtfstringbuffer.cxx6
-rw-r--r--sw/source/filter/ww8/styles.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx46
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx4
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx64
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx104
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx8
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx40
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx194
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx30
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx24
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx90
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx4
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx8
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx112
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx28
-rw-r--r--sw/source/filter/ww8/ww8par.cxx260
-rw-r--r--sw/source/filter/ww8/ww8par.hxx52
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx146
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx54
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx26
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx116
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx828
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx164
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx28
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx4
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx16
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx46
-rw-r--r--sw/source/filter/xml/swxml.cxx34
-rw-r--r--sw/source/filter/xml/wrtxml.cxx14
-rw-r--r--sw/source/filter/xml/wrtxml.hxx2
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.cxx18
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx28
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx26
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx66
-rw-r--r--sw/source/filter/xml/xmlimp.hxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx24
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx4
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx4
-rw-r--r--sw/source/filter/xml/xmlitmap.hxx2
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx2
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx26
-rw-r--r--sw/source/filter/xml/xmlscript.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx42
-rw-r--r--sw/source/filter/xml/xmltbli.cxx138
-rw-r--r--sw/source/filter/xml/xmltbli.hxx20
-rw-r--r--sw/source/filter/xml/xmltext.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx6
-rw-r--r--sw/source/filter/xml/xmltexti.cxx56
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx24
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx6
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx8
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx12
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx6
-rw-r--r--sw/source/ui/config/optpage.cxx38
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx38
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx26
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx6
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx14
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx4
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx2
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx26
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx12
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx48
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx4
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/envelp/envfmt.hxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx12
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/envelp/envprt.hxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx28
-rw-r--r--sw/source/ui/envelp/labelexp.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.hxx2
-rw-r--r--sw/source/ui/envelp/labprt.cxx2
-rw-r--r--sw/source/ui/envelp/labprt.hxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx8
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx10
-rw-r--r--sw/source/ui/fldui/flddb.cxx6
-rw-r--r--sw/source/ui/fldui/flddinf.cxx12
-rw-r--r--sw/source/ui/fldui/fldedt.cxx20
-rw-r--r--sw/source/ui/fldui/fldpage.cxx12
-rw-r--r--sw/source/ui/fldui/fldpage.hxx8
-rw-r--r--sw/source/ui/fldui/fldref.cxx8
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx18
-rw-r--r--sw/source/ui/fldui/fldvar.cxx12
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx8
-rw-r--r--sw/source/ui/fldui/javaedit.cxx10
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx46
-rw-r--r--sw/source/ui/frmdlg/cption.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx18
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx68
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx24
-rw-r--r--sw/source/ui/index/cnttab.cxx92
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx30
-rw-r--r--sw/source/ui/misc/docfnote.cxx20
-rw-r--r--sw/source/ui/misc/glossary.cxx12
-rw-r--r--sw/source/ui/misc/insfnote.cxx8
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx16
-rw-r--r--sw/source/ui/misc/outline.cxx20
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/ui/misc/pggrid.cxx2
-rw-r--r--sw/source/ui/misc/srtdlg.cxx12
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx2
-rw-r--r--sw/source/ui/misc/titlepage.cxx10
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/instable.cxx4
-rw-r--r--sw/source/ui/table/tabledlg.cxx38
-rw-r--r--sw/source/ui/table/tautofmt.cxx2
-rw-r--r--sw/source/ui/vba/vbadialog.cxx2
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx28
-rw-r--r--sw/source/ui/vba/vbastyles.cxx8
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx6
-rw-r--r--sw/source/uibase/app/appenv.cxx6
-rw-r--r--sw/source/uibase/app/apphdl.cxx50
-rw-r--r--sw/source/uibase/app/applab.cxx8
-rw-r--r--sw/source/uibase/app/appopt.cxx14
-rw-r--r--sw/source/uibase/app/docsh.cxx34
-rw-r--r--sw/source/uibase/app/docsh2.cxx32
-rw-r--r--sw/source/uibase/app/docshini.cxx10
-rw-r--r--sw/source/uibase/app/docst.cxx22
-rw-r--r--sw/source/uibase/app/docstyle.cxx154
-rw-r--r--sw/source/uibase/app/mainwn.cxx12
-rw-r--r--sw/source/uibase/app/swdll.cxx6
-rw-r--r--sw/source/uibase/app/swmodul1.cxx6
-rw-r--r--sw/source/uibase/app/swmodule.cxx44
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx10
-rw-r--r--sw/source/uibase/config/dbconfig.cxx4
-rw-r--r--sw/source/uibase/config/modcfg.cxx40
-rw-r--r--sw/source/uibase/config/uinums.cxx20
-rw-r--r--sw/source/uibase/config/usrpref.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx58
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx22
-rw-r--r--sw/source/uibase/dbui/maildispatcher.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx14
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx44
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx6
-rw-r--r--sw/source/uibase/dialog/swabstdlg.cxx4
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx16
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx106
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.cxx2
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx14
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx8
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx4
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx56
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx48
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx16
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx176
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx4
-rw-r--r--sw/source/uibase/docvw/frmsidebarwincontainer.cxx2
-rw-r--r--sw/source/uibase/docvw/romenu.cxx16
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx18
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx30
-rw-r--r--sw/source/uibase/fldui/fldwrap.cxx2
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx6
-rw-r--r--sw/source/uibase/inc/PageBreakWin.hxx2
-rw-r--r--sw/source/uibase/inc/caption.hxx2
-rw-r--r--sw/source/uibase/inc/cfgitems.hxx10
-rw-r--r--sw/source/uibase/inc/chrdlg.hxx2
-rw-r--r--sw/source/uibase/inc/colex.hxx4
-rw-r--r--sw/source/uibase/inc/content.hxx8
-rw-r--r--sw/source/uibase/inc/conttree.hxx2
-rw-r--r--sw/source/uibase/inc/convert.hxx4
-rw-r--r--sw/source/uibase/inc/dbtree.hxx2
-rw-r--r--sw/source/uibase/inc/edtwin.hxx2
-rw-r--r--sw/source/uibase/inc/envimg.hxx2
-rw-r--r--sw/source/uibase/inc/envlop.hxx2
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx20
-rw-r--r--sw/source/uibase/inc/frmdlg.hxx2
-rw-r--r--sw/source/uibase/inc/gloshdl.hxx8
-rw-r--r--sw/source/uibase/inc/instable.hxx4
-rw-r--r--sw/source/uibase/inc/labimg.hxx2
-rw-r--r--sw/source/uibase/inc/linenum.hxx2
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx6
-rw-r--r--sw/source/uibase/inc/mailmrge.hxx2
-rw-r--r--sw/source/uibase/inc/numpara.hxx2
-rw-r--r--sw/source/uibase/inc/numprevw.hxx4
-rw-r--r--sw/source/uibase/inc/optload.hxx2
-rw-r--r--sw/source/uibase/inc/pgfnote.hxx2
-rw-r--r--sw/source/uibase/inc/pggrid.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx4
-rw-r--r--sw/source/uibase/inc/regionsw.hxx2
-rw-r--r--sw/source/uibase/inc/srcedtw.hxx2
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx12
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx6
-rw-r--r--sw/source/uibase/inc/swuiidxmrk.hxx2
-rw-r--r--sw/source/uibase/inc/swuipardlg.hxx2
-rw-r--r--sw/source/uibase/inc/swwrtshitem.hxx2
-rw-r--r--sw/source/uibase/inc/tablemgr.hxx4
-rw-r--r--sw/source/uibase/inc/tautofmt.hxx2
-rw-r--r--sw/source/uibase/inc/tmpdlg.hxx2
-rw-r--r--sw/source/uibase/inc/toxmgr.hxx22
-rw-r--r--sw/source/uibase/inc/uiitems.hxx16
-rw-r--r--sw/source/uibase/inc/uivwimp.hxx4
-rw-r--r--sw/source/uibase/inc/unoatxt.hxx2
-rw-r--r--sw/source/uibase/inc/unomod.hxx2
-rw-r--r--sw/source/uibase/inc/unotools.hxx4
-rw-r--r--sw/source/uibase/inc/unotxvw.hxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx60
-rw-r--r--sw/source/uibase/index/toxmgr.cxx18
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx14
-rw-r--r--sw/source/uibase/lingu/hyp.cxx2
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx4
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx8
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx10
-rw-r--r--sw/source/uibase/misc/glshell.cxx6
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx44
-rw-r--r--sw/source/uibase/ribbar/conrect.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx4
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx12
-rw-r--r--sw/source/uibase/ribbar/tbxanchr.cxx10
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx8
-rw-r--r--sw/source/uibase/shells/annotsh.cxx32
-rw-r--r--sw/source/uibase/shells/basesh.cxx66
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx8
-rw-r--r--sw/source/uibase/shells/drawsh.cxx16
-rw-r--r--sw/source/uibase/shells/drformsh.cxx2
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx40
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx6
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx16
-rw-r--r--sw/source/uibase/shells/frmsh.cxx34
-rw-r--r--sw/source/uibase/shells/grfsh.cxx14
-rw-r--r--sw/source/uibase/shells/langhelper.cxx12
-rw-r--r--sw/source/uibase/shells/mediash.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx30
-rw-r--r--sw/source/uibase/shells/textfld.cxx26
-rw-r--r--sw/source/uibase/shells/textglos.cxx2
-rw-r--r--sw/source/uibase/shells/textidx.cxx12
-rw-r--r--sw/source/uibase/shells/textsh.cxx16
-rw-r--r--sw/source/uibase/shells/textsh1.cxx20
-rw-r--r--sw/source/uibase/shells/textsh2.cxx16
-rw-r--r--sw/source/uibase/shells/txtattr.cxx14
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx16
-rw-r--r--sw/source/uibase/shells/txtnum.cxx22
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.cxx20
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx10
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.cxx8
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx32
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx10
-rw-r--r--sw/source/uibase/sidebar/SwPanelFactory.cxx10
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx10
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx10
-rw-r--r--sw/source/uibase/table/chartins.cxx4
-rw-r--r--sw/source/uibase/table/tablemgr.cxx2
-rw-r--r--sw/source/uibase/table/tablepg.hxx6
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx38
-rw-r--r--sw/source/uibase/uiview/pview.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx6
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx14
-rw-r--r--sw/source/uibase/uiview/view.cxx52
-rw-r--r--sw/source/uibase/uiview/view0.cxx4
-rw-r--r--sw/source/uibase/uiview/view1.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx28
-rw-r--r--sw/source/uibase/uiview/viewcoll.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx20
-rw-r--r--sw/source/uibase/uiview/viewfunc.hxx4
-rw-r--r--sw/source/uibase/uiview/viewling.cxx16
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx6
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx6
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx22
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx26
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx12
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx26
-rw-r--r--sw/source/uibase/uno/SwXFilterOptions.cxx6
-rw-r--r--sw/source/uibase/uno/dlelstnr.cxx10
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx52
-rw-r--r--sw/source/uibase/uno/unodefaults.cxx2
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx12
-rw-r--r--sw/source/uibase/uno/unofreg.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx22
-rw-r--r--sw/source/uibase/uno/unomod.cxx20
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx124
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx46
-rw-r--r--sw/source/uibase/utlui/content.cxx92
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx106
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
-rw-r--r--sw/source/uibase/utlui/initui.cxx16
-rw-r--r--sw/source/uibase/utlui/navipi.cxx64
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx8
-rw-r--r--sw/source/uibase/utlui/prcntfld.cxx2
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx16
-rw-r--r--sw/source/uibase/utlui/unotools.cxx8
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx2
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx8
-rw-r--r--sw/source/uibase/wrtsh/move.cxx16
-rw-r--r--sw/source/uibase/wrtsh/select.cxx10
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx46
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx18
-rw-r--r--sw/source/uibase/wrtsh/wrtsh3.cxx6
-rw-r--r--sw/source/uibase/wrtsh/wrtundo.cxx2
896 files changed, 11260 insertions, 11260 deletions
diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx
index d8331acb9cf9..cba6d26e545d 100644
--- a/sw/inc/HandleAnchorNodeChg.hxx
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -49,7 +49,7 @@ public:
*/
SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat,
const SwFormatAnchor& _rNewAnchorFormat,
- SwFlyFrm* _pKeepThisFlyFrm = 0L );
+ SwFlyFrm* _pKeepThisFlyFrm = nullptr );
/** calls <SwFlyFrameFormat::MakeFrms>, if re-creation of fly frames is necessary.
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
index 206617f0a034..d30d4c3aa5a3 100644
--- a/sw/inc/IDocumentUndoRedo.hxx
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -157,7 +157,7 @@ public:
@return true if there is a Redo action, false if none
*/
virtual bool GetFirstRedoInfo(OUString *const o_pStr,
- SwUndoId *const o_pId = 0) const = 0;
+ SwUndoId *const o_pId = nullptr) const = 0;
/** Get comments of Redo actions.
@return comments of all top-level Redo actions.
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index aab0a46f9194..dbf4ce38d1b6 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -92,7 +92,7 @@ struct FieldShadowState
const SwPostItField* mpShadowField;
bool bCursor;
bool bMouse;
- FieldShadowState(): mpShadowField(0),bCursor(false),bMouse(false)
+ FieldShadowState(): mpShadowField(nullptr),bCursor(false),bMouse(false)
{
}
};
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index e549f42d79c8..a47051303379 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -206,7 +206,7 @@ public:
// Invalidate state of whole tree. If an action is open, this call
// is processed when the last action ends.
void InvalidateStates( AccessibleStates _nStates,
- const SwFrm* _pFrm = 0 );
+ const SwFrm* _pFrm = nullptr );
void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow );
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 695beed6f7ae..58f42512ca20 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -163,7 +163,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
provided the current object rectangle is taken.
*/
void AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
- const SwRect* _pNewObjRect = 0L );
+ const SwRect* _pNewObjRect = nullptr );
/** method to notify background of drawing object
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 741534d2e7b1..c8a1acd880ad 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -34,7 +34,7 @@ class BigPtrEntry
BlockInfo* pBlock;
sal_uInt16 nOffset;
public:
- BigPtrEntry() : pBlock(0), nOffset(0) {}
+ BigPtrEntry() : pBlock(nullptr), nOffset(0) {}
virtual ~BigPtrEntry() {}
inline sal_uLong GetPos() const;
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 436649eb5eb8..491920e1fb13 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -137,11 +137,11 @@ struct SwCalcExp : public SwHash
const SwFieldType* pFieldType;
SwCalcExp( const OUString& rStr, const SwSbxValue& rVal,
- const SwFieldType* pFieldType = 0 );
+ const SwFieldType* pFieldType = nullptr );
};
SwHash* Find( const OUString& rSrch, SwHash* const * ppTable,
- sal_uInt16 nTableSize, sal_uInt16* pPos = 0 );
+ sal_uInt16 nTableSize, sal_uInt16* pPos = nullptr );
void DeleteHashTable( SwHash** ppTable, sal_uInt16 nTableSize );
@@ -203,12 +203,12 @@ public:
static bool Str2Double( const OUString& rStr, sal_Int32& rPos,
double& rVal,
- LocaleDataWrapper const*const pData = 0 );
+ LocaleDataWrapper const*const pData = nullptr );
static bool Str2Double( const OUString& rStr, sal_Int32& rPos,
double& rVal, SwDoc *const pDoc );
SW_DLLPUBLIC static bool IsValidVarName( const OUString& rStr,
- OUString* pValidName = 0 );
+ OUString* pValidName = nullptr );
};
#endif
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 4eb89f1e9c74..7a4d27ce2191 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -58,7 +58,7 @@ public:
TYPEINFO_OVERRIDE();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
static inline const CommandStruct* GetCmds() { return aCmds; }
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index 3f7ae81a3f52..ae7773deb4b0 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -37,7 +37,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
inline SwTableBoxNumFormat& operator=( const SwTableBoxNumFormat& rAttr )
{
@@ -61,7 +61,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
inline void ChgDefinedIn( const SwModify* pNew )
@@ -86,7 +86,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
inline SwTableBoxValue& operator=( const SwTableBoxValue& rCmp )
{
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index 11386ef6d48e..a470914ddb8f 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -56,29 +56,29 @@ class SwTableFormula
typedef void (SwTableFormula:: *FnScanFormula)( const SwTable&, OUString&,
OUString&, OUString*, void* ) const;
- void BoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void PtrToBoxNms( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void RelNmsToBoxNms( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void RelBoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void BoxNmsToRelNm( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void _MakeFormula( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void _GetFormulaBoxes( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void _HasValidBoxes( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
- void _SplitMergeBoxNm( const SwTable&, OUString&, OUString&, OUString* = 0,
- void* pPara = 0 ) const;
+ void BoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void PtrToBoxNms( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void RelNmsToBoxNms( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void RelBoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void BoxNmsToRelNm( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void _MakeFormula( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void _GetFormulaBoxes( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void _HasValidBoxes( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
+ void _SplitMergeBoxNm( const SwTable&, OUString&, OUString&, OUString* = nullptr,
+ void* pPara = nullptr ) const;
static void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd,
SwSelBoxes& rBoxes );
OUString ScanString( FnScanFormula fnFormula, const SwTable& rTable,
- void* = 0 ) const;
+ void* = nullptr ) const;
static const SwTable* FindTable( SwDoc& rDoc, const OUString& rNm );
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index cda2ccf0296d..6de3f8a82452 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -121,8 +121,8 @@ struct SwContentAtPos
SwContentAtPos( int eGetAtPos = 0xffff )
: eContentAtPos( (IsAttrAtPos)eGetAtPos )
{
- aFnd.pField = 0;
- pFndTextAttr = 0;
+ aFnd.pField = nullptr;
+ pFndTextAttr = nullptr;
nDist = 0; // #i23726#
}
@@ -257,7 +257,7 @@ private:
SAL_DLLPRIVATE bool LRMargin( bool, bool bAPI = false );
SAL_DLLPRIVATE bool IsAtLRMargin( bool, bool bAPI = false ) const;
- SAL_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
+ SAL_DLLPRIVATE short GetTextDirection( const Point* pPt = nullptr ) const;
SAL_DLLPRIVATE bool isInHiddenTextFrm(SwShellCrsr* pShellCrsr);
@@ -300,7 +300,7 @@ protected:
public:
TYPEINFO_OVERRIDE();
- SwCrsrShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = 0 );
+ SwCrsrShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = nullptr );
// disguised copy constructor
SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pWin );
virtual ~SwCrsrShell();
@@ -378,14 +378,14 @@ public:
sal_uLong Find( const SwTextFormatColl& rFormatColl,
SwDocPositions eStart, SwDocPositions eEnd,
bool& bCancel,
- FindRanges eRng, const SwTextFormatColl* pReplFormat = 0 );
+ FindRanges eRng, const SwTextFormatColl* pReplFormat = nullptr );
sal_uLong Find( const SfxItemSet& rSet, bool bNoCollections,
SwDocPositions eStart, SwDocPositions eEnd,
bool& bCancel,
FindRanges eRng,
- const css::util::SearchOptions* pSearchOpt = 0,
- const SfxItemSet* rReplSet = 0 );
+ const css::util::SearchOptions* pSearchOpt = nullptr,
+ const SfxItemSet* rReplSet = nullptr );
// Position the Cursor
// return values:
@@ -634,10 +634,10 @@ public:
const SwShellCrsr* getShellCrsr( bool bBlock ) const
{ return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); }
- bool IsBlockMode() const { return 0 != m_pBlockCrsr; }
+ bool IsBlockMode() const { return nullptr != m_pBlockCrsr; }
// is the Crsr in a table and is the selection over 2 columns
- bool IsTableMode() const { return 0 != m_pTableCrsr; }
+ bool IsTableMode() const { return nullptr != m_pTableCrsr; }
const SwShellTableCrsr* GetTableCrsr() const { return m_pTableCrsr; }
SwShellTableCrsr* GetTableCrsr() { return m_pTableCrsr; }
@@ -656,10 +656,10 @@ public:
bool bInHeader = true );
// is point of cursor in header/footer. pbInHeader return true if it is
// in a headerframe otherwise in a footerframe
- bool IsInHeaderFooter( bool* pbInHeader = 0 ) const;
+ bool IsInHeaderFooter( bool* pbInHeader = nullptr ) const;
- bool GotoNextTOXBase( const OUString* = 0 );
- bool GotoPrevTOXBase( const OUString* = 0 );
+ bool GotoNextTOXBase( const OUString* = nullptr );
+ bool GotoPrevTOXBase( const OUString* = nullptr );
bool GotoTOXMarkBase();
// jump to the next or previous index entry
bool GotoNxtPrvTOXMark( bool bNext = true );
@@ -721,7 +721,7 @@ public:
bool GoNextSentence();
bool GoStartSentence();
bool GoEndSentence();
- bool SelectWord( const Point* pPt = 0 );
+ bool SelectWord( const Point* pPt = nullptr );
bool ExpandToSentenceBorders();
// get position from current cursor
@@ -766,7 +766,7 @@ public:
bool GetContentAtPos( const Point& rPt,
SwContentAtPos& rContentAtPos,
bool bSetCrsr = false,
- SwRect* pFieldRect = 0 );
+ SwRect* pFieldRect = nullptr );
const SwPostItField* GetPostItFieldAtCursor() const;
@@ -784,15 +784,15 @@ public:
bool IsPageAtPos( const Point &rPt ) const;
- bool SelectTextAttr( sal_uInt16 nWhich, bool bExpand, const SwTextAttr* pAttr = 0 );
+ bool SelectTextAttr( sal_uInt16 nWhich, bool bExpand, const SwTextAttr* pAttr = nullptr );
bool GotoINetAttr( const SwTextINetFormat& rAttr );
const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const;
bool SelectText( const sal_Int32 nStart,
const sal_Int32 nEnd );
- bool CheckTableBoxContent( const SwPosition* pPos = 0 );
- void SaveTableBoxContent( const SwPosition* pPos = 0 );
+ bool CheckTableBoxContent( const SwPosition* pPos = nullptr );
+ void SaveTableBoxContent( const SwPosition* pPos = nullptr );
void ClearTableBoxContent();
bool EndAllTableBoxEdit();
@@ -811,9 +811,9 @@ public:
const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, bool bSelect = false );
// is cursor or the point in/over a vertical formatted text?
- bool IsInVerticalText( const Point* pPt = 0 ) const;
+ bool IsInVerticalText( const Point* pPt = nullptr ) const;
// is cursor or the point in/over a right to left formatted text?
- bool IsInRightToLeftText( const Point* pPt = 0 ) const;
+ bool IsInRightToLeftText( const Point* pPt = nullptr ) const;
static void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
bool bColumnChange();
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index ca7fc51e3540..07b984077d3d 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -178,7 +178,7 @@ struct SwMergeDescriptor
bPrintAsync( false ),
bCreateSingleFile( false ),
bSubjectIsFilename( false ),
- pMailMergeConfigItem(0)
+ pMailMergeConfigItem(nullptr)
{}
};
@@ -357,7 +357,7 @@ public:
the filename returned by a file picker and additional settings dialog.
In case of success it returns the registered name, otherwise an empty string.
*/
- static OUString LoadAndRegisterDataSource(SwDocShell* pDocShell = 0);
+ static OUString LoadAndRegisterDataSource(SwDocShell* pDocShell = nullptr);
/**
Loads a data source from file and registers it.
@@ -367,16 +367,16 @@ public:
*/
static OUString LoadAndRegisterDataSource(const DBConnURITypes type, const css::uno::Any &rUnoURI,
const css::uno::Reference < css::beans::XPropertySet > *pSettings,
- const OUString &rURI, const OUString *pPrefix = 0, const OUString *pDestDir = 0,
- SwDocShell* pDocShell = 0);
+ const OUString &rURI, const OUString *pPrefix = nullptr, const OUString *pDestDir = nullptr,
+ SwDocShell* pDocShell = nullptr);
/**
Loads a data source from file and registers it.
Convenience function, which calls GetDBunoURI and has just one mandatory parameter.
In case of success it returns the registered name, otherwise an empty string.
*/
- static OUString LoadAndRegisterDataSource(const OUString& rURI, const OUString *pPrefix = 0, const OUString *pDestDir = 0,
- const css::uno::Reference < css::beans::XPropertySet > *pSettings = 0);
+ static OUString LoadAndRegisterDataSource(const OUString& rURI, const OUString *pPrefix = nullptr, const OUString *pDestDir = nullptr,
+ const css::uno::Reference < css::beans::XPropertySet > *pSettings = nullptr);
/// Load the embedded data source of the document and also register it.
void LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const SwDocShell& rDocShell);
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index b5ca6c211e0a..1b3d20bb17b4 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -400,8 +400,8 @@ class SwDrawContact : public SwContact
virtual SdrObject* GetMaster() override;
virtual void SetMaster( SdrObject* _pNewMaster ) override;
- const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = 0L ) const;
- SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = 0L );
+ const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = nullptr ) const;
+ SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = nullptr );
inline const SwPageFrm* GetPageFrm() const
{
@@ -421,7 +421,7 @@ class SwDrawContact : public SwContact
/** Inserts SdrObject in the arrays of the layout ((SwPageFrm and SwFrm).
The anchor is determined according to the attribute SwFormatAnchor.
If required the object gets unregistered with the old anchor. */
- void ConnectToLayout( const SwFormatAnchor *pAnch = 0 );
+ void ConnectToLayout( const SwFormatAnchor *pAnch = nullptr );
/** method to insert 'master' drawing object
into drawing page */
void InsertMasterIntoDrawPage();
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 46ee9e2aa953..b13679c5b73e 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -398,7 +398,7 @@ private:
SwFlyFrameFormat* _MakeFlySection( const SwPosition& rAnchPos,
const SwContentNode& rNode, RndStdIds eRequestId,
const SfxItemSet* pFlyAttrSet,
- SwFrameFormat* = 0 );
+ SwFrameFormat* = nullptr );
sal_Int8 SetFlyFrmAnchor( SwFrameFormat& rFlyFormat, SfxItemSet& rSet, bool bNewFrms );
typedef SwFormat* (SwDoc:: *FNCopyFormat)( const OUString&, SwFormat*, bool, bool );
@@ -626,7 +626,7 @@ public:
have to be surrounded completely by css::awt::Selection.
( Start < Pos < End ) !!!
(Required for Writers.) */
- SwPosFlyFrms GetAllFlyFormats( const SwPaM* = 0,
+ SwPosFlyFrms GetAllFlyFormats( const SwPaM* = nullptr,
bool bDrawAlso = false,
bool bAsCharAlso = false ) const;
@@ -649,12 +649,12 @@ public:
*/
SwFlyFrameFormat* MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
- const SfxItemSet* pSet = 0,
- SwFrameFormat *pParent = 0,
+ const SfxItemSet* pSet = nullptr,
+ SwFrameFormat *pParent = nullptr,
bool bCalledFromShell = false );
SwFlyFrameFormat* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
- const SwSelBoxes* pSelBoxes = 0,
- SwFrameFormat *pParent = 0 );
+ const SwSelBoxes* pSelBoxes = nullptr,
+ SwFrameFormat *pParent = nullptr );
//UUUU Helper that checks for unique items for DrawingLayer items of type NameOrIndex
// and evtl. corrects that items to ensure unique names for that type. This call may
@@ -666,7 +666,7 @@ public:
bool SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet );
bool SetFrameFormatToFly( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFormat,
- SfxItemSet* pSet = 0, bool bKeepOrient = false );
+ SfxItemSet* pSet = nullptr, bool bKeepOrient = false );
void SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat,
const OUString& sNewTitle );
void SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat,
@@ -690,7 +690,7 @@ public:
css::uno::Any
Spell( SwPaM&, css::uno::Reference< css::linguistic2::XSpellChecker1 > &,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
- SwConversionArgs *pConvArgs = 0 ) const;
+ SwConversionArgs *pConvArgs = nullptr ) const;
css::uno::Reference< css::linguistic2::XHyphenatedWord >
Hyphenate( SwPaM *pPam, const Point &rCrsrPos,
@@ -708,9 +708,9 @@ public:
bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
short GetTextDirection( const SwPosition& rPos,
- const Point* pPt = 0 ) const;
+ const Point* pPt = nullptr ) const;
bool IsInVerticalText( const SwPosition& rPos,
- const Point* pPt = 0 ) const;
+ const Point* pPt = nullptr ) const;
// Database and DB-Manager
void SetDBManager( SwDBManager* pNewMgr ) { mpDBManager = pNewMgr; }
@@ -721,7 +721,7 @@ public:
// Find out which databases are used by fields.
void GetAllUsedDB( std::vector<OUString>& rDBNameList,
- const std::vector<OUString>* pAllDBNames = 0 );
+ const std::vector<OUString>* pAllDBNames = nullptr );
void ChgDBData( const SwDBData& rNewData );
SwDBData GetDBData();
@@ -905,7 +905,7 @@ public:
// travel over PaM Ring
bool InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
- SwPaM& rPaM, SwCrsrShell* pShell = 0);
+ SwPaM& rPaM, SwCrsrShell* pShell = nullptr);
/** get the set of printable pages for the XRenderable API by
evaluating the respective settings (see implementation) */
@@ -945,7 +945,7 @@ public:
void DelPageDesc( const OUString & rName, bool bBroadcast = false);
void DelPageDesc( size_t i, bool bBroadcast = false );
void PreDelPageDesc(SwPageDesc * pDel);
- SwPageDesc* MakePageDesc(const OUString &rName, const SwPageDesc* pCpy = 0,
+ SwPageDesc* MakePageDesc(const OUString &rName, const SwPageDesc* pCpy = nullptr,
bool bRegardLanguage = true,
bool bBroadcast = false);
void BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamily,
@@ -965,11 +965,11 @@ public:
// Insert/Renew table/indes
SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
const SwTOXBase& rTOX,
- const SfxItemSet* pSet = 0,
+ const SfxItemSet* pSet = nullptr,
bool bExpand = false );
const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
- const SfxItemSet* pSet = 0 );
+ const SfxItemSet* pSet = nullptr );
static SwTOXBase* GetCurTOX( const SwPosition& rPos );
static const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX);
@@ -1103,7 +1103,7 @@ public:
// add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
sal_uInt16 MakeNumRule( const OUString &rName,
- const SwNumRule* pCpy = 0,
+ const SwNumRule* pCpy = nullptr,
bool bBroadcast = false,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
@@ -1114,7 +1114,7 @@ public:
bool RenameNumRule(const OUString & aOldName, const OUString & aNewName,
bool bBroadcast = false);
bool DelNumRule( const OUString& rName, bool bBroadCast = false );
- OUString GetUniqueNumRuleName( const OUString* pChkStr = 0, bool bAutoNum = true ) const;
+ OUString GetUniqueNumRuleName( const OUString* pChkStr = nullptr, bool bAutoNum = true ) const;
void UpdateNumRule(); // Update all invalids.
void ChgNumRuleFormats( const SwNumRule& rRule );
@@ -1123,9 +1123,9 @@ public:
// Goto next/previous on same level.
static bool GotoNextNum( SwPosition&, bool bOverUpper = true,
- sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+ sal_uInt8* pUpper = nullptr, sal_uInt8* pLower = nullptr );
static bool GotoPrevNum( SwPosition&, bool bOverUpper = true,
- sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+ sal_uInt8* pUpper = nullptr, sal_uInt8* pLower = nullptr );
/** Searches for a text node with a numbering rule.
@@ -1190,8 +1190,8 @@ public:
const SwTable* InsertTable( const SwInsertTableOptions& rInsTableOpts, // HEADLINE_NO_BORDER
const SwPosition& rPos, sal_uInt16 nRows,
sal_uInt16 nCols, short eAdjust,
- const SwTableAutoFormat* pTAFormat = 0,
- const std::vector<sal_uInt16> *pColArr = 0,
+ const SwTableAutoFormat* pTAFormat = nullptr,
+ const std::vector<sal_uInt16> *pColArr = nullptr,
bool bCalledFromShell = false,
bool bNewModel = true );
@@ -1203,7 +1203,7 @@ public:
const SwTable* TextToTable( const SwInsertTableOptions& rInsTableOpts, // HEADLINE_NO_BORDER,
const SwPaM& rRange, sal_Unicode cCh,
short eAdjust,
- const SwTableAutoFormat* = 0 );
+ const SwTableAutoFormat* = nullptr );
// text to table conversion - API support
const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
@@ -1238,13 +1238,13 @@ public:
// From FEShell (for Undo and BModified).
static void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
- const SwCellFrm* pBoxFrm = 0 );
+ const SwCellFrm* pBoxFrm = nullptr );
void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
- const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
+ const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = nullptr );
static void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
- const SwCellFrm* pBoxFrm = 0 );
+ const SwCellFrm* pBoxFrm = nullptr );
void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* pCrsr,
- const SwCellFrm* pBoxFrm = 0 );
+ const SwCellFrm* pBoxFrm = nullptr );
// Direct access for UNO.
void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
@@ -1276,15 +1276,15 @@ public:
void ClearLineNumAttrs( SwPosition & rPos );
bool InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
- const SwTable* pCpyTable = 0, bool bCpyName = false,
+ const SwTable* pCpyTable = nullptr, bool bCpyName = false,
bool bCorrPos = false );
bool UnProtectCells( const OUString& rTableName );
bool UnProtectCells( const SwSelBoxes& rBoxes );
bool UnProtectTables( const SwPaM& rPam );
bool HasTableAnyProtection( const SwPosition* pPos,
- const OUString* pTableName = 0,
- bool* pFullTableProtection = 0 );
+ const OUString* pTableName = nullptr,
+ bool* pFullTableProtection = nullptr );
// Split table at baseline position, i.e. create a new table.
bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0,
@@ -1312,7 +1312,7 @@ public:
/** @return names of all references that are set in document.
If array pointer is 0 return only whether a RefMark is set in document. */
- sal_uInt16 GetRefMarks( std::vector<OUString>* = 0 ) const;
+ sal_uInt16 GetRefMarks( std::vector<OUString>* = nullptr ) const;
// Insert label. If a FlyFormat is created, return it.
SwFlyFrameFormat* InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
@@ -1339,18 +1339,18 @@ public:
// insert section (the ODF kind of section, not the nodesarray kind)
SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &,
- SwTOXBase const*const pTOXBase = 0,
- SfxItemSet const*const pAttr = 0, bool const bUpdate = true);
+ SwTOXBase const*const pTOXBase = nullptr,
+ SfxItemSet const*const pAttr = nullptr, bool const bUpdate = true);
static sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
- const SwNode** ppSttNd = 0 );
+ const SwNode** ppSttNd = nullptr );
static SwSection* GetCurrSection( const SwPosition& rPos );
SwSectionFormats& GetSections() { return *mpSectionFormatTable; }
const SwSectionFormats& GetSections() const { return *mpSectionFormatTable; }
SwSectionFormat *MakeSectionFormat( SwSectionFormat *pDerivedFrom );
void DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes = false );
void UpdateSection(size_t const nSect, SwSectionData &,
- SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false);
- OUString GetUniqueSectionName( const OUString* pChkStr = 0 ) const;
+ SfxItemSet const*const = nullptr, bool const bPreventLinkUpdate = false);
+ OUString GetUniqueSectionName( const OUString* pChkStr = nullptr ) const;
/* @@@MAINTAINABILITY-HORROR@@@
The model should not have anything to do with a shell.
@@ -1404,11 +1404,11 @@ public:
const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const;
// Call into intransparent Basic; expect possible Return String.
- bool ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* pArgs = 0 );
+ bool ExecMacro( const SvxMacro& rMacro, OUString* pRet = nullptr, SbxArray* pArgs = nullptr );
// Call into intransparent Basic / JavaScript.
sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
- bool bChkPtr = false, SbxArray* pArgs = 0 );
+ bool bChkPtr = false, SbxArray* pArgs = nullptr );
/** Adjust left margin via object bar (similar to adjustment of numerations).
One can either change the margin "by" adding or subtracting a given
@@ -1431,10 +1431,10 @@ public:
// Create sub-documents according to given collection.
// If no collection is given, use chapter styles for 1st level.
bool GenerateGlobalDoc( const OUString& rPath,
- const SwTextFormatColl* pSplitColl = 0 );
+ const SwTextFormatColl* pSplitColl = nullptr );
bool GenerateGlobalDoc( const OUString& rPath, int nOutlineLevel = 0 );
bool GenerateHTMLDoc( const OUString& rPath,
- const SwTextFormatColl* pSplitColl = 0 );
+ const SwTextFormatColl* pSplitColl = nullptr );
bool GenerateHTMLDoc( const OUString& rPath, int nOutlineLevel = 0 );
// Compare two documents.
@@ -1448,7 +1448,7 @@ public:
// For AutoFormat: with Undo/Redlining.
void SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nPoolId,
- const SfxItemSet* pSet = 0 );
+ const SfxItemSet* pSet = nullptr );
void SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& );
// Only for SW-textbloxks! Does not pay any attention to layout!
@@ -1638,7 +1638,7 @@ public:
* Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5
*/
- void dumpAsXml(struct _xmlTextWriter* = 0) const;
+ void dumpAsXml(struct _xmlTextWriter* = nullptr) const;
std::set<Color> GetDocColors();
std::vector< std::weak_ptr<SwUnoCrsr> > mvUnoCrsrTbl;
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index d319c70aaa19..07246188f681 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -199,7 +199,7 @@ public:
bool Insert( SwRangeRedline* p, bool bIns = true );
bool Insert( SwRangeRedline* p, sal_uInt16& rInsPos, bool bIns = true );
- bool InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsPos = 0 );
+ bool InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsPos = nullptr );
void Remove( sal_uInt16 nPos );
bool Remove( const SwRangeRedline* p );
diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx
index 35827e09a4b2..cf073a9398ba 100644
--- a/sw/inc/docfac.hxx
+++ b/sw/inc/docfac.hxx
@@ -29,7 +29,7 @@ protected:
SwDoc* pDoc;
public:
- SwDocFac( SwDoc *pDoc = 0 );
+ SwDocFac( SwDoc *pDoc = nullptr );
~SwDocFac();
/// Document is created after calling Read(...).
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index a5871daa85e5..bf20d9ba2015 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -127,19 +127,19 @@ class SW_DLLPUBLIC SwDocShell
sal_uInt16 nMask,
const bool bNew,
const OString& sPageId = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
const bool bBasic = false );
SAL_DLLPRIVATE bool Delete(const OUString &rName, sal_uInt16 nFamily);
SAL_DLLPRIVATE bool Hide(const OUString &rName, sal_uInt16 nFamily, bool bHidden);
SAL_DLLPRIVATE sal_uInt16 ApplyStyles(const OUString &rName,
const sal_uInt16 nFamily,
- SwWrtShell* pShell = 0,
+ SwWrtShell* pShell = nullptr,
sal_uInt16 nMode = 0);
SAL_DLLPRIVATE sal_uInt16 DoWaterCan( const OUString &rName, sal_uInt16 nFamily);
- SAL_DLLPRIVATE sal_uInt16 UpdateStyle(const OUString &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0);
+ SAL_DLLPRIVATE sal_uInt16 UpdateStyle(const OUString &rName, sal_uInt16 nFamily, SwWrtShell* pShell = nullptr);
SAL_DLLPRIVATE sal_uInt16 MakeByExample(const OUString &rName,
- sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0);
+ sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = nullptr);
SAL_DLLPRIVATE void SubInitNew(); ///< for InitNew and HtmlSourceMode.
@@ -192,7 +192,7 @@ public:
void ExecStyleSheet(SfxRequest&);
void GetState(SfxItemSet &);
- void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
+ void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = nullptr );
/// returns Doc. But be careful!
inline SwDoc* GetDoc() { return m_pDoc; }
@@ -229,7 +229,7 @@ public:
/// For inserting document.
Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
- SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0);
+ SwCrsrShell* pCrsrSh = nullptr, SwPaM* pPaM = nullptr);
#if defined WNT
virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType,
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index d18bf72b8a4f..34b083efeb77 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -140,7 +140,7 @@ public:
OUString Expand( sal_uInt32 nFormat, short nOff, sal_uInt16 const nPageNumber,
sal_uInt16 const nMaxPage, const OUString& ) const;
void ChangeExpansion( SwDoc* pDoc,
- bool bVirtPageNum, const sal_Int16* pNumFormat = 0 );
+ bool bVirtPageNum, const sal_Int16* pNumFormat = nullptr );
virtual SwFieldType* Copy() const override;
};
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index a0a47ce8a719..cbb00fd0fab4 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -53,7 +53,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > createUnoPage() override;
protected:
- void lateInit(const SwDPage& rPage, SwDrawModel* pNewModel = 0);
+ void lateInit(const SwDPage& rPage, SwDrawModel* pNewModel = nullptr);
private:
SwDPage(const SwDPage& rSrcPage);
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
index 42b3f0b1bf37..53ba14d7497a 100644
--- a/sw/inc/edglbldc.hxx
+++ b/sw/inc/edglbldc.hxx
@@ -48,9 +48,9 @@ public:
/// Query contents.
GlobalDocContentType GetType() const { return eType; }
const SwSection* GetSection() const
- { return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
+ { return GLBLDOC_SECTION == eType ? PTR.pSect : nullptr; }
const SwTOXBase* GetTOX() const
- { return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
+ { return GLBLDOC_TOXBASE == eType ? PTR.pTOX : nullptr; }
sal_uLong GetDocPos() const { return nDocPos; }
/// For sorting.
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 1469997b2b44..74605baa5749 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -156,7 +156,7 @@ class SW_DLLPUBLIC SwEditShell : public SwCrsrShell
that will be used by GetGraphic() and GetGraphicSize(). */
SAL_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
- SAL_DLLPRIVATE void DeleteSel( SwPaM& rPam, bool* pUndo = 0 );
+ SAL_DLLPRIVATE void DeleteSel( SwPaM& rPam, bool* pUndo = nullptr );
SAL_DLLPRIVATE void _SetSectionAttr( SwSectionFormat& rSectFormat, const SfxItemSet& rSet );
@@ -200,13 +200,13 @@ public:
void SetLinkUpdMode( sal_uInt16 nMode );
/// Copy content of all ranges at current position of cursor to given Shell.
- bool Copy( SwEditShell* pDestShell = 0 );
+ bool Copy( SwEditShell* pDestShell = nullptr );
/** For copying via ClipBoard:
If table is copied into table, move all cursors away from it.
Copy and Paste must be in FEShell because of FlyFrames!
Copy all selections to the document. */
- bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+ bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = nullptr );
long SplitNode( bool bAutoFormat = false, bool bCheckTableStart = true );
bool AppendTextNode();
@@ -295,7 +295,7 @@ public:
SwCharFormat& GetCharFormat(sal_uInt16 nFormat) const;
SwCharFormat* GetCurCharFormat() const;
void FillByEx(SwCharFormat*, bool bReset = false);
- SwCharFormat* MakeCharFormat( const OUString& rName, SwCharFormat* pDerivedFrom = 0 );
+ SwCharFormat* MakeCharFormat( const OUString& rName, SwCharFormat* pDerivedFrom = nullptr );
SwCharFormat* FindCharFormatByName( const OUString& rName ) const;
/* FormatCollections (new) - Explaining the general naming pattern:
@@ -337,7 +337,7 @@ public:
/// Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTextFormatColl(..)>
void SetTextFormatColl(SwTextFormatColl*, const bool bResetListAttrs = false);
SwTextFormatColl *MakeTextFormatColl(const OUString &rFormatCollName,
- SwTextFormatColl *pDerivedFrom = 0);
+ SwTextFormatColl *pDerivedFrom = nullptr);
void FillByEx(SwTextFormatColl*, bool bReset = false);
SwTextFormatColl* FindTextFormatCollByName( const OUString& rName ) const;
@@ -381,7 +381,7 @@ public:
void ChangeDBFields( const std::vector<OUString>& rOldNames,
const OUString& rNewName );
void GetAllUsedDB( std::vector<OUString>& rDBNameList,
- std::vector<OUString>* pAllDBNames = 0 );
+ std::vector<OUString>* pAllDBNames = nullptr );
bool IsAnyDatabaseFieldInDoc()const;
@@ -419,9 +419,9 @@ public:
/// Insert content table. Renew if required.
void InsertTableOf(const SwTOXBase& rTOX,
- const SfxItemSet* pSet = 0);
+ const SfxItemSet* pSet = nullptr);
bool UpdateTableOf(const SwTOXBase& rTOX,
- const SfxItemSet* pSet = 0);
+ const SfxItemSet* pSet = nullptr);
const SwTOXBase* GetCurTOX() const;
const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, bool bCreate = false );
void SetDefaultTOXBase(const SwTOXBase& rBase);
@@ -521,7 +521,7 @@ public:
bool SelectionHasNumber() const;
bool SelectionHasBullet() const;
- OUString GetUniqueNumRuleName( const OUString* pChkStr = 0, bool bAutoNum = true ) const;
+ OUString GetUniqueNumRuleName( const OUString* pChkStr = nullptr, bool bAutoNum = true ) const;
void ChgNumRuleFormats( const SwNumRule& rRule );
/// Set (and query if) a numbering with StartFlag starts at current PointPos.
@@ -552,10 +552,10 @@ public:
void DelAllUndoObj();
/// Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
- SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = nullptr );
/// Closes parenthesis of nUndoId, not used by UI.
- SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = nullptr );
bool GetLastUndoInfo(OUString *const o_pStr,
SwUndoId *const o_pId) const;
@@ -617,12 +617,12 @@ public:
else give a rap on the knuckles!
If a string-ptr != 0 return the respective name. */
void GetGrfNms( OUString* pGrfName, OUString* pFltName,
- const SwFlyFrameFormat* = 0 ) const;
+ const SwFlyFrameFormat* = nullptr ) const;
/// Re-read if graphic is not ok. Current graphic is replaced by the new one.
void ReRead( const OUString& rGrfName, const OUString& rFltName,
- const Graphic* pGraphic = 0,
- const GraphicObject* pGrafObj = 0 );
+ const Graphic* pGraphic = nullptr,
+ const GraphicObject* pGrafObj = nullptr );
/// Unique identification of object (for ImageMapDlg).
void *GetIMapInventor() const;
@@ -656,7 +656,7 @@ public:
including styles. */
sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const OUString& rName,
const OUString& rShortName, bool bSaveRelFile = false,
- const OUString* pOnlyText=0 );
+ const OUString* pOnlyText=nullptr );
/// Save complete content of doc as glossary.
sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const OUString& rName,
@@ -681,7 +681,7 @@ public:
const SwTable& InsertTable( const SwInsertTableOptions& rInsTableOpts, ///< ALL_TBL_INS_ATTR
sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = css::text::HoriOrientation::FULL,
- const SwTableAutoFormat* pTAFormat = 0 );
+ const SwTableAutoFormat* pTAFormat = nullptr );
void InsertDDETable( const SwInsertTableOptions& rInsTableOpts, ///< HEADLINE_NO_BORDER
SwDDEFieldType* pDDEType,
@@ -695,7 +695,7 @@ public:
bool TextToTable( const SwInsertTableOptions& rInsTableOpts, ///< ALL_TBL_INS_ATTR
sal_Unicode cCh,
sal_Int16 eAdj = css::text::HoriOrientation::FULL,
- const SwTableAutoFormat* pTAFormat = 0 );
+ const SwTableAutoFormat* pTAFormat = nullptr );
bool TableToText( sal_Unicode cCh );
bool IsTextToTableAvailable() const;
@@ -715,7 +715,7 @@ public:
Can Merge checks if Prev or Next are possible.
If pointer pChkNxtPrv is passed possible direction is given. */
- bool CanMergeTable( bool bWithPrev = true, bool* pChkNxtPrv = 0 ) const;
+ bool CanMergeTable( bool bWithPrev = true, bool* pChkNxtPrv = nullptr ) const;
bool MergeTable( bool bWithPrev = true, sal_uInt16 nMode = 0 );
/// Set up InsertDB as table Undo.
@@ -725,13 +725,13 @@ public:
/// Save selections.
void SpellStart( SwDocPositions eStart, SwDocPositions eEnd,
- SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
+ SwDocPositions eCurr, SwConversionArgs *pConvArgs = nullptr );
/// Restore selections.
- void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
+ void SpellEnd( SwConversionArgs *pConvArgs = nullptr, bool bRestoreSelection = true );
css::uno::Any SpellContinue(
sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
- SwConversionArgs *pConvArgs = 0 );
+ SwConversionArgs *pConvArgs = nullptr );
/** Spells on a sentence basis - the SpellPortions are needed
@return false if no error could be found. */
@@ -772,7 +772,7 @@ public:
/** @return names of all references set in document.
If ArrayPointer == 0 then return only whether a RefMark is set in document. */
- sal_uInt16 GetRefMarks( std::vector<OUString>* = 0 ) const;
+ sal_uInt16 GetRefMarks( std::vector<OUString>* = nullptr ) const;
/// Call AutoCorrect
void AutoCorrect( SvxAutoCorrect& rACorr, bool bInsertMode,
@@ -780,7 +780,7 @@ public:
bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, OUString& rWord );
/// Set our styles according to the respective rules.
- void AutoFormat( const SvxSwAutoFormatFlags* pAFlags = 0 );
+ void AutoFormat( const SvxSwAutoFormatFlags* pAFlags = nullptr );
static SvxSwAutoFormatFlags* GetAutoFormatFlags();
static void SetAutoFormatFlags(SvxSwAutoFormatFlags *);
@@ -803,7 +803,7 @@ public:
sal_uInt16 GetLineCount( bool bActPos = true );
/// Query and set footnote-text/number. Set.. to current SSelection!
- bool GetCurFootnote( SwFormatFootnote* pToFillFootnote = 0 );
+ bool GetCurFootnote( SwFormatFootnote* pToFillFootnote = nullptr );
bool SetCurFootnote( const SwFormatFootnote& rFillFootnote );
bool HasFootnotes( bool bEndNotes = false ) const;
@@ -811,7 +811,7 @@ public:
/// @return list of all footnotes and their first portions of text.
SwSection const* InsertSection(
- SwSectionData & rNewData, SfxItemSet const*const = 0 );
+ SwSectionData & rNewData, SfxItemSet const*const = nullptr );
bool IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
@@ -820,22 +820,22 @@ public:
a footnote the reference of which is in a columned range.
If bOutOfTab is set, the range comprising the table is searched
and not an inner one. */
- SwSection* GetAnySection( bool bOutOfTab = false, const Point* pPt = 0 );
+ SwSection* GetAnySection( bool bOutOfTab = false, const Point* pPt = nullptr );
size_t GetSectionFormatCount() const;
size_t GetSectionFormatPos(const SwSectionFormat&) const;
const SwSectionFormat& GetSectionFormat(size_t nFormat) const;
void DelSectionFormat( size_t nFormat);
void UpdateSection( size_t const nSect, SwSectionData &,
- SfxItemSet const*const = 0);
+ SfxItemSet const*const = nullptr);
bool IsAnySectionInDoc( bool bChkReadOnly = false,
bool bChkHidden = false,
bool BChkTOX = false ) const;
- OUString GetUniqueSectionName( const OUString* pChkStr = 0 ) const;
+ OUString GetUniqueSectionName( const OUString* pChkStr = nullptr ) const;
/// Set attributes.
- void SetSectionAttr(const SfxItemSet& rSet, SwSectionFormat* pSectFormat = 0);
+ void SetSectionAttr(const SfxItemSet& rSet, SwSectionFormat* pSectFormat = nullptr);
/** Search inside the cursor selection for full selected sections.
if any part of section in the selection @return 0.
@@ -927,7 +927,7 @@ public:
/// Interface for TextInputData - (for input of Japanese/Chinese chars.)
SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
- OUString DeleteExtTextInput( SwExtTextInput* pDel = 0, bool bInsText = true);
+ OUString DeleteExtTextInput( SwExtTextInput* pDel = nullptr, bool bInsText = true);
void SetExtTextInputData( const CommandExtTextInputData& );
/// Interface for access to AutoComplete-list.
@@ -938,7 +938,7 @@ public:
sal_uInt16 GetScalingOfSelectedText() const;
/// Ctor/Dtor.
- SwEditShell( SwDoc&, vcl::Window*, const SwViewOption *pOpt = 0 );
+ SwEditShell( SwDoc&, vcl::Window*, const SwViewOption *pOpt = nullptr );
/// Copy-Constructor in disguise.
SwEditShell( SwEditShell&, vcl::Window* );
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
index fb7f4427a34d..6e41d9559c38 100644
--- a/sw/inc/extinput.hxx
+++ b/sw/inc/extinput.hxx
@@ -33,7 +33,7 @@ class SwExtTextInput : public SwPaM
bool bIsOverwriteCursor : 1;
LanguageType eInputLanguage;
public:
- SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
+ SwExtTextInput( const SwPaM& rPam, Ring* pRing = nullptr );
virtual ~SwExtTextInput();
void SetInputData( const CommandExtTextInputData& rData );
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index a3055f05a19c..6e6ad6b86254 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -33,7 +33,7 @@ class SW_DLLPUBLIC SwFormatCharFormat: public SfxPoolItem, public SwClient
SwTextCharFormat* pTextAttr; ///< My text attribute.
public:
- SwFormatCharFormat() : pTextAttr(0) {}
+ SwFormatCharFormat() : pTextAttr(nullptr) {}
/// single argument ctors shall be explicit.
explicit SwFormatCharFormat( SwCharFormat *pFormat );
@@ -53,12 +53,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index b589480a2312..6ea8b19986ac 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -157,7 +157,7 @@ struct SwGetCurColNumPara
{
const SwFrameFormat* pFrameFormat;
const SwRect* pPrtRect, *pFrmRect;
- SwGetCurColNumPara() : pFrameFormat( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
+ SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ), pFrmRect( nullptr ) {}
};
enum class SwPasteSdr
@@ -218,7 +218,7 @@ private:
/** Used for mouse operations on a table:
@return a cell frame that is 'close' to rPt. */
- SAL_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
+ SAL_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = nullptr, bool* pbCol = nullptr ) const;
// 0 == not in any column.
SAL_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm,
@@ -249,12 +249,12 @@ public:
using SwEditShell::Insert;
TYPEINFO_OVERRIDE();
- SwFEShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = 0 );
+ SwFEShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = nullptr );
SwFEShell( SwEditShell& rShell, vcl::Window *pWin );
virtual ~SwFEShell();
/// Copy and Paste methods for internal clipboard.
- bool Copy( SwDoc* pClpDoc, const OUString* pNewClpText = 0 );
+ bool Copy( SwDoc* pClpDoc, const OUString* pNewClpText = nullptr );
bool Paste( SwDoc* pClpDoc, bool bIncludingPageFrames = false);
/// Paste some pages into another doc - used in mailmerge.
@@ -271,7 +271,7 @@ public:
/** If an object as been given, exactly this object is selected
(instead of searching over position). */
- bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 );
+ bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = nullptr );
void DelSelectedObj();
/** Move selection upwards or downwards (Z-Order).
@@ -315,7 +315,7 @@ public:
bool IsSelContainsControl() const;
ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
- ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const;
+ ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = nullptr ) const;
/// For adjustment of PosAttr when anchor changes.
SwRect GetObjRect() const;
@@ -335,7 +335,7 @@ public:
bool _bMirror = false,
Point* _opRef = nullptr,
Size* _opPercent = nullptr,
- const SwFormatFrmSize* pFormatFrmSize = 0 ) const;
+ const SwFormatFrmSize* pFormatFrmSize = nullptr ) const;
/// Set size of draw objects.
void SetObjRect( const SwRect& rRect );
@@ -359,7 +359,7 @@ public:
/** @return FrameFormat of object that may be under Point.
Object does not become selected! */
- const SwFrameFormat* GetFormatFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const;
+ const SwFrameFormat* GetFormatFromObj( const Point& rPt, SwRect** pRectToFill = nullptr ) const;
/// @return a format too, if the point is over the text of any fly.
const SwFrameFormat* GetFormatFromAnyObj( const Point& rPt ) const;
@@ -381,9 +381,9 @@ public:
bool GetFlyFrmAttr( SfxItemSet &rSet ) const;
bool SetFlyFrmAttr( SfxItemSet &rSet );
static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
- bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 );
+ bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = nullptr );
const SwFrameFormat *NewFlyFrm( const SfxItemSet &rSet, bool bAnchValid = false,
- SwFrameFormat *pParent = 0 );
+ SwFrameFormat *pParent = nullptr );
void SetFlyPos( const Point &rAbsPos);
Point FindAnchorPos( const Point &rAbsPos, bool bMoveIt = false );
@@ -393,7 +393,7 @@ public:
bool IsFrmVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const;
SwFrameFormat* GetSelectedFrameFormat() const; ///< If frame then frame style, else 0.
- void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = 0 ); ///< If frame then set frame style.
+ void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = nullptr ); ///< If frame then set frame style.
// Get selected fly
SwFlyFrm* GetSelectedFlyFrm() const;
@@ -438,8 +438,8 @@ public:
If a pointer is passed on a size, this is the object's current core-size.
Else the size is provided via GetCurFlyRect(). */
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
- const SwRect *pFlyPrtRect = 0,
- const SwRect *pFlyFrmRect = 0,
+ const SwRect *pFlyPrtRect = nullptr,
+ const SwRect *pFlyFrmRect = nullptr,
const bool bNoTextFrmPrtAreaChanged = false ) = 0;
/** Connect objects with ActivateWhenVisible at Paint.
@@ -470,9 +470,9 @@ public:
bool bSelFrame = true );
/// Position is a graphic with URL?
- const SwFrameFormat* IsURLGrfAtPos( const Point& rPt, OUString* pURL = 0,
- OUString *pTargetFrameName = 0,
- OUString *pURLDescription = 0 ) const;
+ const SwFrameFormat* IsURLGrfAtPos( const Point& rPt, OUString* pURL = nullptr,
+ OUString *pTargetFrameName = nullptr,
+ OUString *pURLDescription = nullptr ) const;
/** For Chain always connect Fly specified by format with that hit by point.
rRect contains rect of Fly (for its highlight). */
@@ -557,7 +557,7 @@ public:
Return value indicates if it was converted. */
bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const;
- void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt = 0 );
+ void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt = nullptr );
bool Paste( const Graphic &rGrf, const OUString& rURL );
bool IsAlignPossible() const;
@@ -565,22 +565,22 @@ public:
void Insert(const OUString& rGrfName,
const OUString& rFltName,
- const Graphic* pGraphic = 0,
- const SfxItemSet* pFlyAttrSet = 0,
- const SfxItemSet* pGrfAttrSet = 0,
- SwFrameFormat* = 0 );
+ const Graphic* pGraphic = nullptr,
+ const SfxItemSet* pFlyAttrSet = nullptr,
+ const SfxItemSet* pGrfAttrSet = nullptr,
+ SwFrameFormat* = nullptr );
/// Insertion of a drawing object which have to be already inserted in the DrawModel.
void InsertDrawObj( SdrObject& rDrawObj,
const Point& rInsertPosition );
bool ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltName,
- const Graphic* pGrf = 0 );
+ const Graphic* pGrf = nullptr );
// --> #i972#
/** for starmath formulas anchored 'as char' it aligns it baseline to baseline
changing the previous vertical orientation */
- void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 );
+ void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = nullptr );
/// aligns all formulas with anchor 'as char' to baseline
void AlignAllFormulasToBaseline();
@@ -602,7 +602,7 @@ public:
size_t GetPageDescCnt() const;
SwPageDesc* FindPageDescByName( const OUString& rName,
bool bGetFromPool = false,
- size_t* pPos = 0 );
+ size_t* pPos = nullptr );
const SwPageDesc& GetPageDesc( size_t i ) const;
void ChgPageDesc( size_t i, const SwPageDesc& );
@@ -611,7 +611,7 @@ public:
const SwPageDesc* GetSelectedPageDescs() const;
const SwRect& GetAnyCurRect( CurRectType eType,
- const Point* pPt = 0,
+ const Point* pPt = nullptr,
const css::uno::Reference < css::embed::XEmbeddedObject >& =
css::uno::Reference < css::embed::XEmbeddedObject >() ) const;
@@ -620,9 +620,9 @@ public:
bool GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const;
SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&,
- const SfxItemSet* pFlyAttrSet = 0,
- const SfxItemSet* pGrfAttrSet = 0,
- SwFrameFormat* = 0 );
+ const SfxItemSet* pFlyAttrSet = nullptr,
+ const SfxItemSet* pGrfAttrSet = nullptr,
+ SwFrameFormat* = nullptr );
bool FinishOLEObj(); ///< Shutdown server.
void GetTableAttr( SfxItemSet & ) const;
@@ -686,7 +686,7 @@ public:
const Point &rPt );
/// pEnd will be used during MouseMove
- bool SelTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ bool SelTableRowCol( const Point& rPt, const Point* pEnd = nullptr, bool bRowDrag = false );
void GetTabRows( SwTabCols &rToFill ) const;
void SetTabRows( const SwTabCols &rNew, bool bCurColOnly );
@@ -697,8 +697,8 @@ public:
cursor is not allowed in readonly. */
void UnProtectCells(); ///< Refers to table selection.
void UnProtectTables(); ///< Unprotect all tables in selection.
- bool HasTableAnyProtection( const OUString* pTableName = 0,
- bool* pFullTableProtection = 0 );
+ bool HasTableAnyProtection( const OUString* pTableName = nullptr,
+ bool* pFullTableProtection = nullptr );
bool CanUnProtectCells() const;
sal_uInt16 GetRowsToRepeat() const;
@@ -749,12 +749,12 @@ public:
const bool bCpyBrd = true );
/// The ruler needs some information too.
- sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column.
+ sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = nullptr ) const; //0 == not in any column.
sal_uInt16 GetCurMouseColNum( const Point &rPt,
- SwGetCurColNumPara* pPara = 0 ) const;
+ SwGetCurColNumPara* pPara = nullptr ) const;
size_t GetCurTabColNum() const; //0 == not in any table.
size_t GetCurMouseTabColNum( const Point &rPt ) const;
- sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; ///< Current outer column.
+ sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = nullptr ) const; ///< Current outer column.
bool IsTableRightToLeft() const;
bool IsMouseTableRightToLeft( const Point &rPt ) const;
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 4363fb5bc036..603e7587b8ee 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -267,7 +267,7 @@ public:
inline void SwFieldType::UpdateFields() const
{
- const_cast<SwFieldType*>(this)->ModifyNotification( 0, 0 );
+ const_cast<SwFieldType*>(this)->ModifyNotification( nullptr, nullptr );
}
/** Base class of all fields.
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index da2b091b1499..bd260372b1e8 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -52,12 +52,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index a76ff7e2f948..f72adf0a5411 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -44,12 +44,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index f7ac3d18d561..4f74fdca1889 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -32,7 +32,7 @@ public:
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 336453555a38..ab3532b901ed 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -102,12 +102,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 3578bb794705..2fb7ee23177b 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -41,12 +41,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index d170da60c970..2403675f41fc 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -34,13 +34,13 @@ class SW_DLLPUBLIC SwFormatContent: public SfxPoolItem
SwFormatContent &operator=( const SwFormatContent & ) = delete;
public:
- SwFormatContent( const SwStartNode* pStartNode = 0 );
+ SwFormatContent( const SwStartNode* pStartNode = nullptr );
SwFormatContent( const SwFormatContent &rCpy );
virtual ~SwFormatContent();
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
const SwNodeIndex *GetContentIdx() const { return pStartNode; }
void SetNewContentIdx( const SwNodeIndex *pIdx );
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index 57d29ea4b714..7388af608a00 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -67,7 +67,7 @@ protected:
SwTextFormatColl *mpNextTextFormatColl;
SwTextFormatColl( SwAttrPool& rPool, const sal_Char* pFormatCollName,
- SwTextFormatColl* pDerFrom = 0,
+ SwTextFormatColl* pDerFrom = nullptr,
sal_uInt16 nFormatWh = RES_TXTFMTCOLL )
: SwFormatColl(rPool, pFormatCollName, aTextFormatCollSetRange, pDerFrom, nFormatWh)
, mbStayAssignedToListLevelOfOutlineStyle(false)
@@ -77,7 +77,7 @@ protected:
}
SwTextFormatColl( SwAttrPool& rPool, const OUString &rFormatCollName,
- SwTextFormatColl* pDerFrom = 0,
+ SwTextFormatColl* pDerFrom = nullptr,
sal_uInt16 nFormatWh = RES_TXTFMTCOLL )
: SwFormatColl(rPool, rFormatCollName, aTextFormatCollSetRange, pDerFrom, nFormatWh)
, mbStayAssignedToListLevelOfOutlineStyle(false)
@@ -141,13 +141,13 @@ class SwGrfFormatColl: public SwFormatColl
friend class SwDoc;
protected:
SwGrfFormatColl( SwAttrPool& rPool, const sal_Char* pFormatCollName,
- SwGrfFormatColl* pDerFrom = 0 )
+ SwGrfFormatColl* pDerFrom = nullptr )
: SwFormatColl( rPool, pFormatCollName, aGrfFormatCollSetRange,
pDerFrom, RES_GRFFMTCOLL )
{}
SwGrfFormatColl( SwAttrPool& rPool, const OUString &rFormatCollName,
- SwGrfFormatColl* pDerFrom = 0 )
+ SwGrfFormatColl* pDerFrom = nullptr )
: SwFormatColl( rPool, rFormatCollName, aGrfFormatCollSetRange,
pDerFrom, RES_GRFFMTCOLL )
{}
@@ -223,11 +223,11 @@ protected:
SwFormatCollConditions m_CondColls;
SwConditionTextFormatColl( SwAttrPool& rPool, const sal_Char* pFormatCollName,
- SwTextFormatColl* pDerFrom = 0 )
+ SwTextFormatColl* pDerFrom = nullptr )
: SwTextFormatColl( rPool, pFormatCollName, pDerFrom, RES_CONDTXTFMTCOLL )
{}
SwConditionTextFormatColl( SwAttrPool& rPool, const OUString &rFormatCollName,
- SwTextFormatColl* pDerFrom = 0 )
+ SwTextFormatColl* pDerFrom = nullptr )
: SwTextFormatColl( rPool, rFormatCollName, pDerFrom, RES_CONDTXTFMTCOLL )
{}
diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx
index e6b12d0ef61b..452db0350669 100644
--- a/sw/inc/fmtcolfunc.hxx
+++ b/sw/inc/fmtcolfunc.hxx
@@ -38,7 +38,7 @@ namespace TextFormatCollFunc
*/
void CheckTextFormatCollForDeletionOfAssignmentToOutlineStyle(
SwFormat* pFormat,
- const SwNumRuleItem* pNewNumRuleItem = 0L );
+ const SwNumRuleItem* pNewNumRuleItem = nullptr );
/** determines the list style, which directly set at the given paragraph style
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 8070ddf1f54b..cef3224b303a 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -33,12 +33,12 @@ public:
bool bPrt = false ) : SfxBoolItem( nId, bPrt ) {}
/// "pure virtual methos" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
index 7b678c0d47ea..06ad1f32f2ae 100644
--- a/sw/inc/fmtflcnt.hxx
+++ b/sw/inc/fmtflcnt.hxx
@@ -40,11 +40,11 @@ public:
SwFormatFlyCnt( SwFrameFormat *pFrameFormat );
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
inline SwFrameFormat *GetFrameFormat() const { return pFormat; }
/// For Undo: delete the FlyFrmFormat "logically"; it is kept in Undo-object.
- inline void SetFlyFormat( SwFrameFormat* pNew = 0 ) { pFormat = pNew; }
+ inline void SetFlyFormat( SwFrameFormat* pNew = nullptr ) { pFormat = pNew; }
const SwTextFlyCnt *GetTextFlyCnt() const { return pTextAttr; }
};
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 9204f15fad2c..0f83415293e8 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -69,7 +69,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
@@ -130,7 +130,7 @@ class SW_DLLPUBLIC SwFormatFieldHint : public SfxHint
const SwView* pView;
public:
- SwFormatFieldHint( const SwFormatField* p, SwFormatFieldHintWhich n, const SwView* pV = 0)
+ SwFormatFieldHint( const SwFormatField* p, SwFormatFieldHintWhich n, const SwView* pV = nullptr)
: pField(p)
, nWhich(n)
, pView(pV)
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 0ce283f38984..a23e0f3e7501 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -35,12 +35,12 @@ public:
TYPEINFO_OVERRIDE();
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index 2389f6566275..d3416adf3998 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -40,7 +40,7 @@ public:
inline SwFormatFillOrder &operator=( const SwFormatFillOrder &rCpy );
/// "Pure virtual methods" of SfxPoolItem.
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual sal_uInt16 GetValueCount() const override;
SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index 10e56dcf0c47..4f77040ed410 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -66,12 +66,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index a7025d32747d..96f53dcf7845 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -56,7 +56,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
// SwClient
virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index d9730b6de3b5..879c561d61bd 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -63,7 +63,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
inline bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
@@ -91,7 +91,7 @@ public:
: SwFormatFootnoteEndAtTextEnd( RES_FTN_AT_TXTEND, ePos )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwFormatEndAtTextEnd : public SwFormatFootnoteEndAtTextEnd
@@ -103,7 +103,7 @@ public:
SetNumType( SVX_NUM_ROMAN_LOWER );
}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
inline const SwFormatFootnoteAtTextEnd &SwAttrSet::GetFootnoteAtTextEnd(bool bInP) const
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 7434c1acb301..e0c9a513c081 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -46,12 +46,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
const SwFrameFormat *GetHeaderFormat() const { return static_cast<const SwFrameFormat*>(GetRegisteredIn()); }
SwFrameFormat *GetHeaderFormat() { return static_cast<SwFrameFormat*>(GetRegisteredIn()); }
@@ -78,12 +78,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
const SwFrameFormat *GetFooterFormat() const { return static_cast<const SwFrameFormat*>(GetRegisteredIn()); }
SwFrameFormat *GetFooterFormat() { return static_cast<SwFrameFormat*>(GetRegisteredIn()); }
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 528bad3ecf7d..aa6ca6f424e9 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -52,12 +52,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -123,7 +123,7 @@ public:
}
/// Set a new MacroTable or clear the current one.
- void SetMacroTable( const SvxMacroTableDtor* pTable = 0 );
+ void SetMacroTable( const SvxMacroTableDtor* pTable = nullptr );
const SvxMacroTableDtor* GetMacroTable() const
{
return mpMacroTable;
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index cde782f63717..7d81094d3c9a 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -39,12 +39,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 84dac2749389..112da9ba567c 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -32,12 +32,12 @@ public:
SwFormatLayoutSplit( bool bSplit = true ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
inline const SwFormatLayoutSplit &SwAttrSet::GetLayoutSplit(bool bInP) const
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 8e2f92e448ba..ab1ac82ddefb 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -110,7 +110,7 @@ public:
/// SfxPoolItem
virtual bool operator==( const SfxPoolItem & ) const override;
- virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem * Clone( SfxItemPool *pPool = nullptr ) const override;
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTextNode(SwTextNode *const pTextNode);
@@ -152,7 +152,7 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override;
public:
- explicit Meta(SwFormatMeta * const i_pFormat = 0);
+ explicit Meta(SwFormatMeta * const i_pFormat = nullptr);
virtual ~Meta();
/// sfx2::Metadatable
@@ -179,7 +179,7 @@ private:
bool IsFixedLanguage() const { return m_bIsFixedLanguage; }
void SetIsFixedLanguage(bool b) { m_bIsFixedLanguage = b; }
- explicit MetaField(SwFormatMeta * const i_pFormat = 0,
+ explicit MetaField(SwFormatMeta * const i_pFormat = nullptr,
const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
const bool bIsFixedLanguage = false );
@@ -200,7 +200,7 @@ private:
public:
MetaFieldManager();
std::shared_ptr<MetaField> makeMetaField(
- SwFormatMeta * const i_pFormat = 0,
+ SwFormatMeta * const i_pFormat = nullptr,
const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
const bool bIsFixedLanguage = false );
/// get all meta fields
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 8c9ed10935cf..112d7fe343e2 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -43,12 +43,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -80,12 +80,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 5a0d12bd3b14..c07a2182b9ef 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -47,7 +47,7 @@ protected:
virtual void SwClientNotify( const SwModify&, const SfxHint& rHint ) override;
public:
- SwFormatPageDesc( const SwPageDesc *pDesc = 0 );
+ SwFormatPageDesc( const SwPageDesc *pDesc = nullptr );
SwFormatPageDesc( const SwFormatPageDesc &rCpy );
SwFormatPageDesc &operator=( const SwFormatPageDesc &rCpy );
virtual ~SwFormatPageDesc();
@@ -56,12 +56,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index 6f6521926c24..1c1c578edec9 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -52,7 +52,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
// SwClient
virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index 5238a5f047c4..58c601461bbb 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -32,12 +32,12 @@ public:
SwFormatRowSplit( bool bSplit = true ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
inline const SwFormatRowSplit &SwAttrSet::GetRowSplit(bool bInP) const
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index 22b1d069f905..62f27043e5de 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -43,13 +43,13 @@ public:
// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 8aaa75aad533..b628a9408d21 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -40,13 +40,13 @@ public:
// "Pure virtual Methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual sal_uInt16 GetValueCount() const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index b29156c4c023..20eb332719fa 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -50,12 +50,12 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 0d72126413f2..d60d9c829c66 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -44,7 +44,7 @@ public:
/// pure virtual methods of class <SfxPoolItem>
virtual bool operator==( const SfxPoolItem& _rAttr ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index bff32bc663f3..fe0ddfd2ec55 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -89,7 +89,7 @@ public:
void DelDiffs( const SwFormat& rFormat ) { DelDiffs( rFormat.GetAttrSet() ); }
/// 0 is Default.
- bool SetDerivedFrom(SwFormat *pDerivedFrom = 0);
+ bool SetDerivedFrom(SwFormat *pDerivedFrom = nullptr);
/// If bInParents is FALSE, search only in this format for attribute.
//UUUUinline
@@ -97,7 +97,7 @@ public:
bool bInParents = true ) const;
//UUUUinline
SfxItemState GetItemState( sal_uInt16 nWhich, bool bSrchInParent = true,
- const SfxPoolItem **ppItem = 0 ) const;
+ const SfxPoolItem **ppItem = nullptr ) const;
SfxItemState GetBackgroundState(SvxBrushItem &rItem,
bool bSrchInParent = true) const;
virtual bool SetFormatAttr( const SfxPoolItem& rAttr );
@@ -109,7 +109,7 @@ public:
virtual sal_uInt16 ResetAllFormatAttr();
inline SwFormat* DerivedFrom() const { return const_cast<SwFormat*>(static_cast<const SwFormat*>(GetRegisteredIn())); }
- inline bool IsDefault() const { return DerivedFrom() == 0; }
+ inline bool IsDefault() const { return DerivedFrom() == nullptr; }
inline OUString GetName() const { return m_aFormatName; }
inline bool HasName(const OUString &rName) const { return m_aFormatName == rName; }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 69fa3047d407..3e881645a6f9 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -53,14 +53,14 @@ protected:
const sal_Char* pFormatNm,
SwFrameFormat *pDrvdFrm,
sal_uInt16 nFormatWhich = RES_FRMFMT,
- const sal_uInt16* pWhichRange = 0);
+ const sal_uInt16* pWhichRange = nullptr);
SwFrameFormat(
SwAttrPool& rPool,
const OUString &rFormatNm,
SwFrameFormat *pDrvdFrm,
sal_uInt16 nFormatWhich = RES_FRMFMT,
- const sal_uInt16* pWhichRange = 0);
+ const sal_uInt16* pWhichRange = nullptr);
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ) override;
@@ -81,13 +81,13 @@ public:
rPoint - test on DocPosition.
pFly - optional FlyFrame, in case it is already known. */
IMapObject* GetIMapObject( const Point& rPoint,
- const SwFlyFrm *pFly = 0 ) const;
+ const SwFlyFrm *pFly = nullptr ) const;
/** @return the real size of the frame - or an empty rectangle
if no layout exists.
If pPoint is given, look for the frame closest to it. */
SwRect FindLayoutRect( const bool bPrtArea = false,
- const Point* pPoint = 0,
+ const Point* pPoint = nullptr,
const bool bCalcFrm = false ) const;
/** Searches SdrObject. SdrObjUserCall is client of the format.
@@ -175,10 +175,10 @@ public:
/// Creates the views.
virtual void MakeFrms() override;
- SwFlyFrm* GetFrm( const Point* pDocPos = 0,
+ SwFlyFrm* GetFrm( const Point* pDocPos = nullptr,
const bool bCalcFrm = false ) const;
- SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
+ SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = nullptr,
const bool bCalcFrm = false ) const;
virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ) override;
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index b79a57e72980..62396a5f369f 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -45,7 +45,7 @@ public:
void UpdateFootnote( const SwNodeIndex& rStt ); // Update all from pos.
void UpdateAllFootnote(); // Update all footnotes.
- SwTextFootnote* SeekEntry( const SwNodeIndex& rIdx, size_t* pPos = 0 ) const;
+ SwTextFootnote* SeekEntry( const SwNodeIndex& rIdx, size_t* pPos = nullptr ) const;
};
class SwUpdFootnoteEndNtAtEnd
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index ae6820ae6c79..76bdff5aa1e0 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -63,7 +63,7 @@ public:
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
bool operator==( const SwEndNoteInfo &rInf ) const;
- SwEndNoteInfo( SwTextFormatColl *pTextColl = 0);
+ SwEndNoteInfo( SwTextFormatColl *pTextColl = nullptr);
SwEndNoteInfo(const SwEndNoteInfo&);
const OUString& GetPrefix() const { return sPrefix; }
@@ -100,7 +100,7 @@ public:
bool operator==( const SwFootnoteInfo &rInf ) const;
- SwFootnoteInfo(SwTextFormatColl* pTextColl = 0);
+ SwFootnoteInfo(SwTextFormatColl* pTextColl = nullptr);
SwFootnoteInfo(const SwFootnoteInfo&);
};
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index ce8031a0f7ba..9b16b4b44c2c 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -52,7 +52,7 @@ public:
{}
// pure virtual methods of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
// pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const override;
@@ -61,7 +61,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const override;
@@ -88,7 +88,7 @@ public:
sal_Int32 nTop, sal_Int32 nBottom );
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SwRotationGrf : public SfxUInt16Item
@@ -103,13 +103,13 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal,
@@ -126,12 +126,12 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
class SW_DLLPUBLIC SwContrastGrf : public SfxInt16Item
@@ -142,12 +142,12 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
class SwChannelGrf : public SfxInt16Item
@@ -163,7 +163,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
class SwChannelRGrf : public SwChannelGrf
@@ -172,7 +172,7 @@ public:
SwChannelRGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELR )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SwChannelGGrf : public SwChannelGrf
{
@@ -180,7 +180,7 @@ public:
SwChannelGGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELG )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SwChannelBGrf : public SwChannelGrf
{
@@ -188,7 +188,7 @@ public:
SwChannelBGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELB )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem
@@ -210,13 +210,13 @@ public:
}
// pure virtual methods from SfxEnumItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const override;
@@ -235,12 +235,12 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
class SwTransparencyGrf : public SfxByteItem
@@ -251,12 +251,12 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal,
@@ -271,7 +271,7 @@ public:
{}
// pure virtual methods of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
// pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const override;
@@ -279,7 +279,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const override;
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 1a3b407cc068..3822ee3edd84 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -32,12 +32,12 @@ public:
bool bPrt = false ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(bool bInP) const
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 481993d409ce..751dd5daae53 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -43,7 +43,7 @@ public:
// "Overhead" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
};
// SwPtrMsgPoolItem (old SwObjectDying!)
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 8c038a5df51b..2f6e98e42d79 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -300,7 +300,7 @@ public:
bool HasColsOption() const { return m_bColsOption; }
bool HasColTags() const { return m_bColTags; }
- bool IsTopTable() const { return m_pSwTable != 0; }
+ bool IsTopTable() const { return m_pSwTable != nullptr; }
void SetMustResize( bool bSet ) { m_bMustResize = bSet; }
void SetMustNotResize( bool bSet ) { m_bMustNotResize = bSet; }
@@ -358,7 +358,7 @@ inline void SwHTMLTableLayoutCell::SetProtected()
nRowSpan = 1;
nColSpan = 1;
- pContents = 0;
+ pContents = nullptr;
}
inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index 09289a382e7e..d7b6fef945d6 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -123,7 +123,7 @@ protected:
virtual void Update( SwIndex const & rPos, const sal_Int32 nChangeLen,
const bool bNegative = false, const bool bDelete = false );
- bool HasAnyIndex() const { return 0 != m_pFirst; }
+ bool HasAnyIndex() const { return nullptr != m_pFirst; }
public:
SwIndexReg();
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 84ee60fc1f2d..4e6614ebce43 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -85,7 +85,7 @@ public:
/// find for an internal format name the corresponding filter entry
SW_DLLPUBLIC static const SfxFilter*
GetFilterOfFormat( const OUString& rFormat,
- const SfxFilterContainer* pCnt = 0 );
+ const SfxFilterContainer* pCnt = nullptr );
/** Detect for the given file which filter should be used. The filter name
is returned. If no filter could be found, the name of the ASCII filter
@@ -96,7 +96,7 @@ public:
static bool IsValidStgFilter( const css::uno::Reference < css::embed::XStorage >& rStg, const SfxFilter& rFilter);
static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
- rtl_TextEncoding *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
+ rtl_TextEncoding *pCharSet=nullptr, bool *pSwap=nullptr, LineEnd *pLineEnd=nullptr, bool bEncodedFilter = false );
static const OUString GetSubStorageName( const SfxFilter& rFltr );
};
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 68c5626caead..374c55bdc8d3 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -91,7 +91,7 @@ public:
bool IsRestartEachPage() const { return bRestartEachPage; }
void SetRestartEachPage( bool b ) { bRestartEachPage = b; }
- bool HasCharFormat() const { return GetRegisteredIn() != 0; }
+ bool HasCharFormat() const { return GetRegisteredIn() != nullptr; }
};
#endif
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index d8a5e0f685e0..04c61cea7bc1 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -43,8 +43,8 @@ extern void PageNumNotify( SwViewShell* pVwSh,
enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
extern void FrameNotify( SwViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
-SW_DLLPUBLIC void StartProgress ( sal_uInt16 nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
-SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void StartProgress ( sal_uInt16 nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = nullptr );
+SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = nullptr );
SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell );
void SetProgressText ( sal_uInt16 nMessId, SwDocShell *pDocShell );
void RescheduleProgress( SwDocShell *pDocShell );
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 4c47284b14db..1bb0de60f23c 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -58,7 +58,7 @@ private:
typedef std::vector<std::unique_ptr<InsCaptionOpt>> InsCapOptArr;
InsCapOptArr m_InsCapOptArr;
public:
- InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0);
+ InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = nullptr);
void Insert(InsCaptionOpt* pObj);
};
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index c3c1f5030b7a..8850d62d1c3a 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -141,13 +141,13 @@ public:
SwNodePtr operator[]( sal_uLong n ) const; // defined in node.hxx
sal_uLong Count() const { return BigPtrArray::Count(); }
- void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = nullptr )
{
ForEach( 0, BigPtrArray::Count(), fnForEach, pArgs );
}
- void ForEach( sal_uLong nStt, sal_uLong nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 );
+ void ForEach( sal_uLong nStt, sal_uLong nEnd, FnForEach_SwNodes fnForEach, void* pArgs = nullptr );
void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
- FnForEach_SwNodes fnForEach, void* pArgs = 0 );
+ FnForEach_SwNodes fnForEach, void* pArgs = nullptr );
/// A still empty section.
SwNode& GetEndOfPostIts() const { return *m_pEndOfPostIts; }
@@ -205,29 +205,29 @@ public:
/// Implementations of "Make...Node" are in the given .cxx-files.
SwTextNode *MakeTextNode( const SwNodeIndex & rWhere,
SwTextFormatColl *pColl,
- SwAttrSet* pAutoAttr = 0 ); ///< in ndtxt.cxx
+ SwAttrSet* pAutoAttr = nullptr ); ///< in ndtxt.cxx
SwStartNode* MakeTextSection( const SwNodeIndex & rWhere,
SwStartNodeType eSttNdTyp,
SwTextFormatColl *pColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
static SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
const OUString& rGrfName,
const OUString& rFltName,
const Graphic* pGraphic,
SwGrfFormatColl *pColl,
- SwAttrSet* pAutoAttr = 0,
+ SwAttrSet* pAutoAttr = nullptr,
bool bDelayed = false ); ///< in ndgrf.cxx
static SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
const GraphicObject& rGrfObj,
SwGrfFormatColl *pColl,
- SwAttrSet* pAutoAttr = 0 ); ///< in ndgrf.cxx
+ SwAttrSet* pAutoAttr = nullptr ); ///< in ndgrf.cxx
SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
const svt::EmbeddedObjectRef&,
SwGrfFormatColl *pColl,
- SwAttrSet* pAutoAttr = 0 ); ///< in ndole.cxx
+ SwAttrSet* pAutoAttr = nullptr ); ///< in ndole.cxx
SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
const OUString &rName,
sal_Int64 nAspect,
@@ -251,8 +251,8 @@ public:
static SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
sal_uInt16 nBoxes, SwTextFormatColl* pContentTextColl,
sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0,
- SwTextFormatColl* pHeadlineTextColl = 0,
- const SwAttrSet * pAttrSet = 0);
+ SwTextFormatColl* pHeadlineTextColl = nullptr,
+ const SwAttrSet * pAttrSet = nullptr);
/// Create balanced table from selected range.
SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
@@ -260,7 +260,7 @@ public:
SwTableLineFormat* pLineFormat,
SwTableBoxFormat* pBoxFormat,
SwTextFormatColl* pTextColl,
- SwUndoTextToTable* pUndo = 0 );
+ SwUndoTextToTable* pUndo = nullptr );
static SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
@@ -274,7 +274,7 @@ public:
/// Create regular text from what was table.
bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
- SwUndoTableToText* = 0 );
+ SwUndoTableToText* = nullptr );
/// Is in untbl.cxx and may called only by Undo-object.
SwTableNode* UndoTableToText( sal_uLong nStt, sal_uLong nEnd,
const SwTableToTextSaves& rSavedData );
@@ -296,7 +296,7 @@ public:
bool bCalcNewSize = false );
/// Two Tables that are following one another are merged.
bool MergeTable( const SwNodeIndex& rPos, bool bWithPrev = true,
- sal_uInt16 nMode = 0, SwHistory* pHistory = 0 );
+ sal_uInt16 nMode = 0, SwHistory* pHistory = nullptr );
/// Insert a new SwSection.
SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
@@ -316,7 +316,7 @@ public:
with that before rFrmIdx and pEnd at the back.
If no valid node is found, return 0. rFrmIdx points to the node with frames. **/
SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
- const SwNode* pEnd = 0 ) const;
+ const SwNode* pEnd = nullptr ) const;
SwNode * DocumentSectionStartNode(SwNode * pNode) const;
SwNode * DocumentSectionEndNode(SwNode * pNode) const;
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index ac02f976f068..d50e682c4b14 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -57,16 +57,16 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTextNode
const OUString& rGrfName, const OUString& rFltName,
const Graphic* pGraphic,
SwGrfFormatColl* pGrfColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
///< Ctor for reading (SW/G) without graphics.
SwGrfNode( const SwNodeIndex& rWhere,
const OUString& rGrfName, const OUString& rFltName,
SwGrfFormatColl* pGrfColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
SwGrfNode( const SwNodeIndex& rWhere,
const GraphicObject& rGrfObj,
SwGrfFormatColl* pGrfColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
void InsertLink( const OUString& rGrfName, const OUString& rFltName );
bool ImportGraphic( SvStream& rStrm );
@@ -127,8 +127,8 @@ public:
void SetGraphic(const Graphic& rGraphic, const OUString& rLink);
/// wrappers for non-const calls at GraphicObject
- void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0, const GraphicAttr* pAttr = NULL, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, OutputDevice* pFirstFrameOutDev = NULL) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pAttr, nFlags, pFirstFrameOutDev); }
- void StopGraphicAnimation(OutputDevice* pOut = NULL, long nExtraData = 0) { maGrfObj.StopAnimation(pOut, nExtraData); }
+ void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0, const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, OutputDevice* pFirstFrameOutDev = nullptr) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pAttr, nFlags, pFirstFrameOutDev); }
+ void StopGraphicAnimation(OutputDevice* pOut = nullptr, long nExtraData = 0) { maGrfObj.StopAnimation(pOut, nExtraData); }
virtual Size GetTwipSize() const override;
void SetTwipSize( const Size& rSz );
@@ -158,8 +158,8 @@ public:
/** Re-read in case graphic was not OK. The current one
gets replaced by the new one. */
bool ReRead( const OUString& rGrfName, const OUString& rFltName,
- const Graphic* pGraphic = 0,
- const GraphicObject* pGrfObj = 0,
+ const Graphic* pGraphic = nullptr,
+ const GraphicObject* pGrfObj = nullptr,
bool bModify = true );
private:
/// Loading of graphic immediately before displaying.
@@ -205,12 +205,12 @@ public:
// Inline methods from Node.hxx - it is only now that we know TextNode!!
inline SwGrfNode *SwNode::GetGrfNode()
{
- return ND_GRFNODE == m_nNodeType ? static_cast<SwGrfNode*>(this) : 0;
+ return ND_GRFNODE == m_nNodeType ? static_cast<SwGrfNode*>(this) : nullptr;
}
inline const SwGrfNode *SwNode::GetGrfNode() const
{
- return ND_GRFNODE == m_nNodeType ? static_cast<const SwGrfNode*>(this) : 0;
+ return ND_GRFNODE == m_nNodeType ? static_cast<const SwGrfNode*>(this) : nullptr;
}
inline bool SwGrfNode::IsLinkedFile() const
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 2d15a123eafc..c885be091460 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -45,7 +45,7 @@ SwTextAttr * MakeTextAttr(
sal_Int32 const nStt,
sal_Int32 const nEnd,
CopyOrNew_t const bIsCopy = NEW,
- SwTextNode *const pTextNode = 0 );
+ SwTextNode *const pTextNode = nullptr );
SwTextAttr * MakeTextAttr(
SwDoc & rDoc,
@@ -172,7 +172,7 @@ public:
/// register a History, which receives all attribute changes (for Undo)
void Register( SwRegHistory* pHist ) { m_pHistory = pHist; }
/// deregister the currently registered History
- void DeRegister() { Register(0); }
+ void DeRegister() { Register(nullptr); }
SwRegHistory* GetHistory() const { return m_pHistory; }
/// try to insert the hint
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 722b874389b4..3c6b23439704 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -46,7 +46,7 @@ class SW_DLLPUBLIC SwNoTextNode : public SwContentNode
protected:
SwNoTextNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
- SwGrfFormatColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
+ SwGrfFormatColl *pGrColl, SwAttrSet* pAutoAttr = nullptr );
public:
virtual ~SwNoTextNode();
@@ -68,7 +68,7 @@ public:
void SetContour( const tools::PolyPolygon *pPoly,
bool bAutomatic = false );
const tools::PolyPolygon *HasContour() const;
- bool _HasContour() const { return pContour!=0; };
+ bool _HasContour() const { return pContour!=nullptr; };
void GetContour( tools::PolyPolygon &rPoly ) const;
void CreateContour();
@@ -93,11 +93,11 @@ public:
// Inline methods from Node.hxx - we know TextNode only here!!
inline SwNoTextNode *SwNode::GetNoTextNode()
{
- return ND_NOTXTNODE & m_nNodeType ? static_cast<SwNoTextNode*>(this) : 0;
+ return ND_NOTXTNODE & m_nNodeType ? static_cast<SwNoTextNode*>(this) : nullptr;
}
inline const SwNoTextNode *SwNode::GetNoTextNode() const
{
- return ND_NOTXTNODE & m_nNodeType ? static_cast<const SwNoTextNode*>(this) : 0;
+ return ND_NOTXTNODE & m_nNodeType ? static_cast<const SwNoTextNode*>(this) : nullptr;
}
#endif // INCLUDED_SW_INC_NDNOTXT_HXX
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index d9776327bcb9..d5c78b7ae072 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -80,13 +80,13 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTextNode
SwOLENode( const SwNodeIndex &rWhere,
const svt::EmbeddedObjectRef&,
SwGrfFormatColl *pGrfColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
SwOLENode( const SwNodeIndex &rWhere,
const OUString &rName,
sal_Int64 nAspect,
SwGrfFormatColl *pGrfColl,
- SwAttrSet* pAutoAttr = 0 );
+ SwAttrSet* pAutoAttr = nullptr );
SwOLENode( const SwOLENode & ) = delete;
@@ -140,12 +140,12 @@ public:
/// Inline methods from Node.hxx
inline SwOLENode *SwNode::GetOLENode()
{
- return ND_OLENODE == m_nNodeType ? static_cast<SwOLENode*>(this) : 0;
+ return ND_OLENODE == m_nNodeType ? static_cast<SwOLENode*>(this) : nullptr;
}
inline const SwOLENode *SwNode::GetOLENode() const
{
- return ND_OLENODE == m_nNodeType ? static_cast<const SwOLENode*>(this) : 0;
+ return ND_OLENODE == m_nNodeType ? static_cast<const SwOLENode*>(this) : nullptr;
}
#endif // _ INCLUDED_SW_INC_NDOLE_HXX
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 285f3d01c14f..24a6bea2a96a 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -118,7 +118,7 @@ class SW_DLLPUBLIC SwTextNode: public SwContentNode, public ::sfx2::Metadatable
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes;
SAL_DLLPRIVATE SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl,
- const SfxItemSet* pAutoAttr = 0 );
+ const SfxItemSet* pAutoAttr = nullptr );
/// Copies the attributes at nStart to pDest.
SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
@@ -234,7 +234,7 @@ public:
/// Is in itratr.
void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
- OutputDevice* pOut = 0 ) const;
+ OutputDevice* pOut = nullptr ) const;
/// overriding to handle change of certain paragraph attributes
virtual bool SetAttr( const SfxPoolItem& ) override;
@@ -276,7 +276,7 @@ public:
const SwIndex &rIdx,
const sal_Int32 nLen,
const sal_uInt16 nWhich = 0,
- const SfxItemSet* pSet = 0,
+ const SfxItemSet* pSet = nullptr,
const bool bInclRefToxMark = false,
const bool bExactRange = false );
void GCAttr();
@@ -690,7 +690,7 @@ public:
const bool bAddSpaceAfterListLabelStr = false,
const bool bWithSpacesForLevel = false,
const bool bWithFootnote = true ) const;
- bool GetExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx = 0,
+ bool GetExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx = nullptr,
sal_Int32 nIdx = 0, sal_Int32 nLen = -1,
bool bWithNum = false, bool bWithFootnote = true,
bool bReplaceTabsWithSpaces = false ) const;
@@ -749,7 +749,7 @@ public:
/// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,
sal_Int32 nStart, sal_Int32 nEnd,
- SwUndoTransliterate* pUndo = 0 );
+ SwUndoTransliterate* pUndo = nullptr );
/// count words in given range - returns true if we refreshed out count
bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
@@ -848,12 +848,12 @@ inline SwTextFormatColl* SwTextNode::GetTextColl() const
/// Inline methods from Node.hxx
inline SwTextNode *SwNode::GetTextNode()
{
- return ND_TEXTNODE == m_nNodeType ? static_cast<SwTextNode*>(this) : 0;
+ return ND_TEXTNODE == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
}
inline const SwTextNode *SwNode::GetTextNode() const
{
- return ND_TEXTNODE == m_nNodeType ? static_cast<const SwTextNode*>(this) : 0;
+ return ND_TEXTNODE == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
}
inline void
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 66a62506f2df..b7e973fb321a 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -257,7 +257,7 @@ public:
IDocumentListItems& getIDocumentListItems();
/// Is node in the visible area of the Shell?
- bool IsInVisibleArea( SwViewShell const * pSh = 0 ) const;
+ bool IsInVisibleArea( SwViewShell const * pSh = nullptr ) const;
/// Is node in an protected area?
bool IsInProtectSect() const;
/** Is node in something that is protected (range, frame,
@@ -267,7 +267,7 @@ public:
/** Search PageDesc with which this node is formatted. If layout is existent
search over layout, else only the hard way is left: search over the nodes
to the front!! */
- const SwPageDesc* FindPageDesc( bool bCalcLay, size_t* pPgDescNdIdx = 0 ) const;
+ const SwPageDesc* FindPageDesc( bool bCalcLay, size_t* pPgDescNdIdx = nullptr ) const;
/// If node is in a fly return the respective format.
SwFrameFormat* GetFlyFormat() const;
@@ -391,8 +391,8 @@ public:
virtual SwContentNode *JoinPrev();
/** Is it possible to join two nodes?
In pIdx the second position can be returned. */
- bool CanJoinNext( SwNodeIndex* pIdx =0 ) const;
- bool CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
+ bool CanJoinNext( SwNodeIndex* pIdx =nullptr ) const;
+ bool CanJoinPrev( SwNodeIndex* pIdx =nullptr ) const;
void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
@@ -402,16 +402,16 @@ public:
/// Replacement for good old GetFrm(..):
SwContentFrm *getLayoutFrm( const SwRootFrm*,
- const Point* pDocPos = 0,
- const SwPosition *pPos = 0,
+ const Point* pDocPos = nullptr,
+ const SwPosition *pPos = nullptr,
const bool bCalcFrm = true ) const;
/** @return the real size of the frame or an empty rectangle if
no layout exists. Needed for export filters. */
SwRect FindLayoutRect( const bool bPrtArea = false,
- const Point* pPoint = 0,
+ const Point* pPoint = nullptr,
const bool bCalcFrm = false ) const;
SwRect FindPageFrmRect( const bool bPrtArea = false,
- const Point* pPoint = 0,
+ const Point* pPoint = nullptr,
const bool bCalcFrm = false ) const;
/** Method creates all views of document for given node. The content
@@ -554,7 +554,7 @@ public:
On default the frames are created until the end of the range.
When another NodeIndex pEnd is passed a MakeFrms is called up to it.
Used by TableToText. */
- void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
+ void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr );
/** Method deletes all views of document for the node. The
content frames are removed from the respective layout. */
@@ -589,43 +589,43 @@ private:
inline SwEndNode *SwNode::GetEndNode()
{
- return ND_ENDNODE == m_nNodeType ? static_cast<SwEndNode*>(this) : 0;
+ return ND_ENDNODE == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
}
inline const SwEndNode *SwNode::GetEndNode() const
{
- return ND_ENDNODE == m_nNodeType ? static_cast<const SwEndNode*>(this) : 0;
+ return ND_ENDNODE == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
}
inline SwStartNode *SwNode::GetStartNode()
{
- return ND_STARTNODE & m_nNodeType ? static_cast<SwStartNode*>(this) : 0;
+ return ND_STARTNODE & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
}
inline const SwStartNode *SwNode::GetStartNode() const
{
- return ND_STARTNODE & m_nNodeType ? static_cast<const SwStartNode*>(this) : 0;
+ return ND_STARTNODE & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
}
inline SwTableNode *SwNode::GetTableNode()
{
- return ND_TABLENODE == m_nNodeType ? static_cast<SwTableNode*>(this) : 0;
+ return ND_TABLENODE == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
}
inline const SwTableNode *SwNode::GetTableNode() const
{
- return ND_TABLENODE == m_nNodeType ? static_cast<const SwTableNode*>(this) : 0;
+ return ND_TABLENODE == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
}
inline SwSectionNode *SwNode::GetSectionNode()
{
- return ND_SECTIONNODE == m_nNodeType ? static_cast<SwSectionNode*>(this) : 0;
+ return ND_SECTIONNODE == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
}
inline const SwSectionNode *SwNode::GetSectionNode() const
{
- return ND_SECTIONNODE == m_nNodeType ? static_cast<const SwSectionNode*>(this) : 0;
+ return ND_SECTIONNODE == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
}
inline SwContentNode *SwNode::GetContentNode()
{
- return ND_CONTENTNODE & m_nNodeType ? static_cast<SwContentNode*>(this) : 0;
+ return ND_CONTENTNODE & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
}
inline const SwContentNode *SwNode::GetContentNode() const
{
- return ND_CONTENTNODE & m_nNodeType ? static_cast<const SwContentNode*>(this) : 0;
+ return ND_CONTENTNODE & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
}
inline bool SwNode::IsStartNode() const
@@ -717,7 +717,7 @@ inline const SwDoc* SwNode::GetDoc() const
inline SwFormatColl* SwContentNode::GetCondFormatColl() const
{
- return m_pCondColl ? static_cast<SwFormatColl*>(m_pCondColl->GetRegisteredIn()) : 0;
+ return m_pCondColl ? static_cast<SwFormatColl*>(m_pCondColl->GetRegisteredIn()) : nullptr;
}
inline SwFormatColl& SwContentNode::GetAnyFormatColl() const
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index ace92d0bcb4e..e07e7128917b 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -82,7 +82,7 @@ public:
void SetGrfBulletCP(sal_Unicode cP){m_cGrfBulletCP = cP;}
sal_Unicode GetGrfBulletCP() const {return m_cGrfBulletCP;}
- virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0) override;
+ virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = nullptr, const sal_Int16* pOrient = nullptr) override;
virtual void SetVertOrient(sal_Int16 eSet) override;
virtual sal_Int16 GetVertOrient() const override;
@@ -173,7 +173,7 @@ public:
const bool bInclStrings = true,
const bool bOnlyArabic = false,
const unsigned int _nRestrictToThisLevel = MAXLEVEL,
- Extremities* pExtremities = 0 ) const;
+ Extremities* pExtremities = nullptr ) const;
OUString MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels = false,
const sal_uInt8 nRestrictInclToThisLevel = 0 ) const;
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 8a6c3d555f08..01d32fb21bd1 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -164,23 +164,23 @@ class SW_DLLPUBLIC SwPaM : public sw::Ring<SwPaM>
SwPosition * m_pMark; ///< points at either m_Bound1 or m_Bound2
bool m_bIsInFrontOfLabel;
- SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 );
+ SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = nullptr );
SwPaM(SwPaM const& rPaM) = delete;
public:
- explicit SwPaM( const SwPosition& rPos, SwPaM* pRing = 0 );
- SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = 0 );
+ explicit SwPaM( const SwPosition& rPos, SwPaM* pRing = nullptr );
+ SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = nullptr );
SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt,
- long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = nullptr );
SwPaM( const SwNode& rMk, const SwNode& rPt,
- long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = nullptr );
SwPaM( const SwNodeIndex& rMk, sal_Int32 nMkContent,
- const SwNodeIndex& rPt, sal_Int32 nPtContent, SwPaM* pRing = 0 );
+ const SwNodeIndex& rPt, sal_Int32 nPtContent, SwPaM* pRing = nullptr );
SwPaM( const SwNode& rMk, sal_Int32 nMkContent,
- const SwNode& rPt, sal_Int32 nPtContent, SwPaM* pRing = 0 );
- SwPaM( const SwNode& rNd, sal_Int32 nContent = 0, SwPaM* pRing = 0 );
- SwPaM( const SwNodeIndex& rNd, sal_Int32 nContent = 0, SwPaM* pRing = 0 );
+ const SwNode& rPt, sal_Int32 nPtContent, SwPaM* pRing = nullptr );
+ SwPaM( const SwNode& rNd, sal_Int32 nContent = 0, SwPaM* pRing = nullptr );
+ SwPaM( const SwNodeIndex& rNd, sal_Int32 nContent = 0, SwPaM* pRing = nullptr );
virtual ~SwPaM();
/// this takes a second parameter, which indicates the Ring that
@@ -198,13 +198,13 @@ public:
bool bSearchInNotes,
utl::TextSearch& rSText,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, bool bInReadOnly = false);
+ const SwPaM *pPam =nullptr, bool bInReadOnly = false);
bool Find( const SwFormat& rFormat,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, bool bInReadOnly = false);
+ const SwPaM *pPam =nullptr, bool bInReadOnly = false);
bool Find( const SfxPoolItem& rAttr, bool bValue = true,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, bool bInReadOnly = false );
+ const SwPaM *pPam =nullptr, bool bInReadOnly = false );
bool Find( const SfxItemSet& rAttr, bool bNoColls,
SwMoveFn fnMove,
const SwPaM *pPam, bool bInReadOnly, bool bMoveFirst );
@@ -293,7 +293,7 @@ public:
{ return bOne ? m_Bound1 : m_Bound2; }
/// Get number of page which contains cursor.
- sal_uInt16 GetPageNum( bool bAtPoint = true, const Point* pLayPos = 0 );
+ sal_uInt16 GetPageNum( bool bAtPoint = true, const Point* pLayPos = nullptr );
/** Is in something protected (readonly) or selection contains
something protected. */
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 46c8267296c0..2fa8fbc52153 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -77,12 +77,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0) const override;
+ const IntlWrapper* pIntl = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -121,12 +121,12 @@ public:
inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
inline SwRegisterItem::SwRegisterItem( const bool bRegister ) :
@@ -159,12 +159,12 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -183,12 +183,12 @@ public:
inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
inline SwParaConnectBorderItem::SwParaConnectBorderItem( const bool bConnect ) :
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index dd3e4b45014b..554e5ebc6a43 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -57,7 +57,7 @@ struct SwLayoutInfo
sal_uInt16 mRedlineAuthor;
SwLayoutInfo()
- : mpAnchorFrm(0)
+ : mpAnchorFrm(nullptr)
, mPosition()
, mnStartNodeIdx( 0 )
, mnStartContent( -1 )
@@ -79,7 +79,7 @@ namespace SwPostItHelper
SwLayoutStatus getLayoutInfos(
SwLayoutInfo& o_rInfo,
const SwPosition& rAnchorPos,
- const SwPosition* pAnnotationStartPos = NULL );
+ const SwPosition* pAnnotationStartPos = nullptr );
long getLayoutHeight( const SwRootFrm* pRoot );
void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
@@ -98,7 +98,7 @@ public:
SwSidebarItem( const bool aShow,
const bool aFocus)
- : pPostIt(0)
+ : pPostIt(nullptr)
, bShow(aShow)
, bFocus(aFocus)
, mLayoutStatus( SwPostItHelper::INVISIBLE )
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 5a074e091a4b..adac3de94ac2 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -80,8 +80,8 @@ public:
SwPrintData()
{
- m_pPrintUIOptions = NULL;
- m_pRenderData = NULL;
+ m_pPrintUIOptions = nullptr;
+ m_pRenderData = nullptr;
bPrintGraphic =
bPrintTable =
@@ -251,21 +251,21 @@ public:
SwRenderData();
~SwRenderData();
- bool HasPostItData() const { return m_pPostItShell != 0; }
+ bool HasPostItData() const { return m_pPostItShell != nullptr; }
void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev );
void DeletePostItData();
SfxObjectShellLock const& GetTempDocShell() const { return m_xTempDocShell;}
void SetTempDocShell(SfxObjectShellLock const&);
- bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
+ bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != nullptr; }
bool NeedNewViewOptionAdjust( const SwViewShell& ) const;
void ViewOptionAdjustStart( SwViewShell &rSh, const SwViewOption &rViewOptions);
void ViewOptionAdjust( SwPrintData const* const pPrtOptions );
void ViewOptionAdjustStop();
void ViewOptionAdjustCrashPreventionKludge();
- bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
+ bool HasSwPrtOptions() const { return m_pPrtOptions != nullptr; }
SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions.get(); }
void MakeSwPrtOptions( SwDocShell const*const pDocShell,
SwPrintUIOptions const*const pOpt, bool const bIsPDFExport );
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 9aa157e0c93c..72d590928201 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -57,7 +57,7 @@ class SwRedlineExtraData_FormatColl : public SwRedlineExtraData
sal_uInt16 nPoolId;
public:
SwRedlineExtraData_FormatColl( const OUString& rColl, sal_uInt16 nPoolFormatId,
- const SfxItemSet* pSet = 0 );
+ const SfxItemSet* pSet = nullptr );
virtual ~SwRedlineExtraData_FormatColl();
virtual SwRedlineExtraData* CreateNew() const override;
virtual void Reject( SwPaM& rPam ) const override;
@@ -121,7 +121,7 @@ public:
// For sw3io: pNext/pExtraData are taken over.
SwRedlineData( RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT,
const OUString& rCmnt, SwRedlineData* pNxt,
- SwRedlineExtraData* pExtraData = 0 );
+ SwRedlineExtraData* pExtraData = nullptr );
~SwRedlineData();
@@ -200,7 +200,7 @@ public:
// For sw3io: pData is taken over!
SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos, bool bVsbl,
bool bDelLP, bool bIsPD) :
- SwPaM( rPos ), pRedlineData( pData ), pContentSect( 0 ),
+ SwPaM( rPos ), pRedlineData( pData ), pContentSect( nullptr ),
bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
{}
SwRangeRedline( const SwRangeRedline& );
@@ -213,12 +213,12 @@ public:
bool IsVisible() const { return bIsVisible; }
bool IsDelLastPara() const { return bDelLastPara; }
- void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 )
+ void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = nullptr )
{
if( !pSttPtr ) pSttPtr = Start();
*pSttPtr = rPos;
}
- void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = 0 )
+ void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = nullptr )
{
if( !pEndPtr ) pEndPtr = End();
*pEndPtr = rPos;
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 4ed183749aae..010e08a82dec 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -76,7 +76,7 @@ public:
static SwTextNode* FindAnchor( SwDoc* pDoc, const OUString& rRefMark,
sal_uInt16 nSubType, sal_uInt16 nSeqNo,
- sal_Int32* pStt, sal_Int32* pEnd = 0 );
+ sal_Int32* pStt, sal_Int32* pEnd = nullptr );
};
class SW_DLLPUBLIC SwGetRefField : public SwField
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index a07dd06382a6..f3581ce9968b 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -116,7 +116,7 @@ public:
void SetCondition(OUString const& rNew) { m_sCondition = rNew; }
OUString GetLinkFileName() const { return m_sLinkFileName; }
- void SetLinkFileName(OUString const& rNew, OUString const* pPassWd = 0)
+ void SetLinkFileName(OUString const& rNew, OUString const* pPassWd = nullptr)
{
m_sLinkFileName = rNew;
if (pPassWd) { SetLinkFilePassword(*pPassWd); }
@@ -203,7 +203,7 @@ public:
void SetCondition(OUString const& rNew) { m_Data.SetCondition(rNew); }
OUString GetLinkFileName() const;
- void SetLinkFileName(OUString const& rNew, OUString const*const pPassWd = 0);
+ void SetLinkFileName(OUString const& rNew, OUString const*const pPassWd = nullptr);
// Password of linked file (only valid during runtime!)
OUString GetLinkFilePassword() const
{ return m_Data.GetLinkFilePassword(); }
@@ -354,7 +354,7 @@ SwSectionFormat const * SwSection::GetFormat() const
inline SwSection* SwSection::GetParent() const
{
SwSectionFormat const * pFormat = GetFormat();
- SwSection* pRet = 0;
+ SwSection* pRet = nullptr;
if( pFormat )
pRet = pFormat->GetParentSection();
return pRet;
@@ -362,7 +362,7 @@ inline SwSection* SwSection::GetParent() const
inline SwSectionFormat* SwSectionFormat::GetParent() const
{
- SwSectionFormat* pRet = 0;
+ SwSectionFormat* pRet = nullptr;
if( GetRegisteredIn() )
pRet = const_cast<SwSectionFormat*>(dynamic_cast< const SwSectionFormat* >( GetRegisteredIn() ));
return pRet;
@@ -371,7 +371,7 @@ inline SwSectionFormat* SwSectionFormat::GetParent() const
inline SwSection* SwSectionFormat::GetParentSection() const
{
SwSectionFormat* pParent = GetParent();
- SwSection* pRet = 0;
+ SwSection* pRet = nullptr;
if( pParent )
{
pRet = pParent->GetSection();
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 9e8938eee4e9..9b8c94ea8304 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -161,7 +161,7 @@ public:
// Initial reading. Document is created only at Read(...)
// or in case it is given, into that.
// Special case for Load with Sw3Reader.
- SwReader( SfxMedium&, const OUString& rFilename, SwDoc *pDoc = 0 );
+ SwReader( SfxMedium&, const OUString& rFilename, SwDoc *pDoc = nullptr );
// Read into existing document.
// Document and position in document are taken from SwPaM.
@@ -412,10 +412,10 @@ public:
Writer();
virtual ~Writer();
- virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = 0 );
- sal_uLong Write( SwPaM&, SvStream&, const OUString* = 0 );
- virtual sal_uLong Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString* = 0, SfxMedium* = 0 );
- virtual sal_uLong Write( SwPaM&, SotStorage&, const OUString* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = nullptr );
+ sal_uLong Write( SwPaM&, SvStream&, const OUString* = nullptr );
+ virtual sal_uLong Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString* = nullptr, SfxMedium* = nullptr );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const OUString* = nullptr );
virtual void SetupFilterOptions(SfxMedium& rMedium);
@@ -476,8 +476,8 @@ public:
virtual bool IsStgWriter() const override;
- virtual sal_uLong Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString* = 0, SfxMedium* = 0 ) override;
- virtual sal_uLong Write( SwPaM&, SotStorage&, const OUString* = 0 ) override;
+ virtual sal_uLong Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString* = nullptr, SfxMedium* = nullptr ) override;
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const OUString* = nullptr ) override;
SotStorage& GetStorage() const { return *pStg; }
};
@@ -498,7 +498,7 @@ class SW_DLLPUBLIC SwWriter
bool bWriteAll;
public:
- sal_uLong Write( WriterRef& rxWriter, const OUString* = 0);
+ sal_uLong Write( WriterRef& rxWriter, const OUString* = nullptr);
SwWriter( SvStream&, SwCrsrShell &, bool bWriteAll = false );
SwWriter( SvStream&, SwDoc & );
@@ -523,7 +523,7 @@ struct SwReaderWriterEntry
bool bDelReader;
SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel )
- : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
+ : pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
{}
/// Get access to the reader.
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index f0fc06f3638e..dd1e736fe954 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -77,7 +77,7 @@ struct SwConversionArgs : SwArgsBase
nConvSrcLang( nLang ),
nConvTextLang( LANGUAGE_NONE ),
nConvTargetLang( LANGUAGE_NONE ),
- pTargetFont( NULL ),
+ pTargetFont( nullptr ),
bAllowImplicitChangesForNotConvertibleText( false )
{}
};
@@ -137,7 +137,7 @@ public:
}
const Point *GetCrsrPos() const
{
- return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0;
+ return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : nullptr;
}
bool IsCheck() const { return bCheck; }
void SetCheck( const bool bNew ) { bCheck = bNew; }
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 4e2064c36a57..8919596a8198 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -337,7 +337,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) = 0;
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0;
virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const OUString* pFormatStr = 0) = 0;
+ sal_uInt8 nDialogMode, const OUString* pFormatStr = nullptr) = 0;
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0;
virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) = 0;
@@ -360,7 +360,7 @@ public:
SwView& rVw,
const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode,
- const OUString *pCollName = 0,
+ const OUString *pCollName = nullptr,
bool bDraw = false,
const OString& sDefPage = OString() ) = 0;
@@ -371,7 +371,7 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
- const SwTableAutoFormat* pSelFormat = 0 ) = 0;
+ const SwTableAutoFormat* pSelFormat = nullptr ) = 0;
virtual SfxAbstractDialog * CreateSwBorderDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) = 0;
virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) = 0;
@@ -393,7 +393,7 @@ public:
bool bNewFrm = true,
bool bFormat = false,
const OString& sDefPage = OString(),
- const OUString* pFormatStr = 0) = 0;
+ const OUString* pFormatStr = nullptr) = 0;
/// @param nSlot
/// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered.
/// Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to activate certain dialog pane
@@ -402,7 +402,7 @@ public:
SfxStyleSheetBase& rBase,
sal_uInt16 nRegion,
const OString& sPage = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
bool bNew = false) = 0;
virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
@@ -422,7 +422,7 @@ public:
const OUString& rTableName,
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection,
- css::uno::Sequence< css::uno::Any >* pSelection = 0 ) = 0;
+ css::uno::Sequence< css::uno::Any >* pSelection = nullptr ) = 0;
virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg(vcl::Window* pParent) = 0;
virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) = 0;
virtual VclAbstractDialog* CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr) = 0;
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index 72f01e7c335e..a0d08f2a20c2 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -184,7 +184,7 @@ public:
SwAttrSet( SwAttrPool&, const sal_uInt16* nWhichPairTable );
SwAttrSet( const SwAttrSet& );
- virtual SfxItemSet* Clone(bool bItems = true, SfxItemPool *pToPool = 0) const override;
+ virtual SfxItemSet* Clone(bool bItems = true, SfxItemPool *pToPool = nullptr) const override;
bool Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew );
bool Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
@@ -192,7 +192,7 @@ public:
// Delete an item or a range.
sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
sal_uInt16 ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
- SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 );
+ SwAttrSet* pOld = nullptr, SwAttrSet* pNew = nullptr );
int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index 6660a2dd17e2..602c5919af06 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -37,7 +37,7 @@ protected:
public:
TYPEINFO_OVERRIDE();
- SwBaseLink( SfxLinkUpdateMode nMode, SotClipboardFormatId nFormat, SwContentNode* pNode = 0 )
+ SwBaseLink( SfxLinkUpdateMode nMode, SotClipboardFormatId nFormat, SwContentNode* pNode = nullptr )
: ::sfx2::SvBaseLink( nMode, nFormat ), pContentNode( pNode ),
bSwapIn( false ), bNoDataFlag( false ), bIgnoreDataChanged( false )
{}
@@ -53,7 +53,7 @@ public:
// For graphics only.
bool SwapIn( bool bWaitForData = false, bool bNativFormat = false );
- bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
+ bool Connect() { return nullptr != SvBaseLink::GetRealObject(); }
// Only for graphics-links (for switching between DDE / Grf-link).
void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 012acef8a8db..08b217e095fc 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -94,10 +94,10 @@ public:
public:
- virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+ virtual SwCursor* Create( SwPaM* pRing = nullptr ) const;
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
- virtual void SaveTableBoxContent( const SwPosition* pPos = 0 );
+ virtual void SaveTableBoxContent( const SwPosition* pPos = nullptr );
void FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const;
SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions,
@@ -113,13 +113,13 @@ public:
SwDocPositions nStart, SwDocPositions nEnde,
bool& bCancel,
FindRanges = FND_IN_BODY,
- const SwTextFormatColl* pReplFormat = 0 );
+ const SwTextFormatColl* pReplFormat = nullptr );
sal_uLong Find( const SfxItemSet& rSet, bool bNoCollections,
SwDocPositions nStart, SwDocPositions nEnde,
bool& bCancel,
FindRanges = FND_IN_BODY,
- const css::util::SearchOptions* pSearchOpt = 0,
- const SfxItemSet* rReplSet = 0 );
+ const css::util::SearchOptions* pSearchOpt = nullptr,
+ const SfxItemSet* rReplSet = nullptr );
// UI versions
bool IsStartWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
@@ -130,7 +130,7 @@ public:
bool GoEndWord();
bool GoNextWord();
bool GoPrevWord();
- bool SelectWord( SwViewShell* pViewShell, const Point* pPt = 0 );
+ bool SelectWord( SwViewShell* pViewShell, const Point* pPt = nullptr );
// API versions of above functions (will be used with a different
// WordType for the break iterator)
@@ -141,7 +141,7 @@ public:
bool GoEndWordWT( sal_Int16 nWordType );
bool GoNextWordWT( sal_Int16 nWordType );
bool GoPrevWordWT( sal_Int16 nWordType );
- bool SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = 0 );
+ bool SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = nullptr );
enum SentenceMoveType
{
@@ -242,7 +242,7 @@ struct _SwCursor_SavePos
_SwCursor_SavePos( const SwCursor& rCrsr )
: nNode( rCrsr.GetPoint()->nNode.GetIndex() ),
nContent( rCrsr.GetPoint()->nContent.GetIndex() ),
- pNext( 0 )
+ pNext( nullptr )
{}
virtual ~_SwCursor_SavePos() {}
@@ -264,7 +264,7 @@ protected:
virtual bool IsSelOvrCheck(int eFlags) override;
public:
- SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 );
+ SwTableCursor( const SwPosition &rPos, SwPaM* pRing = nullptr );
SwTableCursor( SwTableCursor& );
virtual ~SwTableCursor();
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index e2ca9302d2fd..567928739b1d 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -88,16 +88,16 @@ struct SwCallMouseEvent
SwCallMouseEvent()
: eType( EVENT_OBJECT_NONE )
- { PTR.pFormat = 0; PTR.IMAP.pIMapObj = 0; }
+ { PTR.pFormat = nullptr; PTR.IMAP.pIMapObj = nullptr; }
void Set( SwCallEventObjectType eTyp, const SwFrameFormat* pFormat )
- { eType = eTyp; PTR.pFormat = pFormat; PTR.IMAP.pIMapObj = 0; }
+ { eType = eTyp; PTR.pFormat = pFormat; PTR.IMAP.pIMapObj = nullptr; }
void Set( const SwFrameFormat* pFormat, const IMapObject* pIMapObj )
{ eType = EVENT_OBJECT_IMAGEMAP; PTR.pFormat = pFormat; PTR.IMAP.pIMapObj = pIMapObj; }
void Set( const SwFormatINetFormat* pINetAttr )
- { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; }
+ { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = nullptr; }
bool operator==( const SwCallMouseEvent& rEvent ) const
{
@@ -109,7 +109,7 @@ struct SwCallMouseEvent
{ return !( *this == rEvent ); }
void Clear()
- { eType = EVENT_OBJECT_NONE; PTR.pFormat = 0; PTR.IMAP.pIMapObj = 0; }
+ { eType = EVENT_OBJECT_NONE; PTR.pFormat = nullptr; PTR.IMAP.pIMapObj = nullptr; }
bool HasEvent() const { return EVENT_OBJECT_NONE != eType; }
};
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index a30a466f69fe..ee21c78430ef 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -221,7 +221,7 @@ public:
// It's not allowed to change the table model after the first call of one of these functions.
bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
- SwTableBox* pMergeBox, SwUndoTableMerge* pUndo = 0 )
+ SwTableBox* pMergeBox, SwUndoTableMerge* pUndo = nullptr )
{
#ifdef DBG_UTIL
m_bDontChangeModel = true;
@@ -253,7 +253,7 @@ public:
bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 );
void FindSuperfluousRows( SwSelBoxes& rBoxes )
- { _FindSuperfluousRows( rBoxes, 0, 0 ); }
+ { _FindSuperfluousRows( rBoxes, nullptr, nullptr ); }
void CheckRowSpan( SwTableLine* &rpLine, bool bUp ) const;
SwTableSortBoxes& GetTabSortBoxes() { return m_TabSortContentBoxes; }
@@ -279,9 +279,9 @@ public:
bool bCpyNds = true, bool bCpyName = false ) const;
// Copy table in this
bool InsTable( const SwTable& rCpyTable, const SwNodeIndex&,
- SwUndoTableCpyTable* pUndo = 0 );
+ SwUndoTableCpyTable* pUndo = nullptr );
bool InsTable( const SwTable& rCpyTable, const SwSelBoxes&,
- SwUndoTableCpyTable* pUndo = 0 );
+ SwUndoTableCpyTable* pUndo = nullptr );
bool InsNewTable( const SwTable& rCpyTable, const SwSelBoxes&,
SwUndoTableCpyTable* pUndo );
// Copy headline of table (with content!) into an other one.
@@ -350,7 +350,7 @@ class SW_DLLPUBLIC SwTableLine: public SwClient // Client of FrameFormat.
public:
TYPEINFO_OVERRIDE();
- SwTableLine() : m_pUpper(0) {}
+ SwTableLine() : m_pUpper(nullptr) {}
SwTableLine( SwTableLineFormat*, sal_uInt16 nBoxes, SwTableBox *pUp );
virtual ~SwTableLine();
@@ -370,9 +370,9 @@ public:
void ChgFrameFormat( SwTableLineFormat* pNewFormat );
// Search next/previous box with content.
- SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =nullptr,
bool bOvrTableLns=true ) const;
- SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =nullptr,
bool bOvrTableLns=true ) const;
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
@@ -412,9 +412,9 @@ public:
SwTableBox();
- SwTableBox( SwTableBoxFormat*, sal_uInt16 nLines, SwTableLine *pUp = 0 );
- SwTableBox( SwTableBoxFormat*, const SwStartNode&, SwTableLine *pUp = 0 );
- SwTableBox( SwTableBoxFormat*, const SwNodeIndex&, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFormat*, sal_uInt16 nLines, SwTableLine *pUp = nullptr );
+ SwTableBox( SwTableBoxFormat*, const SwStartNode&, SwTableLine *pUp = nullptr );
+ SwTableBox( SwTableBoxFormat*, const SwNodeIndex&, SwTableLine *pUp = nullptr );
virtual ~SwTableBox();
SwTableLines &GetTabLines() { return m_aLines; }
@@ -442,9 +442,9 @@ public:
sal_uLong GetSttIdx() const;
// Search next/previous box with content.
- SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =nullptr,
bool bOvrTableLns=true ) const;
- SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =nullptr,
bool bOvrTableLns=true ) const;
// Return name of this box. It is determined dynamically and
// is calculated from the position in the lines/boxes/table.
@@ -456,7 +456,7 @@ public:
// width or height when inserting cols or rows
Point GetCoordinates() const;
- bool IsInHeadline( const SwTable* pTable = 0 ) const;
+ bool IsInHeadline( const SwTable* pTable = nullptr ) const;
// Contains box contents, that can be formatted as a number?
bool HasNumContent( double& rNum, sal_uInt32& rFormatIndex,
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index a5281c7b4833..a4ad0b131c38 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -65,8 +65,8 @@ SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
// !! objects must be deleted from the caller!!
bool UCB_GetFileListOfFolder( const OUString& rURL,
std::vector<OUString>& rList,
- const OUString* pExtension = 0,
- std::vector<DateTime*>* pDateTimeList = 0 );
+ const OUString* pExtension = nullptr,
+ std::vector<DateTime*>* pDateTimeList = nullptr );
// is the URL an existing file?
SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index b6c8950c14fb..524cb4ebd30f 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -104,7 +104,7 @@ bool IsFrmInTableSel( const SwRect& rUnion, const SwFrm* pCell );
// i.e. boxes are added if some overlap at the sides.
// Additionally a new box is created and filled with the relevant content.
void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
- SwTableBox** ppMergeBox, SwUndoTableMerge* pUndo = 0 );
+ SwTableBox** ppMergeBox, SwUndoTableMerge* pUndo = nullptr );
// Check if selected boxes allow for a valid merge.
sal_uInt16 CheckMergeSel( const SwPaM& rPam );
@@ -169,7 +169,7 @@ class _FndBox
public:
_FndBox( SwTableBox* pB, _FndLine* pFL ) :
- pBox(pB), pUpper(pFL), pLineBefore( 0 ), pLineBehind( 0 ) {}
+ pBox(pB), pUpper(pFL), pLineBefore( nullptr ), pLineBehind( nullptr ) {}
const FndLines_t& GetLines() const { return m_Lines; }
FndLines_t& GetLines() { return m_Lines; }
@@ -187,7 +187,7 @@ public:
const bool bBehind );
bool AreLinesToRestore( const SwTable &rTable ) const;
- void ClearLineBehind() { pLineBehind = 0; }
+ void ClearLineBehind() { pLineBehind = nullptr; }
};
class _FndLine
@@ -200,7 +200,7 @@ class _FndLine
_FndLine& operator=(_FndLine const&) = delete;
public:
- _FndLine(SwTableLine* pL, _FndBox* pFB=0) : pLine(pL), pUpper(pFB) {}
+ _FndLine(SwTableLine* pL, _FndBox* pFB=nullptr) : pLine(pL), pUpper(pFB) {}
const FndBoxes_t& GetBoxes() const { return m_Boxes; }
FndBoxes_t& GetBoxes() { return m_Boxes; }
const SwTableLine* GetLine() const { return pLine; }
@@ -218,7 +218,7 @@ struct _FndPara
_FndBox* pFndBox;
_FndPara( const SwSelBoxes& rBxs, _FndBox* pFB )
- : rBoxes(rBxs), pFndLine(0), pFndBox(pFB) {}
+ : rBoxes(rBxs), pFndLine(nullptr), pFndBox(pFB) {}
_FndPara( const _FndPara& rPara, _FndBox* pFB )
: rBoxes(rPara.rBoxes), pFndLine(rPara.pFndLine), pFndBox(pFB) {}
_FndPara( const _FndPara& rPara, _FndLine* pFL )
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index cad07df1059f..fa54460edec4 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -52,12 +52,12 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 99d7436b3f7d..fde50c3519a7 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -94,7 +94,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
void InvalidateTOXMark();
@@ -426,7 +426,7 @@ protected:
public:
SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
sal_uInt16 nCreaType, const OUString& rTitle );
- SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
+ SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = nullptr );
virtual ~SwTOXBase();
virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
diff --git a/sw/inc/txtannotationfld.hxx b/sw/inc/txtannotationfld.hxx
index 7f7e330b6134..62b99e4ca45f 100644
--- a/sw/inc/txtannotationfld.hxx
+++ b/sw/inc/txtannotationfld.hxx
@@ -36,7 +36,7 @@ public:
virtual ~SwTextAnnotationField();
::sw::mark::IMark* GetAnnotationMark(
- SwDoc* pDoc = NULL ) const;
+ SwDoc* pDoc = nullptr ) const;
};
#endif
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index eaff28f8c7cc..23d21a20e4ba 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -31,7 +31,7 @@ class SwTextRefMark : public SwTextAttrEnd
public:
SwTextRefMark( SwFormatRefMark& rAttr,
- sal_Int32 const nStart, sal_Int32 const*const pEnd = 0);
+ sal_Int32 const nStart, sal_Int32 const*const pEnd = nullptr);
virtual sal_Int32* GetEnd() override; // SwTextAttr
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index 40c4024f4494..6538582889fc 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -32,7 +32,7 @@ class SwTextTOXMark : public SwTextAttrEnd
public:
SwTextTOXMark( SwTOXMark& rAttr,
- sal_Int32 const nStart, sal_Int32 const*const pEnd = 0);
+ sal_Int32 const nStart, sal_Int32 const*const pEnd = nullptr);
virtual ~SwTextTOXMark();
virtual sal_Int32 *GetEnd() override; // SwTextAttr
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index be74d1a3c210..298c9ca69941 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -54,7 +54,7 @@ protected:
bool bCacheComment;
mutable OUString * pComment;
- static void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 );
+ static void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = nullptr );
static void RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext );
static void RemoveIdxRel( sal_uLong, const SwPosition& );
@@ -149,11 +149,11 @@ protected:
// MoveTo: moves from the NodesArray into the UndoNodesArray.
// MoveFrom: moves from the UndoNodesArray into the NodesArray.
static void MoveToUndoNds( SwPaM& rPam,
- SwNodeIndex* pNodeIdx = 0,
- sal_uLong* pEndNdIdx = 0, sal_Int32 * pEndCntIdx = 0 );
+ SwNodeIndex* pNodeIdx = nullptr,
+ sal_uLong* pEndNdIdx = nullptr, sal_Int32 * pEndCntIdx = nullptr );
static void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
SwPosition& rInsPos,
- sal_uLong* pEndNdIdx = 0, sal_Int32 * pEndCntIdx = 0 );
+ sal_uLong* pEndNdIdx = nullptr, sal_Int32 * pEndCntIdx = nullptr );
// These two methods move the SPoint back/forth from PaM. With it
// a range can be spanned for Undo/Redo. (In this case the SPoint
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 3cf2c2c3322f..902e75530423 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -39,7 +39,7 @@ private:
bool m_bSkipOverProtectSections : 1;
public:
- SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
+ SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = nullptr );
virtual ~SwUnoCrsr();
protected:
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 5c59c67b9896..41f83af366ce 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -85,7 +85,7 @@ namespace SwUnoCursorHelper
, SwPaM& rPam
, css::uno::Any *pAny
, css::beans::PropertyState& eState
- , const SwTextNode* pNode = 0 );
+ , const SwTextNode* pNode = nullptr );
void GetCurPageStyle(SwPaM& rPaM, OUString &rString);
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 81ba5ec5dc66..661b9acc5917 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -158,7 +158,7 @@ class SwXShape : public SwXShapeBaseClass,
@author OD
*/
- SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = 0L );
+ SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = nullptr );
/** method to determine position according to the positioning attributes
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
index d9fa41e6b5bc..9a29e8b82178 100644
--- a/sw/inc/unoparagraph.hxx
+++ b/sw/inc/unoparagraph.hxx
@@ -84,7 +84,7 @@ public:
static css::uno::Reference<css::text::XTextContent>
CreateXParagraph(SwDoc & rDoc, SwTextNode * pTextNode,
css::uno::Reference< css::text::XText>
- const& xParentText = 0,
+ const& xParentText = nullptr,
const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
const SwTextNode * GetTextNode() const;
@@ -279,8 +279,8 @@ struct SwXParagraphEnumeration
css::uno::Reference< css::text::XText > const & xParent,
std::shared_ptr<SwUnoCrsr> pCursor,
const CursorType eType,
- SwStartNode const*const pStartNode = 0,
- SwTable const*const pTable = 0);
+ SwStartNode const*const pStartNode = nullptr,
+ SwTable const*const pTable = nullptr);
};
#endif // INCLUDED_SW_INC_UNOPARAGRAPH_HXX
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index e9cf05ae6839..d19f5f170885 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -66,7 +66,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pDoc = 0;}
+ void Invalidate() {pDoc = nullptr;}
};
class SwXEndnoteProperties : public cppu::WeakAggImplHelper2
@@ -96,7 +96,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pDoc = 0;}
+ void Invalidate() {pDoc = nullptr;}
};
class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2
@@ -126,7 +126,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pDoc = 0;}
+ void Invalidate() {pDoc = nullptr;}
};
class SwXNumberingRules : public cppu::WeakAggImplHelper5
@@ -155,7 +155,7 @@ protected:
public:
SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
- SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc = NULL); // NumRule for paragraphs, numbering styles
+ SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc = nullptr); // NumRule for paragraphs, numbering styles
SwXNumberingRules(SwDoc& rDoc); //create a new instance
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
@@ -202,7 +202,7 @@ public:
const SwNumRule* GetNumRule() {return pNumRule;}
static bool isInvalidStyle(const OUString &rName);
- void Invalidate() {pDocShell = 0;}
+ void Invalidate() {pDocShell = nullptr;}
OUString GetCreatedNumRuleName() const {return m_sCreatedNumRuleName;}
static css::uno::Sequence<css::beans::PropertyValue> GetPropertiesForNumFormat(
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index 0394b1b0ab7a..f8fa7463d2e5 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -83,7 +83,7 @@ public:
css::uno::Reference< css::text::XText > const& xParent,
const enum CursorType eType,
SwPosition const& rPos,
- SwPosition const*const pMark = 0);
+ SwPosition const*const pMark = nullptr);
SwXTextCursor(
css::uno::Reference< css::text::XText > const& xParent,
SwPaM const& rSourceCursor,
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 438ca6e2cf2a..f8be80a8dd09 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -492,7 +492,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pxDoc = 0;}
+ void Invalidate() {pxDoc = nullptr;}
};
class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper
@@ -608,7 +608,7 @@ public:
void AdjustViewOptions( SwPrintData const* const pPrtOptions );
bool checkShell( const SwViewShell& rCompare ) const
{ return &rCompare == m_pShell; }
- void DontTouchThatViewShellItSmellsFunny() { m_pShell = 0; }
+ void DontTouchThatViewShellItSmellsFunny() { m_pShell = nullptr; }
};
#endif
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index b9fa19564af3..359f2e80d8e3 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -138,10 +138,10 @@ struct SwApplyTemplate
SwApplyTemplate() :
eType(0),
nColor(0),
- m_pFormatClipboard(0),
+ m_pFormatClipboard(nullptr),
nUndo(0)
{
- aColl.pTextColl = 0;
+ aColl.pTextColl = nullptr;
}
};
@@ -261,7 +261,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
// methods for searching
// set search context
SAL_DLLPRIVATE bool SearchAndWrap(bool bApi = false);
- SAL_DLLPRIVATE bool SearchAll(sal_uInt16* pFound = 0);
+ SAL_DLLPRIVATE bool SearchAll(sal_uInt16* pFound = nullptr);
SAL_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions );
SAL_DLLPRIVATE void Replace();
@@ -309,8 +309,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
// used for spell checking and text conversion
SAL_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, bool bStartDone,
- bool bEndDone, SwConversionArgs *pConvArgs = 0 );
- SAL_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
+ bool bEndDone, SwConversionArgs *pConvArgs = nullptr );
+ SAL_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = nullptr );
SAL_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
SAL_DLLPRIVATE void SpellKontext(bool bOn = true)
@@ -536,8 +536,8 @@ public:
bool AreOnlyFormsSelected() const;
bool HasDrwObj(SdrObject *pSdrObj) const;
bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
- bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
- vcl::Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
+ bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=nullptr,
+ vcl::Window* pWin=nullptr, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
@@ -549,7 +549,7 @@ public:
// edit links
void EditLinkDlg();
- void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
+ void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = nullptr);
void InsertCaption(const InsCaptionOpt *pOpt);
// Async call by Core
@@ -565,7 +565,7 @@ public:
inline virtual const FmFormShell *GetFormShell() const override { return m_pFormShell; }
// so that in the SubShells' DTors m_pShell can be reset if applicable
- void ResetSubShell() { m_pShell = 0; }
+ void ResetSubShell() { m_pShell = nullptr; }
virtual void WriteUserData(OUString &, bool bBrowse = false) override;
virtual void ReadUserData(const OUString &, bool bBrowse = false) override;
@@ -617,8 +617,8 @@ public:
//public fuer D&D
int InsertGraphic( const OUString &rPath, const OUString &rFilter,
- bool bLink = true, GraphicFilter *pFlt = 0,
- Graphic* pPreviewGrf = 0,
+ bool bLink = true, GraphicFilter *pFlt = nullptr,
+ Graphic* pPreviewGrf = nullptr,
bool bRule = false );
void ExecuteScan( SfxRequest& rReq );
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 42fd3e5ca5b0..5055992f36b6 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -244,7 +244,7 @@ public:
{ b ? (m_nCoreOptions |= VIEWOPT_1_POSTITS ) : ( m_nCoreOptions &= ~VIEWOPT_1_POSTITS); }
static void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
bool bIsScript );
- static sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 );
+ static sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = nullptr );
inline bool IsShowHiddenChar(bool bHard = false) const
{ return !m_bReadonly && (m_nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 6e93657ee0dd..61b562b7a753 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -546,10 +546,10 @@ public:
SwAccessibleMap* GetAccessibleMap();
- SwViewShell( SwViewShell&, vcl::Window *pWin = 0, OutputDevice *pOut = 0,
+ SwViewShell( SwViewShell&, vcl::Window *pWin = nullptr, OutputDevice *pOut = nullptr,
long nFlags = 0 );
SwViewShell( SwDoc& rDoc, vcl::Window *pWin,
- const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
+ const SwViewOption *pOpt = nullptr, OutputDevice *pOut = nullptr,
long nFlags = 0 );
virtual ~SwViewShell();
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 48487bcf0b20..0e2da96efe14 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -99,7 +99,7 @@ public:
// make a complete swap access to m_pCursorOverlay is needed there
void swapContent(SwSelPaintRects& rSwap);
- void Show(std::vector<OString>* pSelectionRectangles = 0);
+ void Show(std::vector<OString>* pSelectionRectangles = nullptr);
void Hide();
void Invalidate( const SwRect& rRect );
@@ -112,7 +112,7 @@ public:
// check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY
static void Get1PixelInLogic( const SwViewShell& rSh,
- long* pX = 0, long* pY = 0 );
+ long* pX = nullptr, long* pY = nullptr );
};
class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
@@ -128,7 +128,7 @@ private:
public:
SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos );
SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos,
- const Point& rPtPos, SwPaM* pRing = 0 );
+ const Point& rPtPos, SwPaM* pRing = nullptr );
// note: *intentionally* links the new shell cursor into the old one's Ring
SwShellCrsr( SwShellCrsr& );
virtual ~SwShellCrsr();
@@ -152,10 +152,10 @@ public:
virtual void SetMark() override;
- virtual SwCursor* Create( SwPaM* pRing = 0 ) const override;
+ virtual SwCursor* Create( SwPaM* pRing = nullptr ) const override;
virtual short MaxReplaceArived() override; //returns RET_YES/RET_CANCEL/RET_NO
- virtual void SaveTableBoxContent( const SwPosition* pPos = 0 ) override;
+ virtual void SaveTableBoxContent( const SwPosition* pPos = nullptr ) override;
bool UpDown( bool bUp, sal_uInt16 nCnt = 1 );
@@ -192,10 +192,10 @@ public:
bool IsInside( const Point& rPt ) const;
virtual void SetMark() override;
- virtual SwCursor* Create( SwPaM* pRing = 0 ) const override;
+ virtual SwCursor* Create( SwPaM* pRing = nullptr ) const override;
virtual short MaxReplaceArived() override; //returns RET_YES/RET_CANCEL/RET_NO
- virtual void SaveTableBoxContent( const SwPosition* pPos = 0 ) override;
+ virtual void SaveTableBoxContent( const SwPosition* pPos = nullptr ) override;
// true: Cursor can be set to this position.
virtual bool IsAtValidPos( bool bPoint = true ) const override;
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index 23fb6a2f03e8..4e484ea8322f 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -89,8 +89,8 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL,
SwDocShellRef xDocShRef = new SwDocShell;
SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READ);
- const SfxFilter* pImportFilter = 0;
- SfxFilter* pExportFilter = 0;
+ const SfxFilter* pImportFilter = nullptr;
+ SfxFilter* pExportFilter = nullptr;
if (bExport)
{
SfxGetpApp()->GetFilterMatcher().GuessFilter(*pSrcMed, &pImportFilter, SfxFilterFlags::IMPORT, SfxFilterFlags::NONE);
diff --git a/sw/qa/core/test_ToxTextGenerator.cxx b/sw/qa/core/test_ToxTextGenerator.cxx
index 5ce9098ccfa9..2a565ee05a88 100644
--- a/sw/qa/core/test_ToxTextGenerator.cxx
+++ b/sw/qa/core/test_ToxTextGenerator.cxx
@@ -48,7 +48,7 @@ public:
struct MockedSortTab : public SwTOXSortTabBase {
MockedSortTab()
- : SwTOXSortTabBase(TOX_SORT_INDEX,0,0,0) {;}
+ : SwTOXSortTabBase(TOX_SORT_INDEX,nullptr,nullptr,nullptr) {;}
virtual TextAndReading GetText_Impl() const override {
return TextAndReading();
@@ -86,7 +86,7 @@ void
ToxTextGeneratorTest::EmptyStringIsReturnedAsNumStringIfNoTextMarkIsSet()
{
MockedSortTab sortTab;
- sortTab.pTextMark = NULL;
+ sortTab.pTextMark = nullptr;
OUString expected("");
OUString actual = ToxTextGenerator::GetNumStringOfFirstNode(sortTab, false, 0);
@@ -153,13 +153,13 @@ ToxTextGeneratorTest::ChapterNumberWithoutTextIsGeneratedForNoprepstTitle()
token.nChapterFormat = CF_NUM_NOPREPST_TITLE;
OUString expected("1");
- OUString actual = ttg.GenerateTextForChapterToken(token, NULL, NULL);
+ OUString actual = ttg.GenerateTextForChapterToken(token, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(expected, actual);
// we cannot mock the pre- and suffix generation in the chapterfield. We just test that sNumber and
// sTitle are used and hope that the pre- and suffix addition works.
token.nChapterFormat = CF_NUMBER;
- expected = ttg.GenerateTextForChapterToken(token, NULL, NULL);
+ expected = ttg.GenerateTextForChapterToken(token, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(expected, actual);
}
@@ -179,13 +179,13 @@ ToxTextGeneratorTest::ChapterNumberWithTitleIsGeneratedForNumberNoPrepst()
token.nChapterFormat = CF_NUMBER_NOPREPST;
OUString expected("5 myTitle");
- OUString actual = ttg.GenerateTextForChapterToken(token, NULL, NULL);
+ OUString actual = ttg.GenerateTextForChapterToken(token, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(expected, actual);
// we cannot mock the pre- and suffix generation in the chapterfield. We just test that sNumber and
// sTitle are used and hope that the pre- and suffix addition works.
token.nChapterFormat = CF_NUM_TITLE;
- expected = ttg.GenerateTextForChapterToken(token, NULL, NULL);
+ expected = ttg.GenerateTextForChapterToken(token, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(expected, actual);
}
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index bb76e6cf8f54..206fe93146d1 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -74,7 +74,7 @@ class SwDocTest : public test::BootstrapFixture
{
public:
SwDocTest()
- : m_pDoc(NULL)
+ : m_pDoc(nullptr)
{
}
@@ -571,7 +571,7 @@ void SwDocTest::testSwScanner()
{
SwScanner aScanner(*pTextNode,
OUString("Hello World"),
- 0, ModelToViewHelper(), i18n::WordType::DICTIONARY_WORD, 0,
+ nullptr, ModelToViewHelper(), i18n::WordType::DICTIONARY_WORD, 0,
RTL_CONSTASCII_LENGTH("Hello World"));
bool bFirstOk = aScanner.NextWord();
@@ -926,7 +926,7 @@ void SwDocTest::testMergePortionsDeleteNotSorted()
SwPaM aPaM(aIdx);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, " AABBCC");
- SwCharFormat *const pCharFormat(m_pDoc->MakeCharFormat("foo", 0));
+ SwCharFormat *const pCharFormat(m_pDoc->MakeCharFormat("foo", nullptr));
SwFormatCharFormat const charFormat(pCharFormat);
SwFormatINetFormat const inetFormat("http://example.com", "");
@@ -973,8 +973,8 @@ void SwDocTest::testGraphicAnchorDeletion()
SwFormatAnchor aAnchor(FLY_AS_CHAR);
aAnchor.SetAnchor(aPaM.GetPoint());
aFlySet.Put(aAnchor);
- SwFlyFrameFormat *pFrame = m_pDoc->getIDocumentContentOperations().Insert(aPaM, OUString(), OUString(), NULL, &aFlySet, NULL, NULL);
- CPPUNIT_ASSERT_MESSAGE("Expected frame", pFrame != NULL);
+ SwFlyFrameFormat *pFrame = m_pDoc->getIDocumentContentOperations().Insert(aPaM, OUString(), OUString(), nullptr, &aFlySet, nullptr, nullptr);
+ CPPUNIT_ASSERT_MESSAGE("Expected frame", pFrame != nullptr);
CPPUNIT_ASSERT_MESSAGE("Should be 1 graphic", m_pDoc->GetFlyCount(FLYCNTTYPE_GRF) == 1);
@@ -1067,7 +1067,7 @@ void SwDocTest::randomTest()
for( int i = 0; i < 2000; i++ )
{
SwPaM aPam(m_pDoc->GetNodes());
- SwCursor aCrs(getRandomPosition(m_pDoc, i/20), 0, false);
+ SwCursor aCrs(getRandomPosition(m_pDoc, i/20), nullptr, false);
aCrs.SetMark();
switch (getRand (i < 50 ? 3 : 6)) {
@@ -1596,7 +1596,7 @@ void SwDocTest::test64kPageDescs()
size_t nPos;
SwPageDesc *pDesc = m_pDoc->FindPageDesc( aChanged, &nPos );
- CPPUNIT_ASSERT( pDesc != NULL );
+ CPPUNIT_ASSERT( pDesc != nullptr );
CPPUNIT_ASSERT( nPos == nPageDescCount );
// check if we didn't mess up PageDesc at pos 0
@@ -1608,12 +1608,12 @@ void SwDocTest::test64kPageDescs()
m_pDoc->DelPageDesc( aChanged, nPos );
pDesc = m_pDoc->FindPageDesc( aChanged, &nPos );
// not there anymore
- CPPUNIT_ASSERT( pDesc == NULL );
+ CPPUNIT_ASSERT( pDesc == nullptr );
CPPUNIT_ASSERT( nPos == SIZE_MAX );
// check if PageDesc at pos 0 is still there
pDesc = m_pDoc->FindPageDesc( aZeroName, &nPos );
- CPPUNIT_ASSERT( pDesc != NULL );
+ CPPUNIT_ASSERT( pDesc != nullptr );
CPPUNIT_ASSERT( nPos == 0 );
}
@@ -1634,7 +1634,7 @@ void SwDocTest::setUp()
void SwDocTest::tearDown()
{
- m_pDoc = 0; // deleted by DoClose()
+ m_pDoc = nullptr; // deleted by DoClose()
m_xDocShRef->DoClose();
m_xDocShRef.Clear();
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index a33329a8e890..1871c61ba052 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -666,15 +666,15 @@ void Test::testSkipImages()
// during DOC and DOCX import, using the "SkipImages" FilterOptions.
const char* aFilterNames[][2] = {
- { "/sw/qa/extras/globalfilter/data/skipimages.doc", NULL },
+ { "/sw/qa/extras/globalfilter/data/skipimages.doc", nullptr },
{ "/sw/qa/extras/globalfilter/data/skipimages.doc", "SkipImages" },
- { "/sw/qa/extras/globalfilter/data/skipimages.docx", NULL },
+ { "/sw/qa/extras/globalfilter/data/skipimages.docx", nullptr },
{ "/sw/qa/extras/globalfilter/data/skipimages.docx", "SkipImages" }
};
for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
{
- bool bSkipImages = aFilterNames[nFilter][1] != NULL;
+ bool bSkipImages = aFilterNames[nFilter][1] != nullptr;
OString sFailedMessage = OString("Failed on filter: ") + aFilterNames[nFilter][0];
if (mxComponent.is())
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 8ae58fe37824..09b3a95a429a 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -154,7 +154,7 @@ public:
}
SwModelTestBase(const char* pTestDocumentPath = "", const char* pFilter = "")
- : mpXmlBuffer(0)
+ : mpXmlBuffer(nullptr)
, mpTestDocumentPath(pTestDocumentPath)
, mpFilter(pFilter)
, mnStartTime(0)
@@ -297,7 +297,7 @@ private:
// create the xml writer
mpXmlBuffer = xmlBufferCreate();
xmlTextWriterPtr pXmlWriter = xmlNewTextWriterMemory(mpXmlBuffer, 0);
- xmlTextWriterStartDocument(pXmlWriter, NULL, NULL, NULL);
+ xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr);
// create the dump
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
@@ -317,7 +317,7 @@ protected:
if (mpXmlBuffer)
{
xmlBufferFree(mpXmlBuffer);
- mpXmlBuffer = 0;
+ mpXmlBuffer = nullptr;
}
}
@@ -654,7 +654,7 @@ protected:
xmlDocPtr parseExport(const OUString& rStreamName = OUString("word/document.xml"))
{
if (!mbExported)
- return 0;
+ return nullptr;
return parseExportInternal( maTempFile.GetURL(), rStreamName );
}
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 6f95565e7d9b..992ddd5ddeb0 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -92,7 +92,7 @@ public:
DBuriMap::const_iterator pos = aDBuriMap.find( aURI );
if (pos == aDBuriMap.end())
{
- aDBName = SwDBManager::LoadAndRegisterDataSource( aURI, NULL, &aWorkDir );
+ aDBName = SwDBManager::LoadAndRegisterDataSource( aURI, nullptr, &aWorkDir );
aDBuriMap.insert( std::pair< OUString, OUString >( aURI, aDBName ) );
std::cout << "New datasource name: '" << aDBName << "'" << std::endl;
}
@@ -170,7 +170,7 @@ public:
xmlDocPtr parseMailMergeExport(int number, const OUString& rStreamName = OUString("word/document.xml"))
{
if (mnCurOutputType != text::MailMergeType::FILE)
- return 0;
+ return nullptr;
OUString name = mailMergeOutputPrefix + OUString::number( number ) + ".odt";
return parseExportInternal( mailMergeOutputURL + "/" + name, rStreamName );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 0b82bcf3654d..cfa1ddb4637e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -700,7 +700,7 @@ DECLARE_OOXMLEXPORT_TEST(testAbsolutePositionOffsetValue,"fdo78432.docx")
for(sal_Int32 index = 0; index<6; ++index)
{
- CPPUNIT_ASSERT(pXmlObjs[index]->nodesetval != 0);
+ CPPUNIT_ASSERT(pXmlObjs[index]->nodesetval != nullptr);
xmlNodePtr pXmlNode = pXmlObjs[index]->nodesetval->nodeTab[0];
OUString contents = OUString::createFromAscii(reinterpret_cast<const char*>((pXmlNode->children[0]).content));
CPPUNIT_ASSERT( contents.toInt64() <= IntMax );
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index f0b495d37c5b..b9b3e93b6add 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -248,7 +248,7 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- SwDoc* createDoc(const char* pName = 0);
+ SwDoc* createDoc(const char* pName = nullptr);
};
SwDoc* SwUiWriterTest::createDoc(const char* pName)
@@ -483,7 +483,7 @@ void SwUiWriterTest::testImportRTF()
SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), StreamMode::READ);
SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCrsr());
Reader* pRTFReader = SwReaderWriter::GetReader(READER_WRITER_RTF);
- CPPUNIT_ASSERT(pRTFReader != 0);
+ CPPUNIT_ASSERT(pRTFReader != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader));
sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex();
@@ -719,7 +719,7 @@ void SwUiWriterTest::testChineseConversionBlank()
SwPaM aPaM(aIdx);
// When
- SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, NULL,
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
true, false, false );
aWrap.Convert();
@@ -743,7 +743,7 @@ void SwUiWriterTest::testChineseConversionNonChineseText()
pDoc->getIDocumentContentOperations().InsertString(aPaM, NON_CHINESE_CONTENT);
// When
- SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, NULL,
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
true, false, false );
aWrap.Convert();
@@ -767,7 +767,7 @@ void SwUiWriterTest::testChineseConversionTraditionalToSimplified()
pDoc->getIDocumentContentOperations().InsertString(aPaM, CHINESE_TRADITIONAL_CONTENT);
// When
- SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, NULL,
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
true, false, false );
aWrap.Convert();
@@ -791,7 +791,7 @@ void SwUiWriterTest::testChineseConversionSimplifiedToTraditional()
pDoc->getIDocumentContentOperations().InsertString(aPaM, CHINESE_SIMPLIFIED_CONTENT);
// When
- SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, NULL,
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
true, false, false );
aWrap.Convert();
@@ -2546,14 +2546,14 @@ void SwUiWriterTest::testShapeAnchorUndo()
Rectangle aOrigLogicRect(pObject->GetLogicRect());
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
- rUndoManager.StartUndo(UNDO_START, NULL);
+ rUndoManager.StartUndo(UNDO_START, nullptr);
pWrtShell->SelectObj(Point(), 0, pObject);
pWrtShell->GetDrawView()->MoveMarkedObj(Size(100, 100));
pWrtShell->ChgAnchor(0, true);
- rUndoManager.EndUndo(UNDO_END, NULL);
+ rUndoManager.EndUndo(UNDO_END, nullptr);
CPPUNIT_ASSERT(aOrigLogicRect != pObject->GetLogicRect());
@@ -2679,7 +2679,7 @@ void SwUiWriterTest::testTdf87922()
// Create an SwDrawTextInfo.
SwDoc* pDoc = createDoc("tdf87922.odt");
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- SwScriptInfo* pScriptInfo = 0;
+ SwScriptInfo* pScriptInfo = nullptr;
// Get access to the single paragraph in the document.
SwNodeIndex aNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1);
const OUString& rText = aNodeIndex.GetNode().GetTextNode()->GetText();
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index 14f16ff4946a..5b885a6c3a1a 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -28,13 +28,13 @@
SwNodeNum::SwNodeNum( SwTextNode* pTextNode )
: SwNumberTreeNode(),
mpTextNode( pTextNode ),
- mpNumRule( 0 )
+ mpNumRule( nullptr )
{
}
SwNodeNum::SwNodeNum( SwNumRule* pNumRule )
: SwNumberTreeNode(),
- mpTextNode( 0 ),
+ mpTextNode( nullptr ),
mpNumRule( pNumRule )
{
}
@@ -118,7 +118,7 @@ void SwNodeNum::PostRemove()
{
GetNumRule()->RemoveTextNode( *(GetTextNode()) );
}
- mpNumRule = 0;
+ mpNumRule = nullptr;
}
}
@@ -228,9 +228,9 @@ bool SwNodeNum::LessThan(const SwNumberTreeNode & rNode) const
bool bResult = false;
const SwNodeNum & rTmpNode = static_cast<const SwNodeNum &>(rNode);
- if (mpTextNode == NULL && rTmpNode.mpTextNode != NULL)
+ if (mpTextNode == nullptr && rTmpNode.mpTextNode != nullptr)
bResult = true;
- else if (mpTextNode != NULL && rTmpNode.mpTextNode != NULL)
+ else if (mpTextNode != nullptr && rTmpNode.mpTextNode != nullptr)
{
// #i83479# - refactoring
// simplify comparison by comparing the indexes of the text nodes
@@ -366,7 +366,7 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum )
// #i81002#
const SwNodeNum* SwNodeNum::GetPrecedingNodeNumOf( const SwTextNode& rTextNode ) const
{
- const SwNodeNum* pPrecedingNodeNum( 0 );
+ const SwNodeNum* pPrecedingNodeNum( nullptr );
// #i83479#
SwNodeNum aNodeNumForTextNode( const_cast<SwTextNode*>(&rTextNode) );
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 80151ff79fb2..459cf5425718 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -27,7 +27,7 @@ using std::find;
SwNumberTreeNode::SwNumberTreeNode()
: mChildren(),
- mpParent( 0 ),
+ mpParent( nullptr ),
mnNumber( 0 ),
mbContinueingPreviousSubTree( false ),
mbPhantom( false ),
@@ -53,7 +53,7 @@ SwNumberTreeNode::~SwNumberTreeNode()
}
}
- OSL_ENSURE( IsPhantom() || mpParent == NULL, ": I'm not supposed to have a parent.");
+ OSL_ENSURE( IsPhantom() || mpParent == nullptr, ": I'm not supposed to have a parent.");
mpParent = reinterpret_cast<SwNumberTreeNode *>(0xdeadbeef);
@@ -62,7 +62,7 @@ SwNumberTreeNode::~SwNumberTreeNode()
SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
{
- SwNumberTreeNode * pNew = NULL;
+ SwNumberTreeNode * pNew = nullptr;
if (! mChildren.empty() &&
(*mChildren.begin())->IsPhantom())
@@ -83,7 +83,7 @@ SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
OSL_FAIL("insert of phantom failed!");
delete pNew;
- pNew = NULL;
+ pNew = nullptr;
}
}
@@ -404,7 +404,7 @@ void SwNumberTreeNode::MoveChildren(SwNumberTreeNode * pDest)
if (pMyFirst->IsPhantom())
{
- SwNumberTreeNode * pDestLast = NULL;
+ SwNumberTreeNode * pDestLast = nullptr;
if (pDest->mChildren.empty())
pDestLast = pDest->CreatePhantom();
@@ -471,7 +471,7 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
return;
}
- if ( pChild->GetParent() != NULL || pChild->GetChildCount() > 0 )
+ if ( pChild->GetParent() != nullptr || pChild->GetChildCount() > 0 )
{
OSL_FAIL("only orphans allowed.");
return;
@@ -616,7 +616,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
{
SwNumberTreeNode * pRemove = *aRemoveIt;
- pRemove->mpParent = NULL;
+ pRemove->mpParent = nullptr;
tSwNumberTreeChildren::const_iterator aItPred = mChildren.end();
@@ -965,9 +965,9 @@ bool SwNumberTreeNodeLessThan(const SwNumberTreeNode * pA,
{
bool bResult = false;
- if (pA == NULL && pB != NULL)
+ if (pA == nullptr && pB != nullptr)
bResult = true;
- else if (pA != NULL && pB != NULL)
+ else if (pA != nullptr && pB != nullptr)
bResult = pA->LessThan(*pB);
return bResult;
@@ -975,7 +975,7 @@ bool SwNumberTreeNodeLessThan(const SwNumberTreeNode * pA,
SwNumberTreeNode * SwNumberTreeNode::GetLastDescendant() const
{
- SwNumberTreeNode * pResult = NULL;
+ SwNumberTreeNode * pResult = nullptr;
tSwNumberTreeChildren::const_reverse_iterator aIt = mChildren.rbegin();
if (aIt != mChildren.rend())
@@ -996,7 +996,7 @@ bool SwNumberTreeNode::LessThan(const SwNumberTreeNode & rTreeNode) const
SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
{
- SwNumberTreeNode * pResult = NULL;
+ SwNumberTreeNode * pResult = nullptr;
if (mpParent)
{
@@ -1007,7 +1007,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
{
// #i64311#
// root node is no valid predecessor
- pResult = mpParent->GetParent() ? mpParent : NULL;
+ pResult = mpParent->GetParent() ? mpParent : nullptr;
}
else
{
@@ -1184,7 +1184,7 @@ void SwNumberTreeNode::NotifyInvalidChildren()
void SwNumberTreeNode::NotifyInvalidSiblings()
{
- if (mpParent != NULL)
+ if (mpParent != nullptr)
mpParent->NotifyInvalidChildren();
}
@@ -1192,7 +1192,7 @@ void SwNumberTreeNode::NotifyInvalidSiblings()
const SwNumberTreeNode* SwNumberTreeNode::GetPrecedingNodeOf(
const SwNumberTreeNode& rNode ) const
{
- const SwNumberTreeNode* pPrecedingNode( 0 );
+ const SwNumberTreeNode* pPrecedingNode( nullptr );
if ( GetChildCount() > 0 )
{
@@ -1205,7 +1205,7 @@ const SwNumberTreeNode* SwNumberTreeNode::GetPrecedingNodeOf(
}
}
- if ( pPrecedingNode == 0 && GetRoot() )
+ if ( pPrecedingNode == nullptr && GetRoot() )
{
// <this> node has no children or the given node precedes all its children
// and the <this> node isn't the root node.
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 4d27552442e8..f10e16acd7dc 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -81,7 +81,7 @@ uno::Reference< XAccessible > SwAccessibleContext::GetWeakParent() const
vcl::Window *SwAccessibleContext::GetWindow()
{
- vcl::Window *pWin = 0;
+ vcl::Window *pWin = nullptr;
if( GetMap() )
{
@@ -100,12 +100,12 @@ vcl::Window *SwAccessibleContext::GetWindow()
SwCrsrShell* SwAccessibleContext::GetCrsrShell()
{
SwCrsrShell* pCrsrShell;
- SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
+ SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr;
OSL_ENSURE( pViewShell, "no view shell" );
if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr )
pCrsrShell = static_cast<SwCrsrShell*>( pViewShell );
else
- pCrsrShell = NULL;
+ pCrsrShell = nullptr;
return pCrsrShell;
}
@@ -114,12 +114,12 @@ const SwCrsrShell* SwAccessibleContext::GetCrsrShell() const
{
// just like non-const GetCrsrShell
const SwCrsrShell* pCrsrShell;
- const SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
+ const SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr;
OSL_ENSURE( pViewShell, "no view shell" );
if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr )
pCrsrShell = static_cast<const SwCrsrShell*>( pViewShell );
else
- pCrsrShell = NULL;
+ pCrsrShell = nullptr;
return pCrsrShell;
}
@@ -609,7 +609,7 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent()
CHECK_FOR_DEFUNC( XAccessibleContext )
const SwFrm *pUpper = GetParent();
- OSL_ENSURE( pUpper != 0 || m_isDisposing, "no upper found" );
+ OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" );
uno::Reference< XAccessible > xAcc;
if( pUpper )
@@ -634,7 +634,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent()
CHECK_FOR_DEFUNC( XAccessibleContext )
const SwFrm *pUpper = GetParent();
- OSL_ENSURE( pUpper != 0 || m_isDisposing, "no upper found" );
+ OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" );
sal_Int32 nIndex = -1;
if( pUpper )
@@ -919,7 +919,7 @@ void SAL_CALL SwAccessibleContext::grabFocus()
}
else
{
- const SwContentFrm *pCFrm = 0;
+ const SwContentFrm *pCFrm = nullptr;
if( GetFrm()->IsContentFrm() )
pCFrm = static_cast< const SwContentFrm * >( GetFrm() );
else if( GetFrm()->IsLayoutFrm() )
@@ -997,7 +997,7 @@ void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
::accessibility::AccessibleShape *pAccImpl )
{
- if(NULL == pAccImpl)
+ if(nullptr == pAccImpl)
{
return ;
}
@@ -1336,14 +1336,14 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj,
SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr
? static_cast<SwFEShell*>( pCrsrShell )
- : 0;
+ : nullptr;
// Get rid of activated OLE object
if( pFEShell )
pFEShell->FinishOLEObj();
SwWrtShell* pWrtShell = dynamic_cast<const SwWrtShell*>( pCrsrShell) != nullptr
? static_cast<SwWrtShell*>( pCrsrShell )
- : 0;
+ : nullptr;
bool bRet = false;
if( pObj )
@@ -1436,7 +1436,7 @@ bool SwAccessibleContext::HasAdditionalAccessibleChildren()
/** #i88070# - get additional accessible child by index */
vcl::Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 nIndex )
{
- vcl::Window* pAdditionalAccessibleChild( 0 );
+ vcl::Window* pAdditionalAccessibleChild( nullptr );
if ( GetFrm()->IsTextFrm() )
{
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index e895bf346930..e52daa569fed 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -362,11 +362,11 @@ public:
bool Select( SwPaM *pPaM, SdrObject *pObj, bool bAdd );
inline bool Select( SwPaM& rPaM )
{
- return Select( &rPaM, 0, false );
+ return Select( &rPaM, nullptr, false );
}
inline bool Select( SdrObject *pObj, bool bAdd )
{
- return Select( 0, pObj, bAdd );
+ return Select( nullptr, pObj, bAdd );
}
//This method is used to updated the selected state and fire the selected state changed event.
@@ -374,8 +374,8 @@ public:
bool IsSeletedInDoc() { return m_isSelectedInDoc; }
static OUString GetResource( sal_uInt16 nResId,
- const OUString *pArg1 = 0,
- const OUString *pArg2 = 0 );
+ const OUString *pArg1 = nullptr,
+ const OUString *pArg2 = nullptr );
};
// some heavily used exception support
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 07265493a0eb..08271f25bf16 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -74,7 +74,7 @@ SwAccessibleDocumentBase::SwAccessibleDocumentBase ( SwAccessibleMap *_pMap ) :
SwAccessibleContext( _pMap, AccessibleRole::DOCUMENT_TEXT,
_pMap->GetShell()->GetLayout() ),
mxParent( _pMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible() ),
- mpChildWin( 0 )
+ mpChildWin( nullptr )
{
}
@@ -129,7 +129,7 @@ void SwAccessibleDocumentBase::RemoveChild( vcl::Window *pWin )
aEvent.OldValue <<= mpChildWin->GetAccessible();
FireAccessibleEvent( aEvent );
- mpChildWin = 0;
+ mpChildWin = nullptr;
}
}
@@ -208,7 +208,7 @@ OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleName()
SolarMutexGuard g;
OUString sAccName = GetResource( STR_ACCESS_DOC_WORDPROCESSING );
- SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : 0;
+ SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
if ( pDoc )
{
OUString sFileName = pDoc->getDocAccTitle();
@@ -282,7 +282,7 @@ css::awt::Point SAL_CALL SwAccessibleDocumentBase::getLocationOnScreen()
CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
- Point aPixPos( pWin->GetWindowExtentsRelative( 0 ).TopLeft() );
+ Point aPixPos( pWin->GetWindowExtentsRelative( nullptr ).TopLeft() );
awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
return aLoc;
@@ -297,7 +297,7 @@ css::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
- Size aPixSize( pWin->GetWindowExtentsRelative( 0 ).GetSize() );
+ Size aPixSize( pWin->GetWindowExtentsRelative( nullptr ).GetSize() );
awt::Size aSize( aPixSize.Width(), aPixSize.Height() );
return aSize;
@@ -313,7 +313,7 @@ sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint(
CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
- Rectangle aPixBounds( pWin->GetWindowExtentsRelative( 0 ) );
+ Rectangle aPixBounds( pWin->GetWindowExtentsRelative( nullptr ) );
aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top());
Point aPixPoint( aPoint.X, aPoint.Y );
@@ -375,7 +375,7 @@ SwAccessibleDocument::SwAccessibleDocument ( SwAccessibleMap* pInitMap ) :
SwAccessibleDocument::~SwAccessibleDocument()
{
- vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : 0;
+ vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
if( pWin )
pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
}
@@ -384,7 +384,7 @@ void SwAccessibleDocument::Dispose( bool bRecursive )
{
OSL_ENSURE( GetFrm() && GetMap(), "already disposed" );
- vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : 0;
+ vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
if( pWin )
pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
SwAccessibleContext::Dispose( bRecursive );
@@ -555,7 +555,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SolarMutexGuard g;
uno::Any anyAtrribute;
- SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : 0;
+ SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
if (!pDoc)
return anyAtrribute;
@@ -565,7 +565,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr
? static_cast<SwFEShell*>( pCrsrShell )
- : 0;
+ : nullptr;
OUString sAttrName;
OUString sValue;
sal_uInt16 nPage, nLogPage;
@@ -590,8 +590,8 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwContentFrm* pCurrFrm = pCrsrShell->GetCurrFrm();
SwPageFrm* pCurrPage=static_cast<SwFrm*>(pCurrFrm)->FindPageFrm();
sal_uLong nLineNum = 0;
- SwTextFrm* pTextFrm = NULL;
- SwTextFrm* pCurrTextFrm = NULL;
+ SwTextFrm* pTextFrm = nullptr;
+ SwTextFrm* pCurrTextFrm = nullptr;
pTextFrm = static_cast< SwTextFrm* >(static_cast< SwPageFrm* > (pCurrPage)->ContainsContent());
if (pCurrFrm->IsInFly())//such as, graphic,chart
{
@@ -612,7 +612,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->GetUpper();
if ( pFrm )
- pCurrTextFrm = NULL;
+ pCurrTextFrm = nullptr;
//check shape
if(pCrsrShell->Imp()->GetDrawView())
{
@@ -623,7 +623,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat();
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
if( FLY_AS_CHAR != rAnchor.GetAnchorId() )
- pCurrTextFrm = NULL;
+ pCurrTextFrm = nullptr;
}
}
//calculate line number
@@ -651,7 +651,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
{
if (pCurrTextFrm->IsTextFrm())
{
- const SwPosition* pPoint = NULL;
+ const SwPosition* pPoint = nullptr;
if(pCurrTextFrm->IsInFly())
{
SwFlyFrm *pFlyFrm = pCurrTextFrm->FindFlyFrm();
@@ -690,7 +690,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
sValue += sAttrName;
int nCurrCol = 1;
- if(pCurrCol!=NULL)
+ if(pCurrCol!=nullptr)
{
//SwLayoutFrm* pParent = pCurrCol->GetUpper();
SwFrm* pCurrPageCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm();
@@ -701,7 +701,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwLayoutFrm* pParent = pCurrPageCol->GetUpper();
- if(pParent!=NULL)
+ if(pParent!=nullptr)
{
SwFrm* pCol = pParent->Lower();
while(pCol&&(pCol!=pCurrPageCol))
@@ -725,7 +725,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
sValue += ";";
SwSectionFrm* pCurrSctFrm=static_cast<SwFrm*>(pCurrFrm)->FindSctFrm();
- if(pCurrSctFrm!=NULL && pCurrSctFrm->GetSection()!=NULL )
+ if(pCurrSctFrm!=nullptr && pCurrSctFrm->GetSection()!=nullptr )
{
sAttrName = "section-name:";
@@ -747,10 +747,10 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
nCurrCol = 1;
- if(pCurrCol!=NULL)
+ if(pCurrCol!=nullptr)
{
SwLayoutFrm* pParent = pCurrCol->GetUpper();
- if(pParent!=NULL)
+ if(pParent!=nullptr)
{
SwFrm* pCol = pParent->Lower();
while(pCol&&(pCol!=pCurrCol))
@@ -862,7 +862,7 @@ css::uno::Sequence< css::uno::Any >
if ( pCrsrShell )
{
SwPaM *_pStartCrsr = pCrsrShell->GetCrsr(), *__pStartCrsr = _pStartCrsr;
- SwContentNode* pPrevNode = NULL;
+ SwContentNode* pPrevNode = nullptr;
std::vector<SwFrm*> vFrmList;
do
{
@@ -873,7 +873,7 @@ css::uno::Sequence< css::uno::Any >
{
continue;
}
- SwFrm* pFrm = pContentNode ? pContentNode->getLayoutFrm( pCrsrShell->GetLayout() ) : NULL;
+ SwFrm* pFrm = pContentNode ? pContentNode->getLayoutFrm( pCrsrShell->GetLayout() ) : nullptr;
if ( pFrm )
{
vFrmList.push_back( pFrm );
diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx
index f4219d7211a5..91462027f665 100644
--- a/sw/source/core/access/accframe.hxx
+++ b/sw/source/core/access/accframe.hxx
@@ -93,7 +93,7 @@ protected:
inline void ClearFrm()
{
- mpFrm = 0;
+ mpFrm = nullptr;
}
SwAccessibleFrame( const SwRect& rVisArea,
@@ -117,7 +117,7 @@ protected:
// Return the bounding box of the frame clipped to the vis area. If
// no frame is specified, use this' frame.
SwRect GetBounds( const SwAccessibleMap& rAccMap,
- const SwFrm *pFrm = 0 );
+ const SwFrm *pFrm = nullptr );
// Return the upper that has a context attached. This might be
// another one than the immediate upper.
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 95dd95541f94..f895714fd41c 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -276,12 +276,12 @@ SwPaM* SwAccessibleFrameBase::GetCrsr()
{
// get the cursor shell; if we don't have any, we don't have a
// cursor/selection either
- SwPaM* pCrsr = NULL;
+ SwPaM* pCrsr = nullptr;
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL && !pCrsrShell->IsTableMode() )
+ if( pCrsrShell != nullptr && !pCrsrShell->IsTableMode() )
{
SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr
- ? static_cast< SwFEShell * >( pCrsrShell ) : 0;
+ ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr;
if( !pFESh ||
!(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
{
@@ -315,7 +315,7 @@ bool SwAccessibleFrameBase::GetSelectedState( )
if( pPos->nNode.GetNode().GetTextNode() )
{
SwPaM* pCrsr = GetCrsr();
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode();
sal_uLong nHere = pNode->GetIndex();
@@ -363,7 +363,7 @@ bool SwAccessibleFrameBase::GetSelectedState( )
SwFlyFrm* SwAccessibleFrameBase::getFlyFrm() const
{
- SwFlyFrm* pFlyFrm = NULL;
+ SwFlyFrm* pFlyFrm = nullptr;
const SwFrm* pFrm = GetFrm();
assert(pFrm);
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 0ccc5b73bcfd..a449247cd103 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -40,31 +40,31 @@
namespace sw { namespace access {
SwAccessibleChild::SwAccessibleChild()
- : mpFrm( 0 )
- , mpDrawObj( 0 )
- , mpWindow( 0 )
+ : mpFrm( nullptr )
+ , mpDrawObj( nullptr )
+ , mpWindow( nullptr )
{}
SwAccessibleChild::SwAccessibleChild( const SdrObject* pDrawObj )
- : mpFrm( 0 )
- , mpDrawObj( 0 )
- , mpWindow( 0 )
+ : mpFrm( nullptr )
+ , mpDrawObj( nullptr )
+ , mpWindow( nullptr )
{
Init( pDrawObj );
}
SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm )
- : mpFrm( 0 )
- , mpDrawObj( 0 )
- , mpWindow( 0 )
+ : mpFrm( nullptr )
+ , mpDrawObj( nullptr )
+ , mpWindow( nullptr )
{
Init( pFrm );
}
SwAccessibleChild::SwAccessibleChild( vcl::Window* pWindow )
- : mpFrm( 0 )
- , mpDrawObj( 0 )
- , mpWindow( 0 )
+ : mpFrm( nullptr )
+ , mpDrawObj( nullptr )
+ , mpWindow( nullptr )
{
Init( pWindow );
}
@@ -72,9 +72,9 @@ SwAccessibleChild::SwAccessibleChild( vcl::Window* pWindow )
SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm,
const SdrObject* pDrawObj,
vcl::Window* pWindow )
- : mpFrm( 0 )
- , mpDrawObj( 0 )
- , mpWindow( 0 )
+ : mpFrm( nullptr )
+ , mpDrawObj( nullptr )
+ , mpWindow( nullptr )
{
if ( pFrm )
{
@@ -100,8 +100,8 @@ void SwAccessibleChild::Init( const SdrObject* pDrawObj )
mpDrawObj = pDrawObj;
mpFrm = mpDrawObj && dynamic_cast<const SwVirtFlyDrawObj*>( mpDrawObj) != nullptr
? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrm()
- : 0;
- mpWindow = 0;
+ : nullptr;
+ mpWindow = nullptr;
}
void SwAccessibleChild::Init( const SwFrm* pFrm )
@@ -109,15 +109,15 @@ void SwAccessibleChild::Init( const SwFrm* pFrm )
mpFrm = pFrm;
mpDrawObj = mpFrm && mpFrm->IsFlyFrm()
? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj()
- : 0;
- mpWindow = 0;
+ : nullptr;
+ mpWindow = nullptr;
}
void SwAccessibleChild::Init( vcl::Window* pWindow )
{
mpWindow = pWindow;
- mpFrm = 0;
- mpDrawObj = 0;
+ mpFrm = nullptr;
+ mpDrawObj = nullptr;
}
bool SwAccessibleChild::IsAccessible( bool bPagePreview ) const
@@ -128,7 +128,7 @@ bool SwAccessibleChild::IsAccessible( bool bPagePreview ) const
{
bRet = mpFrm->IsAccessibleFrm() &&
( !mpFrm->IsCellFrm() ||
- static_cast<const SwCellFrm *>( mpFrm )->GetTabBox()->GetSttNd() != 0 ) &&
+ static_cast<const SwCellFrm *>( mpFrm )->GetTabBox()->GetSttNd() != nullptr ) &&
!mpFrm->IsInCoveredCell() &&
( bPagePreview ||
!mpFrm->IsPageFrm() );
@@ -210,8 +210,8 @@ bool SwAccessibleChild::operator==( const SwAccessibleChild& r ) const
bool SwAccessibleChild::IsValid() const
{
- return mpFrm != 0 ||
- mpDrawObj != 0 ||
+ return mpFrm != nullptr ||
+ mpDrawObj != nullptr ||
mpWindow != nullptr;
}
@@ -314,7 +314,7 @@ bool SwAccessibleChild::AlwaysIncludeAsChild() const
const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const
{
- const SwFrm* pParent( 0 );
+ const SwFrm* pParent( nullptr );
if ( mpFrm )
{
diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx
index 348eabc7bca1..5c3cb557d0a1 100644
--- a/sw/source/core/access/accfrmobjslist.cxx
+++ b/sw/source/core/access/accfrmobjslist.cxx
@@ -56,7 +56,7 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
{
aCurr = (nNextObj < pObjs->size())
? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ : static_cast< const SdrObject *>( nullptr );
}
}
if ( !aCurr.IsValid() )
@@ -110,7 +110,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs();
aCurr = ( pObjs && nNextObj < pObjs->size() )
? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ : static_cast< const SdrObject *>( nullptr );
}
else if( rFrm.IsTextFrm() )
{
@@ -118,12 +118,12 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
const size_t nObjsCount = pObjs ? pObjs->size() : 0;
aCurr = ( pObjs && nNextObj < nObjsCount )
? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ : static_cast< const SdrObject *>( nullptr );
while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
{
aCurr = ( nNextObj < nObjsCount )
? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ : static_cast< const SdrObject *>( nullptr );
}
if ( !aCurr.IsValid() )
{
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 8ccd616bbe66..668cfc9c00aa 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -46,7 +46,7 @@ SwAccessibleHyperlink::SwAccessibleHyperlink( size_t nHPos,
const SwTextAttr *SwAccessibleHyperlink::GetTextAttr() const
{
- const SwTextAttr *pTextAttr = 0;
+ const SwTextAttr *pTextAttr = nullptr;
if( xPara.is() && xPara->GetMap() )
{
const SwTextNode *pTextNd = xPara->GetTextNode();
@@ -250,7 +250,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid( )
void SwAccessibleHyperlink::Invalidate()
{
SolarMutexGuard aGuard;
- xPara = 0;
+ xPara = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 87f9dbd5e2ec..b771417b3156 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1191,7 +1191,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
{
int pIndex = pPos->nContent.GetIndex();
bool bMarked = false;
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode();
sal_uLong nHere = pNode->GetIndex();
@@ -1326,7 +1326,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
//Checked for Paras.
bool bMarkChanged = false;
SwAccessibleContextMap_Impl mapTemp;
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer())
{
@@ -1336,7 +1336,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
SwNodeIndex nEndIndex( rTmpCrsr.End()->nNode );
while(nStartIndex <= nEndIndex)
{
- SwFrm *pFrm = NULL;
+ SwFrm *pFrm = nullptr;
if(nStartIndex.GetNode().IsContentNode())
{
SwContentNode* pCNd = static_cast<SwContentNode*>(&(nStartIndex.GetNode()));
@@ -1559,7 +1559,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool bInvalidateFocusMode /*=fa
if (pAccShape)
{
SdrObject *pObj = GetSdrObjectFromXShape(pAccShape->GetXShape());
- SwFrameFormat *pFrameFormat = pObj ? FindFrameFormat( pObj ) : NULL;
+ SwFrameFormat *pFrameFormat = pObj ? FindFrameFormat( pObj ) : nullptr;
if (pFrameFormat)
{
const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor();
@@ -1663,7 +1663,7 @@ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) :
mpPreview( nullptr ),
mnPara( 1 ),
mbShapeSelected( false ),
- mpSeletedFrmMap(NULL)
+ mpSeletedFrmMap(nullptr)
{
pSh->GetLayout()->AddAccessibleShell();
}
@@ -1698,7 +1698,7 @@ SwAccessibleMap::~SwAccessibleMap()
if( xTmp.is() )
{
SwAccessibleContext *pTmp = static_cast< SwAccessibleContext * >( xTmp.get() );
- pTmp->SetMap(NULL);
+ pTmp->SetMap(nullptr);
}
++aIter;
}
@@ -1752,7 +1752,7 @@ SwAccessibleMap::~SwAccessibleMap()
}
delete mpPreview;
- mpPreview = NULL;
+ mpPreview = nullptr;
{
osl::MutexGuard aGuard( maEventMutex );
@@ -1859,7 +1859,7 @@ uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
const Size& _rPreviewWinSize )
{
// create & update preview data object
- if( mpPreview == NULL )
+ if( mpPreview == nullptr )
mpPreview = new SwAccPreviewData();
mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize );
@@ -2387,7 +2387,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
{
::rtl::Reference< SwAccessibleContext > xAccImpl;
::rtl::Reference< SwAccessibleContext > xParentAccImpl;
- const SwFrm *pParent =NULL;
+ const SwFrm *pParent =nullptr;
{
osl::MutexGuard aGuard( maMutex );
@@ -2688,17 +2688,17 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
{
const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
const SdrMarkList *pMarkList = pFESh->GetMarkList();
- if (pMarkList != NULL && pMarkList->GetMarkCount() == 1)
+ if (pMarkList != nullptr && pMarkList->GetMarkCount() == 1)
{
SdrObject *pObj = pMarkList->GetMark( 0 )->GetMarkedSdrObj();
- ::rtl::Reference < ::accessibility::AccessibleShape > pAccShapeImpl = GetContextImpl(pObj,NULL,false);
+ ::rtl::Reference < ::accessibility::AccessibleShape > pAccShapeImpl = GetContextImpl(pObj,nullptr,false);
if (!pAccShapeImpl.is())
{
while (pObj && pObj->GetUpGroup())
{
pObj = pObj->GetUpGroup();
}
- if (pObj != NULL)
+ if (pObj != nullptr)
{
const SwFrm *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreview() );
if( pParent )
@@ -3017,7 +3017,7 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewP
const Size& _rPreviewWinSize )
{
assert(GetShell()->IsPreview() && "no preview?");
- assert(mpPreview != NULL && "no preview data?");
+ assert(mpPreview != nullptr && "no preview data?");
mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize );
@@ -3054,7 +3054,7 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewP
void SwAccessibleMap::InvalidatePreviewSelection( sal_uInt16 nSelPage )
{
OSL_ENSURE( GetShell()->IsPreview(), "no preview?" );
- OSL_ENSURE( mpPreview != NULL, "no preview data?" );
+ OSL_ENSURE( mpPreview != nullptr, "no preview data?" );
mpPreview->InvalidateSelection( GetShell()->GetLayout()->GetPageByPageNum( nSelPage ) );
@@ -3256,14 +3256,14 @@ bool SwAccessibleMap::ReplaceChild (
++aIter;
}
}
- return NULL;
+ return nullptr;
}
css::uno::Reference< XAccessible >
SwAccessibleMap::GetAccessibleCaption (const css::uno::Reference< css::drawing::XShape >&)
throw (css::uno::RuntimeException)
{
- return NULL;
+ return nullptr;
}
Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const
@@ -3341,7 +3341,7 @@ void SwAccessibleMap::GetMapMode( const Point& _rPoint,
MapMode aMapMode = GetShell()->GetWin()->GetMapMode();
if( GetShell()->IsPreview() )
{
- OSL_ENSURE( mpPreview != NULL, "need preview data" );
+ OSL_ENSURE( mpPreview != nullptr, "need preview data" );
mpPreview->AdjustMapMode( aMapMode, _rPoint );
}
@@ -3351,9 +3351,9 @@ void SwAccessibleMap::GetMapMode( const Point& _rPoint,
Size SwAccessibleMap::GetPreviewPageSize( sal_uInt16 _nPreviewPageNum ) const
{
OSL_ENSURE( mpVSh->IsPreview(), "no page preview accessible." );
- OSL_ENSURE( mpVSh->IsPreview() && ( mpPreview != NULL ),
+ OSL_ENSURE( mpVSh->IsPreview() && ( mpPreview != nullptr ),
"missing accessible preview data at page preview" );
- if ( mpVSh->IsPreview() && ( mpPreview != NULL ) )
+ if ( mpVSh->IsPreview() && ( mpPreview != nullptr ) )
{
return mpVSh->PagePreviewLayout()->GetPreviewPageSizeByPageNum( _nPreviewPageNum );
}
@@ -3561,7 +3561,7 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
const SwRect& SwAccessibleMap::GetVisArea() const
{
- OSL_ENSURE( !GetShell()->IsPreview() || (mpPreview != NULL),
+ OSL_ENSURE( !GetShell()->IsPreview() || (mpPreview != nullptr),
"preview without preview data?" );
return GetShell()->IsPreview()
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index b0199a102c27..5bb25d3048ce 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -43,14 +43,14 @@ using utl::AccessibleRelationSetHelper;
const SwNoTextNode *SwAccessibleNoTextFrame::GetNoTextNode() const
{
- const SwNoTextNode *pNd = 0;
+ const SwNoTextNode *pNd = nullptr;
const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() );
if( pFlyFrm->Lower() && pFlyFrm->Lower()->IsNoTextFrm() )
{
const SwContentFrm *pCntFrm =
static_cast<const SwContentFrm *>( pFlyFrm->Lower() );
const SwContentNode* pSwContentNode = pCntFrm->GetNode();
- if(pSwContentNode != NULL)
+ if(pSwContentNode != nullptr)
{
pNd = pSwContentNode->GetNoTextNode();
}
@@ -343,7 +343,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
return alink;
}
- return NULL;
+ return nullptr;
}
sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 )
diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx
index e6c149e1ae6c..ddea63954254 100644
--- a/sw/source/core/access/accnotexthyperlink.cxx
+++ b/sw/source/core/access/accnotexthyperlink.cxx
@@ -51,7 +51,7 @@ sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionCount()
SwFormatURL aURL( GetFormat()->GetURL() );
ImageMap* pMap = aURL.GetMap();
- if( pMap != NULL )
+ if( pMap != nullptr )
{
return pMap->GetIMapObjectCount();
}
@@ -74,7 +74,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn
bool bRet = false;
SwFormatURL aURL( GetFormat()->GetURL() );
ImageMap* pMap = aURL.GetMap();
- if( pMap != NULL )
+ if( pMap != nullptr )
{
IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
if (!pMapObj->GetURL().isEmpty())
@@ -115,7 +115,7 @@ OUString SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionDescription(
SwFormatURL aURL( GetFormat()->GetURL() );
ImageMap* pMap = aURL.GetMap();
- if( pMap != NULL )
+ if( pMap != nullptr )
{
IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
if (!pMapObj->GetDesc().isEmpty())
@@ -143,7 +143,7 @@ Reference< XAccessibleKeyBinding > SAL_CALL
bool bIsValid = false;
SwFormatURL aURL( GetFormat()->GetURL() );
ImageMap* pMap = aURL.GetMap();
- if( pMap != NULL )
+ if( pMap != nullptr )
{
IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
if (!pMapObj->GetURL().isEmpty())
@@ -200,7 +200,7 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionObject(
SwFormatURL aURL( GetFormat()->GetURL() );
OUString retText;
ImageMap* pMap = aURL.GetMap();
- if( pMap != NULL )
+ if( pMap != nullptr )
{
IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
if (!pMapObj->GetURL().isEmpty())
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
index 55752ae89031..32e4a9083e81 100644
--- a/sw/source/core/access/accpage.cxx
+++ b/sw/source/core/access/accpage.cxx
@@ -115,8 +115,8 @@ SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap,
: SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame )
, bIsSelected( false )
{
- OSL_ENSURE( pFrame != NULL, "need frame" );
- OSL_ENSURE( pInitMap != NULL, "need map" );
+ OSL_ENSURE( pFrame != nullptr, "need frame" );
+ OSL_ENSURE( pInitMap != nullptr, "need map" );
OSL_ENSURE( pFrame->IsPageFrm(), "need page frame" );
SolarMutexGuard aGuard;
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 5ab1d0d6de78..7d0934c2001a 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -125,7 +125,7 @@ const SwTextNode* SwAccessibleParagraph::GetTextNode() const
OSL_ENSURE( pFrm->IsTextFrm(), "The text frame has mutated!" );
const SwTextNode* pNode = static_cast<const SwTextFrm*>(pFrm)->GetTextNode();
- OSL_ENSURE( pNode != NULL, "A text frame without a text node." );
+ OSL_ENSURE( pNode != nullptr, "A text frame without a text node." );
return pNode;
}
@@ -148,7 +148,7 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
// #i27301# - consider adjusted method signature
SwPaM* pCaret = GetCursor( false ); // caret is first PaM in PaM-ring
- if( pCaret != NULL )
+ if( pCaret != nullptr )
{
const SwTextNode* pNode = GetTextNode();
@@ -205,7 +205,7 @@ bool SwAccessibleParagraph::GetSelection(
// get the selection, and test whether it affects our text node
SwPaM* pCrsr = GetCursor( true ); // #i27301# - consider adjusted method signature
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
// get SwPosition for my node
const SwTextNode* pNode = GetTextNode();
@@ -324,15 +324,15 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection )
{
// get the cursor shell; if we don't have any, we don't have a
// cursor/selection either
- SwPaM* pCrsr = NULL;
+ SwPaM* pCrsr = nullptr;
SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell();
// #i27301# - if cursor is retrieved for selection, the cursors for
// a table selection has to be returned.
- if ( pCrsrShell != NULL &&
+ if ( pCrsrShell != nullptr &&
( _bForSelection || !pCrsrShell->IsTableMode() ) )
{
SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr
- ? static_cast< SwFEShell * >( pCrsrShell ) : 0;
+ ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr;
if( !pFESh ||
!(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
{
@@ -370,7 +370,7 @@ void SwAccessibleParagraph::GetStates(
// FOCUSED (simulates node index of cursor)
SwPaM* pCaret = GetCursor( false ); // #i27301# - consider adjusted method signature
const SwTextNode* pTextNd = GetTextNode();
- if( pCaret != 0 && pTextNd != 0 &&
+ if( pCaret != nullptr && pTextNd != nullptr &&
pTextNd->GetIndex() == pCaret->GetPoint()->nNode.GetIndex() &&
nOldCaretPos != -1)
{
@@ -536,8 +536,8 @@ SwAccessibleParagraph::SwAccessibleParagraph(
: SwClient( const_cast<SwTextNode*>(rTextFrm.GetTextNode()) ) // #i108125#
, SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTextFrm )
, sDesc()
- , pPortionData( NULL )
- , pHyperTextData( NULL )
+ , pPortionData( nullptr )
+ , pHyperTextData( nullptr )
, nOldCaretPos( -1 )
, bIsHeading( false )
//Get the real heading level, Heading1 ~ Heading10
@@ -578,7 +578,7 @@ void SwAccessibleParagraph::UpdatePortionData()
throw( uno::RuntimeException )
{
// obtain the text frame
- OSL_ENSURE( GetFrm() != NULL, "The text frame has vanished!" );
+ OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" );
OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" );
const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() );
@@ -588,37 +588,37 @@ void SwAccessibleParagraph::UpdatePortionData()
pFrm->GetTextNode(), GetMap()->GetShell()->GetViewOptions() );
pFrm->VisitPortions( *pPortionData );
- OSL_ENSURE( pPortionData != NULL, "UpdatePortionData() failed" );
+ OSL_ENSURE( pPortionData != nullptr, "UpdatePortionData() failed" );
}
void SwAccessibleParagraph::ClearPortionData()
{
delete pPortionData;
- pPortionData = NULL;
+ pPortionData = nullptr;
delete pHyperTextData;
- pHyperTextData = 0;
+ pHyperTextData = nullptr;
}
void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot )
{
- OSL_ENSURE( GetMap() != NULL, "no map?" );
+ OSL_ENSURE( GetMap() != nullptr, "no map?" );
SwViewShell* pViewShell = GetMap()->GetShell();
- OSL_ENSURE( pViewShell != NULL, "View shell expected!" );
+ OSL_ENSURE( pViewShell != nullptr, "View shell expected!" );
SfxViewShell* pSfxShell = pViewShell->GetSfxViewShell();
- OSL_ENSURE( pSfxShell != NULL, "SfxViewShell shell expected!" );
+ OSL_ENSURE( pSfxShell != nullptr, "SfxViewShell shell expected!" );
if( !pSfxShell )
return;
SfxViewFrame *pFrame = pSfxShell->GetViewFrame();
- OSL_ENSURE( pFrame != NULL, "View frame expected!" );
+ OSL_ENSURE( pFrame != nullptr, "View frame expected!" );
if( !pFrame )
return;
SfxDispatcher *pDispatcher = pFrame->GetDispatcher();
- OSL_ENSURE( pDispatcher != NULL, "Dispatcher expected!" );
+ OSL_ENSURE( pDispatcher != nullptr, "Dispatcher expected!" );
if( !pDispatcher )
return;
@@ -686,7 +686,7 @@ SwTOXSortTabBase* SwAccessibleParagraph::GetTOXSortTabBase()
const SwTOXBaseSection *pTOXBaseSect = static_cast<const SwTOXBaseSection *>(pSect);
if( pSect->GetType() == TOX_CONTENT_SECTION )
{
- SwTOXSortTabBase* pSortBase = 0;
+ SwTOXSortTabBase* pSortBase = nullptr;
size_t nSize = pTOXBaseSect->GetTOXSortTabBases().size();
for(size_t nIndex = 0; nIndex<nSize; nIndex++ )
@@ -703,13 +703,13 @@ SwTOXSortTabBase* SwAccessibleParagraph::GetTOXSortTabBase()
}
}
}
- return NULL;
+ return nullptr;
}
//the function is to check whether the position is in a redline range.
const SwRangeRedline* SwAccessibleParagraph::GetRedlineAtIndex( sal_Int32 )
{
- const SwRangeRedline* pRedline = NULL;
+ const SwRangeRedline* pRedline = nullptr;
SwPaM* pCrSr = GetCursor( true );
if ( pCrSr )
{
@@ -720,7 +720,7 @@ const SwRangeRedline* SwAccessibleParagraph::GetRedlineAtIndex( sal_Int32 )
const SwDoc* pDoc = pNode->GetDoc();
if ( pDoc )
{
- pRedline = pDoc->getIDocumentRedlineAccess().GetRedline( *pStart, NULL );
+ pRedline = pDoc->getIDocumentRedlineAccess().GetRedline( *pStart, nullptr );
}
}
}
@@ -751,7 +751,7 @@ bool SwAccessibleParagraph::GetWordBoundary(
bool bRet = false;
// now ask the Break-Iterator for the word
- OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt != nullptr, "We always need a break." );
OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
if( g_pBreakIt->GetBreakIter().is() )
{
@@ -838,7 +838,7 @@ bool SwAccessibleParagraph::GetGlyphBoundary(
// ask the Break-Iterator for the glyph by moving one cell
// forward, and then one cell back
- OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt != nullptr, "We always need a break." );
OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
if( g_pBreakIt->GetBreakIter().is() )
{
@@ -1008,8 +1008,8 @@ void SAL_CALL SwAccessibleParagraph::grabFocus()
const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() );
const SwTextNode* pTextNd = pTextFrm->GetTextNode();
- if( pCrsrSh != 0 && pTextNd != 0 &&
- ( pCrsr == 0 ||
+ if( pCrsrSh != nullptr && pTextNd != nullptr &&
+ ( pCrsr == nullptr ||
pCrsr->GetPoint()->nNode.GetIndex() != pTextNd->GetIndex() ||
!pTextFrm->IsInside( pCrsr->GetPoint()->nContent.GetIndex()) ) )
{
@@ -1027,7 +1027,7 @@ void SAL_CALL SwAccessibleParagraph::grabFocus()
// ->#i13955#
vcl::Window * pWindow = GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
pWindow->GrabFocus();
// <-#i13955#
}
@@ -1037,8 +1037,8 @@ static bool lcl_GetBackgroundColor( Color & rColor,
const SwFrm* pFrm,
SwCrsrShell* pCrsrSh )
{
- const SvxBrushItem* pBackgrdBrush = 0;
- const Color* pSectionTOXColor = 0;
+ const SvxBrushItem* pBackgrdBrush = nullptr;
+ const Color* pSectionTOXColor = nullptr;
SwRect aDummyRect;
//UUUU
@@ -1125,9 +1125,9 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNam
uno::Sequence< OUString > getAttributeNames()
{
- static uno::Sequence< OUString >* pNames = NULL;
+ static uno::Sequence< OUString >* pNames = nullptr;
- if( pNames == NULL )
+ if( pNames == nullptr )
{
// Add the font name to attribute list
uno::Sequence< OUString >* pSeq = new uno::Sequence< OUString >( 13 );
@@ -1158,9 +1158,9 @@ uno::Sequence< OUString > getAttributeNames()
uno::Sequence< OUString > getSupplementalAttributeNames()
{
- static uno::Sequence< OUString >* pNames = NULL;
+ static uno::Sequence< OUString >* pNames = nullptr;
- if( pNames == NULL )
+ if( pNames == nullptr )
{
uno::Sequence< OUString >* pSeq = new uno::Sequence< OUString >( 9 );
@@ -1318,7 +1318,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
// get cursor shell
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
// create pam for selection
SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() );
@@ -1433,7 +1433,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
{
OUString strTypeName;
SwFieldMgr aMgr;
- SwTextField* pTextField = NULL;
+ SwTextField* pTextField = nullptr;
SwTextNode* pTextNd = const_cast<SwTextNode*>( GetTextNode() );
SwIndex fldIndex( pTextNd, nIndex );
sal_Int32 nFieldIndex = GetPortionData().GetFieldIndex(nIndex);
@@ -1955,7 +1955,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
tAccParaPropValMap& rRunAttrSeq )
{
// create PaM for character at position <nIndex>
- SwPaM* pPaM( 0 );
+ SwPaM* pPaM( nullptr );
{
const SwTextNode* pTextNode( GetTextNode() );
SwPosition* pStartPos = new SwPosition( *pTextNode );
@@ -2013,7 +2013,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
PropertyEntryVector_t::const_iterator aPropIt = aPropertyEntries.begin();
while ( aPropIt != aPropertyEntries.end() )
{
- const SfxPoolItem* pItem( 0 );
+ const SfxPoolItem* pItem( nullptr );
// #i82637# - Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
if ( aSet.GetItemState( aPropIt->nWID, true, &pItem ) == SfxItemState::SET )
@@ -2289,10 +2289,10 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
//misspelled word
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
+ if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
{
const SwWrongList* pWrongList = pTextNode->GetWrong();
- if( NULL != pWrongList )
+ if( nullptr != pWrongList )
{
sal_Int32 nBegin = nIndex;
sal_Int32 nLen = 1;
@@ -2310,10 +2310,10 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
//misspelled word
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
+ if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
{
const SwWrongList* pWrongList = pTextNode->GetWrong();
- if( NULL != pWrongList )
+ if( nullptr != pWrongList )
{
sal_Int32 nBegin = nIndex;
sal_Int32 nLen = 1;
@@ -2499,7 +2499,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
}
// ask core for position
- OSL_ENSURE( GetFrm() != NULL, "The text frame has vanished!" );
+ OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" );
OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" );
const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() );
SwCrsrMoveState aMoveState;
@@ -2591,7 +2591,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
// get cursor shell
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
// create pam for selection
SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() );
@@ -3108,7 +3108,7 @@ SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrm *pTextFrm ) :
const SwTextAttr *SwHyperlinkIter_Impl::next()
{
- const SwTextAttr *pAttr = 0;
+ const SwTextAttr *pAttr = nullptr;
if( pHints )
{
while( !pAttr && nPos < pHints->Count() )
@@ -3320,7 +3320,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( )
sal_Int32 nSeleted = 0;
SwPaM* pCrsr = GetCursor( true );
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
// get SwPosition for my node
const SwTextNode* pNode = GetTextNode();
@@ -3393,7 +3393,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd
// get the selection, and test whether it affects our text node
SwPaM* pCrsr = GetCursor( true );
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
bool bRet = false;
@@ -3488,7 +3488,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::addSelection( sal_Int32, sal_Int32 sta
// get cursor shell
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
// create pam for selection
pCrsrShell->StartAction();
@@ -3640,7 +3640,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
if ( nCaretPos == aLineBound.startPos )
{
SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell();
- if ( pCrsrShell != 0 )
+ if ( pCrsrShell != nullptr )
{
const awt::Rectangle aCharRect = getCharacterBounds( nCaretPos );
@@ -3693,7 +3693,7 @@ bool SwAccessibleParagraph::GetSelectionAtIndex(
// get the selection, and test whether it affects our text node
SwPaM* pCrsr = GetCursor( true );
- if( pCrsr != NULL )
+ if( pCrsr != nullptr )
{
// get SwPosition for my node
const SwTextNode* pNode = GetTextNode();
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index d9831f320fc2..2433e03ad6a1 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -192,7 +192,7 @@ protected:
SwAccessiblePortionData& GetPortionData()
throw( css::uno::RuntimeException )
{
- if( pPortionData == NULL )
+ if( pPortionData == nullptr )
UpdatePortionData();
return *pPortionData;
}
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 8f55cb079b52..1fb823cf96cd 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -80,12 +80,12 @@ SwAccessiblePortionData::SwAccessiblePortionData(
aFieldPosition(),
aAttrFieldType(),
aPortionAttrs(),
- pSentences( 0 ),
+ pSentences( nullptr ),
nBeforePortions( 0 ),
bFinished( false ),
bLastIsSpecial( false )
{
- OSL_ENSURE( pTextNode != NULL, "Text node is needed!" );
+ OSL_ENSURE( pTextNode != nullptr, "Text node is needed!" );
// reserve some space to reduce memory allocations
aLineBreaks.reserve( 5 );
@@ -484,9 +484,9 @@ void SwAccessiblePortionData::GetSentenceBoundary(
OSL_ENSURE( nPos >= 0, "illegal position; check before" );
OSL_ENSURE( nPos < sAccessibleString.getLength(), "illegal position" );
- if( pSentences == NULL )
+ if( pSentences == nullptr )
{
- OSL_ENSURE( g_pBreakIt != NULL, "We always need a break." );
+ OSL_ENSURE( g_pBreakIt != nullptr, "We always need a break." );
OSL_ENSURE( g_pBreakIt->GetBreakIter().is(), "No break-iterator." );
if( g_pBreakIt->GetBreakIter().is() )
{
@@ -536,7 +536,7 @@ void SwAccessiblePortionData::GetAttributeBoundary(
Boundary& rBound,
sal_Int32 nPos) const
{
- OSL_ENSURE( pTextNode != NULL, "Need SwTextNode!" );
+ OSL_ENSURE( pTextNode != nullptr, "Need SwTextNode!" );
// attribute boundaries can only occur on portion boundaries
FillBoundary( rBound, aAccessiblePositions,
@@ -642,10 +642,10 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
"text portion expected" );
nModelPos += nPos - aAccessiblePositions[ nPortionNo ];
- rpPos = NULL;
+ rpPos = nullptr;
}
}
- if( rpPos != NULL )
+ if( rpPos != nullptr )
{
OSL_ENSURE( rpPos == &rPos, "Yes!" );
OSL_ENSURE( nRefPos <= nPos, "wrong reference" );
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 8a48c4d77cd4..5f631e14170e 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -93,12 +93,12 @@ class SwAccessiblePortionData : public SwPortionHandler
public:
SwAccessiblePortionData( const SwTextNode* pTextNd,
- const SwViewOption* pViewOpt = NULL );
+ const SwViewOption* pViewOpt = nullptr );
virtual ~SwAccessiblePortionData();
// SwPortionHandler methods
virtual void Text(sal_Int32 nLength, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0) override;
- virtual void Special(sal_Int32 nLength, const OUString& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0, const SwFont* pFont = 0) override;
+ virtual void Special(sal_Int32 nLength, const OUString& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0, const SwFont* pFont = nullptr) override;
virtual void LineBreak(sal_Int32 nWidth) override;
virtual void Skip(sal_Int32 nLength) override;
virtual void Finish() override;
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index aa068d8507c7..07f17d27fc64 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -55,9 +55,9 @@ SwAccessibleSelectionHelper::~SwAccessibleSelectionHelper()
SwFEShell* SwAccessibleSelectionHelper::GetFEShell()
{
- OSL_ENSURE( m_rContext.GetMap() != NULL, "no map?" );
+ OSL_ENSURE( m_rContext.GetMap() != nullptr, "no map?" );
SwViewShell* pViewShell = m_rContext.GetMap()->GetShell();
- OSL_ENSURE( pViewShell != NULL,
+ OSL_ENSURE( pViewShell != nullptr,
"No view shell? Then what are you looking at?" );
SwFEShell* pFEShell = dynamic_cast<SwFEShell*>( pViewShell );
@@ -93,11 +93,11 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
// we can only select fly frames, so we ignore (should: return
// false) all other attempts at child selection
SwFEShell* pFEShell = GetFEShell();
- if( pFEShell != NULL )
+ if( pFEShell != nullptr )
{
const SdrObject *pObj = aChild.GetDrawObject();
if( pObj )
- m_rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm());
+ m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==aChild.GetSwFrm());
}
// no frame shell, or no frame, or no fly frame -> can't select
}
@@ -155,7 +155,7 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
const SwFEShell* pFEShell = GetFEShell();
if( pFEShell )
{
- if ( aChild.GetSwFrm() != 0 )
+ if ( aChild.GetSwFrm() != nullptr )
{
bRet = (pFEShell->GetSelectedFlyFrm() == aChild.GetSwFrm());
}
@@ -195,9 +195,9 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( )
const SwAccessibleChild& rChild = *aIter;
const SdrObject* pObj = rChild.GetDrawObject();
const SwFrm* pFrm = rChild.GetSwFrm();
- if( pObj && !(pFrm != 0 && pFEShell->IsObjSelected()) )
+ if( pObj && !(pFrm != nullptr && pFEShell->IsObjSelected()) )
{
- m_rContext.Select( const_cast< SdrObject *>( pObj ), 0==pFrm );
+ m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==pFrm );
if( pFrm )
break;
}
@@ -215,7 +215,7 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
// Only one frame can be selected at a time, and we only frames
// for selectable children.
const SwFEShell* pFEShell = GetFEShell();
- if( pFEShell != 0 )
+ if( pFEShell != nullptr )
{
const SwFlyFrm* pFlyFrm = pFEShell->GetSelectedFlyFrm();
if( pFlyFrm )
@@ -282,7 +282,7 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
// be 0, and a selection must exist, otherwise we have to throw an
// lang::IndexOutOfBoundsException
SwFEShell* pFEShell = GetFEShell();
- if( 0 == pFEShell )
+ if( nullptr == pFEShell )
throwIndexOutOfBoundsException();
SwAccessibleChild aChild;
@@ -341,7 +341,7 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
if( !aChild.IsValid() )
throwIndexOutOfBoundsException();
- OSL_ENSURE( m_rContext.GetMap() != NULL, "We need the map." );
+ OSL_ENSURE( m_rContext.GetMap() != nullptr, "We need the map." );
Reference< XAccessible > xChild;
if( aChild.GetSwFrm() )
{
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 0c7adac6518c..f94a05537659 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -468,7 +468,7 @@ const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos(
{
Point aPos( mpTabFrm->Frm().Pos() );
aPos.Move( nLeft, nTop );
- const SwFrm *pRet = 0;
+ const SwFrm *pRet = nullptr;
FindCell( aPos, mpTabFrm, bExact, pRet );
return pRet;
@@ -660,9 +660,9 @@ void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol,
const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const
{
- const SwSelBoxes *pSelBoxes = 0;
+ const SwSelBoxes *pSelBoxes = nullptr;
const SwCrsrShell *pCSh = GetCrsrShell();
- if( (pCSh != NULL) && pCSh->IsTableMode() )
+ if( (pCSh != nullptr) && pCSh->IsTableMode() )
{
pSelBoxes = &pCSh->GetTableCrsr()->GetSelectedBoxes();
}
@@ -692,14 +692,14 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
OSL_ENSURE( nChildIndex >= 0, "Illegal child index." );
OSL_ENSURE( nChildIndex < const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(), "Illegal child index." ); // #i77106#
- const SwTableBox* pBox = NULL;
+ const SwTableBox* pBox = nullptr;
// get table box for 'our' table cell
SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) );
if( aCell.GetSwFrm() )
{
const SwFrm* pChildFrm = aCell.GetSwFrm();
- if( (pChildFrm != NULL) && pChildFrm->IsCellFrm() )
+ if( (pChildFrm != nullptr) && pChildFrm->IsCellFrm() )
{
const SwCellFrm* pCellFrm =
static_cast<const SwCellFrm*>( pChildFrm );
@@ -707,7 +707,7 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
}
}
- OSL_ENSURE( pBox != NULL, "We need the table box." );
+ OSL_ENSURE( pBox != nullptr, "We need the table box." );
return pBox;
}
@@ -718,7 +718,7 @@ bool SwAccessibleTable::IsChildSelected( sal_Int32 nChildIndex ) const
if( pSelBoxes )
{
const SwTableBox* pBox = GetTableBox( nChildIndex );
- OSL_ENSURE( pBox != NULL, "We need the table box." );
+ OSL_ENSURE( pBox != nullptr, "We need the table box." );
bRet = pSelBoxes->find( const_cast<SwTableBox*>( pBox ) ) != pSelBoxes->end();
}
@@ -766,7 +766,7 @@ SwAccessibleTable::SwAccessibleTable(
SwAccessibleMap* pInitMap,
const SwTabFrm* pTabFrm ) :
SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ),
- mpTableData( 0 )
+ mpTableData( nullptr )
{
SolarMutexGuard aGuard;
@@ -908,7 +908,7 @@ void SwAccessibleTable::UpdateTableData()
void SwAccessibleTable::ClearTableData()
{
delete mpTableData;
- mpTableData = 0;
+ mpTableData = nullptr;
}
OUString SAL_CALL SwAccessibleTable::getAccessibleDescription()
@@ -1497,10 +1497,10 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
// preliminaries: get 'our' table box, and get the cursor shell
const SwTableBox* pBox = GetTableBox( nChildIndex );
- OSL_ENSURE( pBox != NULL, "We need the table box." );
+ OSL_ENSURE( pBox != nullptr, "We need the table box." );
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell == NULL )
+ if( pCrsrShell == nullptr )
return;
// assure, that child, identified by the given index, isn't already selected.
@@ -1516,21 +1516,21 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
// if we have a selection in a table, check if it's in the
// same table that we're trying to select in
const SwTableNode* pSelectedTable = pCrsrShell->IsCrsrInTable();
- if( pSelectedTable != NULL )
+ if( pSelectedTable != nullptr )
{
// get top-most table line
const SwTableLine* pUpper = pBox->GetUpper();
- while( pUpper->GetUpper() != NULL )
+ while( pUpper->GetUpper() != nullptr )
pUpper = pUpper->GetUpper()->GetUpper();
sal_uInt16 nPos =
pSelectedTable->GetTable().GetTabLines().GetPos( pUpper );
if( nPos == USHRT_MAX )
- pSelectedTable = NULL;
+ pSelectedTable = nullptr;
}
// create the new selection
const SwStartNode* pStartNode = pBox->GetSttNd();
- if( pSelectedTable == NULL || !pCrsrShell->GetTableCrs() )
+ if( pSelectedTable == nullptr || !pCrsrShell->GetTableCrs() )
{
pCrsrShell->StartAction();
// Set cursor into current cell. This deletes any table cursor.
@@ -1586,7 +1586,7 @@ void SAL_CALL SwAccessibleTable::clearAccessibleSelection( )
CHECK_FOR_DEFUNC( XAccessibleTable );
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
pCrsrShell->StartAction();
pCrsrShell->ClearMark();
@@ -1671,7 +1671,7 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
return;
const SwTableBox* pBox = GetTableBox( nChildIndex );
- OSL_ENSURE( pBox != NULL, "We need the table box." );
+ OSL_ENSURE( pBox != nullptr, "We need the table box." );
// If we unselect point, then set cursor to mark. If we clear another
// selected box, then set cursor to point.
@@ -1823,7 +1823,7 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row )
if( isAccessibleSelected( row , 0 ) && isAccessibleSelected( row , getAccessibleColumnCount()-1 ) )
{
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
pCrsrShell->StartAction();
pCrsrShell->ClearMark();
@@ -1844,7 +1844,7 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column )
if( isAccessibleSelected( 0 , column ) && isAccessibleSelected( getAccessibleRowCount()-1,column))
{
SwCrsrShell* pCrsrShell = GetCrsrShell();
- if( pCrsrShell != NULL )
+ if( pCrsrShell != nullptr )
{
pCrsrShell->StartAction();
pCrsrShell->ClearMark();
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 4da22af9a5a8..b2f3800b44c1 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -81,7 +81,7 @@ protected:
inline SwAccessibleTableData_Impl& GetTableData();
// Is table data evailable?
- bool HasTableData() const { return (mpTableData != 0); }
+ bool HasTableData() const { return (mpTableData != nullptr); }
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index d5026b986858..ae2bc97feb5f 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -307,7 +307,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId()
SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const
{
- SwFlyFrm* pFlyFrm = NULL;
+ SwFlyFrm* pFlyFrm = nullptr;
const SwFrm* pFrm = GetFrm();
assert(pFrm);
@@ -339,12 +339,12 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccess
assert(pFlyFrm);
const SwFlyFrm* pPrevFrm = pFlyFrm->GetPrevLink();
- if( pPrevFrm != NULL )
+ if( pPrevFrm != nullptr )
pHelper->AddRelation( makeRelation(
AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrm ) );
const SwFlyFrm* pNextFrm = pFlyFrm->GetNextLink();
- if( pNextFrm != NULL )
+ if( pNextFrm != nullptr )
pHelper->AddRelation( makeRelation(
AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrm ) );
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index cbe8d70160ab..3ab9b8a5d593 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -96,7 +96,7 @@ namespace {
continue;
}
- SwWrongList* pMarkupList( 0 );
+ SwWrongList* pMarkupList( nullptr );
switch ( pActRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
@@ -127,7 +127,7 @@ namespace {
const sal_Int32 nTextFrmChangeTrackEnd =
std::min(nTextNodeChangeTrackEnd, nTextFrmTextEndPos);
- pMarkupList->Insert( OUString(), 0,
+ pMarkupList->Insert( OUString(), nullptr,
nTextFrmChangeTrackStart,
nTextFrmChangeTrackEnd - nTextFrmChangeTrackStart,
pMarkupList->Count() );
@@ -138,9 +138,9 @@ namespace {
SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTextFrm& rTextFrm )
: mrTextFrm( rTextFrm )
- , mpChangeTrackInsertionTextMarkupList( 0 )
- , mpChangeTrackDeletionTextMarkupList( 0 )
- , mpChangeTrackFormatChangeTextMarkupList( 0 )
+ , mpChangeTrackInsertionTextMarkupList( nullptr )
+ , mpChangeTrackDeletionTextMarkupList( nullptr )
+ , mpChangeTrackFormatChangeTextMarkupList( nullptr )
{
}
@@ -152,24 +152,24 @@ SwParaChangeTrackingInfo::~SwParaChangeTrackingInfo()
void SwParaChangeTrackingInfo::reset()
{
delete mpChangeTrackInsertionTextMarkupList;
- mpChangeTrackInsertionTextMarkupList = 0;
+ mpChangeTrackInsertionTextMarkupList = nullptr;
delete mpChangeTrackDeletionTextMarkupList;
- mpChangeTrackDeletionTextMarkupList = 0;
+ mpChangeTrackDeletionTextMarkupList = nullptr;
delete mpChangeTrackFormatChangeTextMarkupList;
- mpChangeTrackFormatChangeTextMarkupList = 0;
+ mpChangeTrackFormatChangeTextMarkupList = nullptr;
}
const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( const sal_Int32 nTextMarkupType )
{
- SwWrongList* pChangeTrackingTextMarkupList = 0;
+ SwWrongList* pChangeTrackingTextMarkupList = nullptr;
- if ( mpChangeTrackInsertionTextMarkupList == 0 )
+ if ( mpChangeTrackInsertionTextMarkupList == nullptr )
{
- OSL_ENSURE( mpChangeTrackDeletionTextMarkupList == 0,
+ OSL_ENSURE( mpChangeTrackDeletionTextMarkupList == nullptr,
"<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackDeletionTextMarkupList> expected to be NULL." );
- OSL_ENSURE( mpChangeTrackFormatChangeTextMarkupList == 0,
+ OSL_ENSURE( mpChangeTrackFormatChangeTextMarkupList == nullptr,
"<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackFormatChangeTextMarkupList> expected to be NULL." );
initChangeTrackTextMarkupLists( mrTextFrm,
mpChangeTrackInsertionTextMarkupList,
diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx
index 750be3b52341..5f7ae087243b 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -38,7 +38,7 @@ namespace {
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException)
{
- const SwWrongList* pTextMarkupList( 0 );
+ const SwWrongList* pTextMarkupList( nullptr );
switch ( nTextMarkupType )
{
case text::TextMarkupType::SPELLCHECK:
@@ -49,13 +49,13 @@ namespace {
case text::TextMarkupType::PROOFREADING:
{
// support not implemented yet
- pTextMarkupList = 0;
+ pTextMarkupList = nullptr;
}
break;
case text::TextMarkupType::SMARTTAG:
{
// support not implemented yet
- pTextMarkupList = 0;
+ pTextMarkupList = nullptr;
}
break;
default:
@@ -74,7 +74,7 @@ SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionD
: mrPortionData( rPortionData )
// #i108125#
, mpTextNode( &rTextNode )
- , mpTextMarkupList( 0 )
+ , mpTextMarkupList( nullptr )
{
}
@@ -82,7 +82,7 @@ SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionD
SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
const SwWrongList& rTextMarkupList )
: mrPortionData( rPortionData )
- , mpTextNode( 0 )
+ , mpTextNode( nullptr )
, mpTextMarkupList( &rTextMarkupList )
{
}
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 177f66a2c25e..9df9a1c520d3 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -51,7 +51,7 @@ SfxPoolItem* SwTableBoxNumFormat::Clone( SfxItemPool* ) const
SwTableBoxFormula::SwTableBoxFormula( const OUString& rFormula )
: SfxPoolItem( RES_BOXATR_FORMULA ),
SwTableFormula( rFormula ),
- pDefinedIn( 0 )
+ pDefinedIn( nullptr )
{
}
@@ -79,7 +79,7 @@ SfxPoolItem* SwTableBoxFormula::Clone( SfxItemPool* ) const
*/
const SwNode* SwTableBoxFormula::GetNodeOfFormula() const
{
- const SwNode* pRet = 0;
+ const SwNode* pRet = nullptr;
if( pDefinedIn )
{
SwTableBox* pBox = SwIterator<SwTableBox,SwModify>( *pDefinedIn ).First();
@@ -91,7 +91,7 @@ const SwNode* SwTableBoxFormula::GetNodeOfFormula() const
SwTableBox* SwTableBoxFormula::GetTableBox()
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
if( pDefinedIn )
pBox = SwIterator<SwTableBox,SwModify>( *pDefinedIn ).First();
return pBox;
@@ -116,7 +116,7 @@ void SwTableBoxFormula::ChangeState( const SfxPoolItem* pItem )
const SwTableNode* pTableNd;
const SwNode* pNd = GetNodeOfFormula();
if( pNd && &pNd->GetNodes() == &pNd->GetDoc()->GetNodes() &&
- 0 != ( pTableNd = pNd->FindTableNode() ))
+ nullptr != ( pTableNd = pNd->FindTableNode() ))
{
switch( pUpdateField->m_eFlags )
{
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index ad99ba98ef58..580b2c623ecd 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -140,7 +140,7 @@ SwFormat &SwFormat::operator=(const SwFormat& rFormat)
}
else
{
- m_aSet.SetParent( 0 );
+ m_aSet.SetParent( nullptr );
}
}
m_bAutoFormat = rFormat.m_bAutoFormat;
@@ -281,7 +281,7 @@ void SwFormat::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValu
{
// otherwise de-register at least from dying one
DerivedFrom()->Remove( this );
- m_aSet.SetParent( 0 );
+ m_aSet.SetParent( nullptr );
}
}
}
@@ -311,7 +311,7 @@ void SwFormat::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValu
static_cast<const SwFormatChg*>(pNewValue)->pChangedFormat == GetRegisteredIn() )
{
// attach Set to new parent
- m_aSet.SetParent( DerivedFrom() ? &DerivedFrom()->m_aSet : 0 );
+ m_aSet.SetParent( DerivedFrom() ? &DerivedFrom()->m_aSet : nullptr );
}
break;
case RES_RESET_FMTWRITTEN:
@@ -351,7 +351,7 @@ bool SwFormat::SetDerivedFrom(SwFormat *pDerFrom)
if ( pDerFrom )
{
const SwFormat* pFormat = pDerFrom;
- while ( pFormat != 0 )
+ while ( pFormat != nullptr )
{
if ( pFormat == this )
return false;
@@ -443,7 +443,7 @@ SfxItemState SwFormat::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, cons
// if not, reset pointer and return SfxItemState::DEFAULT to signal that
// the item is not set
if( ppItem )
- *ppItem = NULL;
+ *ppItem = nullptr;
return SfxItemState::DEFAULT;
}
@@ -472,7 +472,7 @@ SfxItemState SwFormat::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParen
return SfxItemState::DEFAULT;
}
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eRet = m_aSet.GetItemState(RES_BACKGROUND, bSrchInParent, &pItem);
if (pItem)
rItem = *static_cast<const SvxBrushItem*>(pItem);
@@ -537,7 +537,7 @@ bool SwFormat::SetFormatAttr( const SfxPoolItem& rAttr )
(RES_GRFFMTCOLL == nFormatWhich ||
RES_TXTFMTCOLL == nFormatWhich ) ) )
{
- if( ( bRet = (0 != m_aSet.Put( rAttr ))) )
+ if( ( bRet = (nullptr != m_aSet.Put( rAttr ))) )
m_aSet.SetModifyAtAttr( this );
// #i71574#
if ( nFormatWhich == RES_TXTFMTCOLL && rAttr.Which() == RES_PARATR_NUMRULE )
@@ -593,7 +593,7 @@ bool SwFormat::SetFormatAttr( const SfxItemSet& rSet )
if (supportsFullDrawingLayerFillAttributeSet())
{
- const SfxPoolItem* pSource = 0;
+ const SfxPoolItem* pSource = nullptr;
if(SfxItemState::SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource))
{
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 47d25a70e3ea..04176ba1e703 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -63,16 +63,16 @@ SwDocPosUpdate::SwDocPosUpdate( const SwTwips nDcPos )
SwTableFormulaUpdate::SwTableFormulaUpdate( const SwTable* pNewTable )
: SwMsgPoolItem( RES_TABLEFML_UPDATE ),
- m_pTable( pNewTable ), m_pHistory( 0 ), m_nSplitLine( USHRT_MAX ),
+ m_pTable( pNewTable ), m_pHistory( nullptr ), m_nSplitLine( USHRT_MAX ),
m_eFlags( TBL_CALC )
{
- m_aData.pDelTable = 0;
+ m_aData.pDelTable = nullptr;
m_bModified = m_bBehindSplitLine = false;
OSL_ENSURE( m_pTable, "No Table pointer" );
}
SwAutoFormatGetDocNode::SwAutoFormatGetDocNode( const SwNodes* pNds )
- : SwMsgPoolItem( RES_AUTOFMT_DOCNODE ), pContentNode( 0 ), pNodes( pNds )
+ : SwMsgPoolItem( RES_AUTOFMT_DOCNODE ), pContentNode( nullptr ), pNodes( pNds )
{
}
@@ -120,7 +120,7 @@ bool SwMsgPoolItem::operator==( const SfxPoolItem& ) const
SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
OSL_FAIL( "SwMsgPoolItem knows no Clone" );
- return 0;
+ return nullptr;
}
#if OSL_DEBUG_LEVEL > 0
@@ -145,12 +145,12 @@ SwCondCollCondChg::SwCondCollCondChg( SwFormat *pFormat )
}
SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) :
- SwMsgPoolItem( RES_VIRTPAGENUM_INFO ), m_pPage( 0 ), m_pOrigPage( pPg ), m_pFrm( 0 )
+ SwMsgPoolItem( RES_VIRTPAGENUM_INFO ), m_pPage( nullptr ), m_pOrigPage( pPg ), m_pFrm( nullptr )
{
}
SwFindNearestNode::SwFindNearestNode( const SwNode& rNd )
- : SwMsgPoolItem( RES_FINDNEARESTNODE ), m_pNode( &rNd ), m_pFound( 0 )
+ : SwMsgPoolItem( RES_FINDNEARESTNODE ), m_pNode( &rNd ), m_pFound( nullptr )
{
}
@@ -213,7 +213,7 @@ sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript )
break;
default:
- pM = 0;
+ pM = nullptr;
}
sal_uInt16 nRet;
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index d2f906fcc885..2f88ebf0bed3 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -136,8 +136,8 @@ void SwAttrPool::removeAndDeleteSecondaryPools()
// first delete the items, then break the linking
pSdrPool->Delete();
- SetSecondaryPool(0);
- pSdrPool->SetSecondaryPool(0);
+ SetSecondaryPool(nullptr);
+ pSdrPool->SetSecondaryPool(nullptr);
// final cleanup of secondary pool(s)
SfxItemPool::Free(pSdrPool);
@@ -145,17 +145,17 @@ void SwAttrPool::removeAndDeleteSecondaryPools()
}
SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
- : SfxItemSet( rPool, nWh1, nWh2 ), m_pOldSet( 0 ), m_pNewSet( 0 )
+ : SfxItemSet( rPool, nWh1, nWh2 ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
{
}
SwAttrSet::SwAttrSet( SwAttrPool& rPool, const sal_uInt16* nWhichPairTable )
- : SfxItemSet( rPool, nWhichPairTable ), m_pOldSet( 0 ), m_pNewSet( 0 )
+ : SfxItemSet( rPool, nWhichPairTable ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
{
}
SwAttrSet::SwAttrSet( const SwAttrSet& rSet )
- : SfxItemSet( rSet ), m_pOldSet( 0 ), m_pNewSet( 0 )
+ : SfxItemSet( rSet ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
{
}
@@ -164,7 +164,7 @@ SfxItemSet* SwAttrSet::Clone( bool bItems, SfxItemPool *pToPool ) const
if ( pToPool && pToPool != GetPool() )
{
SwAttrPool* pAttrPool = dynamic_cast< SwAttrPool* >(pToPool);
- SfxItemSet* pTmpSet = 0;
+ SfxItemSet* pTmpSet = nullptr;
if ( !pAttrPool )
pTmpSet = SfxItemSet::Clone( bItems, pToPool );
else
@@ -196,8 +196,8 @@ bool SwAttrSet::Put_BC( const SfxPoolItem& rAttr,
{
m_pNewSet = pNew;
m_pOldSet = pOld;
- bool bRet = 0 != SfxItemSet::Put( rAttr );
- m_pOldSet = m_pNewSet = 0;
+ bool bRet = nullptr != SfxItemSet::Put( rAttr );
+ m_pOldSet = m_pNewSet = nullptr;
return bRet;
}
@@ -207,7 +207,7 @@ bool SwAttrSet::Put_BC( const SfxItemSet& rSet,
m_pNewSet = pNew;
m_pOldSet = pOld;
bool bRet = SfxItemSet::Put( rSet );
- m_pOldSet = m_pNewSet = 0;
+ m_pOldSet = m_pNewSet = nullptr;
return bRet;
}
@@ -217,7 +217,7 @@ sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
m_pNewSet = pNew;
m_pOldSet = pOld;
sal_uInt16 nRet = SfxItemSet::ClearItem( nWhich );
- m_pOldSet = m_pNewSet = 0;
+ m_pOldSet = m_pNewSet = nullptr;
return nRet;
}
@@ -230,7 +230,7 @@ sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
sal_uInt16 nRet = 0;
for( ; nWhich1 <= nWhich2; ++nWhich1 )
nRet = nRet + SfxItemSet::ClearItem( nWhich1 );
- m_pOldSet = m_pNewSet = 0;
+ m_pOldSet = m_pNewSet = nullptr;
return nRet;
}
@@ -240,7 +240,7 @@ int SwAttrSet::Intersect_BC( const SfxItemSet& rSet,
m_pNewSet = pNew;
m_pOldSet = pOld;
SfxItemSet::Intersect( rSet );
- m_pOldSet = m_pNewSet = 0;
+ m_pOldSet = m_pNewSet = nullptr;
return pNew ? pNew->Count() : ( pOld ? pOld->Count() : 0 );
}
@@ -279,7 +279,7 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
// If CharFormat is set and it is set in different attribute pools then
// the CharFormat has to be copied.
SwCharFormat* pCharFormat;
- if( 0 != ( pCharFormat = const_cast<SwFormatDrop*>(static_cast<const SwFormatDrop*>(pItem))->GetCharFormat() )
+ if( nullptr != ( pCharFormat = const_cast<SwFormatDrop*>(static_cast<const SwFormatDrop*>(pItem))->GetCharFormat() )
&& GetPool() != pCharFormat->GetAttrSet().GetPool() )
{
pCharFormat = GetDoc()->CopyCharFormat( *pCharFormat );
@@ -310,7 +310,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
if( Count() )
{
// #i92811#
- SfxStringItem* pNewListIdItem( 0 );
+ SfxStringItem* pNewListIdItem( nullptr );
const SfxPoolItem* pItem;
const SwDoc *pSrcDoc = GetDoc();
@@ -371,7 +371,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
// check again, if list exist, because <SwDoc::MakeNumRule(..)>
// could have also created it.
- if ( pNewListIdItem == 0 &&
+ if ( pNewListIdItem == nullptr &&
!pDstDoc->getIDocumentListsAccess().getListByName( sListId ) )
{
// copy list
@@ -385,7 +385,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
const SwPageDesc* pPgDesc;
if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState(
RES_PAGEDESC, false, &pItem ) &&
- 0 != ( pPgDesc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()) )
+ nullptr != ( pPgDesc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()) )
{
if( !tmpSet )
tmpSet.reset( new SfxItemSet( *this ));
@@ -402,7 +402,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState( RES_ANCHOR, false, &pItem )
- && static_cast< const SwFormatAnchor* >( pItem )->GetContentAnchor() != NULL )
+ && static_cast< const SwFormatAnchor* >( pItem )->GetContentAnchor() != nullptr )
{
if( !tmpSet )
tmpSet.reset( new SfxItemSet( *this ));
@@ -416,7 +416,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
if( pCNd )
{
// #i92811#
- if ( pNewListIdItem != 0 )
+ if ( pNewListIdItem != nullptr )
{
tmpSet->Put( *pNewListIdItem );
}
@@ -430,7 +430,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
else if( pCNd )
{
// #i92811#
- if ( pNewListIdItem != 0 )
+ if ( pNewListIdItem != nullptr )
{
SfxItemSet aTmpSet( *this );
aTmpSet.Put( *pNewListIdItem );
@@ -448,7 +448,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// #i92811#
delete pNewListIdItem;
- pNewListIdItem = 0;
+ pNewListIdItem = nullptr;
}
}
#if OSL_DEBUG_LEVEL > 0
diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx
index 0f7c767ab3f2..ae43d6c62e6d 100644
--- a/sw/source/core/bastyp/SwSmartTagMgr.cxx
+++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx
@@ -27,7 +27,7 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-SwSmartTagMgr* SwSmartTagMgr::mpTheSwSmartTagMgr = 0;
+SwSmartTagMgr* SwSmartTagMgr::mpTheSwSmartTagMgr = nullptr;
SwSmartTagMgr& SwSmartTagMgr::Get()
{
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 605315663701..5612103f1c1c 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -406,7 +406,7 @@ sal_uInt16 BigPtrArray::Compress( short nMax )
// represents the "old" and <qq> the "new" array.
BlockInfo** pp = ppInf, **qq = pp;
BlockInfo* p;
- BlockInfo* pLast(0); // last empty block
+ BlockInfo* pLast(nullptr); // last empty block
sal_uInt16 nLast = 0; // missing elements
sal_uInt16 nBlkdel = 0; // number of deleted blocks
sal_uInt16 nFirstChgPos = USHRT_MAX; // at which position was the 1st change?
@@ -454,7 +454,7 @@ sal_uInt16 BigPtrArray::Compress( short nMax )
{
// than remove
delete[] p->pData;
- delete p, p = 0;
+ delete p, p = nullptr;
++nBlkdel;
}
else
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 83285a49e847..9314a01ac4fc 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -34,7 +34,7 @@
using namespace com::sun::star;
-SwBreakIt* g_pBreakIt = 0;
+SwBreakIt* g_pBreakIt = nullptr;
void SwBreakIt::_Create( const uno::Reference<uno::XComponentContext> & rxContext )
{
@@ -43,7 +43,7 @@ void SwBreakIt::_Create( const uno::Reference<uno::XComponentContext> & rxContex
void SwBreakIt::_Delete()
{
- delete g_pBreakIt, g_pBreakIt = 0;
+ delete g_pBreakIt, g_pBreakIt = nullptr;
}
SwBreakIt * SwBreakIt::Get()
@@ -53,8 +53,8 @@ SwBreakIt * SwBreakIt::Get()
SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext )
: m_xContext( rxContext ),
- m_pLanguageTag( NULL ),
- m_pForbidden( NULL ),
+ m_pLanguageTag( nullptr ),
+ m_pForbidden( nullptr ),
aForbiddenLang( LANGUAGE_DONTKNOW )
{
OSL_ENSURE( m_xContext.is(), "SwBreakIt: no MultiServiceFactory" );
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 1f4dc62ce64f..1317ec2bb204 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -205,7 +205,7 @@ SwHash* Find( const OUString& rStr, SwHash* const * ppTable,
return pEntry;
}
}
- return 0;
+ return nullptr;
}
inline LanguageType GetDocAppScriptLang( SwDoc& rDoc )
@@ -230,7 +230,7 @@ static double lcl_ConvertToDateValue( SwDoc& rDoc, sal_Int32 nDate )
}
SwCalc::SwCalc( SwDoc& rD )
- : aErrExpr( OUString(), SwSbxValue(), 0 )
+ : aErrExpr( OUString(), SwSbxValue(), nullptr )
, nCommandPos(0)
, rDoc( rD )
, pLclData( m_aSysLocale.GetLocaleDataPtr() )
@@ -333,7 +333,7 @@ SwCalc::SwCalc( SwDoc& rD )
for( n = 0; n < 25; ++n )
{
sTmpStr = OUString::createFromAscii(sNTypeTab[n]);
- VarTable[ aHashValue[ n ] ] = new SwCalcExp( sTmpStr, nVal, 0 );
+ VarTable[ aHashValue[ n ] ] = new SwCalcExp( sTmpStr, nVal, nullptr );
}
static_cast<SwCalcExp*>(VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( false );
@@ -358,7 +358,7 @@ SwCalc::SwCalc( SwDoc& rD )
nVal.PutString( rUserOptions.GetToken( aAdrToken[ 11 ] ));
sTmpStr = OUString::createFromAscii(sNTypeTab[25]);
- VarTable[ aHashValue[ 25 ] ]->pNext = new SwCalcExp( sTmpStr, nVal, 0 );
+ VarTable[ aHashValue[ 25 ] ]->pNext = new SwCalcExp( sTmpStr, nVal, nullptr );
} // SwCalc::SwCalc
@@ -544,7 +544,7 @@ SwCalcExp* SwCalc::VarLook( const OUString& rStr, bool bIns )
}
sal_uLong nTmpRec = 0;
- if( 0 != ( pFnd = Find( sDBNum, VarTable, TBLSZ ) ) )
+ if( nullptr != ( pFnd = Find( sDBNum, VarTable, TBLSZ ) ) )
nTmpRec = static_cast<SwCalcExp*>(pFnd)->nValue.GetULong();
OUString sResult;
@@ -572,7 +572,7 @@ SwCalcExp* SwCalc::VarLook( const OUString& rStr, bool bIns )
return &aErrExpr;
}
- SwCalcExp* pNewExp = new SwCalcExp( aStr, SwSbxValue(), 0 );
+ SwCalcExp* pNewExp = new SwCalcExp( aStr, SwSbxValue(), nullptr );
pNewExp->pNext = VarTable[ ii ];
VarTable[ ii ] = pNewExp;
@@ -617,7 +617,7 @@ void SwCalc::VarChange( const OUString& rStr, const SwSbxValue& rValue )
if( !pFnd )
{
- pFnd = new SwCalcExp( aStr, SwSbxValue( rValue ), 0 );
+ pFnd = new SwCalcExp( aStr, SwSbxValue( rValue ), nullptr );
pFnd->pNext = VarTable[ nPos ];
VarTable[ nPos ] = pFnd;
}
@@ -1257,7 +1257,7 @@ SwSbxValue SwCalc::Prim()
{
SwSbxValue nErg;
- pfCalc pFnc = 0;
+ pfCalc pFnc = nullptr;
bool bChkTrig = false, bChkPow = false;
@@ -1569,7 +1569,7 @@ bool SwCalc::IsValidVarName( const OUString& rStr, OUString* pValidName )
SwHash::SwHash(const OUString& rStr)
: aStr(rStr)
- , pNext(0)
+ , pNext(nullptr)
{
}
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index c79005b4611c..dac9ba9c2769 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -27,18 +27,18 @@
SwIndex::SwIndex(SwIndexReg *const pReg, sal_Int32 const nIdx)
: m_nIndex( nIdx )
, m_pIndexReg( pReg )
- , m_pNext( 0 )
- , m_pPrev( 0 )
- , m_pMark( 0 )
+ , m_pNext( nullptr )
+ , m_pPrev( nullptr )
+ , m_pMark( nullptr )
{
Init(m_nIndex);
}
SwIndex::SwIndex( const SwIndex& rIdx, short nDiff )
: m_pIndexReg( rIdx.m_pIndexReg )
- , m_pNext( 0 )
- , m_pPrev( 0 )
- , m_pMark( 0 )
+ , m_pNext( nullptr )
+ , m_pPrev( nullptr )
+ , m_pMark( nullptr )
{
ChgValue( rIdx, rIdx.m_nIndex + nDiff );
}
@@ -46,9 +46,9 @@ SwIndex::SwIndex( const SwIndex& rIdx, short nDiff )
SwIndex::SwIndex( const SwIndex& rIdx )
: m_nIndex( rIdx.m_nIndex )
, m_pIndexReg( rIdx.m_pIndexReg )
- , m_pNext( 0 )
- , m_pPrev( 0 )
- , m_pMark( 0 )
+ , m_pNext( nullptr )
+ , m_pPrev( nullptr )
+ , m_pMark( nullptr )
{
ChgValue( rIdx, rIdx.m_nIndex );
}
@@ -88,7 +88,7 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 nNewValue )
if (rIdx.m_nIndex > nNewValue) // move forwards
{
SwIndex* pPrv;
- while ((0 != (pPrv = pFnd->m_pPrev)) && (pPrv->m_nIndex > nNewValue))
+ while ((nullptr != (pPrv = pFnd->m_pPrev)) && (pPrv->m_nIndex > nNewValue))
pFnd = pPrv;
if( pFnd != this )
@@ -108,7 +108,7 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 nNewValue )
else if (rIdx.m_nIndex < nNewValue)
{
SwIndex* pNxt;
- while ((0 != (pNxt = pFnd->m_pNext)) && (pNxt->m_nIndex < nNewValue))
+ while ((nullptr != (pNxt = pFnd->m_pNext)) && (pNxt->m_nIndex < nNewValue))
pFnd = pNxt;
if( pFnd != this )
@@ -184,7 +184,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
{
Remove();
m_pIndexReg = rIdx.m_pIndexReg;
- m_pNext = m_pPrev = 0;
+ m_pNext = m_pPrev = nullptr;
bEqual = false;
}
else
@@ -201,7 +201,7 @@ SwIndex& SwIndex::Assign( SwIndexReg* pArr, sal_Int32 nIdx )
{
Remove();
m_pIndexReg = pArr;
- m_pNext = m_pPrev = 0;
+ m_pNext = m_pPrev = nullptr;
Init(nIdx);
}
else if (m_nIndex != nIdx)
@@ -217,7 +217,7 @@ void SwIndex::SetMark(const sw::mark::IMark* pMark)
}
SwIndexReg::SwIndexReg()
- : m_pFirst( 0 ), m_pLast( 0 )
+ : m_pFirst( nullptr ), m_pLast( nullptr )
{
}
@@ -288,7 +288,7 @@ void SwIndexReg::MoveTo( SwIndexReg& rArr )
pIdx->Assign( &rArr, pIdx->GetIndex() );
pIdx = pNext;
}
- m_pFirst = 0, m_pLast = 0;
+ m_pFirst = nullptr, m_pLast = nullptr;
}
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index c5e5cb9eaa35..35c59bffc556 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -433,24 +433,24 @@ SfxItemInfo aSlotTab[] =
{ 0, SfxItemPoolFlags::POOLABLE } // RES_UNKNOWNATR_CONTAINER
};
-sal_uInt16* SwAttrPool::pVersionMap1 = 0;
-sal_uInt16* SwAttrPool::pVersionMap2 = 0;
-sal_uInt16* SwAttrPool::pVersionMap3 = 0;
-sal_uInt16* SwAttrPool::pVersionMap4 = 0;
+sal_uInt16* SwAttrPool::pVersionMap1 = nullptr;
+sal_uInt16* SwAttrPool::pVersionMap2 = nullptr;
+sal_uInt16* SwAttrPool::pVersionMap3 = nullptr;
+sal_uInt16* SwAttrPool::pVersionMap4 = nullptr;
// #i18732#
-sal_uInt16* SwAttrPool::pVersionMap5 = 0;
-sal_uInt16* SwAttrPool::pVersionMap6 = 0;
-sal_uInt16* SwAttrPool::pVersionMap7 = 0;
+sal_uInt16* SwAttrPool::pVersionMap5 = nullptr;
+sal_uInt16* SwAttrPool::pVersionMap6 = nullptr;
+sal_uInt16* SwAttrPool::pVersionMap7 = nullptr;
-std::vector<SvGlobalName*> *pGlobalOLEExcludeList = 0;
+std::vector<SvGlobalName*> *pGlobalOLEExcludeList = nullptr;
-SwAutoCompleteWord* SwDoc::mpACmpltWords = 0;
+SwAutoCompleteWord* SwDoc::mpACmpltWords = nullptr;
-SwCheckIt* pCheckIt = 0;
-CharClass* pAppCharClass = 0;
+SwCheckIt* pCheckIt = nullptr;
+CharClass* pAppCharClass = nullptr;
-CollatorWrapper* pCollator = 0,
- *pCaseCollator = 0;
+CollatorWrapper* pCollator = nullptr,
+ *pCaseCollator = nullptr;
salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper()
{
@@ -525,13 +525,13 @@ void _InitCore()
aAttrTab[ RES_TXTATR_METAFIELD - POOLATTR_BEGIN ] = SwFormatMeta::CreatePoolDefault(RES_TXTATR_METAFIELD);
aAttrTab[ RES_TXTATR_AUTOFMT- POOLATTR_BEGIN ] = new SwFormatAutoFormat;
aAttrTab[ RES_TXTATR_INETFMT - POOLATTR_BEGIN ] = new SwFormatINetFormat( OUString(), OUString() );
- aAttrTab[ RES_TXTATR_CHARFMT- POOLATTR_BEGIN ] = new SwFormatCharFormat( 0 );
+ aAttrTab[ RES_TXTATR_CHARFMT- POOLATTR_BEGIN ] = new SwFormatCharFormat( nullptr );
aAttrTab[ RES_TXTATR_CJK_RUBY - POOLATTR_BEGIN ] = new SwFormatRuby( OUString() );
aAttrTab[ RES_TXTATR_UNKNOWN_CONTAINER - POOLATTR_BEGIN ] = new SvXMLAttrContainerItem( RES_TXTATR_UNKNOWN_CONTAINER );
aAttrTab[ RES_TXTATR_INPUTFIELD - POOLATTR_BEGIN ] = new SwFormatField( RES_TXTATR_INPUTFIELD );
aAttrTab[ RES_TXTATR_FIELD- POOLATTR_BEGIN ] = new SwFormatField( RES_TXTATR_FIELD );
- aAttrTab[ RES_TXTATR_FLYCNT - POOLATTR_BEGIN ] = new SwFormatFlyCnt( 0 );
+ aAttrTab[ RES_TXTATR_FLYCNT - POOLATTR_BEGIN ] = new SwFormatFlyCnt( nullptr );
aAttrTab[ RES_TXTATR_FTN - POOLATTR_BEGIN ] = new SwFormatFootnote;
aAttrTab[ RES_TXTATR_ANNOTATION - POOLATTR_BEGIN ] = new SwFormatField( RES_TXTATR_ANNOTATION );
@@ -731,7 +731,7 @@ void _InitCore()
SwAttrPool::pVersionMap7[ i-1 ] = i + 4;
SwBreakIt::_Create( ::comphelper::getProcessComponentContext() );
- pCheckIt = NULL;
+ pCheckIt = nullptr;
_FrmInit();
_TextInit();
@@ -822,7 +822,7 @@ void _FinitCore()
for( sal_uInt16 n = 0; n < POOLATTR_END - POOLATTR_BEGIN; n++ )
{
SfxPoolItem* pHt;
- if( 0 != ( pHt = aAttrTab[n] ))
+ if( nullptr != ( pHt = aAttrTab[n] ))
delete pHt;
}
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 51817326ead7..c6216cd771ed 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -74,9 +74,9 @@ SwCache::SwCache( const sal_uInt16 nInitSize
#endif
) :
m_aCacheObjects(),
- pRealFirst( 0 ),
- pFirst( 0 ),
- pLast( 0 ),
+ pRealFirst( nullptr ),
+ pFirst( nullptr ),
+ pLast( nullptr ),
nCurMax( nInitSize )
#ifdef DBG_UTIL
, m_aName( rNm )
@@ -127,7 +127,7 @@ void SwCache::Flush( const sal_uInt8 )
{
INCREMENT( m_nFlushCnt );
SwCacheObj *pObj = pRealFirst;
- pRealFirst = pFirst = pLast = 0;
+ pRealFirst = pFirst = pLast = nullptr;
SwCacheObj *pTmp;
while ( pObj )
{
@@ -139,7 +139,7 @@ void SwCache::Flush( const sal_uInt8 )
{
pRealFirst = pFirst = pLast = pObj;
pTmp = pObj->GetNext();
- pObj->SetNext( 0 ); pObj->SetPrev( 0 );
+ pObj->SetNext( nullptr ); pObj->SetPrev( nullptr );
pObj = pTmp;
}
else
@@ -147,7 +147,7 @@ void SwCache::Flush( const sal_uInt8 )
pObj->SetPrev( pLast );
pLast = pObj;
pTmp = pObj->GetNext();
- pObj->SetNext( 0 );
+ pObj->SetNext( nullptr );
pObj = pTmp;
}
}
@@ -157,7 +157,7 @@ void SwCache::Flush( const sal_uInt8 )
pTmp = pObj;
pObj = pTmp->GetNext();
aFreePositions.push_back( pTmp->GetCachePos() );
- m_aCacheObjects[pTmp->GetCachePos()] = NULL;
+ m_aCacheObjects[pTmp->GetCachePos()] = nullptr;
delete pTmp;
INCREMENT( m_nFlushedObjects );
}
@@ -189,7 +189,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
{
OSL_ENSURE( pObj->GetPrev(), "Last but no Prev." );
pLast = pObj->GetPrev();
- pLast->SetNext( 0 );
+ pLast->SetNext( nullptr );
}
else
{
@@ -204,7 +204,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
{
pRealFirst->SetPrev( pObj );
pObj->SetNext( pRealFirst );
- pObj->SetPrev( 0 );
+ pObj->SetPrev( nullptr );
pRealFirst = pFirst = pObj;
CHECK;
}
@@ -218,7 +218,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
pObj->SetPrev( pFirst->GetPrev() );
}
else
- pObj->SetPrev( 0 );
+ pObj->SetPrev( nullptr );
pFirst->SetPrev( pObj );
pObj->SetNext( pFirst );
pFirst = pObj;
@@ -230,10 +230,10 @@ SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex,
const bool bToTop )
{
SwCacheObj *pRet;
- if ( 0 != (pRet = (nIndex < m_aCacheObjects.size()) ? m_aCacheObjects[ nIndex ] : 0) )
+ if ( nullptr != (pRet = (nIndex < m_aCacheObjects.size()) ? m_aCacheObjects[ nIndex ] : nullptr) )
{
if ( !pRet->IsOwner( pOwner ) )
- pRet = 0;
+ pRet = nullptr;
else if ( bToTop && pRet != pFirst )
ToTop( pRet );
}
@@ -294,7 +294,7 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
pObj->GetNext()->SetPrev( pObj->GetPrev() );
aFreePositions.push_back( pObj->GetCachePos() );
- m_aCacheObjects[pObj->GetCachePos()] = NULL;
+ m_aCacheObjects[pObj->GetCachePos()] = nullptr;
delete pObj;
CHECK;
@@ -325,7 +325,7 @@ void SwCache::Delete( const void *pOwner )
{
INCREMENT( m_nDelete );
SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, false )) )
+ if ( nullptr != (pObj = Get( pOwner, false )) )
DeleteObj( pObj );
}
@@ -369,7 +369,7 @@ bool SwCache::Insert( SwCacheObj *pNew )
if ( pObj == pLast )
{ OSL_ENSURE( pObj->GetPrev(), "Last but no Prev" );
pLast = pObj->GetPrev();
- pLast->SetNext( 0 );
+ pLast->SetNext( nullptr );
}
else
{
@@ -422,8 +422,8 @@ void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
}
SwCacheObj::SwCacheObj( const void *pOwn ) :
- m_pNext( 0 ),
- m_pPrev( 0 ),
+ m_pNext( nullptr ),
+ m_pPrev( nullptr ),
m_nCachePos( USHRT_MAX ),
m_nLock( 0 ),
m_pOwner( pOwn )
@@ -462,7 +462,7 @@ void SwCacheAccess::_Get()
if ( !rCache.Insert( pObj ) )
{
delete pObj;
- pObj = 0;
+ pObj = nullptr;
}
else
{
@@ -472,7 +472,7 @@ void SwCacheAccess::_Get()
bool SwCacheAccess::IsAvailable() const
{
- return pObj != 0;
+ return pObj != nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx
index dea4bf83911c..e8a21ccdb74c 100644
--- a/sw/source/core/crsr/BlockCursor.cxx
+++ b/sw/source/core/crsr/BlockCursor.cxx
@@ -61,8 +61,8 @@ void SwBlockCursor::clearPoints()
{
delete pStartPt;
delete pEndPt;
- pStartPt = 0;
- pEndPt = 0;
+ pStartPt = nullptr;
+ pEndPt = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx
index 17c781b78b12..a68b1117cc51 100644
--- a/sw/source/core/crsr/BlockCursor.hxx
+++ b/sw/source/core/crsr/BlockCursor.hxx
@@ -42,7 +42,7 @@ class SwBlockCursor
public:
SwBlockCursor( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ) :
- aCursor( rCrsrSh, rPos ), pStartPt(0), pEndPt(0) {}
+ aCursor( rCrsrSh, rPos ), pStartPt(nullptr), pEndPt(nullptr) {}
/** Access to the shell cursor
@return SwShellCrsr& which represents the start and end position of the
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 0a308ecf69d2..c2ad1f4e7f02 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -55,13 +55,13 @@ namespace sw { namespace mark
SwTextField* pTextField = pTextNode ?
pTextNode->GetFieldTextAttrAt(
- GetMarkEnd().nContent.GetIndex()-1, true ) : NULL;
- OSL_ENSURE( pTextField != NULL, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
- if ( pTextField != NULL )
+ GetMarkEnd().nContent.GetIndex()-1, true ) : nullptr;
+ OSL_ENSURE( pTextField != nullptr, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
+ if ( pTextField != nullptr )
{
const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTextField->GetFormatField().GetField());
- OSL_ENSURE( pPostItField != NULL, "<AnnotationMark::InitDoc(..)> - annotation field missing!" );
- if ( pPostItField != NULL )
+ OSL_ENSURE( pPostItField != nullptr, "<AnnotationMark::InitDoc(..)> - annotation field missing!" );
+ if ( pPostItField != nullptr )
{
// use the annotation mark's name as the annotation name, if
// - the annotation field has an empty annotation name or
@@ -84,22 +84,22 @@ namespace sw { namespace mark
const SwFormatField* AnnotationMark::GetAnnotationFormatField() const
{
SwDoc* pDoc = GetMarkPos().GetDoc();
- if ( pDoc == NULL )
+ if ( pDoc == nullptr )
{
OSL_ENSURE( false, "<AnnotationMark::GetAnnotationFormatField()> - missing document at annotation mark" );
- return NULL;
+ return nullptr;
}
- SwFormatField* pAnnotationFormatField = NULL;
+ SwFormatField* pAnnotationFormatField = nullptr;
SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetFieldType( RES_POSTITFLD, OUString(), false );
SwIterator<SwFormatField,SwFieldType> aIter( *pType );
- for( SwFormatField* pFormatField = aIter.First(); pFormatField != NULL; pFormatField = aIter.Next() )
+ for( SwFormatField* pFormatField = aIter.First(); pFormatField != nullptr; pFormatField = aIter.Next() )
{
if ( pFormatField->IsFieldInDoc() )
{
const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pFormatField->GetField());
- if (pPostItField != NULL && pPostItField->GetName() == GetName())
+ if (pPostItField != nullptr && pPostItField->GetName() == GetName())
{
pAnnotationFormatField = pFormatField;
break;
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 6984040ba906..d4947963a2a1 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -46,15 +46,15 @@ namespace
{
// make sure the position has 1) the proper node, and 2) a proper index
SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode();
- if(pTextNode == NULL && rPos.nContent.GetIndex() > 0)
+ if(pTextNode == nullptr && rPos.nContent.GetIndex() > 0)
{
SAL_INFO(
"sw.core",
"illegal position: " << rPos.nContent.GetIndex()
<< " without proper TextNode");
- rPos.nContent.Assign(NULL, 0);
+ rPos.nContent.Assign(nullptr, 0);
}
- else if(pTextNode != NULL && rPos.nContent.GetIndex() > pTextNode->Len())
+ else if(pTextNode != nullptr && rPos.nContent.GetIndex() > pTextNode->Len())
{
SAL_INFO(
"sw.core",
@@ -69,7 +69,7 @@ namespace
const sal_Unicode aStartMark,
const sal_Unicode aEndMark)
{
- io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, nullptr);
SwPosition rStart = pField->GetMarkStart();
SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
@@ -95,7 +95,7 @@ namespace
++rEnd.nContent;
}
- io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, nullptr);
};
static void lcl_RemoveFieldMarks(Fieldmark* const pField,
@@ -103,7 +103,7 @@ namespace
const sal_Unicode aStartMark,
const sal_Unicode aEndMark)
{
- io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, nullptr);
const SwPosition& rStart = pField->GetMarkStart();
SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
@@ -130,7 +130,7 @@ namespace
io_pDoc->getIDocumentContentOperations().DeleteRange(aEnd);
}
- io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, nullptr);
};
}
@@ -138,7 +138,7 @@ namespace sw { namespace mark
{
MarkBase::MarkBase(const SwPaM& aPaM,
const OUString& rName)
- : SwModify(0)
+ : SwModify(nullptr)
, m_pPos1(new SwPosition(*(aPaM.GetPoint())))
, m_aName(rName)
{
@@ -199,7 +199,7 @@ namespace sw { namespace mark
OUString MarkBase::GenerateNewName(const OUString& rPrefix)
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
{
@@ -229,7 +229,7 @@ namespace sw { namespace mark
NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
- SetXBookmark(uno::Reference<text::XTextContent>(0));
+ SetXBookmark(uno::Reference<text::XTextContent>(nullptr));
}
}
@@ -244,7 +244,7 @@ namespace sw { namespace mark
DdeBookmark::DdeBookmark(const SwPaM& aPaM)
: MarkBase(aPaM, MarkBase::GenerateNewName("__DdeLink__"))
- , m_aRefObj(NULL)
+ , m_aRefObj(nullptr)
{ }
void DdeBookmark::SetRefObject(SwServerObject* pObj)
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 3833c26031b7..f24c6fb9f3a5 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -96,7 +96,7 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCrsrShell& rShell)
if (pContent->GetType() == FRM_TAB)
{
SwFormatFrmSize pSize = pLine->GetFrameFormat()->GetFrmSize();
- pRow->ModifyNotification(NULL, &pSize);
+ pRow->ModifyNotification(nullptr, &pSize);
return;
}
}
@@ -118,8 +118,8 @@ SwCallLink::~SwCallLink()
lcl_notifyRow(pCNd, rShell);
const SwDoc *pDoc=rShell.GetDoc();
- const SwContentNode *pNode = NULL;
- if ( ( pDoc != NULL && nNode < pDoc->GetNodes( ).Count( ) ) )
+ const SwContentNode *pNode = nullptr;
+ if ( ( pDoc != nullptr && nNode < pDoc->GetNodes( ).Count( ) ) )
{
pNode = pDoc->GetNodes()[nNode]->GetContentNode();
}
@@ -212,8 +212,8 @@ SwCallLink::~SwCallLink()
const SwFrm* pFrm;
const SwFlyFrm *pFlyFrm;
- if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->getLayoutFrm(rShell.GetLayout(), 0, 0, false) ) &&
- 0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
+ if( !rShell.ActionPend() && nullptr != ( pFrm = pCNd->getLayoutFrm(rShell.GetLayout(), nullptr, nullptr, false) ) &&
+ nullptr != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrm->GetFormat()->GetContent().GetContentIdx();
OSL_ENSURE( pIndex, "Fly without Content" );
@@ -231,12 +231,12 @@ SwCallLink::~SwCallLink()
long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrm )
{
- SwTextFrm* pFrm = static_cast<SwTextFrm*>(rNd.getLayoutFrm(pRoot,0,0,bCalcFrm));
+ SwTextFrm* pFrm = static_cast<SwTextFrm*>(rNd.getLayoutFrm(pRoot,nullptr,nullptr,bCalcFrm));
SwTextFrm* pNext;
if ( pFrm && !pFrm->IsHiddenNow() )
{
if( pFrm->HasFollow() )
- while( 0 != ( pNext = pFrm->GetFollow() ) &&
+ while( nullptr != ( pNext = pFrm->GetFollow() ) &&
nCntPos >= pNext->GetOfst() )
pFrm = pNext;
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 3fa891436a16..8b55c24d62e9 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -232,7 +232,7 @@ bool SwCrsrShell::IsFormProtected()
bool SwCrsrShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
{
- if(pMark==NULL) return false;
+ if(pMark==nullptr) return false;
// watch Crsr-Moves
CrsrStateHelper aCrsrSt(*this);
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 8e5a44e02999..7ba3d9fab95e 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -86,7 +86,7 @@ void CheckRange( SwCursor* pCurCrsr )
const SwPosition *pStt = pCurCrsr->Start(),
*pEnd = pCurCrsr->GetPoint() == pStt ? pCurCrsr->GetMark() : pCurCrsr->GetPoint();
- SwPaM *pTmpDel = 0,
+ SwPaM *pTmpDel = nullptr,
*pTmp = pCurCrsr->GetNext();
// Search the complete ring
@@ -109,7 +109,7 @@ void CheckRange( SwCursor* pCurCrsr )
// range. Take note that Point does not belong to the range anymore.
pTmp = pTmp->GetNext();
delete pTmpDel; // Remove old range
- pTmpDel = 0;
+ pTmpDel = nullptr;
}
}
@@ -193,8 +193,8 @@ SwPaM* SwCrsrShell::GetCrsr( bool bMakeTableCrsr ) const
const SwContentNode* pCNd;
if( m_pTableCrsr->GetPoint()->nNode.GetIndex() &&
m_pTableCrsr->GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = m_pTableCrsr->GetContentNode() ) && pCNd->getLayoutFrm( GetLayout() ) &&
- 0 != ( pCNd = m_pTableCrsr->GetContentNode(false) ) && pCNd->getLayoutFrm( GetLayout() ) )
+ nullptr != ( pCNd = m_pTableCrsr->GetContentNode() ) && pCNd->getLayoutFrm( GetLayout() ) &&
+ nullptr != ( pCNd = m_pTableCrsr->GetContentNode(false) ) && pCNd->getLayoutFrm( GetLayout() ) )
{
SwShellTableCrsr* pTC = m_pTableCrsr;
GetLayout()->MakeTableCrsrs( *pTC );
@@ -345,7 +345,7 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
bool bRet = false;
// #i27615# Handle cursor in front of label.
- const SwTextNode* pTextNd = 0;
+ const SwTextNode* pTextNd = nullptr;
if( m_pBlockCrsr )
m_pBlockCrsr->clearPoints();
@@ -362,7 +362,7 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
// to the left will simply set the bInFrontOfLabel flag:
else if ( bLeft && 0 == pShellCrsr->GetPoint()->nContent.GetIndex() &&
!pShellCrsr->IsInFrontOfLabel() && !pShellCrsr->HasMark() &&
- 0 != ( pTextNd = pShellCrsr->GetNode().GetTextNode() ) &&
+ nullptr != ( pTextNd = pShellCrsr->GetNode().GetTextNode() ) &&
pTextNd->HasVisibleNumberingOrBullet() )
{
SetInFrontOfLabel( true );
@@ -477,17 +477,17 @@ bool SwCrsrShell::bColumnChange()
{
SwFrm* pCurrFrm = GetCurrFrm(false);
- if (pCurrFrm == NULL)
+ if (pCurrFrm == nullptr)
{
return false;
}
SwFrm* pCurrCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm();
- while(pCurrCol== NULL && pCurrFrm!=NULL )
+ while(pCurrCol== nullptr && pCurrFrm!=nullptr )
{
SwLayoutFrm* pParent = pCurrFrm->GetUpper();
- if(pParent!=NULL)
+ if(pParent!=nullptr)
{
pCurrCol=static_cast<SwFrm*>(pParent)->FindColFrm();
pCurrFrm = static_cast<SwFrm*>(pParent);
@@ -666,7 +666,7 @@ bool SwCrsrShell::isInHiddenTextFrm(SwShellCrsr* pShellCrsr)
{
SwContentNode *pCNode = pShellCrsr->GetContentNode();
SwContentFrm *pFrm = pCNode ?
- pCNode->getLayoutFrm( GetLayout(), &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ) : 0;
+ pCNode->getLayoutFrm( GetLayout(), &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ) : nullptr;
return !pFrm || (pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow());
}
@@ -709,12 +709,12 @@ bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
static SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
{
- SwFrm* pFrm = 0;
+ SwFrm* pFrm = nullptr;
SwContentNode* pCNd = rIdx.GetNode().GetContentNode();
if( pCNd )
{
- SwContentFrm *pCntFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, 0, false );
- pFrm = pCntFrm ? pCntFrm->GetUpper() : NULL;
+ SwContentFrm *pCntFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false );
+ pFrm = pCntFrm ? pCntFrm->GetUpper() : nullptr;
while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->AnchorFrm()
: pFrm->GetUpper();
@@ -728,7 +728,7 @@ bool SwCrsrShell::IsInHeaderFooter( bool* pbInHeader ) const
SwFrm* pFrm = ::lcl_IsInHeaderFooter( m_pCurCrsr->GetPoint()->nNode, aPt );
if( pFrm && pbInHeader )
*pbInHeader = pFrm->IsHeaderFrm();
- return 0 != pFrm;
+ return nullptr != pFrm;
}
int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
@@ -798,9 +798,9 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
{
// in the same frame?
SwFrm* pOld = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm(
- GetLayout(), &m_aCharRect.Pos(), 0, false );
+ GetLayout(), &m_aCharRect.Pos(), nullptr, false );
SwFrm* pNew = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm(
- GetLayout(), &aPt, 0, false );
+ GetLayout(), &aPt, nullptr, false );
if( pNew == pOld )
return bRet;
}
@@ -868,7 +868,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock )
void SwCrsrShell::TableCrsrToCursor()
{
OSL_ENSURE( m_pTableCrsr, "TableCrsrToCursor: Why?" );
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
}
void SwCrsrShell::BlockCrsrToCrsr()
@@ -884,7 +884,7 @@ void SwCrsrShell::BlockCrsrToCrsr()
else
m_pCurCrsr->DeleteMark();
}
- delete m_pBlockCrsr, m_pBlockCrsr = 0;
+ delete m_pBlockCrsr, m_pBlockCrsr = nullptr;
}
void SwCrsrShell::CrsrToBlockCrsr()
@@ -923,7 +923,7 @@ void SwCrsrShell::ClearMark()
*m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
m_pCurCrsr->SwSelPaintRects::Show();
}
else
@@ -1015,7 +1015,7 @@ void SwCrsrShell::KillPams()
*m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
delete m_pTableCrsr;
- m_pTableCrsr = 0;
+ m_pTableCrsr = nullptr;
}
else if( m_pBlockCrsr )
{
@@ -1033,7 +1033,7 @@ void SwCrsrShell::KillPams()
int SwCrsrShell::CompareCursor( CrsrCompareType eType ) const
{
int nRet = 0;
- const SwPosition *pFirst = 0, *pSecond = 0;
+ const SwPosition *pFirst = nullptr, *pSecond = nullptr;
const SwPaM *pCur = GetCrsr(), *pStk = m_pCrsrStk;
// cursor on stack is needed if we compare against stack
if( pStk || ( eType == CurrPtCurrMk ) )
@@ -1142,10 +1142,10 @@ void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
SET_CURR_SHELL( this );
// page number: first visible page or the one at the cursor
const SwContentFrm* pCFrm;
- const SwPageFrm *pPg = 0;
+ const SwPageFrm *pPg = nullptr;
- if( !bAtCrsrPos || 0 == (pCFrm = GetCurrFrm( bCalcFrm )) ||
- 0 == (pPg = pCFrm->FindPageFrm()) )
+ if( !bAtCrsrPos || nullptr == (pCFrm = GetCurrFrm( bCalcFrm )) ||
+ nullptr == (pPg = pCFrm->FindPageFrm()) )
{
pPg = Imp()->GetFirstVisPage(GetOut());
while( pPg && pPg->IsEmptyPage() )
@@ -1343,7 +1343,7 @@ void SwCrsrShell::UpdateCrsrPos()
&aTmpState );
pShellCrsr->DeleteMark();
}
- IGrammarContact *pGrammarContact = GetDoc() ? GetDoc()->getGrammarContact() : 0;
+ IGrammarContact *pGrammarContact = GetDoc() ? GetDoc()->getGrammarContact() : nullptr;
if( pGrammarContact )
pGrammarContact->updateCursorPosition( *m_pCurCrsr->GetPoint() );
--mnStartAction;
@@ -1361,7 +1361,7 @@ static bool lcl_CheckHiddenSection( SwNodeIndex& rIdx )
SwNodeIndex aTmp( *pSectNd );
const SwNode* pFrmNd =
rIdx.GetNodes().FindPrvNxtFrmNode( aTmp, pSectNd->EndOfSectionNode() );
- bOk = pFrmNd != NULL;
+ bOk = pFrmNd != nullptr;
SAL_WARN_IF(!bOk, "sw", "found no Node with Frames");
rIdx = aTmp;
}
@@ -1379,7 +1379,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos )
if ( pContent && pContent->IsTextNode() )
pTextNd = pContent->GetTextNode();
else
- pTextNd = 0;
+ pTextNd = nullptr;
}
if ( pTextNd )
@@ -1464,7 +1464,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
// --> Make code robust. The table cursor may point
// to a table in a currently inactive header.
- SwTabFrm *pTab = pTableFrm ? pTableFrm->FindTabFrm() : 0;
+ SwTabFrm *pTab = pTableFrm ? pTableFrm->FindTabFrm() : nullptr;
if ( pTab && pTab->GetTable()->GetRowsToRepeat() > 0 )
{
@@ -1494,7 +1494,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
// No table cursor in repeated headlines:
if ( bInRepeatedHeadline )
{
- pTableFrm = 0;
+ pTableFrm = nullptr;
SwPosSection fnPosSect = *pPos < *pITmpCrsr->GetMark()
? fnSectionStart
@@ -1596,7 +1596,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
m_pCurCrsr->DeleteMark();
*m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint();
m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos();
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
}
m_pVisCrsr->Hide(); // always hide visible Cursor
@@ -2007,10 +2007,10 @@ bool SwCrsrShell::Pop( bool bOldCrsr )
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
// are there any left?
- if( 0 == m_pCrsrStk )
+ if( nullptr == m_pCrsrStk )
return false;
- SwShellCrsr *pTmp = 0, *pOldStk = m_pCrsrStk;
+ SwShellCrsr *pTmp = nullptr, *pOldStk = m_pCrsrStk;
// the successor becomes the current one
if( m_pCrsrStk->GetNext() != m_pCrsrStk )
@@ -2064,7 +2064,7 @@ bool SwCrsrShell::Pop( bool bOldCrsr )
void SwCrsrShell::Combine()
{
// any others left?
- if( 0 == m_pCrsrStk )
+ if( nullptr == m_pCrsrStk )
return;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
@@ -2078,14 +2078,14 @@ void SwCrsrShell::Combine()
*m_pCrsrStk->GetPoint() = *m_pCurCrsr->GetPoint();
m_pCrsrStk->GetPtPos() = m_pCurCrsr->GetPtPos();
- SwShellCrsr * pTmp = 0;
+ SwShellCrsr * pTmp = nullptr;
if( m_pCrsrStk->GetNext() != m_pCrsrStk )
{
pTmp = dynamic_cast<SwShellCrsr*>(m_pCrsrStk->GetNext());
}
delete m_pCurCrsr;
m_pCurCrsr = m_pCrsrStk;
- m_pCrsrStk->MoveTo(0); // remove from ring
+ m_pCrsrStk->MoveTo(nullptr); // remove from ring
m_pCrsrStk = pTmp;
if( !m_pCurCrsr->IsInProtectTable( true ) &&
!m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -2186,7 +2186,7 @@ void SwCrsrShell::ShGetFcs( bool bUpdate )
SwContentFrm *SwCrsrShell::GetCurrFrm( const bool bCalcFrm ) const
{
SET_CURR_SHELL( static_cast<SwViewShell*>(const_cast<SwCrsrShell *>(this)) );
- SwContentFrm *pRet = 0;
+ SwContentFrm *pRet = nullptr;
SwContentNode *pNd = m_pCurCrsr->GetContentNode();
if ( pNd )
{
@@ -2495,7 +2495,7 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
const SwPosition *pStt = pDelRg->Start(),
*pEnd = pDelRg->GetPoint() == pStt ? pDelRg->GetMark() : pDelRg->GetPoint();
- SwPaM *pTmpDel = 0, *pTmp = *ppDelRing;
+ SwPaM *pTmpDel = nullptr, *pTmp = *ppDelRing;
// search over the whole ring
bool bGoNext;
@@ -2540,14 +2540,14 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
if( bDelete )
{
if (pTmp == pTmpDel)
- pTmp = 0;
+ pTmp = nullptr;
delete pTmpDel; // invalidate old area
}
else
{
pTmpDel->DeleteMark();
}
- pTmpDel = 0;
+ pTmpDel = nullptr;
}
if( bGoNext && pTmp )
pTmp = pTmp->GetNext();
@@ -2621,12 +2621,12 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx )
*/
SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin )
: SwViewShell( rShell, pInitWin )
- , SwModify( 0 )
- , m_pCrsrStk( 0 )
- , m_pBlockCrsr( 0 )
- , m_pTableCrsr( 0 )
- , m_pBoxIdx( 0 )
- , m_pBoxPtr( 0 )
+ , SwModify( nullptr )
+ , m_pCrsrStk( nullptr )
+ , m_pBlockCrsr( nullptr )
+ , m_pTableCrsr( nullptr )
+ , m_pBoxIdx( nullptr )
+ , m_pBoxPtr( nullptr )
, m_nUpDownX(0)
, m_nLeftFrmPos(0)
, m_nAktNode(0)
@@ -2638,7 +2638,7 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin )
, m_eMvState( MV_NONE )
, m_sMarkedListId()
, m_nMarkedListLevel( 0 )
- , m_oldColFrm(0)
+ , m_oldColFrm(nullptr)
{
SET_CURR_SHELL( this );
// only keep the position of the current cursor of the copy shell
@@ -2663,12 +2663,12 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin )
SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin,
const SwViewOption *pInitOpt )
: SwViewShell( rDoc, pInitWin, pInitOpt )
- , SwModify( 0 )
- , m_pCrsrStk( 0 )
- , m_pBlockCrsr( 0 )
- , m_pTableCrsr( 0 )
- , m_pBoxIdx( 0 )
- , m_pBoxPtr( 0 )
+ , SwModify( nullptr )
+ , m_pCrsrStk( nullptr )
+ , m_pBlockCrsr( nullptr )
+ , m_pTableCrsr( nullptr )
+ , m_pBoxIdx( nullptr )
+ , m_pBoxPtr( nullptr )
, m_nUpDownX(0)
, m_nLeftFrmPos(0)
, m_nAktNode(0)
@@ -2680,7 +2680,7 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin,
, m_eMvState( MV_NONE ) // state for crsr-travelling - GetCrsrOfst
, m_sMarkedListId()
, m_nMarkedListLevel( 0 )
- , m_oldColFrm(0)
+ , m_oldColFrm(nullptr)
{
SET_CURR_SHELL( this );
// create initial cursor and set it to first content position
@@ -2835,7 +2835,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
SwContentNode* pCNd = rNdIdx.GetNode().GetContentNode();
const SwContentFrm * pFrm;
- if( pCNd && 0 != (pFrm = pCNd->getLayoutFrm( GetLayout(), 0, m_pCurCrsr->GetPoint(), false)) &&
+ if( pCNd && nullptr != (pFrm = pCNd->getLayoutFrm( GetLayout(), nullptr, m_pCurCrsr->GetPoint(), false)) &&
!IsReadOnlyAvailable() && pFrm->IsProtected() &&
nNdIdx < rNds.GetEndOfExtras().GetIndex() )
{
@@ -2846,7 +2846,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
aPam.GetPoint()->nNode = *pCNd->EndOfSectionNode();
bool bFirst = false;
- if( 0 == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward )))
+ if( nullptr == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward )))
{
aPam.GetMark()->nNode = *rNds.GetEndOfPostIts().StartOfSectionNode();
pCNd = ::GetNode( aPam, bFirst, fnMoveBackward );
@@ -2874,7 +2874,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
// (unless cursor in protected areas is OK.)
const SwTableNode* pTableNode = rNdIdx.GetNode().FindTableNode();
if( !IsReadOnlyAvailable() &&
- pTableNode != NULL && rNdIdx.GetNode().IsProtect() )
+ pTableNode != nullptr && rNdIdx.GetNode().IsProtect() )
{
// we're in a table, and we're in a protected area, so we're
// probably in a protected cell.
@@ -2923,7 +2923,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
else
pCNd = SwNodes::GoPrevSection( &rNdIdx,
true, !IsReadOnlyAvailable() );
- if ( pCNd == 0) break;
+ if ( pCNd == nullptr) break;
// moved inside a table -> check if it is protected
if( pCNd->FindTableNode() )
{
@@ -2953,7 +2953,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
if( bOk && rNdIdx.GetIndex() < rNds.GetEndOfExtras().GetIndex() )
{
// also check for Fly - might be protected as well
- if( 0 == (pFrm = pCNd->getLayoutFrm( GetLayout(), 0, 0, false)) ||
+ if( nullptr == (pFrm = pCNd->getLayoutFrm( GetLayout(), nullptr, nullptr, false)) ||
( !IsReadOnlyAvailable() && pFrm->IsProtected() ) ||
( bOnlyText && pCNd->IsNoTextNode() ) )
{
@@ -2982,7 +2982,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText )
{
pCNd = rNdIdx.GetNode().GetContentNode();
// if cursor in hidden frame, always move it
- if( !pCNd || !pCNd->getLayoutFrm( GetLayout(), 0, 0, false) )
+ if( !pCNd || !pCNd->getLayoutFrm( GetLayout(), nullptr, nullptr, false) )
{
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable();
@@ -3012,7 +3012,7 @@ bool SwCrsrShell::IsCrsrReadonly() const
}
// edit in readonly sections
else if ( pFrm && pFrm->IsInSct() &&
- 0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
+ nullptr != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
pSection->IsEditInReadonlyFlag() )
{
return false;
@@ -3052,7 +3052,7 @@ bool SwCrsrShell::HasReadonlySel(bool bAnnotationMode) const
// If protected area is to be ignored, then selections are never read-only.
if ((IsReadOnlyAvailable() || GetViewOptions()->IsFormView()) && !GetViewOptions()->IsIgnoreProtectedArea())
{
- if ( m_pTableCrsr != NULL )
+ if ( m_pTableCrsr != nullptr )
{
bRet = m_pTableCrsr->HasReadOnlyBoxSel()
|| m_pTableCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
@@ -3161,7 +3161,7 @@ sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt,
{
if( m_pTableCrsr )
GetCrsr();
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
sal_uLong nRet = m_pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnd,
bCancel, eRng, bReplace );
@@ -3178,7 +3178,7 @@ sal_uLong SwCrsrShell::Find( const SwTextFormatColl& rFormatColl,
{
if( m_pTableCrsr )
GetCrsr();
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
sal_uLong nRet = m_pCurCrsr->Find( rFormatColl, eStart, eEnd, bCancel, eRng,
pReplFormat );
@@ -3197,7 +3197,7 @@ sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet,
{
if( m_pTableCrsr )
GetCrsr();
- delete m_pTableCrsr, m_pTableCrsr = 0;
+ delete m_pTableCrsr, m_pTableCrsr = nullptr;
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
sal_uLong nRet = m_pCurCrsr->Find( rSet, bNoCollections, eStart, eEnd,
bCancel, eRng, pSearchOpt, rReplSet );
@@ -3252,7 +3252,7 @@ static const SwStartNode* lcl_NodeContext( const SwNode& rNode )
*/
bool sw_PosOk(const SwPosition & aPos)
{
- return NULL != aPos.nNode.GetNode().GetContentNode() &&
+ return nullptr != aPos.nNode.GetNode().GetContentNode() &&
aPos.nContent.GetIdxReg();
}
@@ -3301,9 +3301,9 @@ void SwCrsrShell::ClearUpCrsrs()
const SwNode* pStart = lcl_NodeContext( pStartCrsr->GetPoint()->nNode.GetNode() );
SwNodeIndex aIdx( pStartCrsr->GetPoint()->nNode );
SwNode * pNode = SwNodes::GoPrevious(&aIdx);
- if( pNode == NULL || lcl_NodeContext( *pNode ) != pStart )
+ if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart )
aNodes.GoNext( &aIdx );
- if( pNode == NULL || lcl_NodeContext( *pNode ) != pStart )
+ if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart )
{
// If the start entry of the ring is invalid replace it with a
// cursor pointing to the beginning of the first content node in the
@@ -3311,7 +3311,7 @@ void SwCrsrShell::ClearUpCrsrs()
aIdx = (*(aNodes.GetEndOfContent().StartOfSectionNode()));
pNode = aNodes.GoNext( &aIdx );
}
- bool bFound = (pNode != NULL);
+ bool bFound = (pNode != nullptr);
OSL_ENSURE(bFound, "no content node found");
@@ -3326,7 +3326,7 @@ void SwCrsrShell::ClearUpCrsrs()
// If at least one of the cursors in the ring have been deleted or replaced,
// remove the table cursor.
- if (m_pTableCrsr != NULL && bChanged)
+ if (m_pTableCrsr != nullptr && bChanged)
TableCrsrToCursor();
}
@@ -3469,8 +3469,8 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
const SwWrongList *pSmartTagList;
if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) &&
- 0 != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
- 0 != (pSmartTagList = pNode->GetSmartTags()) &&
+ nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
+ nullptr != (pSmartTagList = pNode->GetSmartTags()) &&
!pNode->IsInProtectSect() )
{
sal_Int32 nCurrent = aPos.nContent.GetIndex();
@@ -3509,7 +3509,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : 0;
+ pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 7158630c303d..a7f1d341cd93 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -145,9 +145,9 @@ bool SwCrsrShell::GotoHeaderText()
if( !pTmpCrsr->IsSelOvr() )
UpdateCrsr();
else
- pFrm = 0;
+ pFrm = nullptr;
}
- return 0 != pFrm;
+ return nullptr != pFrm;
}
/// jump from content to footer
@@ -177,21 +177,21 @@ bool SwCrsrShell::GotoFooterText()
if( !pTmpCrsr->IsSelOvr() )
UpdateCrsr();
else
- pFrm = 0;
+ pFrm = nullptr;
}
else
- pFrm = 0;
+ pFrm = nullptr;
}
else
- pFrm = 0;
- return 0 != pFrm;
+ pFrm = nullptr;
+ return nullptr != pFrm;
}
bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader )
{
bool bRet = false;
SwDoc *pMyDoc = GetDoc();
- const SwPageDesc* pDesc = NULL;
+ const SwPageDesc* pDesc = nullptr;
SET_CURR_SHELL( this );
@@ -210,7 +210,7 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader )
if( pDesc )
{
// check if the attribute exists
- const SwFormatContent* pCnt = 0;
+ const SwFormatContent* pCnt = nullptr;
if( bInHeader )
{
// mirrored pages? ignore for now
@@ -234,7 +234,7 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader )
Point aPt( m_pCurCrsr->GetPtPos() );
- if( pCNd && 0 != pCNd->getLayoutFrm( GetLayout(), &aPt, 0, false ) )
+ if( pCNd && nullptr != pCNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false ) )
{
// then we can set the cursor in here
SwCallLink aLk( *this ); // watch Crsr-Moves
@@ -262,7 +262,7 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName )
bool bRet = false;
const SwSectionFormats& rFormats = GetDoc()->GetSections();
- SwContentNode* pFnd = 0;
+ SwContentNode* pFnd = nullptr;
for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
const SwSection* pSect = rFormats[ --n ]->GetSection();
@@ -313,7 +313,7 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName )
bool bRet = false;
const SwSectionFormats& rFormats = GetDoc()->GetSections();
- SwContentNode* pFnd = 0;
+ SwContentNode* pFnd = nullptr;
for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
const SwSection* pSect = rFormats[ --n ]->GetSection();
@@ -378,8 +378,8 @@ bool SwCrsrShell::GotoTOXMarkBase()
{
const SwSectionNode* pSectNd;
if( dynamic_cast<const SwTOXBaseSection*>( pTOX) != nullptr &&
- 0 != ( pSectFormat = static_cast<SwTOXBaseSection*>(pTOX)->GetFormat() ) &&
- 0 != ( pSectNd = pSectFormat->GetSectionNode() ))
+ nullptr != ( pSectFormat = static_cast<SwTOXBaseSection*>(pTOX)->GetFormat() ) &&
+ nullptr != ( pSectNd = pSectFormat->GetSectionNode() ))
{
SwNodeIndex aIdx( *pSectNd, 1 );
SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
@@ -388,7 +388,7 @@ bool SwCrsrShell::GotoTOXMarkBase()
const SwContentFrm* pCFrm;
if( pCNd &&
pCNd->EndOfSectionIndex() < pSectNd->EndOfSectionIndex() &&
- 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
+ nullptr != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwCallLink aLk( *this ); // watch Crsr-Moves
@@ -445,9 +445,9 @@ bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors )
{
const SwTableBox* pTBox;
const SfxPoolItem* pItem;
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
+ if( nullptr != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_BOXATR_FORMULA, n ) ) &&
- 0 != (pTBox = static_cast<const SwTableBoxFormula*>(pItem)->GetTableBox() ) &&
+ nullptr != (pTBox = static_cast<const SwTableBoxFormula*>(pItem)->GetTableBox() ) &&
pTBox->GetSttNd() &&
pTBox->GetSttNd()->GetNodes().IsDocNodes() &&
( !bOnlyErrors ||
@@ -456,7 +456,7 @@ bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors )
const SwContentFrm* pCFrm;
SwNodeIndex aIdx( *pTBox->GetSttNd() );
const SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- if( pCNd && 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, false ) ) &&
+ if( pCNd && nullptr != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false ) ) &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
_SetGetExpField aCmp( *pTBox );
@@ -520,15 +520,15 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext )
const SfxPoolItem* pItem;
const SwContentFrm* pCFrm;
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
+ if( nullptr != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_TXTATR_TOXMARK, n ) ) &&
- 0 != (pTextTOX = static_cast<const SwTOXMark*>(pItem)->GetTextTOXMark() ) &&
+ nullptr != (pTextTOX = static_cast<const SwTOXMark*>(pItem)->GetTextTOXMark() ) &&
( pTextNd = &pTextTOX->GetTextNode())->GetNodes().IsDocNodes() &&
- 0 != ( pCFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, 0, false )) &&
+ nullptr != ( pCFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false )) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwNodeIndex aNdIndex( *pTextNd ); // UNIX needs this object
- _SetGetExpField aCmp( aNdIndex, *pTextTOX, 0 );
+ _SetGetExpField aCmp( aNdIndex, *pTextTOX, nullptr );
aCmp.SetBodyPos( *pCFrm );
if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF )
@@ -589,19 +589,19 @@ void lcl_MakeFieldLst(
{
// always search the 1. frame
Point aPt;
- SwTextField* pTextField = NULL;
+ SwTextField* pTextField = nullptr;
SwIterator<SwFormatField,SwFieldType> aIter(rFieldType);
for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
{
pTextField = pFormatField->GetTextField();
- if ( pTextField != NULL
+ if ( pTextField != nullptr
&& ( !bChkInpFlag
|| static_cast<const SwSetExpField*>(pTextField->GetFormatField().GetField())->GetInputFlag() ) )
{
const SwTextNode& rTextNode = pTextField->GetTextNode();
const SwContentFrm* pCFrm =
- rTextNode.getLayoutFrm( rTextNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
- if ( pCFrm != NULL
+ rTextNode.getLayoutFrm( rTextNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
+ if ( pCFrm != nullptr
&& ( bInReadOnly || !pCFrm->IsProtected() ) )
{
_SetGetExpField* pNew = new _SetGetExpField( SwNodeIndex( rTextNode ), pTextField );
@@ -707,7 +707,7 @@ bool SwCrsrShell::MoveFieldType(
OSL_ENSURE( pTNd, "No ContentNode" );
SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true );
- const bool bDelField = ( pTextField == NULL );
+ const bool bDelField = ( pTextField == nullptr );
sal_Int32 nContentOffset = -1;
if( bDelField )
@@ -807,10 +807,10 @@ SwTextField * SwCrsrShell::GetTextFieldAtPos(
const SwPosition* pPos,
const bool bIncludeInputFieldAtStart )
{
- SwTextField* pTextField = NULL;
+ SwTextField* pTextField = nullptr;
SwTextNode * const pNode = pPos->nNode.GetNode().GetTextNode();
- if ( pNode != NULL )
+ if ( pNode != nullptr )
{
pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), bIncludeInputFieldAtStart );
}
@@ -822,14 +822,14 @@ SwField* SwCrsrShell::GetFieldAtCrsr(
const SwPaM* pCrsr,
const bool bIncludeInputFieldAtStart )
{
- SwField* pFieldAtCrsr = NULL;
+ SwField* pFieldAtCrsr = nullptr;
SwTextField* pTextField = GetTextFieldAtPos( pCrsr->Start(), bIncludeInputFieldAtStart );
- if ( pTextField != NULL
+ if ( pTextField != nullptr
&& pCrsr->Start()->nNode == pCrsr->End()->nNode )
{
const sal_Int32 nTextFieldLength =
- pTextField->End() != NULL
+ pTextField->End() != nullptr
? *(pTextField->End()) - pTextField->GetStart()
: 1;
if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTextFieldLength )
@@ -847,16 +847,16 @@ SwField* SwCrsrShell::GetCurField( const bool bIncludeInputFieldAtStart ) const
if ( pCrsr->IsMultiSelection() )
{
// multi selection not handled.
- return NULL;
+ return nullptr;
}
SwField* pCurField = GetFieldAtCrsr( pCrsr, bIncludeInputFieldAtStart );;
- if ( pCurField != NULL
+ if ( pCurField != nullptr
&& RES_TABLEFLD == pCurField->GetTyp()->Which() )
{
// TabellenFormel ? wandel internen in externen Namen um
const SwTableNode* pTableNd = IsCrsrInTable();
- static_cast<SwTableField*>(pCurField)->PtrToBoxNm( pTableNd ? &pTableNd->GetTable() : 0 );
+ static_cast<SwTableField*>(pCurField)->PtrToBoxNm( pTableNd ? &pTableNd->GetTable() : nullptr );
}
return pCurField;
@@ -874,7 +874,7 @@ bool SwCrsrShell::CrsrInsideInputField() const
bool SwCrsrShell::PosInsideInputField( const SwPosition& rPos )
{
- return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, false )) != NULL;
+ return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, false )) != nullptr;
}
bool SwCrsrShell::DocPtInsideInputField( const Point& rDocPt ) const
@@ -891,7 +891,7 @@ bool SwCrsrShell::DocPtInsideInputField( const Point& rDocPt ) const
sal_Int32 SwCrsrShell::StartOfInputFieldAtPos( const SwPosition& rPos )
{
const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
- if ( pTextInputField == NULL )
+ if ( pTextInputField == nullptr )
{
OSL_ENSURE( false, "<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position" );
return 0;
@@ -902,7 +902,7 @@ sal_Int32 SwCrsrShell::StartOfInputFieldAtPos( const SwPosition& rPos )
sal_Int32 SwCrsrShell::EndOfInputFieldAtPos( const SwPosition& rPos )
{
const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
- if ( pTextInputField == NULL )
+ if ( pTextInputField == nullptr )
{
OSL_ENSURE( false, "<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position" );
return 0;
@@ -1110,7 +1110,7 @@ bool SwCrsrShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const
{
if( GetLayout() )
- return 0 != GetLayout()->GetPageAtPos( rPt );
+ return nullptr != GetLayout()->GetPageAtPos( rPt );
return false;
}
@@ -1128,7 +1128,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwPosition aPos( *m_pCurCrsr->GetPoint() );
SwTextNode* pTextNd;
- SwContentFrm *pFrm(0);
+ SwContentFrm *pFrm(nullptr);
SwTextAttr* pTextAttr;
SwCrsrMoveState aTmpState;
aTmpState.m_bFieldInfo = true;
@@ -1138,7 +1138,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwSpecialPos aSpecialPos;
aTmpState.m_pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos ) ?
- &aSpecialPos : 0;
+ &aSpecialPos : nullptr;
const bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
pTextNd = aPos.nNode.GetNode().GetTextNode();
@@ -1213,7 +1213,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
rContentAtPos.eContentAtPos = SwContentAtPos::SW_SMARTTAG;
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
@@ -1224,18 +1224,18 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
&& !aTmpState.m_bFootnoteNoInfo )
{
pTextAttr = pTextNd->GetFieldTextAttrAt( aPos.nContent.GetIndex() );
- const SwField* pField = pTextAttr != NULL
+ const SwField* pField = pTextAttr != nullptr
? pTextAttr->GetFormatField().GetField()
- : 0;
+ : nullptr;
if ( SwContentAtPos::SW_CLICKFIELD & rContentAtPos.eContentAtPos
&& pField && !pField->HasClickHdl() )
{
- pField = 0;
+ pField = nullptr;
}
if ( pField )
{
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
if( bSetCrsr )
@@ -1250,7 +1250,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
// only placeholder is not possible
if( SwContentAtPos::SW_FIELD & rContentAtPos.eContentAtPos
|| RES_JUMPEDITFLD == pField->Which() )
- pField = 0;
+ pField = nullptr;
}
else
UpdateCrsr();
@@ -1301,7 +1301,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
rContentAtPos.eContentAtPos = SwContentAtPos::SW_FTN;
}
- else if ( 0 != ( pTextAttr = pTextNd->GetTextAttrForCharAt(
+ else if ( nullptr != ( pTextAttr = pTextNd->GetTextAttrForCharAt(
aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
{
bRet = true;
@@ -1333,7 +1333,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rContentAtPos.pFndTextAttr = pTextAttr;
rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
@@ -1343,7 +1343,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
&& ( SwContentAtPos::SW_TOXMARK | SwContentAtPos::SW_REFMARK ) & rContentAtPos.eContentAtPos
&& !aTmpState.m_bFootnoteNoInfo )
{
- pTextAttr = 0;
+ pTextAttr = nullptr;
if( SwContentAtPos::SW_TOXMARK & rContentAtPos.eContentAtPos )
{
::std::vector<SwTextAttr *> const marks(
@@ -1399,7 +1399,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rContentAtPos.pFndTextAttr = pTextAttr;
rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
@@ -1437,7 +1437,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rContentAtPos.eContentAtPos = SwContentAtPos::SW_INETATTR;
rContentAtPos.pFndTextAttr = pTextAttr;
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
@@ -1445,15 +1445,15 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet && SwContentAtPos::SW_REDLINE & rContentAtPos.eContentAtPos )
{
- const SwRangeRedline* pRedl = GetDoc()->getIDocumentRedlineAccess().GetRedline(aPos, NULL);
+ const SwRangeRedline* pRedl = GetDoc()->getIDocumentRedlineAccess().GetRedline(aPos, nullptr);
if( pRedl )
{
rContentAtPos.aFnd.pRedl = pRedl;
rContentAtPos.eContentAtPos = SwContentAtPos::SW_REDLINE;
- rContentAtPos.pFndTextAttr = 0;
+ rContentAtPos.pFndTextAttr = nullptr;
bRet = true;
- if( pFieldRect && 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
+ if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState );
}
}
@@ -1470,8 +1470,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
const SwTableBox* pBox;
const SwStartNode* pSttNd = pTextNd->FindTableBoxStartNode();
const SfxPoolItem* pItem;
- if( pSttNd && 0 != ( pTableNd = pTextNd->FindTableNode()) &&
- 0 != ( pBox = pTableNd->GetTable().GetTableBox(
+ if( pSttNd && nullptr != ( pTableNd = pTextNd->FindTableNode()) &&
+ nullptr != ( pBox = pTableNd->GetTable().GetTableBox(
pSttNd->GetIndex() )) &&
#ifdef DBG_UTIL
( SfxItemState::SET == pBox->GetFrameFormat()->GetItemState(
@@ -1496,7 +1496,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( aTmpState.m_bPosCorr )
{
if( pF && !pF->Frm().IsInside( aPt ))
- pF = 0;
+ pF = nullptr;
}
else if( !pF )
pF = pFrm;
@@ -1533,7 +1533,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
*pFieldRect = pF->Prt();
*pFieldRect += pF->Frm().Pos();
}
- rContentAtPos.pFndTextAttr = 0;
+ rContentAtPos.pFndTextAttr = nullptr;
rContentAtPos.aFnd.pAttr = pItem;
}
}
@@ -1555,7 +1555,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( nAttrStart > n ) // over the section
break;
- if( 0 != pHt->End() && (
+ if( nullptr != pHt->End() && (
( nAttrStart < n &&
( pHt->DontExpand() ? n < *pHt->End()
: n <= *pHt->End() )) ||
@@ -1627,7 +1627,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet )
{
rContentAtPos.eContentAtPos = SwContentAtPos::SW_NOTHING;
- rContentAtPos.aFnd.pField = 0;
+ rContentAtPos.aFnd.pField = nullptr;
}
return bRet;
}
@@ -1635,7 +1635,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
// #i90516#
const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
{
- const SwPostItField* pPostItField = 0;
+ const SwPostItField* pPostItField = nullptr;
if ( !IsTableMode() )
{
@@ -1644,7 +1644,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
if ( pTextNd )
{
SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->nContent.GetIndex() );
- const SwField* pField = pTextAttr != NULL ? pTextAttr->GetFormatField().GetField() : 0;
+ const SwField* pField = pTextAttr != nullptr ? pTextAttr->GetFormatField().GetField() : nullptr;
if ( pField && pField->Which()== RES_POSTITFLD )
{
pPostItField = static_cast<const SwPostItField*>(pField);
@@ -1658,7 +1658,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
/// is the node in a protected section?
bool SwContentAtPos::IsInProtectSect() const
{
- const SwTextNode* pNd = 0;
+ const SwTextNode* pNd = nullptr;
if( pFndTextAttr )
{
switch( eContentAtPos )
@@ -1683,14 +1683,14 @@ bool SwContentAtPos::IsInProtectSect() const
const SwContentFrm* pFrm;
return pNd && ( pNd->IsInProtectSect() ||
- ( 0 != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false)) &&
+ ( nullptr != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)) &&
pFrm->IsProtected() ));
}
bool SwContentAtPos::IsInRTLText()const
{
bool bRet = false;
- const SwTextNode* pNd = 0;
+ const SwTextNode* pNd = nullptr;
if (pFndTextAttr && (eContentAtPos == SW_FTN))
{
const SwTextFootnote* pTextFootnote = static_cast<const SwTextFootnote*>(pFndTextAttr);
@@ -1762,7 +1762,7 @@ bool SwCrsrShell::SelectTextAttr( sal_uInt16 nWhich,
? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(),
static_cast<RES_TXTATR>(nWhich),
(bExpand) ? SwTextNode::EXPAND : SwTextNode::DEFAULT)
- : 0;
+ : nullptr;
}
if( pTextAttr )
@@ -1858,14 +1858,14 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
pCNd && pCNd->Len() )
nUndoId = UNDO_EMPTY;
- GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, nullptr );
- SwTextFormatColl* pNextFormat = 0;
- SwTextNode* pTNd = pCNd ? pCNd->GetTextNode() : NULL;
+ SwTextFormatColl* pNextFormat = nullptr;
+ SwTextNode* pTNd = pCNd ? pCNd->GetTextNode() : nullptr;
if( pTNd )
pNextFormat = &pTNd->GetTextColl()->GetNextTextFormatColl();
- const SwSectionNode* pSectNd = pCNd ? pCNd->FindSectionNode() : NULL;
+ const SwSectionNode* pSectNd = pCNd ? pCNd->FindSectionNode() : nullptr;
if( pSectNd && aFPos.nParaCnt )
{
SwNodeIndex aEnd( aPos.nNode, 1 );
@@ -1899,7 +1899,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
switch( aFPos.eMode )
{
case FILL_INDENT:
- if( 0 != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
+ if( nullptr != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
{
SfxItemSet aSet( GetDoc()->GetAttrPool(),
RES_LR_SPACE, RES_LR_SPACE,
@@ -1955,7 +1955,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
break;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( nUndoId, nullptr );
EndAction();
bRet = true;
@@ -1966,7 +1966,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
const SwRangeRedline* SwCrsrShell::SelNextRedline()
{
- const SwRangeRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = nullptr;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
@@ -1977,14 +1977,14 @@ const SwRangeRedline* SwCrsrShell::SelNextRedline()
if( pFnd && !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() )
UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
else
- pFnd = 0;
+ pFnd = nullptr;
}
return pFnd;
}
const SwRangeRedline* SwCrsrShell::SelPrevRedline()
{
- const SwRangeRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = nullptr;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
@@ -1995,14 +1995,14 @@ const SwRangeRedline* SwCrsrShell::SelPrevRedline()
if( pFnd && !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() )
UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
else
- pFnd = 0;
+ pFnd = nullptr;
}
return pFnd;
}
const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelect )
{
- const SwRangeRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = nullptr;
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *m_pCurCrsr );
@@ -2014,13 +2014,13 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
SwContentNode* pCNd;
SwNodeIndex* pIdx = &m_pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx,
+ nullptr != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx,
true, IsReadOnlyAvailable() )) )
{
if( *pIdx <= pFnd->End()->nNode )
m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
else
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd && bSelect )
@@ -2037,13 +2037,13 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
pIdx = &m_pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = SwNodes::GoPrevSection( pIdx,
+ nullptr != ( pCNd = SwNodes::GoPrevSection( pIdx,
true, IsReadOnlyAvailable() )) )
{
if( *pIdx >= m_pCurCrsr->GetMark()->nNode )
m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
else
- pFnd = 0;
+ pFnd = nullptr;
}
}
@@ -2060,7 +2060,7 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
| SwCrsrShell::READONLY );
else
{
- pFnd = 0;
+ pFnd = nullptr;
if( bSelect )
m_pCurCrsr->DeleteMark();
}
@@ -2070,7 +2070,7 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec
const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect )
{
- const SwRangeRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = nullptr;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
@@ -2191,7 +2191,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
{
const SwContentNode* pCNd = aCurPos.GetNodeFromContent()->GetContentNode();
SwContentFrm* pFrm;
- if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt )) )
+ if( pCNd && nullptr != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt )) )
aCurPos.SetBodyPos( *pFrm );
}
@@ -2204,7 +2204,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
SwIterator<SwTextINetFormat,SwCharFormat> aIter(*(*pFormats)[--n]);
for( SwTextINetFormat* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
- if( 0 != ( pTextNd = pFnd->GetpTextNode()) &&
+ if( nullptr != ( pTextNd = pFnd->GetpTextNode()) &&
pTextNd->GetNodes().IsDocNodes() )
{
SwTextINetFormat& rAttr = *pFnd;
@@ -2212,7 +2212,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
_SetGetExpField aPos( aTmpPos.nNode, rAttr );
SwContentFrm* pFrm;
if( pTextNd->GetIndex() < nBodySttNdIdx &&
- 0 != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt )) )
+ nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt )) )
aPos.SetBodyPos( *pFrm );
if( bNext
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 855c3dc350f9..68a8b56b4c32 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -100,7 +100,7 @@ const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
if( pTextHt->GetStart() >= nContentPos )
return pTextHt; // valid text attribute
}
- return 0; // invalid text attribute
+ return nullptr; // invalid text attribute
}
const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
@@ -113,7 +113,7 @@ const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
if( pTextHt->GetStart() < nContentPos )
return pTextHt; // valid text attribute
}
- return 0; // invalid text attribute
+ return nullptr; // invalid text attribute
}
static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd,
@@ -161,12 +161,12 @@ static bool lcl_Search( const SwTextNode& rTextNd, SwPaM& rPam,
if ( !rTextNd.HasHints() )
return false;
- const SwTextAttr *pTextHt = 0;
+ const SwTextAttr *pTextHt = nullptr;
bool bForward = fnMove == fnMoveForward;
sal_uInt16 nPos = bForward ? 0 : rTextNd.GetSwpHints().Count();
sal_Int32 nContentPos = rPam.GetPoint()->nContent.GetIndex();
- while( 0 != ( pTextHt=(*fnMove->fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos)))
+ while( nullptr != ( pTextHt=(*fnMove->fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos)))
if( pTextHt->Which() == rCmpItem.Which() &&
( !bValue || CmpAttr( pTextHt->GetAttr(), rCmpItem )))
{
@@ -346,14 +346,14 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr )
const SfxPoolItem* pItem;
// here we explicitly also search in character templates
sal_uInt16 nWhch = rAttr.Which();
- SfxWhichIter* pIter = NULL;
- const SfxPoolItem* pTmpItem = NULL;
- const SfxItemSet* pSet = NULL;
+ SfxWhichIter* pIter = nullptr;
+ const SfxPoolItem* pTmpItem = nullptr;
+ const SfxItemSet* pSet = nullptr;
if( RES_TXTATR_CHARFMT == nWhch || RES_TXTATR_AUTOFMT == nWhch )
{
if( bNoColls && RES_TXTATR_CHARFMT == nWhch )
return Found();
- pTmpItem = NULL;
+ pTmpItem = nullptr;
pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
if ( pSet )
{
@@ -363,7 +363,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr )
SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
- pTmpItem = NULL;
+ pTmpItem = nullptr;
}
}
else
@@ -499,9 +499,9 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr )
const SfxPoolItem* pItem;
// here we explicitly also search in character templates
sal_uInt16 nWhch = rAttr.Which();
- SfxWhichIter* pIter = NULL;
- const SfxPoolItem* pTmpItem = NULL;
- const SfxItemSet* pSet = NULL;
+ SfxWhichIter* pIter = nullptr;
+ const SfxPoolItem* pTmpItem = nullptr;
+ const SfxItemSet* pSet = nullptr;
if( RES_TXTATR_CHARFMT == nWhch || RES_TXTATR_AUTOFMT == nWhch )
{
if( bNoColls && RES_TXTATR_CHARFMT == nWhch )
@@ -516,7 +516,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr )
SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
- pTmpItem = NULL;
+ pTmpItem = nullptr;
}
}
else
@@ -910,7 +910,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() );
}
- while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ) )
+ while( nullptr != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ) )
{
if( bCharAttr )
{
@@ -998,7 +998,7 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() );
}
- while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ) )
+ while( nullptr != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ) )
{
if( aCmpArr.Count() )
{
@@ -1064,7 +1064,7 @@ struct SwFindParaAttr : public SwFindParas
const SearchOptions* pOpt, const SfxItemSet* pRSet,
SwCursor& rCrsr )
: bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ),
- pSearchOpt( pOpt ), rCursor( rCrsr ),pSText( 0 ) {}
+ pSearchOpt( pOpt ), rCursor( rCrsr ),pSText( nullptr ) {}
virtual ~SwFindParaAttr() { delete pSText; }
@@ -1154,7 +1154,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
}
std::unique_ptr<OUString> pRepl( (bRegExp) ?
- ReplaceBackReferences( *pSearchOpt, pCrsr ) : 0 );
+ ReplaceBackReferences( *pSearchOpt, pCrsr ) : nullptr );
rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( *pCrsr,
(pRepl.get()) ? *pRepl : pSearchOpt->replaceString,
bRegExp );
@@ -1235,7 +1235,7 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, bool bNoCollections,
bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, nullptr );
}
SwFindParaAttr aSwFindParaAttr( rSet, bNoCollections, pSearchOpt,
@@ -1248,7 +1248,7 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, bool bNoCollections,
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, nullptr );
}
return nRet;
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index 19ab4f0da861..d99e98cb8942 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -60,7 +60,7 @@ int SwFindParaFormatColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pReg
bool SwFindParaFormatColl::IsReplaceMode() const
{
- return 0 != pReplColl;
+ return nullptr != pReplColl;
}
/// search for Format-Collections
@@ -96,7 +96,7 @@ sal_uLong SwCursor::Find( const SwTextFormatColl& rFormatColl, SwDocPositions nS
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
return nRet;
}
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index 42713d526319..467622f60234 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -43,7 +43,7 @@ bool SwPaM::Find( const SwFormat& rFormat, SwMoveFn fnMove,
bool bFirst = true;
SwContentNode* pNode;
- while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly )))
+ while( nullptr != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly )))
{
if ( pNode->GetFormatColl() == &rFormat )
{
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 33a28d1e82d0..7981954ad28b 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -245,7 +245,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
const bool bChkParaEnd = bRegSearch && rSearchOpt.searchString == "$";
// LanguageType eLastLang = 0;
- while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ))
+ while( nullptr != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ))
{
if( pNode->IsTextNode() )
{
@@ -298,8 +298,8 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
}
SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell();
- SwWrtShell *const pWrtShell = (pDocShell) ? pDocShell->GetWrtShell() : 0;
- SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0;
+ SwWrtShell *const pWrtShell = (pDocShell) ? pDocShell->GetWrtShell() : nullptr;
+ SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : nullptr;
SvxSearchItem aSearchItem(SID_SEARCH_ITEM);
aSearchItem.SetSearchOptions(rSearchOpt);
@@ -318,7 +318,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
{
const SwPosition* pPosition = pFrameFormat->GetAnchor().GetContentAnchor();
if (!pPosition || pPosition->nNode.GetIndex() != pNode->GetIndex())
- pObject = 0;
+ pObject = nullptr;
}
}
@@ -398,7 +398,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
}
else
{
- pPostItMgr->SetActiveSidebarWin(0);
+ pPostItMgr->SetActiveSidebarWin(nullptr);
}
}
@@ -506,7 +506,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText,
sCleanStr = lcl_CleanStr(*pNode->GetTextNode(), nEnd, nStart,
aFltArr, bRemoveSoftHyphens);
- SwScriptIterator* pScriptIter = 0;
+ SwScriptIterator* pScriptIter = nullptr;
sal_uInt16 nSearchScript = 0;
sal_uInt16 nCurrScript = 0;
@@ -549,7 +549,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText,
sal_Int32 nProxyStart = nStart;
sal_Int32 nProxyEnd = nEnd;
if( nSearchScript == nCurrScript &&
- (rSText.*fnMove->fnSearch)( sCleanStr, &nProxyStart, &nProxyEnd, 0 ) &&
+ (rSText.*fnMove->fnSearch)( sCleanStr, &nProxyStart, &nProxyEnd, nullptr ) &&
!(bZeroMatch = (nProxyStart == nProxyEnd)))
{
nStart = nProxyStart;
@@ -669,7 +669,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
}
std::unique_ptr<OUString> pRepl( (bRegExp)
- ? ReplaceBackReferences( m_rSearchOpt, pCrsr ) : 0 );
+ ? ReplaceBackReferences( m_rSearchOpt, pCrsr ) : nullptr );
bool const bReplaced =
m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange(
*pCrsr,
@@ -719,7 +719,7 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes,
bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, nullptr );
}
bool bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
@@ -742,7 +742,7 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes,
OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
{
- OUString *pRet = 0;
+ OUString *pRet = nullptr;
if( pPam && pPam->HasMark() &&
SearchAlgorithms_REGEXP == rSearchOpt.algorithmType )
{
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 5025670e3b27..3a0bb284f63e 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -299,7 +299,7 @@ SwContentNode* GoNextNds( SwNodeIndex* pIdx, bool bChk )
{
if( bChk && 1 != aIdx.GetIndex() - pIdx->GetIndex() &&
!CheckNodesRange( *pIdx, aIdx, true ) )
- pNd = 0;
+ pNd = nullptr;
else
*pIdx = aIdx;
}
@@ -314,7 +314,7 @@ SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk )
{
if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() &&
!CheckNodesRange( *pIdx, aIdx, true ) )
- pNd = 0;
+ pNd = nullptr;
else
*pIdx = aIdx;
}
@@ -508,7 +508,7 @@ bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg )
{
SwPaM* pPam;
- if( pOrigRg == 0 )
+ if( pOrigRg == nullptr )
{
pPam = new SwPaM( *m_pPoint );
pPam->SetMark(); // set beginning
@@ -548,9 +548,9 @@ sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos )
const SwContentNode *pNd ;
const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark;
- if( 0 != ( pNd = pPos->nNode.GetNode().GetContentNode() ) &&
- 0 != ( pCFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), pLayPos, pPos, false )) &&
- 0 != ( pPg = pCFrm->FindPageFrm() ))
+ if( nullptr != ( pNd = pPos->nNode.GetNode().GetContentNode() ) &&
+ nullptr != ( pCFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), pLayPos, pPos, false )) &&
+ nullptr != ( pPg = pCFrm->FindPageFrm() ))
return pPg->GetPhyPageNum();
return 0;
}
@@ -558,7 +558,7 @@ sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos )
// Formular view - See also SwCrsrShell::IsCrsrReadonly()
static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
{
- const SwFrm* pRet = 0;
+ const SwFrm* pRet = nullptr;
const SwFlyFrm* pFly;
const SwSectionFrm* pSectionFrm;
@@ -571,7 +571,7 @@ static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
pRet = pFly;
}
else if ( rFrm.IsInSct() &&
- 0 != ( pSectionFrm = rFrm.FindSctFrm() )->GetSection() &&
+ nullptr != ( pSectionFrm = rFrm.FindSctFrm() )->GetSection() &&
pSectionFrm->GetSection()->IsEditInReadonlyFlag() )
{
pRet = pSectionFrm;
@@ -586,26 +586,26 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
bool bRet = false;
const SwContentNode* pNd = GetPoint()->nNode.GetNode().GetContentNode();
- const SwContentFrm *pFrm = NULL;
- if ( pNd != NULL )
+ const SwContentFrm *pFrm = nullptr;
+ if ( pNd != nullptr )
{
Point aTmpPt;
pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetPoint(), false );
}
// Will be set if point are inside edit-in-readonly environment
- const SwFrm* pPointEditInReadonlyFrm = NULL;
- if ( pFrm != NULL
+ const SwFrm* pPointEditInReadonlyFrm = nullptr;
+ if ( pFrm != nullptr
&& ( pFrm->IsProtected()
|| ( bFormView
- && 0 == ( pPointEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+ && nullptr == ( pPointEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
{
bRet = true;
}
- else if( pNd != NULL )
+ else if( pNd != nullptr )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
- if ( pSNd != NULL
+ if ( pSNd != nullptr
&& ( pSNd->GetSection().IsProtectFlag()
|| ( bFormView
&& !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
@@ -619,25 +619,25 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
&& GetPoint()->nNode != GetMark()->nNode )
{
pNd = GetMark()->nNode.GetNode().GetContentNode();
- pFrm = NULL;
- if ( pNd != NULL )
+ pFrm = nullptr;
+ if ( pNd != nullptr )
{
Point aTmpPt;
pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetMark(), false );
}
- const SwFrm* pMarkEditInReadonlyFrm = NULL;
- if ( pFrm != NULL
+ const SwFrm* pMarkEditInReadonlyFrm = nullptr;
+ if ( pFrm != nullptr
&& ( pFrm->IsProtected()
|| ( bFormView
- && 0 == ( pMarkEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+ && nullptr == ( pMarkEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
{
bRet = true;
}
- else if( pNd != NULL )
+ else if( pNd != nullptr )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
- if ( pSNd != NULL
+ if ( pSNd != nullptr
&& ( pSNd->GetSection().IsProtectFlag()
|| ( bFormView
&& !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
@@ -696,7 +696,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
// TODO: Form Protection when Enhanced Fields are enabled
const SwDoc *pDoc = GetDoc();
const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess();
- sw::mark::IMark* pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL;
+ sw::mark::IMark* pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : nullptr;
sw::mark::IMark* pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA;
bool bUnhandledMark = false;
@@ -712,17 +712,17 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
else
{
// Form protection case
- bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();
- bool bAtStartB = pB != NULL && pB->GetMarkStart() == *GetMark();
+ bool bAtStartA = pA != nullptr && pA->GetMarkStart() == *GetPoint();
+ bool bAtStartB = pB != nullptr && pB->GetMarkStart() == *GetMark();
bRet = ( pA != pB ) || bAtStartA || bAtStartB;
bool bProtectForm = pDoc->GetDocumentSettingManager().get( DocumentSettingId::PROTECT_FORM );
if ( bProtectForm )
- bRet |= ( pA == NULL || pB == NULL );
+ bRet |= ( pA == nullptr || pB == nullptr );
}
}
else
{
- bRet = !( pA == pB && pA != NULL );
+ bRet = !( pA == pB && pA != nullptr );
}
// Don't allow inserting characters between the 'field mark end' and
@@ -752,7 +752,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
bool bInReadOnly )
{
- SwContentNode * pNd = 0;
+ SwContentNode * pNd = nullptr;
if( ((*rPam.GetPoint()).*fnMove->fnCmpOp)( *rPam.GetMark() ) ||
( *rPam.GetPoint() == *rPam.GetMark() && rbFirst ) )
{
@@ -765,7 +765,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
{
if(
(
- 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
+ nullptr == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
(pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow())
) ||
@@ -774,7 +774,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
)
)
{
- pNd = 0;
+ pNd = nullptr;
}
}
}
@@ -798,18 +798,18 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
if( (aPos.*fnMove->fnCmpOp)( *rPam.GetMark() ) )
{
// only in AutoTextSection can be nodes that are hidden
- if( 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
+ if( nullptr == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
( pFrm->IsTextFrm() &&
static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() ) )
{
- pNd = 0;
+ pNd = nullptr;
continue;
}
*rPam.GetPoint() = aPos;
}
else
- pNd = 0; // no valid node
+ pNd = nullptr; // no valid node
break;
}
break;
@@ -949,9 +949,9 @@ bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
}
}
// move node to next/previous ContentNode
- if( ( aPosPara==fnParaStart && 0 != ( pNd =
+ if( ( aPosPara==fnParaStart && nullptr != ( pNd =
GoPreviousNds( &rPos.nNode, true ))) ||
- ( aPosPara==fnParaEnd && 0 != ( pNd =
+ ( aPosPara==fnParaEnd && nullptr != ( pNd =
GoNextNds( &rPos.nNode, true ))) )
{
rPos.nContent.Assign( pNd,
@@ -981,8 +981,8 @@ bool GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
SwPosition aSavePos( rPos ); // position for comparison
(fnMove->fnSection)( &rPos.nNode );
SwContentNode *pNd;
- if( 0 == ( pNd = rPos.nNode.GetNode().GetContentNode()) &&
- 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, true )) )
+ if( nullptr == ( pNd = rPos.nNode.GetNode().GetContentNode()) &&
+ nullptr == ( pNd = (*fnMove->fnNds)( &rPos.nNode, true )) )
{
rPos = aSavePos; // do not change cursor
return false;
@@ -1046,7 +1046,7 @@ OUString SwPaM::GetText() const
const bool bIsEndNode = aNodeIndex == End()->nNode;
SwTextNode * pTextNode = aNodeIndex.GetNode().GetTextNode();
- if (pTextNode != NULL)
+ if (pTextNode != nullptr)
{
const OUString aTmpStr = pTextNode->GetText();
@@ -1084,13 +1084,13 @@ void SwPaM::InvalidatePaM()
{
const SwNode &_pNd = this->GetNode();
const SwTextNode *_pTextNd = _pNd.GetTextNode();
- if (_pTextNd != NULL)
+ if (_pTextNd != nullptr)
{
// pretend that the PaM marks inserted text to recalc the portion...
SwInsText aHint( Start()->nContent.GetIndex(),
End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 );
SwModify *_pModify=const_cast<SwModify*>(static_cast<SwModify const *>(_pTextNd));
- _pModify->ModifyNotification( 0, &aHint);
+ _pModify->ModifyNotification( nullptr, &aHint);
}
}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index e675a20e0aeb..5fce21744cc1 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -223,7 +223,7 @@ namespace
{
SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
if (!pTextNd)
- return NULL;
+ return nullptr;
return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT);
}
}
@@ -273,18 +273,18 @@ bool SwCursor::IsSelOvr( int eFlags )
: SwNodes::GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
}
- bool bIsValidPos = 0 != pCNd;
+ bool bIsValidPos = nullptr != pCNd;
const bool bValidNodesRange = bIsValidPos &&
::CheckNodesRange( rPtIdx, aIdx, true );
if( !bValidNodesRange )
{
rPtIdx = m_pSavePos->nNode;
- if( 0 == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
+ if( nullptr == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
{
bIsValidPos = false;
nContentPos = 0;
rPtIdx = aIdx;
- if( 0 == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
+ if( nullptr == ( pCNd = rPtIdx.GetNode().GetContentNode() ) )
{
// then to the beginning of the document
rPtIdx = rNds.GetEndOfExtras();
@@ -349,7 +349,7 @@ bool SwCursor::IsSelOvr( int eFlags )
// skip to the next/prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex();
- while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextContentFrm() : pFrm->GetPrevContentFrm() ))
+ while( nullptr != ( pFrm = ( bGoNxt ? pFrm->GetNextContentFrm() : pFrm->GetPrevContentFrm() ))
&& 0 == pFrm->Frm().Height() )
;
@@ -366,8 +366,8 @@ bool SwCursor::IsSelOvr( int eFlags )
}
}
- SwContentNode* pCNd = (pFrm != NULL) ? const_cast<SwContentNode*>(pFrm->GetNode()) : NULL;
- if ( pCNd != NULL )
+ SwContentNode* pCNd = (pFrm != nullptr) ? const_cast<SwContentNode*>(pFrm->GetNode()) : nullptr;
+ if ( pCNd != nullptr )
{
// set this ContentNode as new position
rPtIdx = *pCNd;
@@ -381,14 +381,14 @@ bool SwCursor::IsSelOvr( int eFlags )
{
// new position equals saved one
// --> trigger restore of saved pos by setting <pFrm> to NULL - see below
- pFrm = NULL;
+ pFrm = nullptr;
}
if ( IsInProtectTable( true ) )
{
// new position in protected table
// --> trigger restore of saved pos by setting <pFrm> to NULL - see below
- pFrm = NULL;
+ pFrm = nullptr;
}
}
}
@@ -449,7 +449,7 @@ bool SwCursor::IsSelOvr( int eFlags )
|| ( nRefNodeIdx == GetPoint()->nNode.GetIndex()
&& nRefContentIdx < GetPoint()->nContent.GetIndex() );
- if ( pInputFieldTextAttrAtPoint != NULL )
+ if ( pInputFieldTextAttrAtPoint != nullptr )
{
const sal_Int32 nNewPointPos =
bIsForwardSelection ? *(pInputFieldTextAttrAtPoint->End()) : pInputFieldTextAttrAtPoint->GetStart();
@@ -457,7 +457,7 @@ bool SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pTextNdAtPoint, nNewPointPos );
}
- if ( pInputFieldTextAttrAtMark != NULL )
+ if ( pInputFieldTextAttrAtMark != nullptr )
{
const sal_Int32 nNewMarkPos =
bIsForwardSelection ? pInputFieldTextAttrAtMark->GetStart() : *(pInputFieldTextAttrAtMark->End());
@@ -508,10 +508,10 @@ bool SwCursor::IsSelOvr( int eFlags )
: rNds.GoNextSection( &GetPoint()->nNode,true,false );
/* #i12312# Handle failure of Go{Prev|Next}Section */
- if ( 0 == pMyNd)
+ if ( nullptr == pMyNd)
break;
- if( 0 != ( pPtNd = pMyNd->FindTableNode() ))
+ if( nullptr != ( pPtNd = pMyNd->FindTableNode() ))
continue;
}
@@ -532,8 +532,8 @@ bool SwCursor::IsSelOvr( int eFlags )
}
}
if( bSelTop
- ? ( !pMyNd->IsEndNode() || 0 == ( pPtNd = pMyNd->FindTableNode() ))
- : 0 == ( pPtNd = pMyNd->GetTableNode() ))
+ ? ( !pMyNd->IsEndNode() || nullptr == ( pPtNd = pMyNd->FindTableNode() ))
+ : nullptr == ( pPtNd = pMyNd->GetTableNode() ))
break;
} while( true );
}
@@ -562,7 +562,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr )
bool bInCoveredCell = false;
const SwStartNode* pTmpSttNode = pCNd->FindTableBoxStartNode();
OSL_ENSURE( pTmpSttNode, "In table, therefore I expect to get a SwTableBoxStartNode" );
- const SwTableBox* pBox = pTmpSttNode ? pTableNode->GetTable().GetTableBox( pTmpSttNode->GetIndex() ) : 0; //Robust #151355
+ const SwTableBox* pBox = pTmpSttNode ? pTableNode->GetTable().GetTableBox( pTmpSttNode->GetIndex() ) : nullptr; //Robust #151355
if ( pBox && pBox->getRowSpan() < 1 ) // Robust #151270
bInCoveredCell = true;
@@ -602,7 +602,7 @@ GoNextCell:
if( !aCellStt.GetNode().IsStartNode() )
break;
++aCellStt;
- if( 0 == ( pCNd = aCellStt.GetNode().GetContentNode() ))
+ if( nullptr == ( pCNd = aCellStt.GetNode().GetContentNode() ))
pCNd = aCellStt.GetNodes().GoNext( &aCellStt );
if( !( bProt = pCNd->IsProtect() ))
break;
@@ -651,7 +651,7 @@ GoPrevCell:
if( !( pNd = &aCellStt.GetNode())->IsEndNode() )
break;
aCellStt.Assign( *pNd->StartOfSectionNode(), +1 );
- if( 0 == ( pCNd = aCellStt.GetNode().GetContentNode() ))
+ if( nullptr == ( pCNd = aCellStt.GetNode().GetContentNode() ))
pCNd = pNd->GetNodes().GoNext( &aCellStt );
if( !( bProt = pCNd->IsProtect() ))
break;
@@ -748,7 +748,7 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
// only create progress bar for ShellCrsr
bool bIsUnoCrsr = dynamic_cast<SwUnoCrsr*>(pCurCrsr) != nullptr;
- _PercentHdl* pPHdl = 0;
+ _PercentHdl* pPHdl = nullptr;
sal_uInt16 nCrsrCnt = 0;
if( FND_IN_SEL & eFndRngs )
{
@@ -939,7 +939,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
const bool bMvBkwrd = fnMove == fnMoveBackward;
bool bInReadOnly = IsReadOnlyAvailable();
- SwCursor* pFndRing = 0;
+ SwCursor* pFndRing = nullptr;
SwNodes& rNds = GetDoc()->GetNodes();
// search in sections?
@@ -1081,7 +1081,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
{
bool bIsStart = true;
- SwContentNode* pCNd = 0;
+ SwContentNode* pCNd = nullptr;
SwNodes& rNds = GetDoc()->GetNodes();
switch( ePos )
@@ -1223,7 +1223,7 @@ bool SwCursor::IsStartEndSentence( bool bEnd ) const
if( !bRet )
{
- SwCursor aCrsr(*GetPoint(), 0, false);
+ SwCursor aCrsr(*GetPoint(), nullptr, false);
SwPosition aOrigPos = *aCrsr.GetPoint();
aCrsr.GoSentence( bEnd ? SwCursor::END_SENT : SwCursor::START_SENT );
bRet = aOrigPos == *aCrsr.GetPoint();
@@ -1338,7 +1338,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
bool bRet = false;
DeleteMark();
const SwRootFrm* pLayout = pViewShell->GetLayout();
- if( pPt && 0 != pLayout )
+ if( pPt && nullptr != pLayout )
{
// set the cursor to the layout position
Point aPt( *pPt );
@@ -1350,7 +1350,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const
{
// Should we select the whole fieldmark?
const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
- sw::mark::IMark* pMark = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL;
+ sw::mark::IMark* pMark = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : nullptr;
if ( pMark )
{
const SwPosition rStart = pMark->GetMarkStart();
@@ -1575,7 +1575,7 @@ SwCursor::DoSetBidiLevelLeftRight(
bool & io_rbLeft, bool bVisualAllowed, bool bInsertCrsr)
{
// calculate cursor bidi level
- const SwContentFrm* pSttFrm = NULL;
+ const SwContentFrm* pSttFrm = nullptr;
SwNode& rNode = GetPoint()->nNode.GetNode();
if( rNode.IsTextNode() )
@@ -1651,9 +1651,9 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
if (m_nRowSpanOffset)
{
const SwNode* pOldTabBoxSttNode = aOldNodeIdx.GetNode().FindTableBoxStartNode();
- const SwTableNode* pOldTabSttNode = pOldTabBoxSttNode ? pOldTabBoxSttNode->FindTableNode() : 0;
+ const SwTableNode* pOldTabSttNode = pOldTabBoxSttNode ? pOldTabBoxSttNode->FindTableNode() : nullptr;
const SwNode* pNewTabBoxSttNode = GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- const SwTableNode* pNewTabSttNode = pNewTabBoxSttNode ? pNewTabBoxSttNode->FindTableNode() : 0;
+ const SwTableNode* pNewTabSttNode = pNewTabBoxSttNode ? pNewTabBoxSttNode->FindTableNode() : nullptr;
const bool bCellChanged = pOldTabSttNode && pNewTabSttNode &&
pOldTabSttNode == pNewTabSttNode &&
@@ -2337,13 +2337,13 @@ void SwTableCursor::ParkCrsr()
if( !pNd->IsStartNode() )
pNd = pNd->StartOfSectionNode();
GetPoint()->nNode = *pNd;
- GetPoint()->nContent.Assign( 0, 0 );
+ GetPoint()->nContent.Assign( nullptr, 0 );
pNd = &GetMark()->nNode.GetNode();
if( !pNd->IsStartNode() )
pNd = pNd->StartOfSectionNode();
GetMark()->nNode = *pNd;
- GetMark()->nContent.Assign( 0, 0 );
+ GetMark()->nContent.Assign( nullptr, 0 );
m_bChanged = true;
m_bParked = true;
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index 8d8a12d983c0..2bd322f77794 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -35,25 +35,25 @@ SwLayoutFrm* GetCurrColumn( const SwLayoutFrm* pLayFrm )
SwLayoutFrm* GetNextColumn( const SwLayoutFrm* pLayFrm )
{
SwLayoutFrm* pActCol = GetCurrColumn( pLayFrm );
- return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetNext()) : 0;
+ return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetNext()) : nullptr;
}
SwLayoutFrm* GetPrevColumn( const SwLayoutFrm* pLayFrm )
{
SwLayoutFrm* pActCol = GetCurrColumn( pLayFrm );
- return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetPrev()) : 0;
+ return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetPrev()) : nullptr;
}
SwContentFrm* GetColumnStt( const SwLayoutFrm* pColFrm )
{
- return pColFrm ? const_cast<SwContentFrm*>(pColFrm->ContainsContent()) : 0;
+ return pColFrm ? const_cast<SwContentFrm*>(pColFrm->ContainsContent()) : nullptr;
}
SwContentFrm* GetColumnEnd( const SwLayoutFrm* pColFrm )
{
SwContentFrm *pRet = GetColumnStt( pColFrm );
if( !pRet )
- return 0;
+ return nullptr;
SwContentFrm *pNxt = pRet->GetNextContentFrm();
while( pNxt && pColFrm->IsAnLower( pNxt ) )
@@ -76,7 +76,7 @@ bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
if( !m_pTableCrsr )
{
SwLayoutFrm* pLayFrm = GetCurrFrm()->GetUpper();
- if( pLayFrm && 0 != ( pLayFrm = (*fnWhichCol)( pLayFrm )) )
+ if( pLayFrm && nullptr != ( pLayFrm = (*fnWhichCol)( pLayFrm )) )
{
SwContentFrm* pCnt = (*fnPosCol)( pLayFrm );
if( pCnt )
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 31fe101dd889..2bd5e3772fa4 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -55,7 +55,7 @@ bool SwCursor::GotoFootnoteText()
SwTextAttr *const pFootnote( (pTextNd)
? pTextNd->GetTextAttrForCharAt(
GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN)
- : 0);
+ : nullptr);
if (pFootnote)
{
SwCrsrSaveState aSaveState( *this );
@@ -80,16 +80,16 @@ bool SwCrsrShell::GotoFootnoteText()
if( !bRet )
{
SwTextNode* pTextNd = _GetCrsr() ?
- _GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode() : NULL;
+ _GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode() : nullptr;
if( pTextNd )
{
const SwFrm *pFrm = pTextNd->getLayoutFrm( GetLayout(), &_GetCrsr()->GetSttPos(),
_GetCrsr()->Start() );
const SwFootnoteBossFrm* pFootnoteBoss;
bool bSkip = pFrm && pFrm->IsInFootnote();
- while( pFrm && 0 != ( pFootnoteBoss = pFrm->FindFootnoteBossFrm() ) )
+ while( pFrm && nullptr != ( pFootnoteBoss = pFrm->FindFootnoteBossFrm() ) )
{
- if( 0 != ( pFrm = pFootnoteBoss->FindFootnoteCont() ) )
+ if( nullptr != ( pFrm = pFootnoteBoss->FindFootnoteCont() ) )
{
if( bSkip )
bSkip = false;
@@ -131,7 +131,7 @@ bool SwCursor::GotoFootnoteAnchor()
const SwTextFootnote* pTextFootnote;
const SwFootnoteIdxs& rFootnoteArr = pSttNd->GetDoc()->GetFootnoteIdxs();
for( size_t n = 0; n < rFootnoteArr.size(); ++n )
- if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
pSttNd == &pTextFootnote->GetStartNode()->GetNode() )
{
SwCrsrSaveState aSaveState( *this );
@@ -177,7 +177,7 @@ inline bool CmpL( const SwTextFootnote& rFootnote, sal_uLong nNd, sal_Int32 nCnt
bool SwCursor::GotoNextFootnoteAnchor()
{
const SwFootnoteIdxs& rFootnoteArr = GetDoc()->GetFootnoteIdxs();
- const SwTextFootnote* pTextFootnote = 0;
+ const SwTextFootnote* pTextFootnote = nullptr;
size_t nPos = 0;
if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ))
@@ -192,19 +192,19 @@ bool SwCursor::GotoNextFootnoteAnchor()
// search forwards
if( CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
{
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
for( ++nPos; nPos < rFootnoteArr.size(); ++nPos )
{
pTextFootnote = rFootnoteArr[ nPos ];
if( !CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
break; // found
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
}
}
else if( nPos )
{
// search backwards
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
while( nPos )
{
pTextFootnote = rFootnoteArr[ --nPos ];
@@ -220,7 +220,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
else if( nPos < rFootnoteArr.size() )
pTextFootnote = rFootnoteArr[ nPos ];
- bool bRet = 0 != pTextFootnote;
+ bool bRet = nullptr != pTextFootnote;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
@@ -236,7 +236,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
bool SwCursor::GotoPrevFootnoteAnchor()
{
const SwFootnoteIdxs& rFootnoteArr = GetDoc()->GetFootnoteIdxs();
- const SwTextFootnote* pTextFootnote = 0;
+ const SwTextFootnote* pTextFootnote = nullptr;
size_t nPos = 0;
if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ) )
@@ -262,22 +262,22 @@ bool SwCursor::GotoPrevFootnoteAnchor()
else if( nPos )
{
// search backwards
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
while( nPos )
{
pTextFootnote = rFootnoteArr[ --nPos ];
if( CmpL( *pTextFootnote, nNdPos, nCntPos ))
break; // found
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
}
}
else
- pTextFootnote = 0;
+ pTextFootnote = nullptr;
}
else if( nPos )
pTextFootnote = rFootnoteArr[ nPos-1 ];
- bool bRet = 0 != pTextFootnote;
+ bool bRet = nullptr != pTextFootnote;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index 8c2ba4e36b2e..6e332c5da6e8 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -38,7 +38,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
do {
while( aIdx.GetIndex() &&
- 0 == ( pNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) )
+ nullptr == ( pNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) )
--aIdx;
if( pNd ) // is there another section node?
@@ -92,7 +92,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
sal_uLong nEndCount = aIdx.GetNode().GetNodes().Count()-1;
do {
while( aIdx.GetIndex() < nEndCount &&
- 0 == ( pNd = aIdx.GetNode().GetSectionNode()) )
+ nullptr == ( pNd = aIdx.GetNode().GetSectionNode()) )
++aIdx;
if( pNd ) // is there another section node?
@@ -162,7 +162,7 @@ bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
pPos->nNode = *pCNd;
pPos->nContent.Assign( pCNd, bMoveBackward ? pCNd->Len() : 0 );
}
- return 0 != pCNd;
+ return nullptr != pCNd;
}
bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
@@ -205,7 +205,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
// try also the parent of this section
SwSection* pParent = pNd->GetSection().GetParent();
- pNd = pParent ? pParent->GetFormat()->GetSectionNode() : 0;
+ pNd = pParent ? pParent->GetFormat()->GetSectionNode() : nullptr;
} while( pNd );
return false;
}
@@ -236,11 +236,11 @@ bool SwCursor::GotoRegion( const OUString& rName )
for( SwSectionFormats::size_type n = rFormats.size(); n; )
{
const SwSectionFormat* pFormat = rFormats[ --n ];
- const SwNodeIndex* pIdx = 0;
+ const SwNodeIndex* pIdx = nullptr;
const SwSection* pSect;
- if( 0 != ( pSect = pFormat->GetSection() ) &&
+ if( nullptr != ( pSect = pFormat->GetSection() ) &&
pSect->GetSectionName() == rName &&
- 0 != ( pIdx = pFormat->GetContent().GetContentIdx() ) &&
+ nullptr != ( pIdx = pFormat->GetContent().GetContentIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
// area in normal nodes array
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 9902b9c832f0..8e3dbe6b7d1b 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -44,9 +44,9 @@
bool SwCrsrShell::GoNextCell( bool bAppendLine )
{
bool bRet = false;
- const SwTableNode* pTableNd = 0;
+ const SwTableNode* pTableNd = nullptr;
- if( IsTableMode() || 0 != ( pTableNd = IsCrsrInTable() ))
+ if( IsTableMode() || nullptr != ( pTableNd = IsCrsrInTable() ))
{
SwCursor* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr;
SwCallLink aLk( *this ); // watch Crsr-Moves
@@ -55,7 +55,7 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine )
// Check if we have to move the cursor to a covered cell before
// proceeding:
const SwNode* pTableBoxStartNode = pCrsr->GetNode().FindTableBoxStartNode();
- const SwTableBox* pTableBox = 0;
+ const SwTableBox* pTableBox = nullptr;
if ( pCrsr->GetCrsrRowSpanOffset() )
{
@@ -141,8 +141,8 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple )
SET_CURR_SHELL( this );
- const SwTableBox* pStt = 0;
- const SwTableBox* pEnd = 0;
+ const SwTableBox* pStt = nullptr;
+ const SwTableBox* pEnd = nullptr;
// search box based on layout
SwSelBoxes aBoxes;
@@ -179,7 +179,7 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple )
const SwShellCrsr *pCrsr = _GetCrsr();
const SwFrm* pStartFrm = pFrm;
const SwContentNode *pCNd = pCrsr->GetContentNode( false );
- const SwFrm* pEndFrm = pCNd ? pCNd->getLayoutFrm( GetLayout(), &pCrsr->GetMkPos() ) : 0;
+ const SwFrm* pEndFrm = pCNd ? pCNd->getLayoutFrm( GetLayout(), &pCrsr->GetMkPos() ) : nullptr;
if ( bRow )
{
@@ -202,7 +202,7 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple )
SwCellFrms aCells;
GetTableSel( static_cast<const SwCellFrm*>(pStartFrm),
static_cast<const SwCellFrm*>(pEndFrm),
- aBoxes, bSelectUp ? 0 : &aCells, eType );
+ aBoxes, bSelectUp ? nullptr : &aCells, eType );
if( aBoxes.empty() || ( !bSelectUp && 4 != aCells.size() ) )
return false;
@@ -296,10 +296,10 @@ bool SwCrsrShell::SelTableBox()
// frame. This should yield the same result as searching for the
// table box start node, right?
SwFrm *pFrm = GetCurrFrm();
- OSL_ENSURE( !pFrm->IsInTab() == !(pStartNode != NULL),
+ OSL_ENSURE( !pFrm->IsInTab() == !(pStartNode != nullptr),
"Schroedinger's table: We're in a box, and also we aren't." );
#endif
- if( pStartNode == NULL )
+ if( pStartNode == nullptr )
return false;
SET_CURR_SHELL( this );
@@ -371,7 +371,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if ( 0 == pFrm || pCNd->FindTableNode() != pTableNd ||
+ if ( nullptr == pFrm || pCNd->FindTableNode() != pTableNd ||
(!bInReadOnly && pFrm->IsProtected() ) )
{
// we are not located inside a 'valid' cell. We have to continue searching...
@@ -393,7 +393,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
// ok, get the next content node:
pCNd = aTmp.GetNode().GetContentNode();
- if( 0 == pCNd )
+ if( nullptr == pCNd )
pCNd = rNds.GoNext( &aTmp );
// robust:
@@ -403,7 +403,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly )
// check if we have found a suitable table cell:
pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if ( 0 != pFrm && pCNd->FindTableNode() == pTableNd &&
+ if ( nullptr != pFrm && pCNd->FindTableNode() == pTableNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
{
// finally, we have found a suitable table cell => set index and return
@@ -443,7 +443,7 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if( 0 == pFrm || pCNd->FindTableNode() != pTableNd ||
+ if( nullptr == pFrm || pCNd->FindTableNode() != pTableNd ||
(!bInReadOnly && pFrm->IsProtected() ))
{
// skip before current section
@@ -456,7 +456,7 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
return false;
pCNd = aTmp.GetNode().GetContentNode();
- if( 0 == pCNd )
+ if( nullptr == pCNd )
pCNd = SwNodes::GoPrevious( &aTmp );
if ( !pCNd )
@@ -464,7 +464,7 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly )
pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if( 0 != pFrm && pCNd->FindTableNode() == pTableNd &&
+ if( nullptr != pFrm && pCNd->FindTableNode() == pTableNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
{
rIdx = *pCNd;
@@ -487,10 +487,10 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
{
// #i26532#: If we are inside a table, we may not go backward to the
// table start node, because we would miss any tables inside this table.
- SwTableNode* pInnerTableNd = 0;
+ SwTableNode* pInnerTableNd = nullptr;
SwNodeIndex aTmpIdx( aIdx );
while( aTmpIdx.GetIndex() &&
- 0 == ( pInnerTableNd = aTmpIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
+ nullptr == ( pInnerTableNd = aTmpIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
--aTmpIdx;
if( pInnerTableNd == pTableNd )
@@ -499,7 +499,7 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
do {
while( aIdx.GetIndex() &&
- 0 == ( pTableNd = aIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
+ nullptr == ( pTableNd = aIdx.GetNode().StartOfSectionNode()->GetTableNode()) )
--aIdx;
if( pTableNd ) // any further table node?
@@ -552,7 +552,7 @@ bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
sal_uLong nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
do {
while( aIdx.GetIndex() < nLastNd &&
- 0 == ( pTableNd = aIdx.GetNode().GetTableNode()) )
+ nullptr == ( pTableNd = aIdx.GetNode().GetTableNode()) )
++aIdx;
if( pTableNd ) // any further table node?
{
@@ -599,7 +599,7 @@ bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTable,
if( !pTableNd )
return false;
- SwTextNode* pTextNode = 0;
+ SwTextNode* pTextNode = nullptr;
if( fnPosTable == fnMoveBackward ) // to the end of the table
{
SwNodeIndex aIdx( *pTableNd->EndOfSectionNode() );
@@ -714,7 +714,7 @@ OUString SwCrsrShell::GetBoxNms() const
if( IsTableMode() )
{
SwContentNode *pCNd = m_pTableCrsr->Start()->nNode.GetNode().GetContentNode();
- pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
+ pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : nullptr;
if( !pFrm )
return sNm;
@@ -740,7 +740,7 @@ OUString SwCrsrShell::GetBoxNms() const
}
SwContentNode* pCNd = pPos->nNode.GetNode().GetContentNode();
- pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
+ pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : nullptr;
if( pFrm )
{
@@ -773,19 +773,19 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
return false;
// check if box content is consistent with given box format, reset if not
- SwTableBox* pChkBox = 0;
- SwStartNode* pSttNd = 0;
+ SwTableBox* pChkBox = nullptr;
+ SwStartNode* pSttNd = nullptr;
if( !pPos )
{
// get stored position
if( m_pBoxIdx && m_pBoxPtr &&
- 0 != ( pSttNd = m_pBoxIdx->GetNode().GetStartNode() ) &&
+ nullptr != ( pSttNd = m_pBoxIdx->GetNode().GetStartNode() ) &&
SwTableBoxStartNode == pSttNd->GetStartNodeType() &&
m_pBoxPtr == pSttNd->FindTableNode()->GetTable().
GetTableBox( m_pBoxIdx->GetIndex() ) )
pChkBox = m_pBoxPtr;
}
- else if( 0 != ( pSttNd = pPos->nNode.GetNode().
+ else if( nullptr != ( pSttNd = pPos->nNode.GetNode().
FindSttNodeByType( SwTableBoxStartNode )) )
{
pChkBox = pSttNd->FindTableNode()->GetTable().GetTableBox( pSttNd->GetIndex() );
@@ -793,7 +793,7 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
// box has more than one paragraph
if( pChkBox && pSttNd->GetIndex() + 2 != pSttNd->EndOfSectionIndex() )
- pChkBox = 0;
+ pChkBox = nullptr;
// destroy pointer before next action starts
if( !pPos && !pChkBox )
@@ -803,7 +803,7 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
if( pChkBox && !pPos &&
( m_pCurCrsr->HasMark() || m_pCurCrsr->GetNext() != m_pCurCrsr ||
pSttNd->GetIndex() + 1 == m_pCurCrsr->GetPoint()->nNode.GetIndex() ))
- pChkBox = 0;
+ pChkBox = nullptr;
// Did the content of a box change at all? This is important if e.g. Undo
// could not restore the content properly.
@@ -815,7 +815,7 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
( pNd->GetText() == SwViewShell::GetShellRes()->aCalc_Error &&
SfxItemState::SET == pChkBox->GetFrameFormat()->
GetItemState( RES_BOXATR_FORMULA )) )
- pChkBox = 0;
+ pChkBox = nullptr;
}
if( pChkBox )
@@ -827,7 +827,7 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos )
EndAction();
}
- return 0 != pChkBox;
+ return nullptr != pChkBox;
}
void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos )
@@ -844,12 +844,12 @@ void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos )
if( pSttNd && m_pBoxIdx )
{
if( pSttNd == &m_pBoxIdx->GetNode() )
- pSttNd = 0;
+ pSttNd = nullptr;
else
bCheckBox = true;
}
else
- bCheckBox = 0 != m_pBoxIdx;
+ bCheckBox = nullptr != m_pBoxIdx;
if( bCheckBox )
{
@@ -871,8 +871,8 @@ void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos )
void SwCrsrShell::ClearTableBoxContent()
{
- delete m_pBoxIdx, m_pBoxIdx = 0;
- m_pBoxPtr = 0;
+ delete m_pBoxIdx, m_pBoxIdx = nullptr;
+ m_pBoxPtr = nullptr;
}
bool SwCrsrShell::EndAllTableBoxEdit()
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 0bfa49d1377c..1c6135a26f3d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -64,7 +64,7 @@
long SwSelPaintRects::s_nPixPtX = 0;
long SwSelPaintRects::s_nPixPtY = 0;
-MapMode* SwSelPaintRects::s_pMapMode = 0;
+MapMode* SwSelPaintRects::s_pMapMode = nullptr;
// Starting from here: classes / methods for the non-text-cursor
SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
@@ -82,7 +82,7 @@ SwVisCrsr::~SwVisCrsr()
if( m_bIsVisible && m_aTextCrsr.IsVisible() )
m_aTextCrsr.Hide();
- m_pCrsrShell->GetWin()->SetCursor( 0 );
+ m_pCrsrShell->GetWin()->SetCursor( nullptr );
}
void SwVisCrsr::Show()
@@ -140,7 +140,7 @@ void SwVisCrsr::_SetPosAndShow()
if( rNode.IsTextNode() )
{
const SwTextNode& rTNd = *rNode.GetTextNode();
- const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), 0, 0, false );
+ const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), nullptr, nullptr, false );
if ( pFrm )
{
const SwScriptInfo* pSI = static_cast<const SwTextFrm*>(pFrm)->GetScriptInfo();
@@ -211,7 +211,7 @@ void SwVisCrsr::_SetPosAndShow()
if( nStyle != m_aTextCrsr.GetStyle() )
{
m_aTextCrsr.SetStyle( nStyle );
- m_aTextCrsr.SetWindow( m_bIsDragCrsr ? m_pCrsrShell->GetWin() : 0 );
+ m_aTextCrsr.SetWindow( m_bIsDragCrsr ? m_pCrsrShell->GetWin() : nullptr );
}
m_aTextCrsr.Show();
@@ -421,7 +421,7 @@ void SwSelPaintRects::HighlightInputField()
{
SwTextInputField* pCurTextInputFieldAtCrsr =
dynamic_cast<SwTextInputField*>(SwCrsrShell::GetTextFieldAtPos( GetShell()->GetCrsr()->Start(), false ));
- if ( pCurTextInputFieldAtCrsr != NULL )
+ if ( pCurTextInputFieldAtCrsr != nullptr )
{
SwTextNode* pTextNode = pCurTextInputFieldAtCrsr->GetpTextNode();
std::unique_ptr<SwShellCrsr> pCrsrForInputTextField(
@@ -539,7 +539,7 @@ void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh,
SwShellCrsr::SwShellCrsr(
const SwCrsrShell& rCShell,
const SwPosition &rPos )
- : SwCursor(rPos,0,false)
+ : SwCursor(rPos,nullptr,false)
, SwSelPaintRects(rCShell)
, m_pInitialPoint(SwPaM::GetPoint())
{}
@@ -714,14 +714,14 @@ bool SwShellCrsr::IsAtValidPos( bool bPoint ) const
SwShellTableCrsr::SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
const SwPosition& rPos )
- : SwCursor(rPos,0,false), SwShellCrsr(rCrsrSh, rPos), SwTableCursor(rPos)
+ : SwCursor(rPos,nullptr,false), SwShellCrsr(rCrsrSh, rPos), SwTableCursor(rPos)
{
}
SwShellTableCrsr::SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
const SwPosition& rMkPos, const Point& rMkPt,
const SwPosition& rPtPos, const Point& rPtPt )
- : SwCursor(rPtPos,0,false), SwShellCrsr(rCrsrSh, rPtPos), SwTableCursor(rPtPos)
+ : SwCursor(rPtPos,nullptr,false), SwShellCrsr(rCrsrSh, rPtPos), SwTableCursor(rPtPos)
{
SetMark();
*GetMark() = rMkPos;
@@ -759,7 +759,7 @@ void SwShellTableCrsr::FillRects()
if (GetShell()->isTiledRendering())
aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->Frm();
SwNodes& rNds = GetDoc()->GetNodes();
- SwFrm* pEndFrm = 0;
+ SwFrm* pEndFrm = nullptr;
for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
{
const SwStartNode* pSttNd = m_SelectedBoxes[n]->GetSttNd();
@@ -771,7 +771,7 @@ void SwShellTableCrsr::FillRects()
// table in table
// (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
// version to do this)
- const SwTableNode* pCurTableNd = pCNd ? pCNd->FindTableNode() : NULL;
+ const SwTableNode* pCurTableNd = pCNd ? pCNd->FindTableNode() : nullptr;
while ( pSelTableNd != pCurTableNd && pCurTableNd )
{
aIdx = pCurTableNd->EndOfSectionIndex();
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index fa555627a368..c74b26441ddd 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -361,7 +361,7 @@ void ContentIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAu
rUpdater(aNewPos, aEntry.m_nContent);
if ( FLY_AT_CHAR != rFlyAnchor.GetAnchorId() )
{
- aNewPos.nContent.Assign( 0, 0 );
+ aNewPos.nContent.Assign( nullptr, 0 );
}
aNew.SetAnchor( &aNewPos );
pFrameFormat->SetFormatAttr( aNew );
@@ -420,7 +420,7 @@ void ContentIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32
if( _pStkCrsr )
do {
lcl_ChkPaMBoth( m_aShellCrsrEntries, nNode, nContent, *_pStkCrsr);
- } while ( (_pStkCrsr != 0 ) &&
+ } while ( (_pStkCrsr != nullptr ) &&
((_pStkCrsr = _pStkCrsr->GetNext()) != static_cast<SwCrsrShell*>(&rCurShell)->GetStkCrsr()) );
for(SwPaM& rPaM : (static_cast<SwCrsrShell*>(&rCurShell)->_GetCrsr())->GetRingContainer())
diff --git a/sw/source/core/doc/DocumentChartDataProviderManager.cxx b/sw/source/core/doc/DocumentChartDataProviderManager.cxx
index 60835de873e1..fb40e5d42f55 100644
--- a/sw/source/core/doc/DocumentChartDataProviderManager.cxx
+++ b/sw/source/core/doc/DocumentChartDataProviderManager.cxx
@@ -36,7 +36,7 @@ namespace sw {
DocumentChartDataProviderManager::DocumentChartDataProviderManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ),
maChartDataProviderImplRef(),
- mpChartControllerHelper( 0 )
+ mpChartControllerHelper( nullptr )
{
}
@@ -62,12 +62,12 @@ void DocumentChartDataProviderManager::CreateChartInternalDataProviders( const S
SwOLENode *pONd;
SwStartNode *pStNd;
SwNodeIndex aIdx( *m_rDoc.GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while (0 != (pStNd = aIdx.GetNode().GetStartNode()))
+ while (nullptr != (pStNd = aIdx.GetNode().GetStartNode()))
{
++aIdx;
- if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+ if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
aName == pONd->GetChartTableName() /* OLE node is chart? */ &&
- 0 != (pONd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ )
+ nullptr != (pONd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ )
{
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 8eba107a2421..ec341ecda61c 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -102,7 +102,7 @@ namespace
const SwFormatContent& rContent = pFormat->GetContent();
SwStartNode* pSNd;
if( !rContent.GetContentIdx() ||
- 0 == ( pSNd = rContent.GetContentIdx()->GetNode().GetStartNode() ))
+ nullptr == ( pSNd = rContent.GetContentIdx()->GetNode().GetStartNode() ))
continue;
if( pSNd->GetIndex() < nInsNd &&
@@ -294,7 +294,7 @@ namespace
{
SwDoc* pDestDoc = rCpyPam.GetDoc();
SwPosition* pCpyStt = rCpyPam.Start(), *pCpyEnd = rCpyPam.End();
- SwPaM* pDelPam = 0;
+ SwPaM* pDelPam = nullptr;
const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
// We have to count the "non-copied" nodes
sal_uLong nDelCount = 0;
@@ -429,12 +429,12 @@ namespace
const SwPosition* pStt = rPam.Start();
const SwPosition* pEnd = rPam.End();
- if (NULL != pStt && NULL != pEnd)
+ if (nullptr != pStt && nullptr != pEnd)
{
const SwTextNode* pSttNd = pStt->nNode.GetNode().GetTextNode();
const SwTextNode* pEndNd = pEnd->nNode.GetNode().GetTextNode();
- if (NULL != pSttNd && NULL != pEndNd &&
+ if (nullptr != pSttNd && nullptr != pEndNd &&
pStt->nContent.GetIndex() == 0 &&
pEnd->nContent.GetIndex() == pEndNd->Len())
{
@@ -531,7 +531,7 @@ namespace
{
const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End();
const SwTextNode* pEndNd = pEnd->nNode.GetNode().GetTextNode();
- if( (0 != pEndNd) && pStt->nNode.GetNode().IsTextNode() )
+ if( (nullptr != pEndNd) && pStt->nNode.GetNode().IsTextNode() )
{
const sal_uInt64 nSum = pStt->nContent.GetIndex() +
pEndNd->GetText().getLength() - pEnd->nContent.GetIndex();
@@ -565,9 +565,9 @@ namespace
}
pRedl->GetPoint()->nNode = 0;
- pRedl->GetPoint()->nContent.Assign( 0, 0 );
+ pRedl->GetPoint()->nContent.Assign( nullptr, 0 );
pRedl->GetMark()->nNode = 0;
- pRedl->GetMark()->nContent.Assign( 0, 0 );
+ pRedl->GetMark()->nContent.Assign( nullptr, 0 );
}
_SaveRedline( SwRangeRedline* pR, const SwPosition& rPos )
@@ -591,9 +591,9 @@ namespace
}
pRedl->GetPoint()->nNode = 0;
- pRedl->GetPoint()->nContent.Assign( 0, 0 );
+ pRedl->GetPoint()->nContent.Assign( nullptr, 0 );
pRedl->GetMark()->nNode = 0;
- pRedl->GetMark()->nContent.Assign( 0, 0 );
+ pRedl->GetMark()->nContent.Assign( nullptr, 0 );
}
void SetPos( sal_uInt32 nInsPos )
@@ -801,7 +801,7 @@ namespace
static bool lcl_SaveFootnote( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
const SwNodeIndex& rInsPos,
SwFootnoteIdxs& rFootnoteArr, SwFootnoteIdxs& rSaveArr,
- const SwIndex* pSttCnt = 0, const SwIndex* pEndCnt = 0 )
+ const SwIndex* pSttCnt = nullptr, const SwIndex* pEndCnt = nullptr )
{
bool bUpdateFootnote = false;
const SwNodes& rNds = rInsPos.GetNodes();
@@ -843,7 +843,7 @@ namespace
}
else
{
- pSrch->DelFrms(0);
+ pSrch->DelFrms(nullptr);
rFootnoteArr.erase( rFootnoteArr.begin() + nPos );
if( bSaveFootnote )
rSaveArr.insert( pSrch );
@@ -871,7 +871,7 @@ namespace
}
else
{
- pSrch->DelFrms(0);
+ pSrch->DelFrms(nullptr);
rFootnoteArr.erase( rFootnoteArr.begin() + nPos );
if( bSaveFootnote )
rSaveArr.insert( pSrch );
@@ -994,8 +994,8 @@ namespace //local functions originally from docfmt.cxx
const bool bExpandCharToPara=false)
{
// Divide the Sets (for selections in Nodes)
- const SfxItemSet* pCharSet = 0;
- const SfxItemSet* pOtherSet = 0;
+ const SfxItemSet* pCharSet = nullptr;
+ const SfxItemSet* pOtherSet = nullptr;
bool bDelete = false;
bool bCharAttr = false;
bool bOtherAttr = false;
@@ -1066,7 +1066,7 @@ namespace //local functions originally from docfmt.cxx
bDelete = true;
}
- SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0;
+ SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : nullptr;
bool bRet = false;
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
SwContentNode* pNode = pStt->nNode.GetNode().GetContentNode();
@@ -1203,10 +1203,10 @@ namespace //local functions originally from docfmt.cxx
// Tables now also know line breaks
if( !(nFlags & SetAttrMode::APICALL) &&
- 0 != ( pTableNd = pNode->FindTableNode() ) )
+ nullptr != ( pTableNd = pNode->FindTableNode() ) )
{
SwTableNode* pCurTableNd = pTableNd;
- while ( 0 != ( pCurTableNd = pCurTableNd->StartOfSectionNode()->FindTableNode() ) )
+ while ( nullptr != ( pCurTableNd = pCurTableNd->StartOfSectionNode()->FindTableNode() ) )
pTableNd = pCurTableNd;
// set the table format
@@ -1239,12 +1239,12 @@ namespace //local functions originally from docfmt.cxx
// Tables now also know line breaks
const SvxFormatBreakItem* pBreak;
if( pNode && !(nFlags & SetAttrMode::APICALL) &&
- 0 != (pTableNd = pNode->FindTableNode() ) &&
+ nullptr != (pTableNd = pNode->FindTableNode() ) &&
SfxItemState::SET == pOtherSet->GetItemState( RES_BREAK,
false, reinterpret_cast<const SfxPoolItem**>(&pBreak) ) )
{
SwTableNode* pCurTableNd = pTableNd;
- while ( 0 != ( pCurTableNd = pCurTableNd->StartOfSectionNode()->FindTableNode() ) )
+ while ( nullptr != ( pCurTableNd = pCurTableNd->StartOfSectionNode()->FindTableNode() ) )
pTableNd = pCurTableNd;
// set the table format
@@ -1604,7 +1604,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
}
}
- SwPaM* pRedlineRange = 0;
+ SwPaM* pRedlineRange = nullptr;
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ||
(!pDoc->getIDocumentRedlineAccess().IsIgnoreRedline() && !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) )
pRedlineRange = new SwPaM( rPos );
@@ -1639,7 +1639,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
// (with start/end nodes clamped) and move them to
// the desired position.
- SwUndoCpyDoc* pUndo = 0;
+ SwUndoCpyDoc* pUndo = nullptr;
// Save the Undo area
SwPaM aPam( rPos );
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
@@ -1654,7 +1654,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() ));
aPam.GetPoint()->nNode = *pSttNd->EndOfSectionNode();
// copy without Frames
- pDoc->GetDocumentContentOperationsManager().CopyImpl( rPam, *aPam.GetPoint(), false, bCopyAll, 0 );
+ pDoc->GetDocumentContentOperationsManager().CopyImpl( rPam, *aPam.GetPoint(), false, bCopyAll, nullptr );
aPam.GetPoint()->nNode = pDoc->GetNodes().GetEndOfAutotext();
aPam.SetMark();
@@ -1790,7 +1790,7 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
SwContentNode *pTmpNode = rPam.GetPoint()->nNode.GetNode().GetContentNode();
rPam.GetPoint()->nContent.Assign( pTmpNode, 0 );
- bool bGoNext = (0 == pTmpNode);
+ bool bGoNext = (nullptr == pTmpNode);
pTmpNode = rPam.GetMark()->nNode.GetNode().GetContentNode();
rPam.GetMark()->nContent.Assign( pTmpNode, 0 );
@@ -1912,7 +1912,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
_DelBookmarks(
pStt->nNode,
pEnd->nNode,
- NULL,
+ nullptr,
&pStt->nContent,
&pEnd->nContent);
}
@@ -1920,7 +1920,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
bool bUpdateFootnote = false;
SwFootnoteIdxs aTmpFntIdx;
- SwUndoMove * pUndoMove = 0;
+ SwUndoMove * pUndoMove = nullptr;
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
m_rDoc.GetIDocumentUndoRedo().ClearRedo();
@@ -2034,7 +2034,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
rPaM.DeleteMark();
OSL_ENSURE( *aSavePam.GetMark() == rPos ||
- ( aSavePam.GetMark()->nNode.GetNode().GetContentNode() == NULL ),
+ ( aSavePam.GetMark()->nNode.GetNode().GetContentNode() == nullptr ),
"PaM was not moved. Aren't there ContentNodes at the beginning/end?" );
*aSavePam.GetMark() = rPos;
@@ -2163,7 +2163,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
bool bUpdateFootnote = false;
SwFootnoteIdxs aTmpFntIdx;
- SwUndoMove* pUndo = 0;
+ SwUndoMove* pUndo = nullptr;
if ((SwMoveFlags::CREATEUNDOOBJ & eMvFlags ) && m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoMove( &m_rDoc, rRange, rPos );
@@ -2212,7 +2212,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
// Set it to before the Position, so that it cannot be moved further.
SwNodeIndex aIdx( rPos, -1 );
- SwNodeIndex* pSaveInsPos = 0;
+ SwNodeIndex* pSaveInsPos = nullptr;
if( pUndo )
pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
@@ -2227,12 +2227,12 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
else
{
aIdx = rRange.aStart;
- delete pUndo, pUndo = 0;
+ delete pUndo, pUndo = nullptr;
}
// move the Flys to the new position
if( !aSaveFlyArr.empty() )
- _RestFlyInRange( aSaveFlyArr, aIdx, NULL );
+ _RestFlyInRange( aSaveFlyArr, aIdx, nullptr );
// Add the Bookmarks back to the Document
for(
@@ -2446,7 +2446,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
}
else
{ // if Undo and grouping is enabled, everything changes!
- SwUndoInsert * pUndo = NULL;
+ SwUndoInsert * pUndo = nullptr;
// don't group the start if hints at the start should be expanded
if (!(nInsertMode & SwInsertFlags::FORCEHINTEXPAND))
@@ -2511,7 +2511,7 @@ void DocumentContentOperationsManager::TransliterateText(
{
SwUndoTransliterate *const pUndo = (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
? new SwUndoTransliterate( rPaM, rTrans )
- : 0;
+ : nullptr;
const SwPosition* pStt = rPaM.Start(),
* pEnd = rPaM.End();
@@ -2564,7 +2564,7 @@ void DocumentContentOperationsManager::TransliterateText(
}
}
- if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTextNode() ))
+ if( nEndCnt && nullptr != ( pTNd = pEnd->nNode.GetNode().GetTextNode() ))
pTNd->TransliterateText( rTrans, 0, nEndCnt, pUndo );
}
else if( pTNd && nSttCnt < nEndCnt )
@@ -2653,7 +2653,7 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsertOLE(const SwPaM &rRg,
rObjName,
nAspect,
m_rDoc.GetDfltGrfFormatColl(),
- 0 ),
+ nullptr ),
pFlyAttrSet, pGrfAttrSet,
pFrameFormat );
}
@@ -2665,7 +2665,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf
SwGrfNode *pGrfNd;
if( ( !rPam.HasMark()
|| rPam.GetPoint()->nNode.GetIndex() == rPam.GetMark()->nNode.GetIndex() )
- && 0 != ( pGrfNd = rPam.GetPoint()->nNode.GetNode().GetGrfNode() ) )
+ && nullptr != ( pGrfNd = rPam.GetPoint()->nNode.GetNode().GetGrfNode() ) )
{
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
@@ -2690,17 +2690,17 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
{
SwDrawFrameFormat* pFormat = m_rDoc.MakeDrawFrameFormat( OUString(), m_rDoc.GetDfltFrameFormat() );
- const SwFormatAnchor* pAnchor = 0;
+ const SwFormatAnchor* pAnchor = nullptr;
rFlyAttrSet.GetItemState( RES_ANCHOR, false, reinterpret_cast<const SfxPoolItem**>(&pAnchor) );
pFormat->SetFormatAttr( rFlyAttrSet );
// Didn't set the Anchor yet?
// DrawObjecte must never end up in the Header/Footer!
- RndStdIds eAnchorId = pAnchor != NULL ? pAnchor->GetAnchorId() : pFormat->GetAnchor().GetAnchorId();
+ RndStdIds eAnchorId = pAnchor != nullptr ? pAnchor->GetAnchorId() : pFormat->GetAnchor().GetAnchorId();
const bool bIsAtContent = (FLY_AT_PAGE != eAnchorId);
- const SwNodeIndex* pChkIdx = 0;
- if ( pAnchor == NULL )
+ const SwNodeIndex* pChkIdx = nullptr;
+ if ( pAnchor == nullptr )
{
pChkIdx = &rRg.GetPoint()->nNode;
}
@@ -2711,7 +2711,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
}
// allow drawing objects in header/footer, but control objects aren't allowed in header/footer.
- if( pChkIdx != NULL
+ if( pChkIdx != nullptr
&& ::CheckControlLayer( &rDrawObj )
&& m_rDoc.IsInHeaderFooter( *pChkIdx ) )
{
@@ -2719,12 +2719,12 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
eAnchorId = FLY_AT_PAGE;
pFormat->SetFormatAttr( SwFormatAnchor( eAnchorId ) );
}
- else if( pAnchor == NULL
+ else if( pAnchor == nullptr
|| ( bIsAtContent
- && pAnchor->GetContentAnchor() == NULL ) )
+ && pAnchor->GetContentAnchor() == nullptr ) )
{
// apply anchor format
- SwFormatAnchor aAnch( pAnchor != NULL ? *pAnchor : pFormat->GetAnchor() );
+ SwFormatAnchor aAnch( pAnchor != nullptr ? *pAnchor : pFormat->GetAnchor() );
eAnchorId = aAnch.GetAnchorId();
if ( eAnchorId == FLY_AT_FLY )
{
@@ -2748,11 +2748,11 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
{
bool bAnchorAtPageAsFallback = true;
const SwFormatAnchor& rDrawObjAnchorFormat = pFormat->GetAnchor();
- if ( rDrawObjAnchorFormat.GetContentAnchor() != NULL )
+ if ( rDrawObjAnchorFormat.GetContentAnchor() != nullptr )
{
SwTextNode* pAnchorTextNode =
rDrawObjAnchorFormat.GetContentAnchor()->nNode.GetNode().GetTextNode();
- if ( pAnchorTextNode != NULL )
+ if ( pAnchorTextNode != nullptr )
{
const sal_Int32 nStt = rDrawObjAnchorFormat.GetContentAnchor()->nContent.GetIndex();
SwFormatFlyCnt aFormat( pFormat );
@@ -2796,7 +2796,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool bChkTableStart )
{
SwContentNode *pNode = rPos.nNode.GetNode().GetContentNode();
- if(0 == pNode)
+ if(nullptr == pNode)
return false;
{
@@ -2805,7 +2805,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
SwDataChanged aTmp( &m_rDoc, rPos );
}
- SwUndoSplitNode* pUndo = 0;
+ SwUndoSplitNode* pUndo = nullptr;
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
m_rDoc.GetIDocumentUndoRedo().ClearRedo();
@@ -2836,7 +2836,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
const SwNode* pNd = m_rDoc.GetNodes()[ nPrevPos ];
if( pNd->IsStartNode() &&
SwTableBoxStartNode == static_cast<const SwStartNode*>(pNd)->GetStartNodeType() &&
- 0 != ( pTableNd = m_rDoc.GetNodes()[ --nPrevPos ]->GetTableNode() ) &&
+ nullptr != ( pTableNd = m_rDoc.GetNodes()[ --nPrevPos ]->GetTableNode() ) &&
((( pNd = m_rDoc.GetNodes()[ --nPrevPos ])->IsStartNode() &&
SwTableBoxStartNode != static_cast<const SwStartNode*>(pNd)->GetStartNodeType() )
|| ( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsTableNode() )
@@ -2848,14 +2848,14 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
// There are no page breaks outside of the normal body area,
// so this is not a valid condition to insert a paragraph.
if( nPrevPos < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() )
- pNd = 0;
+ pNd = nullptr;
else
{
// Only if the table has page breaks!
const SwFrameFormat* pFrameFormat = pTableNd->GetTable().GetFrameFormat();
if( SfxItemState::SET != pFrameFormat->GetItemState(RES_PAGEDESC, false) &&
SfxItemState::SET != pFrameFormat->GetItemState( RES_BREAK, false ) )
- pNd = 0;
+ pNd = nullptr;
}
}
@@ -3047,7 +3047,7 @@ bool DocumentContentOperationsManager::InsertPoolItem(
const bool bExpandCharToPara)
{
SwDataChanged aTmp( rRg );
- SwUndoAttr* pUndoAttr = 0;
+ SwUndoAttr* pUndoAttr = nullptr;
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
m_rDoc.GetIDocumentUndoRedo().ClearRedo();
@@ -3074,7 +3074,7 @@ bool DocumentContentOperationsManager::InsertItemSet ( const SwPaM &rRg, const S
const SetAttrMode nFlags )
{
SwDataChanged aTmp( rRg );
- SwUndoAttr* pUndoAttr = 0;
+ SwUndoAttr* pUndoAttr = nullptr;
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
m_rDoc.GetIDocumentUndoRedo().ClearRedo();
@@ -3270,7 +3270,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
// is the node empty?
const SwNodes& rNodes = pAPos->nNode.GetNodes();
SwTextNode* pTextNode;
- if( 0 != ( pTextNode = pAPos->nNode.GetNode().GetTextNode() ))
+ if( nullptr != ( pTextNode = pAPos->nNode.GetNode().GetTextNode() ))
{
bEmptyNode = pTextNode->GetText().isEmpty();
if( bEmptyNode )
@@ -3318,7 +3318,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
// #i59964#
// correct determination of new anchor position
SwFormatAnchor aAnchor( *(*it).GetAnchor() );
- assert( aAnchor.GetContentAnchor() != NULL );
+ assert( aAnchor.GetContentAnchor() != nullptr );
SwPosition newPos = *aAnchor.GetContentAnchor();
// for at-paragraph and at-character anchored objects the new anchor
// position can *not* be determined by the difference of the current
@@ -3399,7 +3399,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
}
else
{
- newPos.nContent.Assign( 0, 0 );
+ newPos.nContent.Assign( nullptr, 0 );
}
aAnchor.SetAnchor( &newPos );
@@ -3409,7 +3409,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
const SwFormatContent& rContent = (*it).GetFormat()->GetContent();
const SwStartNode* pSNd;
if( rContent.GetContentIdx() &&
- 0 != ( pSNd = rContent.GetContentIdx()->GetNode().GetStartNode() ) &&
+ nullptr != ( pSNd = rContent.GetContentIdx()->GetNode().GetStartNode() ) &&
pSNd->GetIndex() < rStartIdx.GetIndex() &&
rStartIdx.GetIndex() < pSNd->EndOfSectionIndex() )
{
@@ -3433,7 +3433,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
{
const SwFrameFormat *pFormatN = (*nIt).GetFormat();
const SwFormatChain &rChain = pFormatN->GetChain();
- int nCnt = int(0 != rChain.GetPrev());
+ int nCnt = int(nullptr != rChain.GetPrev());
nCnt += rChain.GetNext() ? 1: 0;
size_t k = 0;
for (::std::set< _ZSortFly >::const_iterator kIt=aSet.begin() ; kIt != aSet.end(); ++kIt, ++k )
@@ -3510,7 +3510,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
OSL_ENSURE( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn(), "DeleteAndJoinWithRedline: redline off" );
{
- SwUndoRedlineDelete* pUndo = 0;
+ SwUndoRedlineDelete* pUndo = nullptr;
RedlineMode_t eOld = m_rDoc.getIDocumentRedlineAccess().GetRedlineMode();
m_rDoc.GetDocumentRedlineManager().checkRedlining( eOld );
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
@@ -3522,7 +3522,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
m_rDoc.getIDocumentRedlineAccess().SetRedlineMode(
(RedlineMode_t) ( nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ) );
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_DELETE, NULL );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_DELETE, nullptr );
pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( pUndo );
}
@@ -3533,7 +3533,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
if ( pUndo )
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_EMPTY, NULL );
+ m_rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_EMPTY, nullptr );
// ??? why the hell is the AppendUndo not below the
// CanGrouping, so this hideous cleanup wouldn't be necessary?
// bah, this is redlining, probably changing this would break it...
@@ -3622,7 +3622,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
// Delete all empty TextHints at the Mark's position
SwTextNode* pTextNd = rPam.GetMark()->nNode.GetNode().GetTextNode();
SwpHints* pHts;
- if( pTextNd && 0 != ( pHts = pTextNd->GetpSwpHints()) && pHts->Count() )
+ if( pTextNd && nullptr != ( pHts = pTextNd->GetpSwpHints()) && pHts->Count() )
{
const sal_Int32 nMkCntPos = rPam.GetMark()->nContent.GetIndex();
for( size_t n = pHts->Count(); n; )
@@ -3633,7 +3633,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
const sal_Int32 *pEndIdx;
if( nMkCntPos == pAttr->GetStart() &&
- 0 != (pEndIdx = pAttr->End()) &&
+ nullptr != (pEndIdx = pAttr->End()) &&
*pEndIdx == pAttr->GetStart() )
pTextNd->DestroyAttr( pHts->Cut( n ) );
}
@@ -3680,7 +3680,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
_DelBookmarks(
pStt->nNode,
pEnd->nNode,
- NULL,
+ nullptr,
&pStt->nContent,
&pEnd->nContent);
@@ -3720,7 +3720,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
{
// So that there are no indices left registered when deleted,
// we remove a SwPaM from the Content here.
- pStt->nContent.Assign( 0, 0 );
+ pStt->nContent.Assign( nullptr, 0 );
}
}
@@ -3747,13 +3747,13 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
{
// So that there are no indices left registered when deleted,
// we remove a SwPaM from the Content here.
- pEnd->nContent.Assign( 0, 0 );
+ pEnd->nContent.Assign( nullptr, 0 );
}
}
// if the end is not a content node, delete it as well
sal_uInt32 nEnde = pEnd->nNode.GetIndex();
- if( pCNd == NULL )
+ if( pCNd == nullptr )
nEnde++;
if( aSttIdx != nEnde )
@@ -3822,7 +3822,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
m_rDoc.GetDocumentRedlineManager().checkRedlining(eOld);
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
// If any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = m_rDoc.getIDocumentMarkAccess()->makeMark( aDelPam, OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
@@ -3914,13 +3914,13 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
*aDelPam.GetPoint() = *rPam.GetPoint();
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
// If any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = m_rDoc.getIDocumentMarkAccess()->makeMark( aDelPam, OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
SwIndex& rIdx = aDelPam.GetPoint()->nContent;
- rIdx.Assign( 0, 0 );
+ rIdx.Assign( nullptr, 0 );
aDelPam.GetMark()->nContent = rIdx;
rPam.GetPoint()->nNode = 0;
rPam.GetPoint()->nContent = rIdx;
@@ -3940,7 +3940,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().size() )
m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aDelPam, true, USHRT_MAX );
- SwUndoReplace* pUndoRpl = 0;
+ SwUndoReplace* pUndoRpl = nullptr;
bool const bDoesUndo = m_rDoc.GetIDocumentUndoRedo().DoesUndo();
if (bDoesUndo)
{
@@ -4028,7 +4028,7 @@ SwFlyFrameFormat* DocumentContentOperationsManager::_InsNoTextNode( const SwPosi
const SfxItemSet* pGrfAttrSet,
SwFrameFormat* pFrameFormat)
{
- SwFlyFrameFormat *pFormat = 0;
+ SwFlyFrameFormat *pFormat = nullptr;
if( pNode )
{
pFormat = m_rDoc._MakeFlySection( rPos, *pNode, FLY_AT_PARA,
@@ -4058,9 +4058,9 @@ static void lcl_PushNumruleState( SfxItemState &aNumRuleState, SwNumRuleItem &aN
// Safe numrule item at destination.
// #i86492# - Safe also <ListId> item of destination.
const SfxItemSet * pAttrSet = pDestTextNd->GetpSwAttrSet();
- if (pAttrSet != NULL)
+ if (pAttrSet != nullptr)
{
- const SfxPoolItem * pItem = NULL;
+ const SfxPoolItem * pItem = nullptr;
aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem);
if (SfxItemState::SET == aNumRuleState)
aNumRuleItem = *static_cast<const SwNumRuleItem *>( pItem);
@@ -4124,7 +4124,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
const bool bEndEqualIns = pDoc == &m_rDoc && rPos == *pEnd;
// If Undo is enabled, create the UndoCopy object
- SwUndoCpyDoc* pUndo = 0;
+ SwUndoCpyDoc* pUndo = nullptr;
// lcl_DeleteRedlines may delete the start or end node of the cursor when
// removing the redlines so use cursor that is corrected by PaMCorrAbs
std::shared_ptr<SwUnoCrsr> const pCopyPam(pDoc->CreateUnoCrsr(rPos));
@@ -4168,7 +4168,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
( (pDestTextNd && !pDestTextNd->GetText().getLength()) ||
( !bOneNode && !rPos.nContent.GetIndex() ) );
bool bCopyBookmarks = true;
- bool bStartIsTextNode = 0 != pSttTextNd;
+ bool bStartIsTextNode = nullptr != pSttTextNd;
// #i104585# copy outline num rule to clipboard (for ASCII filter)
if (pDoc->IsClipBoard() && m_rDoc.GetOutlineNumRule())
@@ -4198,7 +4198,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
!pDestTextNd->IsInList() &&
!lcl_ContainsOnlyParagraphsInList( rPam ) )
{
- pNumRuleToPropagate = 0;
+ pNumRuleToPropagate = nullptr;
}
// This do/while block is only there so that we can break out of it!
@@ -4428,7 +4428,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
bCopyBookmarks = false;
// Put the breaks back into the first node
- if( aBrkSet.Count() && 0 != ( pDestTextNd = pDoc->GetNodes()[
+ if( aBrkSet.Count() && nullptr != ( pDestTextNd = pDoc->GetNodes()[
pCopyPam->GetPoint()->nNode.GetIndex()+1 ]->GetTextNode()))
{
pDestTextNd->SetAttr( aBrkSet );
@@ -4473,7 +4473,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
{
assert(*pCopyPam->GetPoint() == rPos);
// the Node rPos points to may be deleted so unregister ...
- rPos.nContent = SwIndex(0);
+ rPos.nContent = SwIndex(nullptr);
lcl_DeleteRedlines(rPam, *pCopyPam);
rPos = *pCopyPam->GetPoint(); // ... and restore.
}
@@ -4491,7 +4491,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
*pCpyRange->GetMark() = *pCopyPam->GetMark();
}
- if ( pNumRuleToPropagate != NULL )
+ if ( pNumRuleToPropagate != nullptr )
{
// #i86492# - use <SwDoc::SetNumRule(..)>, because it also handles the <ListId>
pDoc->SetNumRule( *pCopyPam, *pNumRuleToPropagate, false,
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index 927b5a959804..7032101e894a 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -50,11 +50,11 @@ class SwWait;
namespace sw {
-DocumentDeviceManager::DocumentDeviceManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ), mpPrt(0), mpVirDev(0), mpPrtData(0) {}
+DocumentDeviceManager::DocumentDeviceManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ), mpPrt(nullptr), mpVirDev(nullptr), mpPrtData(nullptr) {}
SfxPrinter* DocumentDeviceManager::getPrinter(/*[in]*/ bool bCreate ) const
{
- SfxPrinter* pRet = 0;
+ SfxPrinter* pRet = nullptr;
if ( !bCreate || mpPrt )
pRet = mpPrt;
else
@@ -95,7 +95,7 @@ void DocumentDeviceManager::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDe
VirtualDevice* DocumentDeviceManager::getVirtualDevice(/*[in]*/ bool bCreate ) const
{
- VirtualDevice* pRet = 0;
+ VirtualDevice* pRet = nullptr;
if ( !bCreate || mpVirDev )
pRet = mpVirDev;
else
@@ -123,7 +123,7 @@ void DocumentDeviceManager::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*
OutputDevice* DocumentDeviceManager::getReferenceDevice(/*[in]*/ bool bCreate ) const
{
- OutputDevice* pRet = 0;
+ OutputDevice* pRet = nullptr;
if ( !m_rDoc.GetDocumentSettingManager().get(DocumentSettingId::USE_VIRTUAL_DEVICE) )
{
pRet = getPrinter( bCreate );
@@ -181,7 +181,7 @@ void DocumentDeviceManager::setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*
const JobSetup* DocumentDeviceManager::getJobsetup() const
{
- return mpPrt ? &mpPrt->GetJobSetup() : 0;
+ return mpPrt ? &mpPrt->GetJobSetup() : nullptr;
}
void DocumentDeviceManager::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
@@ -308,7 +308,7 @@ void DocumentDeviceManager::PrtDataChanged()
// #i41075#
OSL_ENSURE( m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE) ||
- 0 != getPrinter( false ), "PrtDataChanged will be called recursively!" );
+ nullptr != getPrinter( false ), "PrtDataChanged will be called recursively!" );
SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout();
std::unique_ptr<SwWait> pWait;
bool bEndAction = false;
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index 2fd18842489d..b919180e3363 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -56,7 +56,7 @@ namespace sw
DocumentDrawModelManager::DocumentDrawModelManager(SwDoc& i_rSwdoc)
: m_rDoc(i_rSwdoc)
- , mpDrawModel(0)
+ , mpDrawModel(nullptr)
, mnHeaven(0)
, mnHell(0)
, mnControls(0)
@@ -187,7 +187,7 @@ void DocumentDrawModelManager::ReleaseDrawModel()
{
// !! Also maintain the code in the sw3io for inserting documents!!
- delete mpDrawModel; mpDrawModel = 0;
+ delete mpDrawModel; mpDrawModel = nullptr;
//UUUU
// SfxItemPool *pSdrPool = GetAttrPool().GetSecondaryPool();
//
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 90ae677a6123..003364b8902d 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -239,7 +239,7 @@ SwFieldType *DocumentFieldsManager::GetSysFieldType( const sal_uInt16 eWhich ) c
for( SwFieldTypes::size_type i = 0; i < INIT_FLDTYPES; ++i )
if( eWhich == (*mpFieldTypes)[i]->Which() )
return (*mpFieldTypes)[i];
- return 0;
+ return nullptr;
}
/// Find first type with ResId and name
@@ -271,7 +271,7 @@ SwFieldType* DocumentFieldsManager::GetFieldType(
break;
}
- SwFieldType* pRet = 0;
+ SwFieldType* pRet = nullptr;
for( ; i < nSize; ++i )
{
SwFieldType* pFieldType = (*mpFieldTypes)[i];
@@ -358,10 +358,10 @@ void DocumentFieldsManager::UpdateFields( SfxPoolItem *pNewHt, bool bCloseDB )
if( !pNewHt )
{
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
- pFieldType->ModifyNotification( 0, &aUpdateDDE );
+ pFieldType->ModifyNotification( nullptr, &aUpdateDDE );
}
else
- pFieldType->ModifyNotification( 0, pNewHt );
+ pFieldType->ModifyNotification( nullptr, pNewHt );
break;
}
case RES_GETEXPFLD:
@@ -372,12 +372,12 @@ void DocumentFieldsManager::UpdateFields( SfxPoolItem *pNewHt, bool bCloseDB )
if( !pNewHt )
break;
default:
- pFieldType->ModifyNotification ( 0, pNewHt );
+ pFieldType->ModifyNotification ( nullptr, pNewHt );
}
}
if( !IsExpFieldsLocked() )
- UpdateExpFields( 0, false ); // update expression fields
+ UpdateExpFields( nullptr, false ); // update expression fields
// Tables
UpdateTableFields(pNewHt);
@@ -517,7 +517,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r
if (bUpdateFields)
UpdateTableFields( &aTableUpdate );
else
- pNewField->GetTyp()->ModifyNotification(0, &aTableUpdate);
+ pNewField->GetTyp()->ModifyNotification(nullptr, &aTableUpdate);
if (! bUpdateFields)
bTableSelBreak = true;
@@ -528,7 +528,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r
case RES_MACROFLD:
if( bUpdateFields && pDstTextField->GetpTextNode() )
(pDstTextField->GetpTextNode())->
- ModifyNotification( 0, pDstFormatField );
+ ModifyNotification( nullptr, pDstFormatField );
break;
case RES_DBNAMEFLD:
@@ -556,7 +556,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r
// no break;
default:
- pDstFormatField->ModifyNotification( 0, pMsgHint );
+ pDstFormatField->ModifyNotification( nullptr, pMsgHint );
}
// The fields we can calculate here are being triggered for an update
@@ -573,7 +573,7 @@ void DocumentFieldsManager::UpdateRefFields( SfxPoolItem* pHt )
{
for( auto pFieldType : *mpFieldTypes )
if( RES_GETREFFLD == pFieldType->Which() )
- pFieldType->ModifyNotification( 0, pHt );
+ pFieldType->ModifyNotification( nullptr, pHt );
}
void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
@@ -581,13 +581,13 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
OSL_ENSURE( !pHt || RES_TABLEFML_UPDATE == pHt->Which(),
"What MessageItem is &m_rDoc?" );
- SwFieldType* pFieldType(0);
+ SwFieldType* pFieldType(nullptr);
for (auto pFieldTypeTmp : *mpFieldTypes)
{
if( RES_TABLEFLD == pFieldTypeTmp->Which() )
{
- SwTableFormulaUpdate* pUpdateField = 0;
+ SwTableFormulaUpdate* pUpdateField = nullptr;
if( pHt && RES_TABLEFML_UPDATE == pHt->Which() )
pUpdateField = static_cast<SwTableFormulaUpdate*>(pHt);
@@ -604,7 +604,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
const SwTableNode* pTableNd;
const SwTextNode& rTextNd = pFormatField->GetTextField()->GetTextNode();
if( !rTextNd.GetNodes().IsDocNodes() ||
- 0 == ( pTableNd = rTextNd.FindTableNode() ) )
+ nullptr == ( pTableNd = rTextNd.FindTableNode() ) )
continue;
switch( pUpdateField->m_eFlags )
@@ -655,7 +655,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
sal_uInt32 nMaxItems = m_rDoc.GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
for (sal_uInt32 i = 0; i < nMaxItems; ++i)
{
- if( 0 != (pItem = m_rDoc.GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
+ if( nullptr != (pItem = m_rDoc.GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
static_cast<const SwTableBoxFormula*>(pItem)->GetDefinedIn() )
{
const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->ChangeState( pHt );
@@ -667,7 +667,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
TBL_CALC != static_cast<SwTableFormulaUpdate*>(pHt)->m_eFlags ))
return ;
- SwCalc* pCalc = 0;
+ SwCalc* pCalc = nullptr;
if( pFieldType )
{
@@ -704,7 +704,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
// get the values of all SetExpression fields that are valid
// until the table
- SwFrm* pFrm = 0;
+ SwFrm* pFrm = nullptr;
if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() )
{
// is in the special section, that's expensive!
@@ -718,7 +718,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
aPos.nNode, pFormatField->GetTextField(),
&aPos.nContent ));
else
- pFrm = 0;
+ pFrm = nullptr;
}
}
if( !pFrm )
@@ -743,14 +743,14 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
}
pCalc->SetCalcError( CALC_NOERR );
}
- pFormatField->ModifyNotification( 0, pHt );
+ pFormatField->ModifyNotification( nullptr, pHt );
}
}
// calculate the formula at the boxes
for (sal_uInt32 i = 0; i < nMaxItems; ++i )
{
- if( 0 != (pItem = m_rDoc.GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
+ if( nullptr != (pItem = m_rDoc.GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
static_cast<const SwTableBoxFormula*>(pItem)->GetDefinedIn() &&
!static_cast<const SwTableBoxFormula*>(pItem)->IsValid() )
{
@@ -769,7 +769,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
// get the values of all SetExpression fields that are valid
// until the table
- SwFrm* pFrm = 0;
+ SwFrm* pFrm = nullptr;
if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() )
{
// is in the special section, that's expensive!
@@ -779,13 +779,13 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
if( !pCNd )
pCNd = m_rDoc.GetNodes().GoNext( &aCNdIdx );
- if( pCNd && 0 != (pFrm = pCNd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) )
+ if( pCNd && nullptr != (pFrm = pCNd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) )
{
SwPosition aPos( *pCNd );
if( GetBodyTextNode( m_rDoc, aPos, *pFrm ) )
FieldsToCalc( *pCalc, _SetGetExpField( aPos.nNode ));
else
- pFrm = 0;
+ pFrm = nullptr;
}
}
if( !pFrm )
@@ -843,7 +843,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
if( mpUpdateFields->GetSortLst()->empty() )
{
if( bUpdRefFields )
- UpdateRefFields(NULL);
+ UpdateRefFields(nullptr);
mpUpdateFields->SetInUpdateFields( bOldInUpdateFields );
mpUpdateFields->SetFieldsDirty( false );
@@ -883,7 +883,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
}
break;
case RES_SETEXPFLD:
- const_cast<SwSetExpFieldType*>(static_cast<const SwSetExpFieldType*>(pFieldType))->SetOutlineChgNd( 0 );
+ const_cast<SwSetExpFieldType*>(static_cast<const SwSetExpFieldType*>(pFieldType))->SetOutlineChgNd( nullptr );
break;
}
}
@@ -1106,7 +1106,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
SwSetExpFieldType* pSFieldTyp = static_cast<SwSetExpFieldType*>(pField->GetTyp());
aNew = pSFieldTyp->GetName();
- SwNode* pSeqNd = 0;
+ SwNode* pSeqNd = nullptr;
if( pSField->IsSequenceField() )
{
@@ -1144,7 +1144,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
}
} // switch
- pFormatField->ModifyNotification( 0, 0 ); // trigger formatting
+ pFormatField->ModifyNotification( nullptr, nullptr ); // trigger formatting
if( pUpdateField == pTextField ) // if only &m_rDoc one is updated
{
@@ -1152,7 +1152,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
RES_HIDDENTXTFLD == nWhich || // HiddenText?
RES_HIDDENPARAFLD == nWhich) // HiddenParaField?
break; // quit
- pUpdateField = 0; // update all from here on
+ pUpdateField = nullptr; // update all from here on
}
}
@@ -1164,7 +1164,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
// update reference fields
if( bUpdRefFields )
- UpdateRefFields(NULL);
+ UpdateRefFields(nullptr);
mpUpdateFields->SetInUpdateFields( bOldInUpdateFields );
mpUpdateFields->SetFieldsDirty( false );
@@ -1173,7 +1173,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp
/// Insert field type that was marked as deleted
void DocumentFieldsManager::UpdateUsrFields()
{
- SwCalc* pCalc = 0;
+ SwCalc* pCalc = nullptr;
for( SwFieldTypes::size_type i = INIT_FLDTYPES; i < mpFieldTypes->size(); ++i )
{
const SwFieldType* pFieldType;
@@ -1203,10 +1203,10 @@ void DocumentFieldsManager::UpdatePageFields( SfxPoolItem* pMsgHint )
case RES_CHAPTERFLD:
case RES_GETEXPFLD:
case RES_REFPAGEGETFLD:
- pFieldType->ModifyNotification( 0, pMsgHint );
+ pFieldType->ModifyNotification( nullptr, pMsgHint );
break;
case RES_DOCSTATFLD:
- pFieldType->ModifyNotification( 0, 0 );
+ pFieldType->ModifyNotification( nullptr, nullptr );
break;
}
}
@@ -1376,7 +1376,7 @@ void DocumentFieldsManager::SetFixFields( bool bOnlyTimeDate, const DateTime* pN
// Trigger formatting
if( bChgd )
- pFormatField->ModifyNotification( 0, 0 );
+ pFormatField->ModifyNotification( nullptr, nullptr );
}
}
}
@@ -1541,16 +1541,16 @@ SwField * DocumentFieldsManager::GetFieldAtPos(const SwPosition & rPos)
{
SwTextField * const pAttr = GetTextFieldAtPos(rPos);
- return (pAttr) ? const_cast<SwField *>( pAttr->GetFormatField().GetField() ) : 0;
+ return (pAttr) ? const_cast<SwField *>( pAttr->GetFormatField().GetField() ) : nullptr;
}
SwTextField * DocumentFieldsManager::GetTextFieldAtPos(const SwPosition & rPos)
{
SwTextNode * const pNode = rPos.nNode.GetNode().GetTextNode();
- return (pNode != NULL)
+ return (pNode != nullptr)
? pNode->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true )
- : 0;
+ : nullptr;
}
/// @note For simplicity assume that all field types have updatable contents so
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index fe7313af3b9a..a20c75f41d9a 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -47,8 +47,8 @@ namespace sw
DocumentLayoutManager::DocumentLayoutManager( SwDoc& i_rSwdoc ) :
m_rDoc( i_rSwdoc ),
- mpCurrentView( 0 ),
- mpLayouter( 0 )
+ mpCurrentView( nullptr ),
+ mpLayouter( nullptr )
{
}
@@ -72,20 +72,20 @@ const SwRootFrm *DocumentLayoutManager::GetCurrentLayout() const
{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
- return 0;
+ return nullptr;
}
SwRootFrm *DocumentLayoutManager::GetCurrentLayout()
{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
- return 0;
+ return nullptr;
}
bool DocumentLayoutManager::HasLayout() const
{
// if there is a view, there is always a layout
- return (mpCurrentView != 0);
+ return (mpCurrentView != nullptr);
}
SwLayouter* DocumentLayoutManager::GetLayouter()
@@ -109,7 +109,7 @@ void DocumentLayoutManager::SetLayouter( SwLayouter* pNew )
If there already is a fitting format, it is returned instead. */
SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, const SfxItemSet* pSet )
{
- SwFrameFormat *pFormat = 0;
+ SwFrameFormat *pFormat = nullptr;
const bool bMod = m_rDoc.getIDocumentState().IsModified();
bool bHeader = false;
@@ -210,7 +210,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
m_rDoc.SetAttr( aChain, *rChain.GetNext() );
}
- const SwNodeIndex* pCntIdx = 0;
+ const SwNodeIndex* pCntIdx = nullptr;
// The draw format doesn't own its content, it just has a pointer to it.
if (pFormat->Which() != RES_DRAWFRMFMT)
pCntIdx = pFormat->GetContent().GetContentIdx();
@@ -254,7 +254,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
if ( nWh == RES_FLYFRMFMT )
{
// determine frame formats of at-frame anchored objects
- const SwNodeIndex* pContentIdx = 0;
+ const SwNodeIndex* pContentIdx = nullptr;
if (pFormat->Which() != RES_DRAWFRMFMT)
pContentIdx = pFormat->GetContent().GetContentIdx();
if (pContentIdx)
@@ -292,7 +292,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
if( pCntIdx )
{
SwNode *pNode = &pCntIdx->GetNode();
- const_cast<SwFormatContent&>(static_cast<const SwFormatContent&>(pFormat->GetFormatAttr( RES_CNTNT ))).SetNewContentIdx( 0 );
+ const_cast<SwFormatContent&>(static_cast<const SwFormatContent&>(pFormat->GetFormatAttr( RES_CNTNT ))).SetNewContentIdx( nullptr );
m_rDoc.getIDocumentContentOperations().DeleteSection( pNode );
}
@@ -358,14 +358,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
(FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
rNewAnchor.GetContentAnchor() &&
m_rDoc.IsInHeaderFooter( rNewAnchor.GetContentAnchor()->nNode ) &&
- pDrawContact != NULL &&
- pDrawContact->GetMaster() != NULL &&
+ pDrawContact != nullptr &&
+ pDrawContact->GetMaster() != nullptr &&
CheckControlLayer( pDrawContact->GetMaster() );
}
// just return if we can't copy this
if( bMayNotCopy )
- return NULL;
+ return nullptr;
SwFrameFormat* pDest = m_rDoc.GetDfltFrameFormat();
if( rSource.GetRegisteredIn() != pSrcDoc->GetDfltFrameFormat() )
@@ -444,7 +444,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
//contact object itself. They should be managed by SwUndoInsLayFormat.
const ::sw::DrawUndoGuard drawUndoGuard(m_rDoc.GetIDocumentUndoRedo());
- pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aIdx, NULL, false, true, true );
+ pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aIdx, nullptr, false, true, true );
}
else
{
@@ -530,7 +530,7 @@ void DocumentLayoutManager::ClearSwLayouterEntries()
DocumentLayoutManager::~DocumentLayoutManager()
{
delete mpLayouter;
- mpLayouter = 0L;
+ mpLayouter = nullptr;
}
}
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index 84d346b71d07..3e4552badd7b 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -58,7 +58,7 @@ namespace
SwSectionNode* pSectNd;
explicit _FindItem(const OUString& rS)
- : m_Item(rS), pTableNd(0), pSectNd(0)
+ : m_Item(rS), pTableNd(nullptr), pSectNd(nullptr)
{}
};
@@ -75,7 +75,7 @@ namespace
tools::SvRef<sfx2::SvBaseLink> xLink = pLnk;
OUString sFName;
- sfx2::LinkManager::GetDisplayNames( xLink, 0, &sFName );
+ sfx2::LinkManager::GetDisplayNames( xLink, nullptr, &sFName );
INetURLObject aURL( sFName );
if( INetProtocol::File == aURL.GetProtocol() ||
@@ -83,7 +83,7 @@ namespace
return pLnk;
}
}
- return 0;
+ return nullptr;
}
@@ -106,7 +106,7 @@ namespace
}
}
}
- return NULL;
+ return nullptr;
}
@@ -125,7 +125,7 @@ namespace
{
// found, so get the data
const SwNodeIndex* pIdx;
- if( 0 != (pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
+ if( nullptr != (pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
&pSectFormat->GetDoc()->GetNodes() == &pIdx->GetNodes() )
{
// a table in the normal NodesArr
@@ -146,8 +146,8 @@ namespace
{
SwTable* pTmpTable;
SwTableBox* pFBox;
- if( 0 != ( pTmpTable = SwTable::FindTable( pTableFormat ) ) &&
- 0 != ( pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
+ if( nullptr != ( pTmpTable = SwTable::FindTable( pTableFormat ) ) &&
+ nullptr != ( pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
pFBox->GetSttNd() &&
&pTableFormat->GetDoc()->GetNodes() == &pFBox->GetSttNd()->GetNodes() )
{
@@ -170,7 +170,7 @@ namespace sw
DocumentLinksAdministrationManager::DocumentLinksAdministrationManager( SwDoc& i_rSwdoc ) : mbVisibleLinks(true),
mbLinksUpdated( false ), //#i38810#
- mpLinkMgr( new sfx2::LinkManager( 0 ) ),
+ mpLinkMgr( new sfx2::LinkManager( nullptr ) ),
m_rDoc( i_rSwdoc )
{
}
@@ -231,8 +231,8 @@ void DocumentLinksAdministrationManager::UpdateLinks( bool bUI )
if( bUpdate && (bUI || !bAskUpdate) )
{
SfxMedium* pMedium = m_rDoc.GetDocShell()->GetMedium();
- SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : 0;
- vcl::Window* pDlgParent = pFrm ? &pFrm->GetWindow() : 0;
+ SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : nullptr;
+ vcl::Window* pDlgParent = pFrm ? &pFrm->GetWindow() : nullptr;
GetLinkManager().UpdateAllLinks( bAskUpdate, true, false, pDlgParent );
}
@@ -327,7 +327,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
::sfx2::SvLinkSource* DocumentLinksAdministrationManager::CreateLinkSource(const OUString& rItem)
{
- SwServerObject* pObj = NULL;
+ SwServerObject* pObj = nullptr;
// search for bookmarks and sections case sensitive at first. If nothing is found then try again case insensitive
bool bCaseSensitive = true;
@@ -336,7 +336,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
// bookmarks
::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*m_rDoc.getIDocumentMarkAccess(), rItem, bCaseSensitive);
if(pBkmk && pBkmk->IsExpanded()
- && (0 == (pObj = pBkmk->GetRefObject())))
+ && (nullptr == (pObj = pBkmk->GetRefObject())))
{
// mark found, but no link yet -> create hotlink
pObj = new SwServerObject(*pBkmk);
@@ -355,7 +355,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
}
if(aPara.pSectNd
- && (0 == (pObj = aPara.pSectNd->GetSection().GetObject())))
+ && (nullptr == (pObj = aPara.pSectNd->GetSection().GetObject())))
{
// section found, but no link yet -> create hotlink
pObj = new SwServerObject( *aPara.pSectNd );
@@ -377,7 +377,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
break;
}
if(aPara.pTableNd
- && (0 == (pObj = aPara.pTableNd->GetTable().GetObject())))
+ && (nullptr == (pObj = aPara.pTableNd->GetTable().GetObject())))
{
// table found, but no link yet -> create hotlink
pObj = new SwServerObject(*aPara.pTableNd);
@@ -397,8 +397,8 @@ bool DocumentLinksAdministrationManager::EmbedAllLinks()
{
::sw::UndoGuard const undoGuard(m_rDoc.GetIDocumentUndoRedo());
- ::sfx2::SvBaseLink* pLnk = 0;
- while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks ) ) )
+ ::sfx2::SvBaseLink* pLnk = nullptr;
+ while( nullptr != (pLnk = lcl_FindNextRemovableLink( rLinks ) ) )
{
tools::SvRef<sfx2::SvBaseLink> xLink = pLnk;
// Tell the link that it's being destroyed!
@@ -435,8 +435,8 @@ DocumentLinksAdministrationManager::~DocumentLinksAdministrationManager()
bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr, SwPaM*& rpPam, SwNodeRange*& rpRange ) const
{
// Do we actually have the Item?
- rpPam = 0;
- rpRange = 0;
+ rpPam = nullptr;
+ rpRange = nullptr;
OUString sItem( INetURLObject::decode( rStr,
INetURLObject::DECODE_WITH_CHARSET ));
@@ -477,7 +477,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
SwNode* pNd;
const SwFlyFrameFormat* pFlyFormat = m_rDoc.FindFlyByName( sName );
if( pFlyFormat &&
- 0 != ( pIdx = const_cast<SwNodeIndex*>(pFlyFormat->GetContent().GetContentIdx()) ) &&
+ nullptr != ( pIdx = const_cast<SwNodeIndex*>(pFlyFormat->GetContent().GetContentIdx()) ) &&
!( pNd = &pIdx->GetNode())->IsNoTextNode() )
{
rpRange = new SwNodeRange( *pNd, 1, *pNd->EndOfSectionNode() );
diff --git a/sw/source/core/doc/DocumentListItemsManager.cxx b/sw/source/core/doc/DocumentListItemsManager.cxx
index e095651fd7b7..7e95b174958e 100644
--- a/sw/source/core/doc/DocumentListItemsManager.cxx
+++ b/sw/source/core/doc/DocumentListItemsManager.cxx
@@ -37,7 +37,7 @@ bool DocumentListItemsManager::lessThanNodeNum::operator()( const SwNodeNum* pNo
void DocumentListItemsManager::addListItem( const SwNodeNum& rNodeNum )
{
- if ( mpListItemsList == 0 )
+ if ( mpListItemsList == nullptr )
{
return;
}
@@ -54,7 +54,7 @@ void DocumentListItemsManager::addListItem( const SwNodeNum& rNodeNum )
void DocumentListItemsManager::removeListItem( const SwNodeNum& rNodeNum )
{
- if ( mpListItemsList == 0 )
+ if ( mpListItemsList == nullptr )
{
return;
}
@@ -98,7 +98,7 @@ DocumentListItemsManager::~DocumentListItemsManager()
{
// #i83479#
delete mpListItemsList;
-mpListItemsList = 0;
+mpListItemsList = nullptr;
}
diff --git a/sw/source/core/doc/DocumentListsManager.cxx b/sw/source/core/doc/DocumentListsManager.cxx
index 7bbede1c3a06..dfd9a260f2e1 100644
--- a/sw/source/core/doc/DocumentListsManager.cxx
+++ b/sw/source/core/doc/DocumentListsManager.cxx
@@ -43,14 +43,14 @@ SwList* DocumentListsManager::createList( const OUString& rListId,
if ( getListByName( sListId ) )
{
OSL_FAIL( "<DocumentListsManager::createList(..)> - provided list id already used. Serious defect." );
- return 0;
+ return nullptr;
}
SwNumRule* pDefaultNumRuleForNewList = m_rDoc.FindNumRulePtr( sDefaultListStyleName );
if ( !pDefaultNumRuleForNewList )
{
OSL_FAIL( "<DocumentListsManager::createList(..)> - for provided default list style name no list style is found. Serious defect." );
- return 0;
+ return nullptr;
}
SwList* pNewList = new SwList( sListId, *pDefaultNumRuleForNewList, m_rDoc.GetNodes() );
@@ -71,7 +71,7 @@ void DocumentListsManager::deleteList( const OUString& sListId )
SwList* DocumentListsManager::getListByName( const OUString& sListId ) const
{
- SwList* pList = 0;
+ SwList* pList = nullptr;
std::unordered_map< OUString, SwList*, OUStringHash >::const_iterator
aListIter = maLists.find( sListId );
@@ -88,20 +88,20 @@ SwList* DocumentListsManager::createListForListStyle( const OUString& sListStyle
if ( sListStyleName.isEmpty() )
{
OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - no list style name provided. Serious defect." );
- return 0;
+ return nullptr;
}
if ( getListForListStyle( sListStyleName ) )
{
OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect." );
- return 0;
+ return nullptr;
}
SwNumRule* pNumRule = m_rDoc.FindNumRulePtr( sListStyleName );
if ( !pNumRule )
{
OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - for provided list style name no list style is found. Serious defect." );
- return 0;
+ return nullptr;
}
OUString sListId( pNumRule->GetDefaultListId() ); // can be empty String
@@ -118,7 +118,7 @@ SwList* DocumentListsManager::createListForListStyle( const OUString& sListStyle
SwList* DocumentListsManager::getListForListStyle( const OUString& sListStyleName ) const
{
- SwList* pList = 0;
+ SwList* pList = nullptr;
std::unordered_map< OUString, SwList*, OUStringHash >::const_iterator
aListIter = maListStyleLists.find( sListStyleName );
@@ -177,7 +177,7 @@ void DocumentListsManager::trackChangeOfListStyleName( const OUString& sListStyl
OSL_ENSURE( pList,
"<DocumentListsManager::changeOfListStyleName(..)> - misusage of method: no list found for given list style name" );
- if ( pList != 0 )
+ if ( pList != nullptr )
{
maListStyleLists.erase( sListStyleName );
maListStyleLists[sNewListStyleName] = pList;
@@ -218,7 +218,7 @@ const OUString DocumentListsManager::MakeListIdUnique( const OUString& aSuggeste
const OUString DocumentListsManager::CreateUniqueListId()
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
{
static sal_Int64 nIdCounter = SAL_CONST_INT64(7000000000);
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index f25ab085a1fe..e9988c7606db 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -48,7 +48,7 @@ using namespace com::sun::star;
== pPos->nContent.GetIdxReg());
SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode();
- if( pTextNode == NULL )
+ if( pTextNode == nullptr )
{
assert(pPos->nContent == 0);
}
@@ -79,7 +79,7 @@ using namespace com::sun::star;
{
// check for empty redlines
OSL_ENSURE( ( *(rTable[j]->GetPoint()) != *(rTable[j]->GetMark()) ) ||
- ( rTable[j]->GetContentIdx() != NULL ),
+ ( rTable[j]->GetContentIdx() != nullptr ),
_ERROR_PREFIX "empty redline" );
}
@@ -117,18 +117,18 @@ namespace
const SwContentNode* pCNd;
return 0 == rPos2.nContent.GetIndex() &&
rPos2.nNode.GetIndex() - 1 == rPos1.nNode.GetIndex() &&
- 0 != ( pCNd = rPos1.nNode.GetNode().GetContentNode() ) &&
+ nullptr != ( pCNd = rPos1.nNode.GetNode().GetContentNode() ) &&
rPos1.nContent.GetIndex() == pCNd->Len();
}
static bool lcl_AcceptRedline( SwRedlineTable& rArr, sal_uInt16& rPos,
bool bCallDelete,
- const SwPosition* pSttRng = 0,
- const SwPosition* pEndRng = 0 )
+ const SwPosition* pSttRng = nullptr,
+ const SwPosition* pEndRng = nullptr )
{
bool bRet = true;
SwRangeRedline* pRedl = rArr[ rPos ];
- SwPosition *pRStt = 0, *pREnd = 0;
+ SwPosition *pRStt = nullptr, *pREnd = nullptr;
SwComparePosition eCmp = POS_OUTSIDE;
if( pSttRng && pEndRng )
{
@@ -194,7 +194,7 @@ namespace
case nsRedlineType_t::REDLINE_DELETE:
{
SwDoc& rDoc = *pRedl->GetDoc();
- const SwPosition *pDelStt = 0, *pDelEnd = 0;
+ const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
bool bDelRedl = false;
switch( eCmp )
{
@@ -257,8 +257,8 @@ namespace
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound().nContent.Assign( 0, 0 );
- aPam.GetBound( false ).nContent.Assign( 0, 0 );
+ aPam.GetBound().nContent.Assign( nullptr, 0 );
+ aPam.GetBound( false ).nContent.Assign( nullptr, 0 );
aPam.DeleteMark();
rDoc.getIDocumentContentOperations().DelFullPara( aPam );
}
@@ -282,12 +282,12 @@ namespace
static bool lcl_RejectRedline( SwRedlineTable& rArr, sal_uInt16& rPos,
bool bCallDelete,
- const SwPosition* pSttRng = 0,
- const SwPosition* pEndRng = 0 )
+ const SwPosition* pSttRng = nullptr,
+ const SwPosition* pEndRng = nullptr )
{
bool bRet = true;
SwRangeRedline* pRedl = rArr[ rPos ];
- SwPosition *pRStt = 0, *pREnd = 0;
+ SwPosition *pRStt = nullptr, *pREnd = nullptr;
SwComparePosition eCmp = POS_OUTSIDE;
if( pSttRng && pEndRng )
{
@@ -303,7 +303,7 @@ namespace
case nsRedlineType_t::REDLINE_INSERT:
{
SwDoc& rDoc = *pRedl->GetDoc();
- const SwPosition *pDelStt = 0, *pDelEnd = 0;
+ const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
bool bDelRedl = false;
switch( eCmp )
{
@@ -367,8 +367,8 @@ namespace
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound().nContent.Assign( 0, 0 );
- aPam.GetBound( false ).nContent.Assign( 0, 0 );
+ aPam.GetBound().nContent.Assign( nullptr, 0 );
+ aPam.GetBound( false ).nContent.Assign( nullptr, 0 );
aPam.DeleteMark();
rDoc.getIDocumentContentOperations().DelFullPara( aPam );
}
@@ -381,7 +381,7 @@ namespace
break;
case nsRedlineType_t::REDLINE_DELETE:
{
- SwRangeRedline* pNew = 0;
+ SwRangeRedline* pNew = nullptr;
bool bCheck = false, bReplace = false;
switch( eCmp )
@@ -517,7 +517,7 @@ namespace
{
if( *pTmp->End() <= *pEnd )
{
- if( (*fn_AcceptReject)( rArr, n, bCallDelete, 0, 0 ))
+ if( (*fn_AcceptReject)( rArr, n, bCallDelete, nullptr, nullptr ))
nCount++;
}
else
@@ -547,7 +547,7 @@ namespace
if( !pStt->nContent.GetIndex() &&
!pDoc->GetNodes()[ pStt->nNode.GetIndex() - 1 ]->IsContentNode() )
{
- const SwRangeRedline* pRedl = pDoc->getIDocumentRedlineAccess().GetRedline( *pStt, 0 );
+ const SwRangeRedline* pRedl = pDoc->getIDocumentRedlineAccess().GetRedline( *pStt, nullptr );
if( pRedl )
{
const SwPosition* pRStt = pRedl->Start();
@@ -560,7 +560,7 @@ namespace
!pDoc->GetNodes()[ pEnd->nNode.GetIndex() + 1 ]->IsContentNode() &&
pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetContentNode()->Len() )
{
- const SwRangeRedline* pRedl = pDoc->getIDocumentRedlineAccess().GetRedline( *pEnd, 0 );
+ const SwRangeRedline* pRedl = pDoc->getIDocumentRedlineAccess().GetRedline( *pEnd, nullptr );
if( pRedl )
{
const SwPosition* pREnd = pRedl->End();
@@ -579,7 +579,7 @@ DocumentRedlineManager::DocumentRedlineManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rS
meRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)),
mpRedlineTable( new SwRedlineTable ),
mpExtraRedlineTable ( new SwExtraRedlineTable ),
- mpAutoFormatRedlnComment( 0 ),
+ mpAutoFormatRedlnComment( nullptr ),
mbIsRedlineMove(false),
mbReadlineChecked(false),
mnAutoFormatRedlnCommentNo( 0 )
@@ -601,7 +601,7 @@ void DocumentRedlineManager::SetRedlineMode( RedlineMode_t eMode )
bool bSaveInXMLImportFlag = m_rDoc.IsInXMLImport();
m_rDoc.SetInXMLImport( false );
// and then hide/display everything
- void (SwRangeRedline::*pFnc)(sal_uInt16, size_t) = 0;
+ void (SwRangeRedline::*pFnc)(sal_uInt16, size_t) = nullptr;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eMode )
{
@@ -754,7 +754,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
: pNewRedl->GetPoint();
{
SwTextNode* pTextNode = pStt->nNode.GetNode().GetTextNode();
- if( pTextNode == NULL )
+ if( pTextNode == nullptr )
{
if( pStt->nContent > 0 )
{
@@ -771,7 +771,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
}
}
pTextNode = pEnd->nNode.GetNode().GetTextNode();
- if( pTextNode == NULL )
+ if( pTextNode == nullptr )
{
if( pEnd->nContent > 0 )
{
@@ -789,7 +789,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
}
}
if( ( *pStt == *pEnd ) &&
- ( pNewRedl->GetContentIdx() == NULL ) )
+ ( pNewRedl->GetContentIdx() == nullptr ) )
{ // Do not insert empty redlines
delete pNewRedl;
return false;
@@ -812,7 +812,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
// #i8518# remove empty redlines while we're at it
if( ( *pRStt == *pREnd ) &&
- ( pRedl->GetContentIdx() == NULL ) )
+ ( pRedl->GetContentIdx() == nullptr ) )
{
mpRedlineTable->DeleteAndDestroy(n);
continue;
@@ -878,14 +878,14 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
{
*pStt = *pREnd;
if( ( *pStt == *pEnd ) &&
- ( pNewRedl->GetContentIdx() == NULL ) )
+ ( pNewRedl->GetContentIdx() == nullptr ) )
bDelete = true;
}
else if( POS_OVERLAP_BEFORE == eCmpPos )
{
*pEnd = *pRStt;
if( ( *pStt == *pEnd ) &&
- ( pNewRedl->GetContentIdx() == NULL ) )
+ ( pNewRedl->GetContentIdx() == nullptr ) )
bDelete = true;
}
else if( POS_INSIDE == eCmpPos || POS_EQUAL == eCmpPos)
@@ -893,7 +893,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
if( bDelete )
{
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
bCompress = true;
}
}
@@ -908,7 +908,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
}
pRedl->SetEnd( *pStt, pREnd );
if( ( *pStt == *pRStt ) &&
- ( pRedl->GetContentIdx() == NULL ) )
+ ( pRedl->GetContentIdx() == nullptr ) )
{
mpRedlineTable->DeleteAndDestroy( n );
bDec = true;
@@ -931,10 +931,10 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
pSplit->SetEnd( *pRStt );
pNewRedl->SetStart( *pREnd );
mpRedlineTable->Insert( pSplit );
- if( *pStt == *pEnd && pNewRedl->GetContentIdx() == NULL )
+ if( *pStt == *pEnd && pNewRedl->GetContentIdx() == nullptr )
{
delete pNewRedl;
- pNewRedl = 0;
+ pNewRedl = nullptr;
bCompress = true;
}
}
@@ -948,10 +948,10 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
// handle overlapping redlines in broken documents
*pEnd = *pRStt;
if( ( *pStt == *pEnd ) &&
- ( pNewRedl->GetContentIdx() == NULL ) )
+ ( pNewRedl->GetContentIdx() == nullptr ) )
{
delete pNewRedl;
- pNewRedl = 0;
+ pNewRedl = nullptr;
bCompress = true;
}
}
@@ -968,7 +968,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
}
pRedl->SetEnd( *pStt, pREnd );
if( ( *pStt == *pRStt ) &&
- ( pRedl->GetContentIdx() == NULL ) )
+ ( pRedl->GetContentIdx() == nullptr ) )
{
mpRedlineTable->DeleteAndDestroy( n );
bDec = true;
@@ -991,10 +991,10 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
pSplit->SetEnd( *pRStt );
pNewRedl->SetStart( *pREnd );
mpRedlineTable->Insert( pSplit );
- if( *pStt == *pEnd && pNewRedl->GetContentIdx() == NULL )
+ if( *pStt == *pEnd && pNewRedl->GetContentIdx() == nullptr )
{
delete pNewRedl;
- pNewRedl = 0;
+ pNewRedl = nullptr;
bCompress = true;
}
}
@@ -1023,7 +1023,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
case POS_OVERLAP_BEHIND:
pRedl->SetEnd( *pStt, pREnd );
- if( *pStt == *pRStt && pRedl->GetContentIdx() == NULL )
+ if( *pStt == *pRStt && pRedl->GetContentIdx() == nullptr )
{
mpRedlineTable->DeleteAndDestroy( n );
bDec = true;
@@ -1048,7 +1048,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
SwRangeRedline* pNew = new SwRangeRedline( *pRedl );
pNew->SetStart( *pEnd );
pRedl->SetEnd( *pStt, pREnd );
- if( *pStt == *pRStt && pRedl->GetContentIdx() == NULL )
+ if( *pStt == *pRStt && pRedl->GetContentIdx() == nullptr )
mpRedlineTable->DeleteAndDestroy( n );
AppendRedline( pNew, bCallDelete );
n = 0; // re-initialize
@@ -1093,7 +1093,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
case POS_INSIDE:
case POS_EQUAL:
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
bCompress = true;
break;
@@ -1211,7 +1211,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
bCompress = true;
}
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
break;
case POS_OUTSIDE:
@@ -1225,7 +1225,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
mpRedlineTable->Insert( pNewRedl );
m_rDoc.getIDocumentContentOperations().DeleteAndJoin( *pRedl );
if( !mpRedlineTable->Remove( pNewRedl ) )
- pNewRedl = 0;
+ pNewRedl = nullptr;
}
delete pRedl;
}
@@ -1252,7 +1252,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
mpRedlineTable->Insert( pNewRedl );
m_rDoc.getIDocumentContentOperations().DeleteAndJoin( aPam );
if( !mpRedlineTable->Remove( pNewRedl ) )
- pNewRedl = 0;
+ pNewRedl = nullptr;
n = 0; // re-initialize
}
bDec = true;
@@ -1278,7 +1278,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
mpRedlineTable->Insert( pNewRedl );
m_rDoc.getIDocumentContentOperations().DeleteAndJoin( aPam );
if( !mpRedlineTable->Remove( pNewRedl ) )
- pNewRedl = 0;
+ pNewRedl = nullptr;
n = 0; // re-initialize
bDec = true;
}
@@ -1296,14 +1296,14 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
// two. In this case, pRedl will be changed to cover
// only part of it's former range, and pNew will cover
// the remainder.
- SwRangeRedline* pNew = 0;
+ SwRangeRedline* pNew = nullptr;
switch( eCmpPos )
{
case POS_EQUAL:
{
pRedl->PushData( *pNewRedl );
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
if( IsHideChanges( meRedlineMode ))
{
pRedl->Hide(0, mpRedlineTable->GetPos(pRedl));
@@ -1475,7 +1475,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
pNew->SetStart( *pEnd );
pRedl->SetEnd( *pStt, pREnd );
if( ( *pStt == *pRStt ) &&
- ( pRedl->GetContentIdx() == NULL ) )
+ ( pRedl->GetContentIdx() == nullptr ) )
mpRedlineTable->DeleteAndDestroy( n );
AppendRedline( pNew, bCallDelete );
n = 0; // re-initialize
@@ -1511,7 +1511,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
case POS_EQUAL:
case POS_INSIDE:
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
break;
case POS_OUTSIDE:
@@ -1553,7 +1553,7 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
if( pRedl->IsOwnRedline( *pNewRedl ) &&
pRedl->CanCombine( *pNewRedl ))
// own one can be ignored completely
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
else if( *pREnd == *pEnd )
// or else only shorten the current one
@@ -1646,10 +1646,10 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
if( pNewRedl )
{
if( ( *pStt == *pEnd ) &&
- ( pNewRedl->GetContentIdx() == NULL ) )
+ ( pNewRedl->GetContentIdx() == nullptr ) )
{ // Do not insert empty redlines
delete pNewRedl;
- pNewRedl = 0;
+ pNewRedl = nullptr;
}
else
mpRedlineTable->Insert( pNewRedl );
@@ -1669,11 +1669,11 @@ bool DocumentRedlineManager::AppendRedline( SwRangeRedline* pNewRedl, bool bCall
m_rDoc.getIDocumentContentOperations().DeleteAndJoin( *pNewRedl );
meRedlineMode = eOld;
}
- delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = nullptr;
}
_CHECK_REDLINE( *this )
- return ( 0 != pNewRedl ) || bMerged;
+ return ( nullptr != pNewRedl ) || bMerged;
}
bool DocumentRedlineManager::AppendTableRowRedline( SwTableRowRedline* pNewRedl, bool bCallDelete )
@@ -1718,7 +1718,7 @@ bool DocumentRedlineManager::AppendTableRowRedline( SwTableRowRedline* pNewRedl,
_CHECK_REDLINE( this )
*/
- return ( 0 != pNewRedl ) || bMerged;
+ return ( nullptr != pNewRedl ) || bMerged;
}
bool DocumentRedlineManager::AppendTableCellRedline( SwTableCellRedline* pNewRedl, bool bCallDelete )
@@ -1763,14 +1763,14 @@ bool DocumentRedlineManager::AppendTableCellRedline( SwTableCellRedline* pNewRed
_CHECK_REDLINE( this )
*/
- return ( 0 != pNewRedl ) || bMerged;
+ return ( nullptr != pNewRedl ) || bMerged;
}
void DocumentRedlineManager::CompressRedlines()
{
_CHECK_REDLINE( *this )
- void (SwRangeRedline::*pFnc)(sal_uInt16, size_t) = 0;
+ void (SwRangeRedline::*pFnc)(sal_uInt16, size_t) = nullptr;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode )
{
case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE:
@@ -1836,7 +1836,7 @@ bool DocumentRedlineManager::SplitRedline( const SwPaM& rRange )
if (*pEnd == *pRedlineEnd)
nn += 2;
- SwRangeRedline* pNew = 0;
+ SwRangeRedline* pNew = nullptr;
switch( nn )
{
case 0:
@@ -1961,7 +1961,7 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
pCpy->SetStart( *pEnd );
}
else
- pCpy = 0;
+ pCpy = nullptr;
pRedl->SetEnd( *pStt, pREnd );
if( !pRedl->HasValidRange() )
{
@@ -2079,7 +2079,7 @@ const SwRangeRedline* DocumentRedlineManager::GetRedline( const SwPosition& rPos
{
if( pFndPos )
*pFndPos = nU;
- return 0;
+ return nullptr;
}
else
nO = nM - 1;
@@ -2087,7 +2087,7 @@ const SwRangeRedline* DocumentRedlineManager::GetRedline( const SwPosition& rPos
}
if( pFndPos )
*pFndPos = nU;
- return 0;
+ return nullptr;
// #TODO - add 'SwExtraRedlineTable' also ?
}
@@ -2152,7 +2152,7 @@ bool DocumentRedlineManager::AcceptRedline( sal_uInt16 nPos, bool bCallDelete )
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
}
return bRet;
@@ -2175,7 +2175,7 @@ bool DocumentRedlineManager::AcceptRedline( const SwPaM& rPam, bool bCallDelete
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_ACCEPT_REDLINE, NULL );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_ACCEPT_REDLINE, nullptr );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( new SwUndoAcceptRedline( aPam ));
}
@@ -2266,7 +2266,7 @@ bool DocumentRedlineManager::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
}
return bRet;
@@ -2289,7 +2289,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_REJECT_REDLINE, NULL );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_REJECT_REDLINE, nullptr );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( new SwUndoRejectRedline(aPam) );
}
@@ -2343,7 +2343,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons
SwContentNode* pCNd = SwNodes::GoPrevSection( &aTmp );
if( !pCNd || ( aTmp == rSttPos.nNode &&
pCNd->Len() == rSttPos.nContent.GetIndex() ))
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
rSttPos = *pFnd->End();
@@ -2362,7 +2362,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons
break;
}
else
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
@@ -2397,24 +2397,24 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons
SwContentNode* pCNd;
SwNodeIndex* pIdx = &rPam.GetMark()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = m_rDoc.GetNodes().GoNextSection( pIdx )) )
+ nullptr != ( pCNd = m_rDoc.GetNodes().GoNextSection( pIdx )) )
{
if( *pIdx <= rPam.GetPoint()->nNode )
rPam.GetMark()->nContent.Assign( pCNd, 0 );
else
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
{
pIdx = &rPam.GetPoint()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = SwNodes::GoPrevSection( pIdx )) )
+ nullptr != ( pCNd = SwNodes::GoPrevSection( pIdx )) )
{
if( *pIdx >= rPam.GetMark()->nNode )
rPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
else
- pFnd = 0;
+ pFnd = nullptr;
}
}
@@ -2430,7 +2430,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons
rPam.DeleteMark();
*rPam.GetPoint() = aSavePos;
}
- pFnd = 0;
+ pFnd = nullptr;
}
}
} while( bRestart );
@@ -2462,7 +2462,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons
SwContentNode* pCNd = m_rDoc.GetNodes().GoNextSection( &aTmp );
if( !pCNd || ( aTmp == rSttPos.nNode &&
!rSttPos.nContent.GetIndex() ))
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
rSttPos = *pFnd->Start();
@@ -2480,7 +2480,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons
rSttPos = *pFnd->Start();
}
else
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
@@ -2518,24 +2518,24 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons
SwContentNode* pCNd;
SwNodeIndex* pIdx = &rPam.GetMark()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = SwNodes::GoPrevSection( pIdx )) )
+ nullptr != ( pCNd = SwNodes::GoPrevSection( pIdx )) )
{
if( *pIdx >= rPam.GetPoint()->nNode )
rPam.GetMark()->nContent.Assign( pCNd, pCNd->Len() );
else
- pFnd = 0;
+ pFnd = nullptr;
}
if( pFnd )
{
pIdx = &rPam.GetPoint()->nNode;
if( !pIdx->GetNode().IsContentNode() &&
- 0 != ( pCNd = m_rDoc.GetNodes().GoNextSection( pIdx )) )
+ nullptr != ( pCNd = m_rDoc.GetNodes().GoNextSection( pIdx )) )
{
if( *pIdx <= rPam.GetMark()->nNode )
rPam.GetPoint()->nContent.Assign( pCNd, 0 );
else
- pFnd = 0;
+ pFnd = nullptr;
}
}
@@ -2551,7 +2551,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons
rPam.DeleteMark();
*rPam.GetPoint() = aSavePos;
}
- pFnd = 0;
+ pFnd = nullptr;
}
}
} while( bRestart );
@@ -2634,7 +2634,7 @@ void DocumentRedlineManager::SetRedlinePassword(
/// needs to stay valid!
void DocumentRedlineManager::SetAutoFormatRedlineComment( const OUString* pText, sal_uInt16 nSeqNo )
{
- m_rDoc.SetAutoFormatRedline( 0 != pText );
+ m_rDoc.SetAutoFormatRedline( nullptr != pText );
if( pText )
{
if( !mpAutoFormatRedlnComment )
@@ -2643,7 +2643,7 @@ void DocumentRedlineManager::SetAutoFormatRedlineComment( const OUString* pText,
*mpAutoFormatRedlnComment = *pText;
}
else
- delete mpAutoFormatRedlnComment, mpAutoFormatRedlnComment = 0;
+ delete mpAutoFormatRedlnComment, mpAutoFormatRedlnComment = nullptr;
mnAutoFormatRedlnCommentNo = nSeqNo;
}
@@ -2654,7 +2654,7 @@ void DocumentRedlineManager::checkRedlining(RedlineMode_t& _rReadlineMode)
{
const SwRedlineTable& rRedlineTable = GetRedlineTable();
SwEditShell* pEditShell = m_rDoc.GetEditShell();
- vcl::Window* pParent = pEditShell ? pEditShell->GetWin() : NULL;
+ vcl::Window* pParent = pEditShell ? pEditShell->GetWin() : nullptr;
if ( pParent && !mbReadlineChecked && rRedlineTable.size() > MAX_REDLINE_COUNT
&& !((_rReadlineMode & nsRedlineMode_t::REDLINE_SHOW_DELETE) == nsRedlineMode_t::REDLINE_SHOW_DELETE) )
{
@@ -2672,9 +2672,9 @@ void DocumentRedlineManager::checkRedlining(RedlineMode_t& _rReadlineMode)
DocumentRedlineManager::~DocumentRedlineManager()
{
- delete mpRedlineTable; mpRedlineTable = 0;
- delete mpExtraRedlineTable; mpExtraRedlineTable = 0;
- delete mpAutoFormatRedlnComment; mpAutoFormatRedlnComment = 0;
+ delete mpRedlineTable; mpRedlineTable = nullptr;
+ delete mpExtraRedlineTable; mpExtraRedlineTable = nullptr;
+ delete mpAutoFormatRedlnComment; mpAutoFormatRedlnComment = nullptr;
}
}
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index d2db518c3f5a..67c3f1256f64 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -405,7 +405,7 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo
const css::i18n::ForbiddenCharacters*
sw::DocumentSettingManager::getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const
{
- const css::i18n::ForbiddenCharacters* pRet = 0;
+ const css::i18n::ForbiddenCharacters* pRet = nullptr;
if( mxForbiddenCharsTable.is() )
pRet = mxForbiddenCharsTable->GetForbiddenCharacters( nLang, false );
if( bLocaleData && !pRet && g_pBreakIt )
diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 6318c03d832c..d5c24dd5a8c9 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -234,7 +234,7 @@ IMPL_LINK_TYPED( DocumentStatisticsManager, DoIdleStatsUpdate, Timer *, pTimer,
if (IncrementalDocStatCalculate(32000))
maStatsUpdateTimer.Start();
- SwView* pView = m_rDoc.GetDocShell() ? m_rDoc.GetDocShell()->GetView() : NULL;
+ SwView* pView = m_rDoc.GetDocShell() ? m_rDoc.GetDocShell()->GetView() : nullptr;
if( pView )
pView->UpdateDocStats();
}
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 68844918e9da..005750fbb74a 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1088,12 +1088,12 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
/// exist, create it.
SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
{
- SwFormat *pNewFormat = 0;
- SwFormat *pDeriveFormat = 0;
+ SwFormat *pNewFormat = nullptr;
+ SwFormat *pDeriveFormat = nullptr;
SwFormatsBase* pArray[ 2 ];
sal_uInt16 nArrCnt = 1, nRCId = 0;
- sal_uInt16* pWhichRange = 0;
+ sal_uInt16* pWhichRange = nullptr;
switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
{
@@ -1139,7 +1139,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
default:
// Fault, unknown Format
OSL_ENSURE( nId, "invalid Id" );
- return 0;
+ return nullptr;
}
OSL_ENSURE( nRCId, "invalid Id" );
@@ -1396,7 +1396,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool
nId = RES_POOLPAGE_BEGIN;
}
- SwPageDesc* pNewPgDsc = 0;
+ SwPageDesc* pNewPgDsc = nullptr;
{
const ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr );
const OUString aNm( aResId );
@@ -1404,7 +1404,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool
{
::sw::UndoGuard const undoGuard(m_rDoc.GetIDocumentUndoRedo());
- pNewPgDsc = m_rDoc.MakePageDesc(aNm, 0, bRegardLanguage);
+ pNewPgDsc = m_rDoc.MakePageDesc(aNm, nullptr, bRegardLanguage);
}
pNewPgDsc->SetPoolFormatId( nId );
@@ -1574,14 +1574,14 @@ SwNumRule* DocumentStylePoolManager::GetNumRuleFromPool( sal_uInt16 nId )
ResId aResId( sal_uInt32(RC_POOLNUMRULE_BEGIN + nId - RES_POOLNUMRULE_BEGIN), *pSwResMgr );
OUString aNm( aResId );
- SwCharFormat *pNumCFormat = 0, *pBullCFormat = 0;
+ SwCharFormat *pNumCFormat = nullptr, *pBullCFormat = nullptr;
const SvxNumberFormat::SvxNumPositionAndSpaceMode eNumberFormatPositionAndSpaceMode
= numfunc::GetDefaultPositionAndSpaceMode(); //#i89178#
{
bool bIsModified = m_rDoc.getIDocumentState().IsModified();
- sal_uInt16 n = m_rDoc.MakeNumRule( aNm, 0, false, eNumberFormatPositionAndSpaceMode );
+ sal_uInt16 n = m_rDoc.MakeNumRule( aNm, nullptr, false, eNumberFormatPositionAndSpaceMode );
pNewRule = m_rDoc.GetNumRuleTable()[ n ];
pNewRule->SetPoolFormatId( nId );
@@ -2129,7 +2129,7 @@ bool DocumentStylePoolManager::IsPoolTextCollUsed( sal_uInt16 nId ) const
(RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END),
"Wrong AutoFormat Id" );
- SwTextFormatColl* pNewColl = 0;
+ SwTextFormatColl* pNewColl = nullptr;
bool bFnd = false;
for( sal_uInt16 n = 0; !bFnd && n < m_rDoc.GetTextFormatColls()->size(); ++n )
{
@@ -2148,7 +2148,7 @@ bool DocumentStylePoolManager::IsPoolTextCollUsed( sal_uInt16 nId ) const
/// Check if this AutoCollection is already/still in use
bool DocumentStylePoolManager::IsPoolFormatUsed( sal_uInt16 nId ) const
{
- const SwFormat *pNewFormat = 0;
+ const SwFormat *pNewFormat = nullptr;
const SwFormatsBase* pArray[ 2 ];
sal_uInt16 nArrCnt = 1;
bool bFnd = true;
@@ -2200,7 +2200,7 @@ bool DocumentStylePoolManager::IsPoolPageDescUsed( sal_uInt16 nId ) const
{
OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
"Wrong AutoFormat Id" );
- SwPageDesc *pNewPgDsc = 0;
+ SwPageDesc *pNewPgDsc = nullptr;
bool bFnd = false;
for( size_t n = 0; !bFnd && n < m_rDoc.GetPageDescCnt(); ++n )
{
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index 8ac66584af7d..51a0f3d6657c 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -148,10 +148,10 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void )
const bool bOldLockView = pShell->IsViewLocked();
pShell->LockView( true );
- m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_CHAPTERFLD )->ModifyNotification( 0, 0 ); // ChapterField
- m_rDoc.getIDocumentFieldsAccess().UpdateExpFields( 0, false ); // Updates ExpressionFields
- m_rDoc.getIDocumentFieldsAccess().UpdateTableFields(NULL); // Tables
- m_rDoc.getIDocumentFieldsAccess().UpdateRefFields(NULL); // References
+ m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_CHAPTERFLD )->ModifyNotification( nullptr, nullptr ); // ChapterField
+ m_rDoc.getIDocumentFieldsAccess().UpdateExpFields( nullptr, false ); // Updates ExpressionFields
+ m_rDoc.getIDocumentFieldsAccess().UpdateTableFields(nullptr); // Tables
+ m_rDoc.getIDocumentFieldsAccess().UpdateRefFields(nullptr); // References
pTmpRoot->EndAllAction();
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index f5ba753e5075..b46ae0c38793 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -31,42 +31,42 @@
extern ResMgr* pSwResMgr;
// Initialise UI names to 0
-::std::vector<OUString> *SwStyleNameMapper::m_pTextUINameArray = 0,
- *SwStyleNameMapper::m_pListsUINameArray = 0,
- *SwStyleNameMapper::m_pExtraUINameArray = 0,
- *SwStyleNameMapper::m_pRegisterUINameArray = 0,
- *SwStyleNameMapper::m_pDocUINameArray = 0,
- *SwStyleNameMapper::m_pHTMLUINameArray = 0,
- *SwStyleNameMapper::m_pFrameFormatUINameArray = 0,
- *SwStyleNameMapper::m_pChrFormatUINameArray = 0,
- *SwStyleNameMapper::m_pHTMLChrFormatUINameArray = 0,
- *SwStyleNameMapper::m_pPageDescUINameArray = 0,
- *SwStyleNameMapper::m_pNumRuleUINameArray = 0,
+::std::vector<OUString> *SwStyleNameMapper::m_pTextUINameArray = nullptr,
+ *SwStyleNameMapper::m_pListsUINameArray = nullptr,
+ *SwStyleNameMapper::m_pExtraUINameArray = nullptr,
+ *SwStyleNameMapper::m_pRegisterUINameArray = nullptr,
+ *SwStyleNameMapper::m_pDocUINameArray = nullptr,
+ *SwStyleNameMapper::m_pHTMLUINameArray = nullptr,
+ *SwStyleNameMapper::m_pFrameFormatUINameArray = nullptr,
+ *SwStyleNameMapper::m_pChrFormatUINameArray = nullptr,
+ *SwStyleNameMapper::m_pHTMLChrFormatUINameArray = nullptr,
+ *SwStyleNameMapper::m_pPageDescUINameArray = nullptr,
+ *SwStyleNameMapper::m_pNumRuleUINameArray = nullptr,
// Initialise programmatic names to 0
- *SwStyleNameMapper::m_pTextProgNameArray = 0,
- *SwStyleNameMapper::m_pListsProgNameArray = 0,
- *SwStyleNameMapper::m_pExtraProgNameArray = 0,
- *SwStyleNameMapper::m_pRegisterProgNameArray = 0,
- *SwStyleNameMapper::m_pDocProgNameArray = 0,
- *SwStyleNameMapper::m_pHTMLProgNameArray = 0,
- *SwStyleNameMapper::m_pFrameFormatProgNameArray = 0,
- *SwStyleNameMapper::m_pChrFormatProgNameArray = 0,
- *SwStyleNameMapper::m_pHTMLChrFormatProgNameArray = 0,
- *SwStyleNameMapper::m_pPageDescProgNameArray = 0,
- *SwStyleNameMapper::m_pNumRuleProgNameArray = 0;
-
-NameToIdHash *SwStyleNameMapper::m_pParaUIMap = 0,
- *SwStyleNameMapper::m_pCharUIMap = 0,
- *SwStyleNameMapper::m_pPageUIMap = 0,
- *SwStyleNameMapper::m_pFrameUIMap = 0,
- *SwStyleNameMapper::m_pNumRuleUIMap = 0,
-
- *SwStyleNameMapper::m_pParaProgMap = 0,
- *SwStyleNameMapper::m_pCharProgMap = 0,
- *SwStyleNameMapper::m_pPageProgMap = 0,
- *SwStyleNameMapper::m_pFrameProgMap = 0,
- *SwStyleNameMapper::m_pNumRuleProgMap = 0;
+ *SwStyleNameMapper::m_pTextProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pListsProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pExtraProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pRegisterProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pDocProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pHTMLProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pFrameFormatProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pChrFormatProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pHTMLChrFormatProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pPageDescProgNameArray = nullptr,
+ *SwStyleNameMapper::m_pNumRuleProgNameArray = nullptr;
+
+NameToIdHash *SwStyleNameMapper::m_pParaUIMap = nullptr,
+ *SwStyleNameMapper::m_pCharUIMap = nullptr,
+ *SwStyleNameMapper::m_pPageUIMap = nullptr,
+ *SwStyleNameMapper::m_pFrameUIMap = nullptr,
+ *SwStyleNameMapper::m_pNumRuleUIMap = nullptr,
+
+ *SwStyleNameMapper::m_pParaProgMap = nullptr,
+ *SwStyleNameMapper::m_pCharProgMap = nullptr,
+ *SwStyleNameMapper::m_pPageProgMap = nullptr,
+ *SwStyleNameMapper::m_pFrameProgMap = nullptr,
+ *SwStyleNameMapper::m_pNumRuleProgMap = nullptr;
// SwTableEntry so we can pass the length to the String CTOR
struct SwTableEntry
@@ -103,7 +103,7 @@ const struct SwTableEntry TextProgNameTable [] =
ENTRY( "Heading 8" ),
ENTRY( "Heading 9" ),
ENTRY( "Heading 10" ), // RES_POOLCOLL_TEXT_END
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry ListsProgNameTable [] =
@@ -149,7 +149,7 @@ const struct SwTableEntry ListsProgNameTable [] =
ENTRY( "List 5" ),
ENTRY( "List 5 End" ),
ENTRY( "List 5 Cont." ), // STR_POCO_PRGM_BUL_NONUM5
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry ExtraProgNameTable [] =
@@ -172,7 +172,7 @@ const struct SwTableEntry ExtraProgNameTable [] =
ENTRY( "Sender" ),
ENTRY( "Endnote" ),
ENTRY( "Drawing" ), // RES_POOLCOLL_LABEL_DRAWING
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry RegisterProgNameTable [] =
@@ -213,14 +213,14 @@ const struct SwTableEntry RegisterProgNameTable [] =
ENTRY( "User Index 8" ),
ENTRY( "User Index 9" ),
ENTRY( "User Index 10" ), // STR_POCO_PRGM_TOX_USER10
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry DocProgNameTable [] =
{
ENTRY( "Title" ), // STR_POCO_PRGM_DOC_TITEL
ENTRY( "Subtitle" ),
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry HTMLProgNameTable [] =
@@ -230,7 +230,7 @@ const struct SwTableEntry HTMLProgNameTable [] =
ENTRY( "Horizontal Line" ),
ENTRY( "List Contents" ),
ENTRY( "List Heading" ), // STR_POCO_PRGM_HTML_DT
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry FrameFormatProgNameTable [] =
@@ -242,7 +242,7 @@ const struct SwTableEntry FrameFormatProgNameTable [] =
ENTRY( "Marginalia" ),
ENTRY( "Watermark" ),
ENTRY( "Labels" ), // RES_POOLFRM_LABEL
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry ChrFormatProgNameTable [] =
@@ -264,7 +264,7 @@ const struct SwTableEntry ChrFormatProgNameTable [] =
ENTRY( "Endnote anchor" ),
ENTRY( "Rubies" ), // RES_POOLCHR_RUBYTEXT
ENTRY( "Vertical Numbering Symbols" ), // RES_POOLCHR_VERT_NUMBER
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry HTMLChrFormatProgNameTable [] =
@@ -278,7 +278,7 @@ const struct SwTableEntry HTMLChrFormatProgNameTable [] =
ENTRY( "Variable" ),
ENTRY( "Definition" ),
ENTRY( "Teletype" ), // RES_POOLCHR_HTML_TELETYPE
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry PageDescProgNameTable [] =
@@ -293,7 +293,7 @@ const struct SwTableEntry PageDescProgNameTable [] =
ENTRY( "Footnote" ),
ENTRY( "Endnote" ), // STR_POOLPAGE_PRGM_ENDNOTE
ENTRY( "Landscape" ),
- { 0, NULL }
+ { 0, nullptr }
};
const struct SwTableEntry NumRuleProgNameTable [] =
@@ -308,7 +308,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
ENTRY( "List 3" ),
ENTRY( "List 4" ),
ENTRY( "List 5" ), // STR_POOLNUMRULE_PRGM_BUL5
- { 0, NULL }
+ { 0, nullptr }
};
#undef ENTRY
@@ -424,7 +424,7 @@ void SwStyleNameMapper::testNameTable( SwGetPoolIdFromName const nFamily, sal_uI
const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlags, bool bProgName )
{
// pHashPointer is a pointer to a pointer which stores the UI/prog name array
- NameToIdHash **pHashPointer = 0;
+ NameToIdHash **pHashPointer = nullptr;
// Stores tuples representing (index start, index end, pointer to function which returns ref to name array)
::std::vector<NameArrayIndexTuple_t> vIndexes;
@@ -588,7 +588,7 @@ const OUString& SwStyleNameMapper::getNameFromId(
sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
{
sal_uInt16 nStt = 0;
- const ::std::vector<OUString>* pStrArr = 0;
+ const ::std::vector<OUString>* pStrArr = nullptr;
switch( (USER_FMT | COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID) & nId )
{
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 75919034e4bc..485c7537cd4d 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -236,7 +236,7 @@ SwAutoCompleteWord::~SwAutoCompleteWord()
bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc )
{
SwDocShell* pDocShell = rDoc.GetDocShell();
- SfxMedium* pMedium = pDocShell ? pDocShell->GetMedium() : 0;
+ SfxMedium* pMedium = pDocShell ? pDocShell->GetMedium() : nullptr;
// strings from help module should not be added
if( pMedium )
{
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 0f18087366a6..b07da5a08ab2 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -561,7 +561,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
const SwNumRule * pNumRule = pTextNode->GetNumRule();
- if (pNumRule != NULL)
+ if (pNumRule != nullptr)
{
aTmpStr += "<number>";
if ( pTextNode->GetNum() )
@@ -573,7 +573,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
aTmpStr += "<rule>";
aTmpStr += pNumRule->GetName();
- const SfxPoolItem * pItem = NULL;
+ const SfxPoolItem * pItem = nullptr;
if (pAttrSet && SfxItemState::SET ==
pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem))
@@ -585,7 +585,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
aTmpStr += "*";
}
- const SwNumFormat * pNumFormat = NULL;
+ const SwNumFormat * pNumFormat = nullptr;
aTmpStr += "</rule>";
if (pTextNode->GetActualListLevel() > 0)
@@ -661,7 +661,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
aTmpStr += "<start end=\"";
const SwStartNode * pStartNode = dynamic_cast<const SwStartNode *> (&rNode);
- if (pStartNode != NULL)
+ if (pStartNode != nullptr)
aTmpStr += OUString::number(pStartNode->EndOfSectionNode()->GetIndex());
aTmpStr += "\"/>";
@@ -681,26 +681,26 @@ const char * dbg_out(const SwNode & rNode)
const char * dbg_out(const SwNode * pNode)
{
- if (NULL != pNode)
+ if (nullptr != pNode)
return dbg_out(*pNode);
else
- return NULL;
+ return nullptr;
}
const char * dbg_out(const SwContentNode * pNode)
{
- if (NULL != pNode)
+ if (nullptr != pNode)
return dbg_out(*pNode);
else
- return NULL;
+ return nullptr;
}
const char * dbg_out(const SwTextNode * pNode)
{
- if (NULL != pNode)
+ if (nullptr != pNode)
return dbg_out(*pNode);
else
- return NULL;
+ return nullptr;
}
static void lcl_dbg_nodes_inner(OUString & aStr, SwNodes & rNodes, sal_uLong & nIndex)
@@ -708,8 +708,8 @@ static void lcl_dbg_nodes_inner(OUString & aStr, SwNodes & rNodes, sal_uLong & n
SwNode * pNode = rNodes[nIndex];
SwStartNode * pStartNode = dynamic_cast<SwStartNode *> (pNode);
- SwNode * pEndNode = NULL;
- if (pStartNode != NULL)
+ SwNode * pEndNode = nullptr;
+ if (pStartNode != nullptr)
pEndNode = pStartNode->EndOfSectionNode();
sal_uLong nCount = rNodes.Count();
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 87ca0baefaad..3557c66b8353 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -238,7 +238,7 @@ sal_uInt32 SwDoc::getRsid() const
void SwDoc::setRsid( sal_uInt32 nVal )
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
sal_uInt32 nIncrease = 0;
if (!bHack)
@@ -502,7 +502,7 @@ void SwDoc::ChgDBData(const SwDBData& rNewData)
struct _PostItField : public _SetGetExpField
{
- _PostItField( const SwNodeIndex& rNdIdx, const SwTextField* pField, const SwIndex* pIdx = 0 )
+ _PostItField( const SwNodeIndex& rNdIdx, const SwTextField* pField, const SwIndex* pIdx = nullptr )
: _SetGetExpField( rNdIdx, pField, pIdx ) {}
sal_uInt16 GetPageNo( const StringRangeEnumerator &rRangeEnum,
@@ -561,7 +561,7 @@ bool sw_GetPostIts(
for( SwFormatField* pField = aIter.First(); pField; pField = aIter.Next() )
{
const SwTextField* pTextField;
- if( 0 != ( pTextField = pField->GetTextField() ) &&
+ if( nullptr != ( pTextField = pField->GetTextField() ) &&
pTextField->GetTextNode().GetNodes().IsDocNodes() )
{
bHasPostIts = true;
@@ -639,7 +639,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
sal_Int32 nRes = -1;
const SwFrameFormat &rFormat = pStartFrm->GetPageDesc()->GetMaster();
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState eState = rFormat.GetItemState( RES_PAPER_BIN, false, &pItem );
const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem);
if (eState > SfxItemState::DEFAULT && pPaperBinItem)
@@ -953,7 +953,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// (4 'normal' pages are needed for a single prospect paper
// with back and front)
while( aVec.size() & 3 )
- aVec.push_back( 0 );
+ aVec.push_back( nullptr );
}
// make sure that all pages are in correct order
@@ -978,7 +978,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
nPrintCount < nCntPage; ++nPrintCount )
{
pStPage = aVec[ nSPg ];
- const SwPageFrm* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : 0;
+ const SwPageFrm* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : nullptr;
short nRtlOfs = bPrintProspectRTL ? 1 : 0;
if ( 0 == (( nSPg + nRtlOfs) & 1 ) ) // switch for odd number in LTR, even number in RTL
@@ -1019,7 +1019,7 @@ const SwFormatRefMark* SwDoc::GetRefMark( const OUString& rName ) const
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
const SfxPoolItem* pItem;
- if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) ))
+ if( nullptr == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) ))
continue;
const SwFormatRefMark* pFormatRef = static_cast<const SwFormatRefMark*>(pItem);
@@ -1028,14 +1028,14 @@ const SwFormatRefMark* SwDoc::GetRefMark( const OUString& rName ) const
rName == pFormatRef->GetRefName() )
return pFormatRef;
}
- return 0;
+ return nullptr;
}
/// @return the RefMark per index - for Uno
const SwFormatRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SwTextRefMark* pTextRef;
- const SwFormatRefMark* pRet = 0;
+ const SwFormatRefMark* pRet = nullptr;
sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
sal_uInt32 nCount = 0;
@@ -1043,8 +1043,8 @@ const SwFormatRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
- 0 != (pTextRef = static_cast<const SwFormatRefMark*>(pItem)->GetTextRefMark()) &&
+ if( nullptr != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
+ nullptr != (pTextRef = static_cast<const SwFormatRefMark*>(pItem)->GetTextRefMark()) &&
&pTextRef->GetTextNode().GetNodes() == &GetNodes() )
{
if(nCount == nIndex)
@@ -1071,8 +1071,8 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* pNames ) const
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
- 0 != (pTextRef = static_cast<const SwFormatRefMark*>(pItem)->GetTextRefMark()) &&
+ if( nullptr != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
+ nullptr != (pTextRef = static_cast<const SwFormatRefMark*>(pItem)->GetTextRefMark()) &&
&pTextRef->GetTextNode().GetNodes() == &GetNodes() )
{
if( pNames )
@@ -1123,7 +1123,7 @@ static bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
pTextNode->SetSmartTagDirty( true );
if( pTextNode->GetSmartTags() )
{
- pTextNode->SetSmartTags( NULL );
+ pTextNode->SetSmartTags( nullptr );
}
}
return true;
@@ -1180,16 +1180,16 @@ const SwFormatINetFormat* SwDoc::FindINetAttr( const OUString& rName ) const
for( n = 0; n < nMaxItems; ++n )
{
pItem = static_cast<const SwFormatINetFormat*>( GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) );
- if( 0 != pItem &&
+ if( nullptr != pItem &&
pItem->GetName() == rName &&
- 0 != ( pTextAttr = pItem->GetTextINetFormat()) &&
- 0 != ( pTextNd = pTextAttr->GetpTextNode() ) &&
+ nullptr != ( pTextAttr = pItem->GetTextINetFormat()) &&
+ nullptr != ( pTextNd = pTextAttr->GetpTextNode() ) &&
&pTextNd->GetNodes() == &GetNodes() )
{
return pItem;
}
}
- return 0;
+ return nullptr;
}
void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bImpress )
@@ -1268,7 +1268,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bIm
bool SwDoc::RemoveInvisibleContent()
{
bool bRet = false;
- GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, nullptr );
{
SwTextNode* pTextNd;
@@ -1276,7 +1276,7 @@ bool SwDoc::RemoveInvisibleContent()
for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
{
if( pFormatField->GetTextField() &&
- 0 != ( pTextNd = pFormatField->GetTextField()->GetpTextNode() ) &&
+ nullptr != ( pTextNd = pFormatField->GetTextField()->GetpTextNode() ) &&
pTextNd->GetpSwpHints() && pTextNd->HasHiddenParaField() &&
&pTextNd->GetNodes() == &GetNodes() )
{
@@ -1362,7 +1362,7 @@ bool SwDoc::RemoveInvisibleContent()
if( pSect->CalcHiddenFlag() )
{
SwSection* pParent = pSect, *pTmp;
- while( 0 != (pTmp = pParent->GetParent() ))
+ while( nullptr != (pTmp = pParent->GetParent() ))
{
if( pTmp->IsHiddenFlag() )
pSect = pTmp;
@@ -1429,7 +1429,7 @@ bool SwDoc::RemoveInvisibleContent()
if( bRet )
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, nullptr );
return bRet;
}
@@ -1465,7 +1465,7 @@ bool SwDoc::HasInvisibleContent() const
bool SwDoc::RestoreInvisibleContent()
{
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (GetIDocumentUndoRedo().GetLastUndoInfo(0, & nLastUndoId)
+ if (GetIDocumentUndoRedo().GetLastUndoInfo(nullptr, & nLastUndoId)
&& (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId))
{
GetIDocumentUndoRedo().Undo();
@@ -1479,7 +1479,7 @@ bool SwDoc::ConvertFieldsToText()
{
bool bRet = false;
getIDocumentFieldsAccess().LockExpFields();
- GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE, nullptr );
const SwFieldTypes* pMyFieldTypes = getIDocumentFieldsAccess().GetFieldTypes();
const SwFieldTypes::size_type nCount = pMyFieldTypes->size();
@@ -1574,7 +1574,7 @@ bool SwDoc::ConvertFieldsToText()
if( bRet )
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_UI_REPLACE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UI_REPLACE, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
return bRet;
@@ -1642,7 +1642,7 @@ OUString SwDoc::GetPaMDescr(const SwPaM & rPam)
{
SwTextNode * pTextNode = rPam.GetNode().GetTextNode();
- if (0 != pTextNode)
+ if (nullptr != pTextNode)
{
const sal_Int32 nStart = rPam.Start()->nContent.GetIndex();
const sal_Int32 nEnd = rPam.End()->nContent.GetIndex();
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 056ea7527565..43275185f056 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno;
static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
{
- Sequence<Any> *pRet = 0;
+ Sequence<Any> *pRet = nullptr;
sal_uInt16 nCount = rArgs.Count();
if( nCount > 1 )
@@ -63,7 +63,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
pUnoArgs[i] <<= (sal_Int32)pVar->GetLong();
break;
default:
- pUnoArgs[i].setValue(0, cppu::UnoType<void>::get());
+ pUnoArgs[i].setValue(nullptr, cppu::UnoType<void>::get());
break;
}
}
@@ -84,7 +84,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs )
aRef = pRetValue;
eErr = mpDocShell->CallBasic( rMacro.GetMacName(),
rMacro.GetLibName(),
- pArgs, pRet ? pRetValue : 0 );
+ pArgs, pRet ? pRetValue : nullptr );
if( pRet && SbxNULL < pRetValue->GetType() &&
SbxVOID != pRetValue->GetType() )
@@ -137,7 +137,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
return 0;
sal_uInt16 nRet = 0;
- const SvxMacroTableDtor* pTable = 0;
+ const SvxMacroTableDtor* pTable = nullptr;
switch( rCallEvent.eType )
{
case EVENT_OBJECT_INETATTR:
@@ -147,7 +147,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
for( n = 0; n < nMaxItems; ++n )
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
+ if( nullptr != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
&& rCallEvent.PTR.pINetAttr == pItem )
{
bCheckPtr = false; // misuse as a flag
@@ -181,7 +181,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
const SwFrameFormat* pFormat = rCallEvent.PTR.IMAP.pFormat;
const ImageMap* pIMap;
if( GetSpzFrameFormats()->Contains( pFormat ) &&
- 0 != (pIMap = pFormat->GetURL().GetMap()) )
+ nullptr != (pIMap = pFormat->GetURL().GetMap()) )
{
for( size_t nPos = pIMap->GetIMapObjectCount(); nPos; )
if( pIMapObj == pIMap->GetIMapObject( --nPos ))
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a31b7a099fa0..6efca0e0da42 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -59,7 +59,7 @@ namespace
{
static bool lcl_GreaterThan( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx )
{
- return pIdx != NULL
+ return pIdx != nullptr
? ( rPos.nNode > rNdIdx
|| ( rPos.nNode == rNdIdx
&& rPos.nContent >= pIdx->GetIndex() ) )
@@ -69,7 +69,7 @@ namespace
static bool lcl_Lower( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const SwIndex* pIdx )
{
return rPos.nNode < rNdIdx
- || ( pIdx != NULL
+ || ( pIdx != nullptr
&& rPos.nNode == rNdIdx
&& rPos.nContent < pIdx->GetIndex() );
}
@@ -118,19 +118,19 @@ namespace
{
SwContentNode * pNode = rEnd.GetNode().GetContentNode();
bool bPosAtEndOfNode = false;
- if ( pNode == NULL)
+ if ( pNode == nullptr)
{
SwNodeIndex aEnd = SwNodeIndex(rEnd);
pNode = rEnd.GetNodes().GoNext( &aEnd );
bPosAtEndOfNode = false;
}
- if ( pNode == NULL )
+ if ( pNode == nullptr )
{
SwNodeIndex aStt = SwNodeIndex(rStt);
pNode = SwNodes::GoPrevious(&aStt);
bPosAtEndOfNode = true;
}
- if ( pNode != NULL )
+ if ( pNode != nullptr )
{
return lcl_PositionFromContentNode( pNode, bPosAtEndOfNode );
}
@@ -145,7 +145,7 @@ namespace
rMarks.end(),
rPos,
sw::mark::CompareIMarkStartsAfter());
- if(pMarkAfter == rMarks.end()) return NULL;
+ if(pMarkAfter == rMarks.end()) return nullptr;
return pMarkAfter->get();
};
@@ -167,7 +167,7 @@ namespace
back_inserter(vCandidates),
[&rPos] (IDocumentMarkAccess::pMark_t const& rpMark) { return !rpMark->EndsBefore(rPos); } );
// no candidate left => we are in front of the first mark or there are none
- if(vCandidates.empty()) return NULL;
+ if(vCandidates.empty()) return nullptr;
// return the highest (last) candidate using mark end ordering
return max_element(vCandidates.begin(), vCandidates.end(), &lcl_MarkOrderingByEnd)->get();
}
@@ -195,10 +195,10 @@ namespace
}
io_pMark->ClearOtherMarkPos();
DdeBookmark * const pDdeBkmk = dynamic_cast< DdeBookmark*>(io_pMark);
- if ( pDdeBkmk != NULL
+ if ( pDdeBkmk != nullptr
&& pDdeBkmk->IsServer() )
{
- pDdeBkmk->SetRefObject(NULL);
+ pDdeBkmk->SetRefObject(nullptr);
}
return true;
}
@@ -378,7 +378,7 @@ namespace sw { namespace mark
{ // this can happen via UNO API
SAL_WARN("sw.core", "MarkManager::makeMark(..)"
" - refusing to create duplicate CrossRefBookmark");
- return 0;
+ return nullptr;
}
// create mark
@@ -419,7 +419,7 @@ namespace sw { namespace mark
MarkBase* pMarkBase = dynamic_cast<MarkBase*>(pMark.get());
if (!pMarkBase)
- return 0;
+ return nullptr;
if(pMark->GetMarkPos() != pMark->GetMarkStart())
pMarkBase->Swap();
@@ -698,7 +698,7 @@ namespace sw { namespace mark
&& lcl_GreaterThan(pMark->GetOtherMarkPos(), rStt, pSttIdx)
&& lcl_Lower(pMark->GetOtherMarkPos(), rEnd, pEndIdx);
// special case: completely in range, touching the end?
- if ( pEndIdx != NULL
+ if ( pEndIdx != nullptr
&& ( ( bIsOtherPosInRange
&& pMark->GetMarkPos().nNode == rEnd
&& pMark->GetMarkPos().nContent == *pEndIdx )
@@ -729,7 +729,7 @@ namespace sw { namespace mark
// no delete of UNO mark, if it is not expanded and only touches the start of the range
bDeleteMark = bIsOtherPosInRange
|| pMark->IsExpanded()
- || pSttIdx == NULL
+ || pSttIdx == nullptr
|| !( pMark->GetMarkPos().nNode == rStt
&& pMark->GetMarkPos().nContent == *pSttIdx );
break;
@@ -755,7 +755,7 @@ namespace sw { namespace mark
::std::unique_ptr< SwPosition > pNewPos;
{
- if ( pEndIdx != NULL )
+ if ( pEndIdx != nullptr )
{
pNewPos = ::std::unique_ptr< SwPosition >( new SwPosition( rEnd, *pEndIdx ) );
}
@@ -777,7 +777,7 @@ namespace sw { namespace mark
break;
case IDocumentMarkAccess::MarkType::ANNOTATIONMARK:
// no move of annotation marks, if method is called to collect deleted marks
- bMoveMark = pSaveBkmk == NULL;
+ bMoveMark = pSaveBkmk == nullptr;
break;
default:
bMoveMark = true;
@@ -1016,7 +1016,7 @@ namespace sw { namespace mark
m_vFieldmarks.begin(),
m_vFieldmarks.end(),
[&rPos] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
- if(pFieldmark == m_vFieldmarks.end()) return NULL;
+ if(pFieldmark == m_vFieldmarks.end()) return nullptr;
return dynamic_cast<IFieldmark*>(pFieldmark->get());
}
@@ -1024,7 +1024,7 @@ namespace sw { namespace mark
{
IFieldmark *pMark = getFieldmarkFor(rPos);
if (!pMark || pMark->GetFieldname() != ODF_FORMDROPDOWN)
- return NULL;
+ return nullptr;
return pMark;
}
@@ -1083,7 +1083,7 @@ namespace sw { namespace mark
m_vAnnotationMarks.end(),
[&rPos] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
if (pAnnotationMark == m_vAnnotationMarks.end())
- return NULL;
+ return nullptr;
return pAnnotationMark->get();
}
@@ -1350,11 +1350,11 @@ void _DelBookmarks(
{
bool bStt = true;
SwContentNode* pCNd = pRStt->nNode.GetNode().GetContentNode();
- if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoNext( &pRStt->nNode )) )
+ if( !pCNd && nullptr == ( pCNd = pDoc->GetNodes().GoNext( &pRStt->nNode )) )
{
bStt = false;
pRStt->nNode = rStt;
- if( 0 == ( pCNd = SwNodes::GoPrevious( &pRStt->nNode )) )
+ if( nullptr == ( pCNd = SwNodes::GoPrevious( &pRStt->nNode )) )
{
pRStt->nNode = pREnd->nNode;
pCNd = pRStt->nNode.GetNode().GetContentNode();
@@ -1372,11 +1372,11 @@ void _DelBookmarks(
{
bool bStt = false;
SwContentNode* pCNd = pREnd->nNode.GetNode().GetContentNode();
- if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &pREnd->nNode )) )
+ if( !pCNd && nullptr == ( pCNd = SwNodes::GoPrevious( &pREnd->nNode )) )
{
bStt = true;
pREnd->nNode = rEnd;
- if( 0 == ( pCNd = pDoc->GetNodes().GoNext( &pREnd->nNode )) )
+ if( nullptr == ( pCNd = pDoc->GetNodes().GoNext( &pREnd->nNode )) )
{
pREnd->nNode = pRStt->nNode;
pCNd = pREnd->nNode.GetNode().GetContentNode();
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 1354afaa51f5..e61ef478006d 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -97,8 +97,8 @@ void SwDoc::DoUpdateAllCharts()
const SwTableNode* pTableNd;
const SwFrameFormat* pFormat = rTableFormats[ n ];
- if( 0 != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
- 0 != ( pTableNd = pTmpTable->GetTableNode() ) &&
+ if( nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
+ nullptr != ( pTableNd = pTmpTable->GetTableNode() ) &&
pTableNd->GetNodes().IsDocNodes() )
{
_UpdateCharts( *pTmpTable, *pVSh );
@@ -112,11 +112,11 @@ void SwDoc::_UpdateCharts( const SwTable& rTable, SwViewShell const & rVSh ) con
OUString aName( rTable.GetFrameFormat()->GetName() );
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwOLENode *pONd;
- if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+ if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
aName == pONd->GetChartTableName() &&
pONd->getLayoutFrm( rVSh.GetLayout() ) )
{
@@ -169,7 +169,7 @@ void SwDoc::SetTableName( SwFrameFormat& rTableFormat, const OUString &rNewName
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while ( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwOLENode *pNd = aIdx.GetNode().GetOLENode();
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 390f80a58e63..a6fad31d95a6 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -103,7 +103,7 @@ private:
public:
CompareData(SwDoc& rD, bool bRecordDiff)
- : rDoc( rD ), pIndex( 0 ), pChangedFlag( 0 ), pInsRing(0), pDelRing(0)
+ : rDoc( rD ), pIndex( nullptr ), pChangedFlag( nullptr ), pInsRing(nullptr), pDelRing(nullptr)
, m_bRecordDiff(bRecordDiff)
{
}
@@ -186,7 +186,7 @@ class Hash
const SwCompareLine* pLine;
_HashData()
- : nNext( 0 ), nHash( 0 ), pLine(0) {}
+ : nNext( 0 ), nHash( 0 ), pLine(nullptr) {}
};
sal_uLong* pHashArr;
@@ -338,7 +338,7 @@ protected:
delete[] pData;
}
- int FindLCS( int *pLcs1 = 0, int *pLcs2 = 0, int nStt1 = 0,
+ int FindLCS( int *pLcs1 = nullptr, int *pLcs2 = nullptr, int nStt1 = 0,
int nEnd1 = 0, int nStt2 = 0, int nEnd2 = 0 );
public:
@@ -529,13 +529,13 @@ static const sal_uLong primes[] =
pDataArr = new _HashData[ nSize ];
pDataArr[0].nNext = 0;
pDataArr[0].nHash = 0,
- pDataArr[0].pLine = 0;
+ pDataArr[0].pLine = nullptr;
nPrime = primes[0];
for( i = 0; primes[i] < nSize / 3; i++)
if( !primes[i] )
{
- pHashArr = 0;
+ pHashArr = nullptr;
return;
}
nPrime = primes[ i ];
@@ -763,7 +763,7 @@ void Compare::CheckDiscard( sal_uLong nLen, sal_Char* pDiscard )
}
Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
- : pIndex( 0 ), pLineNum( 0 ), nCount( 0 )
+ : pIndex( nullptr ), pLineNum( nullptr ), nCount( 0 )
{
sal_uLong nLen = rData.GetLineCount();
sal_uLong n;
@@ -1404,7 +1404,7 @@ sal_uLong CompareData::NextIdx( const SwNode* pNd )
{
const SwSectionNode* pSNd;
if( pNd->IsTableNode() ||
- ( 0 != (pSNd = pNd->GetSectionNode() ) &&
+ ( nullptr != (pSNd = pNd->GetSectionNode() ) &&
( CONTENT_SECTION != pSNd->GetSection().GetType() ||
pSNd->GetSection().IsProtect() ) ) )
pNd = pNd->EndOfSectionNode();
@@ -1418,7 +1418,7 @@ sal_uLong CompareData::PrevIdx( const SwNode* pNd )
{
const SwSectionNode* pSNd;
if( pNd->StartOfSectionNode()->IsTableNode() ||
- ( 0 != (pSNd = pNd->StartOfSectionNode()->GetSectionNode() ) &&
+ ( nullptr != (pSNd = pNd->StartOfSectionNode()->GetSectionNode() ) &&
( CONTENT_SECTION != pSNd->GetSection().GetType() ||
pSNd->GetSection().IsProtect() ) ) )
pNd = pNd->StartOfSectionNode();
@@ -1501,7 +1501,7 @@ void CompareData::ShowDelete(
static_cast<const SwCompareLine*>(rData.GetLine( nEnd-1 ))->GetEndNode(), 1 );
sal_uInt16 nOffset = 0;
- const SwCompareLine* pLine = 0;
+ const SwCompareLine* pLine = nullptr;
if( nInsPos >= 1 )
{
if( GetLineCount() == nInsPos )
@@ -1642,7 +1642,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
if( pTmp )
{
SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_DELETE, nAuthor, aTimeStamp,
- OUString(), 0, 0 );
+ OUString(), nullptr, nullptr );
do {
// #i65201#: Expand again, see comment above.
if( pTmp->GetPoint()->nContent == 0 )
@@ -1694,7 +1694,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
}
} while( pInsRing != ( pTmp = pTmp->GetNext()) );
SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,
- OUString(), 0, 0 );
+ OUString(), nullptr, nullptr );
// combine consecutive
if( pTmp->GetNext() != pInsRing )
@@ -1706,7 +1706,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
if( rSttEnd == rEndStt ||
(!rEndStt.nContent.GetIndex() &&
rEndStt.nNode.GetIndex() - 1 == rSttEnd.nNode.GetIndex() &&
- 0 != ( pCNd = rSttEnd.nNode.GetNode().GetContentNode() ) &&
+ nullptr != ( pCNd = rSttEnd.nNode.GetNode().GetContentNode() ) &&
rSttEnd.nContent.GetIndex() == pCNd->Len()))
{
if( pTmp->GetNext() == pInsRing )
@@ -1812,7 +1812,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
CmpOptions.nIgnoreLen = SW_MOD()->IsIgnorePieces() ? SW_MOD()->GetPieceLen() : 0;
}
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
bool bDocWasModified = getIDocumentState().IsModified();
SwDoc& rSrcDoc = (SwDoc&)rDoc;
bool bSrcModified = rSrcDoc.getIDocumentState().IsModified();
@@ -1850,7 +1850,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
if( !bSrcModified )
rSrcDoc.getIDocumentState().ResetModified();
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
return nRet;
}
@@ -1954,7 +1954,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
case POS_INSIDE:
case POS_EQUAL:
- delete pDestRedl, pDestRedl = 0;
+ delete pDestRedl, pDestRedl = nullptr;
// break; -> no break !!!!
case POS_COLLIDE_END:
@@ -1973,7 +1973,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
SwUndoCompDoc *const pUndo =
(pDoc->GetIDocumentUndoRedo().DoesUndo())
- ? new SwUndoCompDoc( *pCpyRedl ) : 0;
+ ? new SwUndoCompDoc( *pCpyRedl ) : nullptr;
// now modify doc: append redline, undo (and count)
pDoc->getIDocumentRedlineAccess().AppendRedline( pCpyRedl, true );
@@ -2008,7 +2008,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
if( pDestRedl )
{
SwUndoCompDoc *const pUndo = (pDoc->GetIDocumentUndoRedo().DoesUndo())
- ? new SwUndoCompDoc( *pDestRedl ) : 0;
+ ? new SwUndoCompDoc( *pDestRedl ) : nullptr;
// now modify doc: append redline, undo (and count)
bool bRedlineAccepted = pDoc->getIDocumentRedlineAccess().AppendRedline( pDestRedl, true );
@@ -2021,7 +2021,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
// if AppendRedline has deleted our redline, we may not keep a
// reference to it
if( ! bRedlineAccepted )
- pDestRedl = NULL;
+ pDestRedl = nullptr;
}
return nIns;
}
@@ -2034,7 +2034,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
long nRet = 0;
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
SwDoc& rSrcDoc = (SwDoc&)rDoc;
bool bSrcModified = rSrcDoc.getIDocumentState().IsModified();
@@ -2097,7 +2097,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE));
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
return nRet;
}
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 82bd250812de..62df0932e57d 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -40,7 +40,7 @@ namespace
static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
{
const SwStartNode* pStartNode = rNode.StartOfSectionNode();
- while( ( pStartNode != NULL ) &&
+ while( ( pStartNode != nullptr ) &&
( pStartNode->StartOfSectionNode() != pStartNode ) &&
( pStartNode->GetStartNodeType() == SwNormalStartNode ) )
pStartNode = pStartNode->StartOfSectionNode();
@@ -108,7 +108,7 @@ void PaMCorrAbs( const SwPaM& rRange,
if( _pStkCrsr )
do {
lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos );
- } while ( (_pStkCrsr != 0 ) &&
+ } while ( (_pStkCrsr != nullptr ) &&
((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) );
for(SwPaM& rPaM : const_cast<SwShellCrsr*>(pCrsrShell->_GetCrsr())->GetRingContainer())
@@ -159,7 +159,7 @@ void PaMCorrAbs( const SwPaM& rRange,
{
// the UNO cursor has left its section. We need to notify it!
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
- pUnoCursor->ModifyNotification( &aHint, NULL );
+ pUnoCursor->ModifyNotification( &aHint, nullptr );
}
}
}
@@ -187,7 +187,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
lcl_PaMCorrAbs(*pRedline, *aPam.Start(), *aPam.End(), aNewPos);
// clean up empty redlines: docredln.cxx asserts these as invalid
if (bChanged && (*pRedline->GetPoint() == *pRedline->GetMark())
- && (pRedline->GetContentIdx() == NULL))
+ && (pRedline->GetContentIdx() == nullptr))
{
rTable.DeleteAndDestroy(n);
}
@@ -215,7 +215,7 @@ void SwDoc::CorrAbs(
SwPosition aEnd(*rRange.End());
SwPosition aNewPos(rNewPos);
- _DelBookmarks( aStart.nNode, aEnd.nNode, NULL, &aStart.nContent, &aEnd.nContent );
+ _DelBookmarks( aStart.nNode, aEnd.nNode, nullptr, &aStart.nContent, &aEnd.nContent );
if(bMoveCrsr)
::PaMCorrAbs(rRange, rNewPos);
@@ -260,7 +260,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
if( _pStkCrsr )
do {
lcl_PaMCorrRel1( _pStkCrsr, pOldNode, aNewPos, nCntIdx );
- } while ( (_pStkCrsr != 0 ) &&
+ } while ( (_pStkCrsr != nullptr ) &&
((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) );
SwPaM* pStartPaM = pCrsrShell->_GetCrsr();
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 97b0dc61967d..be1606cd420d 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -255,7 +255,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHe
const SwFormatHeader &rFormatHead = rDescFrameFormat.GetHeader();
if ( !rFormatHead.IsActive() )
{
- SwFormatHeader aHead( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADERL, 0 ) );
+ SwFormatHeader aHead( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADERL, nullptr ) );
rDescFrameFormat.SetFormatAttr( aHead );
// take over additional attributes (margins, borders ...)
::lcl_DescSetAttr( *rHead.GetHeaderFormat(), *aHead.GetHeaderFormat(), false);
@@ -328,7 +328,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFo
const SwFormatFooter &rFormatFoot = rDescFrameFormat.GetFooter();
if ( !rFormatFoot.IsActive() )
{
- SwFormatFooter aFoot( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, 0 ) );
+ SwFormatFooter aFoot( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, nullptr ) );
rDescFrameFormat.SetFormatAttr( aFoot );
// Take over additional attributes (margins, borders ...).
::lcl_DescSetAttr( *rFoot.GetFooterFormat(), *aFoot.GetFooterFormat(), false);
@@ -528,7 +528,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
}
SfxBindings* pBindings =
- ( GetDocShell() && GetDocShell()->GetDispatcher() ) ? GetDocShell()->GetDispatcher()->GetBindings() : 0;
+ ( GetDocShell() && GetDocShell()->GetDispatcher() ) ? GetDocShell()->GetDispatcher()->GetBindings() : nullptr;
if ( pBindings )
{
pBindings->Invalidate( SID_ATTR_PAGE_COLUMN );
@@ -551,7 +551,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
// #i7983#
void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
{
- if (0 == pDel)
+ if (nullptr == pDel)
return;
// mba: test iteration as clients are removed while iteration
@@ -604,7 +604,7 @@ void SwDoc::BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamil
pPool->SetSearchMask(eFamily);
SfxStyleSheetBase * pBase = pPool->Find(rName);
- if (pBase != NULL)
+ if (pBase != nullptr)
pPool->Broadcast(SfxStyleSheetHint( nOp, *pBase ));
}
}
@@ -819,7 +819,7 @@ static SwPageDesc* lcl_FindPageDesc( SwPageDescs *pPageDescs,
{
SwPageDescs::iterator it = std::find_if(
pPageDescs->begin(), pPageDescs->end(), pred);
- SwPageDesc* res = NULL;
+ SwPageDesc* res = nullptr;
if( it != pPageDescs->end() )
{
res = it->get();
@@ -846,12 +846,12 @@ struct CompareSwPageDescToPtr {
bool SwDoc::ContainsPageDesc( const SwPageDesc *pDesc, size_t* pPos )
{
- if (pDesc == NULL)
+ if (pDesc == nullptr)
return false;
SwPageDesc *res = lcl_FindPageDesc<CompareSwPageDescToPtr>(
&m_PageDescs, pPos,
CompareSwPageDescToPtr(pDesc) );
- return res != NULL;
+ return res != nullptr;
}
void SwDoc::DelPageDesc( const OUString & rName, bool bBroadcast )
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index af0cc62cc296..fe5219cdc1e9 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -200,18 +200,18 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
- bool bNoGroup = ( 0 == pObj->GetUpGroup() );
- SwDrawContact* pNewContact = 0;
+ bool bNoGroup = ( nullptr == pObj->GetUpGroup() );
+ SwDrawContact* pNewContact = nullptr;
if( bNoGroup )
{
- SwDrawFrameFormat *pFormat = 0L;
+ SwDrawFrameFormat *pFormat = nullptr;
// Revoke anchor attribute.
SwDrawContact *pMyContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
const SwFormatAnchor aAnch( pMyContact->GetFormat()->GetAnchor() );
SwUndoDrawGroup *const pUndo = (!GetIDocumentUndoRedo().DoesUndo())
- ? 0
+ ? nullptr
: new SwUndoDrawGroup( (sal_uInt16)rMrkList.GetMarkCount() );
// #i53320#
@@ -238,7 +238,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
pFormat = static_cast<SwDrawFrameFormat*>(pContact->GetFormat());
// Deletes itself!
pContact->Changed(*pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
if( pUndo )
pUndo->AddObj( i, pFormat, pObj );
@@ -309,7 +309,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
SwDrawView::ReplaceMarkedDrawVirtObjs( rDrawView );
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
- std::vector< std::pair< SwDrawFrameFormat*, SdrObject* > >* pFormatsAndObjs( 0L );
+ std::vector< std::pair< SwDrawFrameFormat*, SdrObject* > >* pFormatsAndObjs( nullptr );
const size_t nMarkCount( rMrkList.GetMarkCount() );
if ( nMarkCount )
{
@@ -327,7 +327,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
SwFormatAnchor aAnch( pContact->GetFormat()->GetAnchor() );
SdrObjList *pLst = static_cast<SdrObjGroup*>(pObj)->GetSubList();
- SwUndoDrawUnGroup* pUndo = 0;
+ SwUndoDrawUnGroup* pUndo = nullptr;
if( bUndo )
{
pUndo = new SwUndoDrawUnGroup( static_cast<SdrObjGroup*>(pObj) );
@@ -357,7 +357,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
// its connection to the Writer layout.
for ( size_t i = 0; i < nMarkCount; ++i )
{
- SwUndoDrawUnGroupConnectToLayout* pUndo = 0;
+ SwUndoDrawUnGroupConnectToLayout* pUndo = nullptr;
if( bUndo )
{
pUndo = new SwUndoDrawUnGroupConnectToLayout();
@@ -390,7 +390,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
if( rMrkList.GetMarkCount() )
{
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
bool bDelMarked = true;
if( 1 == rMrkList.GetMarkCount() )
@@ -432,7 +432,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
{
SwUndoDrawDelete *const pUndo =
(!GetIDocumentUndoRedo().DoesUndo())
- ? 0
+ ? nullptr
: new SwUndoDrawDelete( (sal_uInt16)rMrkList.GetMarkCount() );
// Destroy ContactObjects, save formats.
@@ -454,7 +454,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
}
// Deletes itself!
pContact->Changed(*pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
if( pUndo )
pUndo->AddObj( i, pFormat, rMark );
@@ -472,7 +472,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
}
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
}
return bCallBase;
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 111a5223a033..b5628f10af60 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -65,7 +65,7 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
if( rSave.bInsertPosition )
{
- if( pInsertPos != NULL )
+ if( pInsertPos != nullptr )
aPos.nNode = *pInsertPos;
else
aPos.nNode = rSttIdx.GetIndex();
@@ -80,7 +80,7 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
// SetFormatAttr should call Modify() and add it to the node
pFormat->SetFormatAttr( aAnchor );
SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode();
- if( pCNd && pCNd->getLayoutFrm( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false ) )
+ if( pCNd && pCNd->getLayoutFrm( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) )
pFormat->MakeFrms();
}
sw::CheckAnchoredFlyConsistency(*rSttIdx.GetNode().GetDoc());
@@ -141,7 +141,7 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
(FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
// do not move if the InsPos is in the ContentArea of the Fly
- ( 0 == ( pContentIdx = pFormat->GetContent().GetContentIdx() ) ||
+ ( nullptr == ( pContentIdx = pFormat->GetContent().GetContentIdx() ) ||
!( *pContentIdx < rInsPos &&
rInsPos < pContentIdx->GetNode().EndOfSectionIndex() )) )
{
@@ -240,7 +240,7 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
// From now on this class saves the redline positions of all redlines which ends exact at the
// insert position (node _and_ content index)
_SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nCnt )
- : pSavArr( 0 ), pSavIdx( 0 ), nSavContent( nCnt )
+ : pSavArr( nullptr ), pSavIdx( nullptr ), nSavContent( nCnt )
{
SwNode& rNd = rInsIdx.GetNode();
SwDoc* pDest = rNd.GetDoc();
@@ -315,7 +315,7 @@ void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev )
if( pSttNd )
{
SwTextNode *pEndNd = pEnd->nNode.GetNode().GetTextNode();
- rJoinText = 0 != pEndNd;
+ rJoinText = nullptr != pEndNd;
if( rJoinText )
{
bool bExchange = pStt == rPam.GetPoint();
@@ -495,7 +495,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
{
SwPosition* pSttPos = rPaM.Start(), *pEndPos = rPaM.End();
- SwSpellArgs *pSpellArgs = 0;
+ SwSpellArgs *pSpellArgs = nullptr;
if (pConvArgs)
{
pConvArgs->SetStart(pSttPos->nNode.GetNode().GetTextNode(), pSttPos->nContent);
@@ -521,7 +521,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
switch( pNd->GetNodeType() )
{
case ND_TEXTNODE:
- if( 0 != ( pCntFrm = pNd->GetTextNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout() )) )
+ if( nullptr != ( pCntFrm = pNd->GetTextNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout() )) )
{
// skip protected and hidden Cells and Flys
if( pCntFrm->IsProtected() )
@@ -557,7 +557,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
{
SwIndex aStartIndex( dynamic_cast< SwTextNode* >( pNd ), nBeginGrammarCheck );
SwPosition aStart( *pNd, aStartIndex );
- SwCursor aCrsr(aStart, 0, false);
+ SwCursor aCrsr(aStart, nullptr, false);
SwPosition aOrigPos = *aCrsr.GetPoint();
aCrsr.GoSentence( SwCursor::START_SENT );
if( aOrigPos != *aCrsr.GetPoint() )
@@ -691,7 +691,7 @@ public:
SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCrsrPos,
sal_uInt16* pPageCount, sal_uInt16* pPageStart )
- : SwInterHyphInfo( rCrsrPos ), pNode(0),
+ : SwInterHyphInfo( rCrsrPos ), pNode(nullptr),
pPageCnt( pPageCount ), pPageSt( pPageStart )
{
// The following constraints have to be met:
@@ -804,7 +804,7 @@ void SwDoc::SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew )
void SwDoc::DeleteAutoCorrExceptWord()
{
delete mpACEWord;
- mpACEWord = 0;
+ mpACEWord = nullptr;
}
void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat )
@@ -838,10 +838,10 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat )
}
for( ; aIdx.GetIndex() < nEndNd; ++aIdx )
- if( 0 != ( pTNd = aIdx.GetNode().GetTextNode() ))
+ if( nullptr != ( pTNd = aIdx.GetNode().GetTextNode() ))
pTNd->CountWords( rStat, 0, pTNd->GetText().getLength() );
- if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTextNode() ))
+ if( nEndCnt && nullptr != ( pTNd = pEnd->nNode.GetNode().GetTextNode() ))
pTNd->CountWords( rStat, 0, nEndCnt );
}
else if( pTNd && nSttCnt < nEndCnt )
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index b61ed14ff037..21acbc441d70 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -247,7 +247,7 @@ bool _SetGetExpField::operator<( const _SetGetExpField& rField ) const
else
pFirstStt = pFirst->StartOfSectionNode();
- if( 0 != ( pTableNd = pNext->FindTableNode() ) )
+ if( nullptr != ( pTableNd = pNext->FindTableNode() ) )
pNextStt = pTableNd->StartOfSectionNode();
else
pNextStt = pNext->StartOfSectionNode();
@@ -273,7 +273,7 @@ bool _SetGetExpField::operator<( const _SetGetExpField& rField ) const
const SwNode* _SetGetExpField::GetNodeFromContent() const
{
- const SwNode* pRet = 0;
+ const SwNode* pRet = nullptr;
if( CNTNT.pTextField )
switch( eSetGetExpFieldType )
{
@@ -457,7 +457,7 @@ void SwDoc::GetAllUsedDB( std::vector<OUString>& rDBNameList,
for (sal_uInt32 n = 0; n < nMaxItems; ++n)
{
const SfxPoolItem* pItem;
- if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
+ if( nullptr == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
continue;
const SwFormatField* pFormatField = static_cast<const SwFormatField*>(pItem);
@@ -841,14 +841,14 @@ void SwDocUpdateField::_MakeFieldList( SwDoc& rDoc, int eGetMode )
std::vector<sal_uLong> aTmpArr;
std::vector<sal_uLong>::size_type nArrStt = 0;
SwSectionFormats& rArr = rDoc.GetSections();
- SwSectionNode* pSectNd = 0;
+ SwSectionNode* pSectNd = nullptr;
sal_uLong nSttContent = rDoc.GetNodes().GetEndOfExtras().GetIndex();
for (SwSectionFormats::size_type n = rArr.size(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
if( pSect && pSect->IsHidden() && !pSect->GetCondition().isEmpty() &&
- 0 != ( pSectNd = pSect->GetFormat()->GetSectionNode() ))
+ nullptr != ( pSectNd = pSect->GetFormat()->GetSectionNode() ))
{
sal_uLong nIdx = pSectNd->GetIndex();
aTmpArr.push_back( nIdx );
@@ -884,7 +884,7 @@ void SwDocUpdateField::_MakeFieldList( SwDoc& rDoc, int eGetMode )
const OUString sFalse("FALSE");
#if HAVE_FEATURE_DBCONNECTIVITY
- bool bIsDBManager = 0 != rDoc.GetDBManager();
+ bool bIsDBManager = nullptr != rDoc.GetDBManager();
#endif
const sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
@@ -936,7 +936,7 @@ void SwDocUpdateField::_MakeFieldList( SwDoc& rDoc, int eGetMode )
sFormula.clear();
// trigger formatting
- const_cast<SwFormatField*>(pFormatField)->ModifyNotification( 0, 0 );
+ const_cast<SwFormatField*>(pFormatField)->ModifyNotification( nullptr, nullptr );
}
break;
@@ -956,7 +956,7 @@ void SwDocUpdateField::_MakeFieldList( SwDoc& rDoc, int eGetMode )
// evaluate field
const_cast<SwHiddenTextField*>(static_cast<const SwHiddenTextField*>(pField))->Evaluate(&rDoc);
// trigger formatting
- const_cast<SwFormatField*>(pFormatField)->ModifyNotification( 0, 0 );
+ const_cast<SwFormatField*>(pFormatField)->ModifyNotification( nullptr, nullptr );
}
break;
@@ -1006,9 +1006,9 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel
// always the first! (in tab headline, header-/footer)
Point aPt;
- const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
- _SetGetExpField* pNew = NULL;
+ _SetGetExpField* pNew = nullptr;
bool bIsInBody = false;
if( !pFrm || pFrm->IsInDocBody() )
@@ -1021,7 +1021,7 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel
// in frames whose anchor is in redline. However, we do want to update
// fields in hidden sections. So: In order to be updated, a field 1)
// must have a frame, or 2) it must be in the document body.
- if( (pFrm != NULL) || bIsInBody )
+ if( (pFrm != nullptr) || bIsInBody )
pNew = new _SetGetExpField( aIdx, &rTField );
}
else
@@ -1047,7 +1047,7 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel
pDBField->ChgBodyTextFlag( bIsInBody );
}
#endif
- if( pNew != NULL )
+ if( pNew != nullptr )
if( !pFieldSortLst->insert( pNew ).second )
delete pNew;
}
@@ -1055,7 +1055,7 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel
void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd )
{
const SwDoc& rDoc = *rSectNd.GetDoc();
- _SetGetExpField* pNew = 0;
+ _SetGetExpField* pNew = nullptr;
if( rSectNd.GetIndex() < rDoc.GetNodes().GetEndOfExtras().GetIndex() )
{
@@ -1071,7 +1071,7 @@ void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd )
// always the first! (in tab headline, header-/footer)
Point aPt;
- const SwContentFrm* pFrm = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwContentFrm* pFrm = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
if( !pFrm )
break;
@@ -1155,14 +1155,14 @@ void SwDocUpdateField::RemoveFieldType( const SwFieldType& rType )
pPrev = pPrev->pNext;
pPrev->pNext = pFnd->pNext;
}
- pFnd->pNext = 0;
+ pFnd->pNext = nullptr;
delete pFnd;
}
}
}
SwDocUpdateField::SwDocUpdateField(SwDoc* pDoc)
- : pFieldSortLst(0)
+ : pFieldSortLst(nullptr)
, nNodes(0)
, nFieldLstGetMode(0)
, pDocument(pDoc)
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index efd4175f1fed..3553acf022d8 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -91,7 +91,7 @@ size_t SwDoc::GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes ) const
continue;
if( RES_FLYFRMFMT == pFlyFormat->Which()
- && 0 != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
+ && nullptr != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
&& pIdx->GetNodes().IsDocNodes()
)
{
@@ -126,7 +126,7 @@ size_t SwDoc::GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes ) const
SwFrameFormat* SwDoc::GetFlyNum( size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes )
{
SwFrameFormats& rFormats = *GetSpzFrameFormats();
- SwFrameFormat* pRetFormat = 0;
+ SwFrameFormat* pRetFormat = nullptr;
const size_t nSize = rFormats.size();
const SwNodeIndex* pIdx;
size_t nCount = 0;
@@ -143,7 +143,7 @@ SwFrameFormat* SwDoc::GetFlyNum( size_t nIdx, FlyCntType eType, bool bIgnoreText
continue;
if( RES_FLYFRMFMT == pFlyFormat->Which()
- && 0 != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
+ && nullptr != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
&& pIdx->GetNodes().IsDocNodes()
)
{
@@ -193,7 +193,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
{
const SwPosition *pPos = rAnch.GetContentAnchor();
const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode();
- const SwFrm* pOld = pNd ? pNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, 0, false ) : 0;
+ const SwFrm* pOld = pNd ? pNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -204,7 +204,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
{
const SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>(rAnch.GetContentAnchor()->
nNode.GetNode().GetFlyFormat());
- const SwFrm* pOld = pFormat ? pFormat->GetFrm( &aRet ) : 0;
+ const SwFrm* pOld = pFormat ? pFormat->GetFrm( &aRet ) : nullptr;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -256,7 +256,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool
return DONTMAKEFRMS;
Point aOldAnchorPos( ::lcl_FindAnchorLayPos( *this, rOldAnch, &rFormat ));
- Point aNewAnchorPos( ::lcl_FindAnchorLayPos( *this, aNewAnch, 0 ));
+ Point aNewAnchorPos( ::lcl_FindAnchorLayPos( *this, aNewAnch, nullptr ));
// Destroy the old Frames.
// The Views are hidden implicitly, so hiding them another time would be
@@ -334,7 +334,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool
// If only the alignment changes in the position attributes (text::RelOrientation::FRAME
// vs. text::RelOrientation::PRTAREA), we also correct the position.
if( SfxItemState::SET != rSet.GetItemState( RES_HORI_ORIENT, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
SwFormatHoriOrient aOldH( rFormat.GetHoriOrient() );
@@ -355,7 +355,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool
}
if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
SwFormatVertOrient aOldV( rFormat.GetVertOrient() );
// #i28922# - correction: compare <aOldV.GetVertOrient() with
@@ -455,7 +455,7 @@ void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet)
{
if (IsInvalidItem(pItem))
continue;
- const SfxPoolItem* pResult = NULL;
+ const SfxPoolItem* pResult = nullptr;
switch(pItem->Which())
{
@@ -590,7 +590,7 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm
const SwFormatVertOrient aVert( rFormat.GetVertOrient() );
const SwFormatHoriOrient aHori( rFormat.GetHoriOrient() );
- SwUndoSetFlyFormat* pUndo = 0;
+ SwUndoSetFlyFormat* pUndo = nullptr;
bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
if (bUndo)
{
@@ -692,7 +692,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
return false;
}
- GetIDocumentUndoRedo().StartUndo( UNDO_INSATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSATTR, nullptr );
bool bUnmark = false;
for ( size_t i = 0; i < _rMrkList.GetMarkCount(); ++i )
@@ -759,7 +759,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
if ( pNewAnchorFrm->IsProtected() )
{
- pNewAnchorFrm = 0;
+ pNewAnchorFrm = nullptr;
}
else
{
@@ -783,7 +783,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// consider that drawing objects can be in
// header/footer. Thus, <GetFrm()> by left-top-corner
pTextFrm = aPos.nNode.GetNode().
- GetContentNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ GetContentNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
}
const SwFrm *pTmp = ::FindAnchor( pTextFrm, aPt );
pNewAnchorFrm = pTmp->FindFlyFrm();
@@ -826,7 +826,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aPt );
if( pNewAnchorFrm->IsProtected() )
{
- pNewAnchorFrm = 0;
+ pNewAnchorFrm = nullptr;
break;
}
@@ -883,7 +883,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
!static_cast<SwDrawVirtObj*>(pObj)->IsConnected() )
{
SwRect aNewObjRect( aObjRect );
- static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( 0L ))
+ static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( nullptr ))
->AdjustPositioningAttr( pNewAnchorFrm,
&aNewObjRect );
}
@@ -923,7 +923,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
getIDocumentState().SetModified();
return bUnmark;
@@ -977,7 +977,7 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
// #i20622# - to-frame anchored objects are allowed.
if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
(rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
- 0 != rAnchor.GetContentAnchor() &&
+ nullptr != rAnchor.GetContentAnchor() &&
nFlySttNd <= ( nTstSttNd =
rAnchor.GetContentAnchor()->nNode.GetIndex() ) &&
nTstSttNd < nFlySttNd + 2 )
@@ -1007,16 +1007,16 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
{
const SwNodeIndex &rSrcIdx = rSrcAnchor.GetContentAnchor()->nNode,
&rDstIdx = rDstAnchor.GetContentAnchor()->nNode;
- const SwStartNode* pSttNd = 0;
+ const SwStartNode* pSttNd = nullptr;
if( rSrcIdx == rDstIdx ||
( !pSttNd &&
- 0 != ( pSttNd = rSrcIdx.GetNode().FindFlyStartNode() ) &&
+ nullptr != ( pSttNd = rSrcIdx.GetNode().FindFlyStartNode() ) &&
pSttNd == rDstIdx.GetNode().FindFlyStartNode() ) ||
( !pSttNd &&
- 0 != ( pSttNd = rSrcIdx.GetNode().FindFooterStartNode() ) &&
+ nullptr != ( pSttNd = rSrcIdx.GetNode().FindFooterStartNode() ) &&
pSttNd == rDstIdx.GetNode().FindFooterStartNode() ) ||
( !pSttNd &&
- 0 != ( pSttNd = rSrcIdx.GetNode().FindHeaderStartNode() ) &&
+ nullptr != ( pSttNd = rSrcIdx.GetNode().FindHeaderStartNode() ) &&
pSttNd == rDstIdx.GetNode().FindHeaderStartNode() ) ||
( !pSttNd && rDstIdx.GetIndex() > nEndOfExtras &&
rSrcIdx.GetIndex() > nEndOfExtras ))
@@ -1031,7 +1031,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
SwChainRet nErr = Chainable( rSource, rDest );
if ( nErr == SwChainRet::OK )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_CHAINE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_CHAINE, nullptr );
SwFlyFrameFormat& rDestFormat = const_cast<SwFlyFrameFormat&>(static_cast<const SwFlyFrameFormat&>(rDest));
@@ -1064,7 +1064,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
}
SetAttr( aSet, rSource );
- GetIDocumentUndoRedo().EndUndo( UNDO_CHAINE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_CHAINE, nullptr );
}
return nErr;
}
@@ -1074,14 +1074,14 @@ void SwDoc::Unchain( SwFrameFormat &rFormat )
SwFormatChain aChain( rFormat.GetChain() );
if ( aChain.GetNext() )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_UNCHAIN, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UNCHAIN, nullptr );
SwFrameFormat *pFollow = aChain.GetNext();
- aChain.SetNext( 0 );
+ aChain.SetNext( nullptr );
SetAttr( aChain, rFormat );
aChain = pFollow->GetChain();
- aChain.SetPrev( 0 );
+ aChain.SetPrev( nullptr );
SetAttr( aChain, *pFollow );
- GetIDocumentUndoRedo().EndUndo( UNDO_UNCHAIN, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UNCHAIN, nullptr );
}
}
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 0dad444132bb..08d0dc5146d6 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -145,7 +145,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
switch( aSavIds[ n ] )
{
case RES_PAGEDESC:
- bSave = 0 != static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc();
+ bSave = nullptr != static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc();
break;
case RES_BREAK:
bSave = SVX_BREAK_NONE != static_cast<const SvxFormatBreakItem*>(pItem)->GetBreak();
@@ -222,7 +222,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
void SwDoc::RstTextAttrs(const SwPaM &rRg, bool bInclRefToxMark, bool bExactRange )
{
- SwHistory* pHst = 0;
+ SwHistory* pHst = nullptr;
SwDataChanged aTmp( rRg );
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -301,7 +301,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
xDataChanged.reset( new SwDataChanged( *pPam ) );
}
- SwHistory* pHst = 0;
+ SwHistory* pHst = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoResetAttr* pUndo = new SwUndoResetAttr( rRg,
@@ -494,7 +494,7 @@ void SwDoc::ResetAttrAtFormat( const sal_uInt16 nWhichId,
{
SwUndo *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoFormatResetAttr( rChangedFormat, nWhichId )
- : 0;
+ : nullptr;
const bool bAttrReset = rChangedFormat.ResetFormatAttr( nWhichId );
@@ -548,7 +548,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
if( !rSet.Count() )
return;
- SwModify aCallMod( 0 );
+ SwModify aCallMod( nullptr );
SwAttrSet aOld( GetAttrPool(), rSet.GetRanges() ),
aNew( GetAttrPool(), rSet.GetRanges() );
SfxItemIter aIter( rSet );
@@ -566,13 +566,13 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
{
aCallMod.Add( mpDfltTextFormatColl );
aCallMod.Add( mpDfltCharFormat );
- bCheckSdrDflt = 0 != pSdrPool;
+ bCheckSdrDflt = nullptr != pSdrPool;
}
else if ( isPARATR(nWhich) ||
isPARATR_LIST(nWhich) )
{
aCallMod.Add( mpDfltTextFormatColl );
- bCheckSdrDflt = 0 != pSdrPool;
+ bCheckSdrDflt = nullptr != pSdrPool;
}
else if (isGRFATR(nWhich))
{
@@ -632,7 +632,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
bool bChg = false;
sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
- if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) ))
+ if( nullptr != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) ))
bChg |= lcl_SetNewDefTabStops( nOldWidth, nNewWidth,
*const_cast<SvxTabStopItem*>(static_cast<const SvxTabStopItem*>(pTmpItem)) );
@@ -1002,7 +1002,7 @@ static bool lcl_SetTextFormatColl( const SwNodePtr& rpNode, void* pArgs )
{
SwContentNode* pCNd = static_cast<SwContentNode*>(rpNode->GetTextNode());
- if( pCNd == NULL)
+ if( pCNd == nullptr)
return true;
sw::DocumentContentOperationsManager::ParaRstFormat* pPara = static_cast<sw::DocumentContentOperationsManager::ParaRstFormat*>(pArgs);
@@ -1074,7 +1074,7 @@ bool SwDoc::SetTextFormatColl(const SwPaM &rRg,
{
SwDataChanged aTmp( rRg );
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
- SwHistory* pHst = 0;
+ SwHistory* pHst = nullptr;
bool bRet = true;
if (GetIDocumentUndoRedo().DoesUndo())
@@ -1209,7 +1209,7 @@ SwTextFormatColl* SwDoc::CopyTextColl( const SwTextFormatColl& rColl )
const SwNumRule* pRule;
const OUString& rName = static_cast<const SwNumRuleItem*>(pItem)->GetValue();
if( !rName.isEmpty() &&
- 0 != ( pRule = rColl.GetDoc()->FindNumRulePtr( rName )) &&
+ nullptr != ( pRule = rColl.GetDoc()->FindNumRulePtr( rName )) &&
!pRule->IsAutoRule() )
{
SwNumRule* pDestRule = FindNumRulePtr( rName );
@@ -1264,7 +1264,7 @@ void SwDoc::CopyFormatArr( const SwFormatsBase& rSourceArr,
if( pSrc->IsDefault() || pSrc->IsAuto() )
continue;
- if( 0 == FindFormatByName( rDestArr, pSrc->GetName() ) )
+ if( nullptr == FindFormatByName( rDestArr, pSrc->GetName() ) )
{
if( RES_CONDTXTFMTCOLL == pSrc->Which() )
MakeCondTextFormatColl( pSrc->GetName(), static_cast<SwTextFormatColl*>(&rDfltFormat) );
@@ -1549,7 +1549,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles )
while( nCnt )
{
const SwPageDesc &rSrc = *rSource.m_PageDescs[ --nCnt ];
- if( 0 == FindPageDesc( rSrc.GetName() ) )
+ if( nullptr == FindPageDesc( rSrc.GetName() ) )
MakePageDesc( rSrc.GetName() );
}
@@ -1602,7 +1602,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles )
SwFormat* SwDoc::FindFormatByName( const SwFormatsBase& rFormatArr,
const OUString& rName )
{
- SwFormat* pFnd = 0;
+ SwFormat* pFnd = nullptr;
for( size_t n = 0; n < rFormatArr.GetFormatCount(); ++n )
{
// Does the Doc already contain the template?
@@ -1617,7 +1617,7 @@ SwFormat* SwDoc::FindFormatByName( const SwFormatsBase& rFormatArr,
void SwDoc::MoveLeftMargin( const SwPaM& rPam, bool bRight, bool bModulus )
{
- SwHistory* pHistory = 0;
+ SwHistory* pHistory = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoMoveLeftMargin* pUndo = new SwUndoMoveLeftMargin( rPam, bRight,
@@ -1720,11 +1720,11 @@ void SwDoc::_CreateNumberFormatter()
}
SwTableNumFormatMerge::SwTableNumFormatMerge( const SwDoc& rSrc, SwDoc& rDest )
- : pNFormat( 0 )
+ : pNFormat( nullptr )
{
// a different Doc -> Number formatter needs to be merged
SvNumberFormatter* pN;
- if( &rSrc != &rDest && 0 != ( pN = const_cast<SwDoc&>(rSrc).GetNumberFormatter( false ) ))
+ if( &rSrc != &rDest && nullptr != ( pN = const_cast<SwDoc&>(rSrc).GetNumberFormatter( false ) ))
( pNFormat = rDest.GetNumberFormatter())->MergeFormatter( *pN );
if( &rSrc != &rDest )
@@ -1857,7 +1857,7 @@ void SwDoc::ChgFormat(SwFormat & rFormat, const SfxItemSet & rSet)
SfxItemIter aIter(aSet);
const SfxPoolItem * pItem = aIter.FirstItem();
- while (pItem != NULL)
+ while (pItem != nullptr)
{
aOldSet.InvalidateItem(pItem->Which());
@@ -1880,7 +1880,7 @@ void SwDoc::RenameFormat(SwFormat & rFormat, const OUString & sNewName,
if (GetIDocumentUndoRedo().DoesUndo())
{
- SwUndo * pUndo = NULL;
+ SwUndo * pUndo = nullptr;
switch (rFormat.Which())
{
@@ -1919,7 +1919,7 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const
if (!pWriter)
{
pWriter = xmlNewTextWriterFilename("nodes.xml", 0);
- xmlTextWriterStartDocument(pWriter, NULL, NULL, NULL);
+ xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
bOwns = true;
}
xmlTextWriterStartElement(pWriter, BAD_CAST("swDoc"));
@@ -1976,7 +1976,7 @@ std::set<Color> SwDoc::GetDocColors()
for (sal_uInt32 j=0; j<nCount; j++)
{
const SvxColorItem *pItem = static_cast<const SvxColorItem*>(rPool.GetItem2(nAttrib, j));
- if (pItem == 0)
+ if (pItem == nullptr)
continue;
Color aColor( pItem->GetValue() );
if (COL_AUTO != aColor.GetColor())
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 5d6c51c156a0..f2711e6d50d8 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -87,9 +87,9 @@ bool SwEndNoteInfo::operator==( const SwEndNoteInfo& rInfo ) const
SwEndNoteInfo::SwEndNoteInfo(const SwEndNoteInfo& rInfo) :
SwClient( rInfo.GetFootnoteTextColl() ),
- aPageDescDep( this, 0 ),
- aCharFormatDep( this, 0 ),
- aAnchorCharFormatDep( this, 0 ),
+ aPageDescDep( this, nullptr ),
+ aCharFormatDep( this, nullptr ),
+ aAnchorCharFormatDep( this, nullptr ),
sPrefix( rInfo.sPrefix ),
sSuffix( rInfo.sSuffix ),
m_bEndNote( true ),
@@ -109,9 +109,9 @@ SwEndNoteInfo::SwEndNoteInfo(const SwEndNoteInfo& rInfo) :
SwEndNoteInfo::SwEndNoteInfo(SwTextFormatColl *pFormat) :
SwClient(pFormat),
- aPageDescDep( this, 0 ),
- aCharFormatDep( this, 0 ),
- aAnchorCharFormatDep( this, 0 ),
+ aPageDescDep( this, nullptr ),
+ aCharFormatDep( this, nullptr ),
+ aAnchorCharFormatDep( this, nullptr ),
m_bEndNote( true ),
nFootnoteOffset( 0 )
{
@@ -132,7 +132,7 @@ SwPageDesc *SwEndNoteInfo::GetPageDesc( SwDoc &rDoc ) const
bool SwEndNoteInfo::KnowsPageDesc() const
{
- return (aPageDescDep.GetRegisteredIn() != 0);
+ return (aPageDescDep.GetRegisteredIn() != nullptr);
}
bool SwEndNoteInfo::DependsOn( const SwPageDesc* pDesc ) const
@@ -312,7 +312,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo)
// #i81002# no update during loading
if ( !IsInReading() )
{
- getIDocumentFieldsAccess().UpdateRefFields(NULL);
+ getIDocumentFieldsAccess().UpdateRefFields(nullptr);
}
getIDocumentState().SetModified();
}
@@ -380,7 +380,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
// #i81002# no update during loading
if ( !IsInReading() )
{
- getIDocumentFieldsAccess().UpdateRefFields(NULL);
+ getIDocumentFieldsAccess().UpdateRefFields(nullptr);
}
getIDocumentState().SetModified();
}
@@ -401,7 +401,7 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr,
size_t nPos = 0;
rFootnoteArr.SeekEntry( pStt->nNode, &nPos );
- SwUndoChangeFootNote* pUndo = 0;
+ SwUndoChangeFootNote* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().ClearRedo(); // AppendUndo far below, so leave it
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 60bb6193e658..b82d7f99816a 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -68,12 +68,12 @@ bool SwDoc::GenerateGlobalDoc( const OUString& rPath,
bool SwDoc::GenerateGlobalDoc( const OUString& rPath, int nOutlineLevel )
{
- return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, true, 0, nOutlineLevel );
+ return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, true, nullptr, nOutlineLevel );
}
bool SwDoc::GenerateHTMLDoc( const OUString& rPath, int nOutlineLevel )
{
- return SplitDoc( SPLITDOC_TO_HTML, rPath, true, 0, nOutlineLevel );
+ return SplitDoc( SPLITDOC_TO_HTML, rPath, true, nullptr, nOutlineLevel );
}
bool SwDoc::GenerateHTMLDoc( const OUString& rPath,
@@ -93,7 +93,7 @@ SwNodePtr GetStartNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, sal_uInt16*
return pNd;
}
- return 0;
+ return nullptr;
}
SwNodePtr GetEndNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, sal_uInt16* nOutl )
@@ -112,7 +112,7 @@ SwNodePtr GetEndNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, sal_uInt16* n
return pNd;
}
}
- return 0;
+ return nullptr;
}
// two helpers for collection mode
@@ -126,7 +126,7 @@ SwNodePtr GetStartNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl*
{
return pNd;
}
- return 0;
+ return nullptr;
}
SwNodePtr GetEndNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pSplitColl, sal_uInt16* nOutl )
@@ -148,7 +148,7 @@ SwNodePtr GetEndNode( const SwOutlineNodes* pOutlNds, const SwTextFormatColl* pS
return pNd;
}
}
- return 0;
+ return nullptr;
}
bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, const SwTextFormatColl* pSplitColl, int nOutlineLevel )
@@ -353,8 +353,8 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
if( nNodeDiff )
{
SwPaM aTmp( *pStartNd, aEndIdx.GetNode(), 1, -1 );
- aTmp.GetPoint()->nContent.Assign( 0, 0 );
- aTmp.GetMark()->nContent.Assign( 0, 0 );
+ aTmp.GetPoint()->nContent.Assign( nullptr, 0 );
+ aTmp.GetMark()->nContent.Assign( nullptr, 0 );
SwNodeIndex aSIdx( aTmp.GetMark()->nNode );
SwNodeIndex aEIdx( aTmp.GetPoint()->nNode );
@@ -400,7 +400,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
// If the link cannot be found anymore,
// it has to be a bug!
if( !pOutlNds->Seek_Entry( pStartNd, &nOutl ))
- pStartNd = 0;
+ pStartNd = nullptr;
++nOutl;
}
break;
@@ -410,7 +410,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
const OUString sNm( INetURLObject( sFileName ).GetName() );
SwSectionData aSectData( FILE_LINK_SECTION,
GetUniqueSectionName( &sNm ));
- SwSectionFormat* pFormat = MakeSectionFormat( 0 );
+ SwSectionFormat* pFormat = MakeSectionFormat( nullptr );
aSectData.SetLinkFileName(sFileName);
aSectData.SetProtectFlag(true);
@@ -465,12 +465,12 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
if (aEndIdx >= aStartIdx)
{
pSectNd = GetNodes().InsertTextSection(aStartIdx,
- *pFormat, aSectData, 0, &aEndIdx, false);
+ *pFormat, aSectData, nullptr, &aEndIdx, false);
}
else
{
pSectNd = GetNodes().InsertTextSection(aEndIdx,
- *pFormat, aSectData, 0, &aStartIdx, false);
+ *pFormat, aSectData, nullptr, &aStartIdx, false);
}
// <- #i26762#
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 282df7f7af2a..5d9f9be892e5 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -150,7 +150,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
OSL_ENSURE(pGDoc->GetDocShell(), "no SwDocShell at glossary");
if (GetDocShell() && pGDoc->GetDocShell())
pGDoc->ReplaceDocumentProperties( *this );
- pGDoc->getIDocumentFieldsAccess().SetFixFields(false, NULL);
+ pGDoc->getIDocumentFieldsAccess().SetFixFields(false, nullptr);
// StartAllAction();
getIDocumentFieldsAccess().LockExpFields();
@@ -167,7 +167,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
aCpyPam.GetPoint()->nContent.Assign(
pContentNd, (pContentNd) ? pContentNd->Len() : 0 );
- GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
SwPaM *_pStartCrsr = &rPaM, *__pStartCrsr = _pStartCrsr;
do {
@@ -194,11 +194,11 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
pShell->SaveTableBoxContent( &rInsPos );
} while( (_pStartCrsr = static_cast<SwPaM *>(_pStartCrsr->GetNext())) !=
__pStartCrsr );
- GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
if( !getIDocumentFieldsAccess().IsExpFieldsLocked() )
- getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
bRet = true;
}
mbInsOnlyTextGlssry = bSav_IsInsGlossary;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 7419d871f7e8..9bee9bf6d4c1 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -188,7 +188,7 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
pFormat->SetFormatAttr( SwFormatContent( rNode.StartOfSectionNode() ));
- const SwFormatAnchor* pAnchor = 0;
+ const SwFormatAnchor* pAnchor = nullptr;
if( pFlySet )
{
pFlySet->GetItemState( RES_ANCHOR, false,
@@ -246,15 +246,15 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
const sal_Int32 nStt = rAnchPos.nContent.GetIndex();
SwTextNode * pTextNode = rAnchPos.nNode.GetNode().GetTextNode();
- OSL_ENSURE(pTextNode!= 0, "There should be a SwTextNode!");
+ OSL_ENSURE(pTextNode!= nullptr, "There should be a SwTextNode!");
- if (pTextNode != NULL)
+ if (pTextNode != nullptr)
{
SwFormatFlyCnt aFormat( pFormat );
// may fail if there's no space left or header/ftr
if (!pTextNode->InsertItem(aFormat, nStt, nStt))
{ // pFormat is dead now
- return 0;
+ return nullptr;
}
}
}
@@ -300,7 +300,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType,
const SfxItemSet* pFlySet,
SwFrameFormat* pFrameFormat, bool bCalledFromShell )
{
- SwFlyFrameFormat* pFormat = 0;
+ SwFlyFrameFormat* pFormat = nullptr;
if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) )
{
const SwFormatAnchor* pAnch;
@@ -332,7 +332,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType,
SwContentNode * pAnchorNode = pAnchorPos->nNode.GetNode().GetContentNode();
assert(pAnchorNode); // pAnchorNode from cursor, must be valid
- const SfxPoolItem * pItem = NULL;
+ const SfxPoolItem * pItem = nullptr;
if (bCalledFromShell && !lcl_IsItemSet(*pNewTextNd, RES_PARATR_ADJUST) &&
SfxItemState::SET == pAnchorNode->GetSwAttrSet().
@@ -353,7 +353,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
{
const SwFormatAnchor& rAnch = static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR ));
- GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, nullptr );
SwFlyFrameFormat* pFormat = MakeFlySection( rAnch.GetAnchorId(), rPam.GetPoint(),
&rSet, pParent );
@@ -415,7 +415,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
aIndex = rContent.GetContentIdx()->GetNode().EndOfSectionIndex() - 1;
OSL_ENSURE( aIndex.GetNode().GetTextNode(),
"a TextNode should be here" );
- aPos.nContent.Assign( 0, 0 ); // Deregister index!
+ aPos.nContent.Assign( nullptr, 0 ); // Deregister index!
GetNodes().Delete( aIndex );
// This is a hack: whilst FlyFrames/Headers/Footers are not undoable we delete all Undo objects
@@ -460,7 +460,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, nullptr );
return pFormat;
}
@@ -603,18 +603,18 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso,
*/
static void lcl_CpyAttr( SfxItemSet &rNewSet, const SfxItemSet &rOldSet, sal_uInt16 nWhich )
{
- const SfxPoolItem *pOldItem = NULL;
+ const SfxPoolItem *pOldItem = nullptr;
rOldSet.GetItemState( nWhich, false, &pOldItem);
- if (pOldItem != NULL)
+ if (pOldItem != nullptr)
rNewSet.Put( *pOldItem );
else
{
pOldItem = rOldSet.GetItem( nWhich );
- if (pOldItem != NULL)
+ if (pOldItem != nullptr)
{
const SfxPoolItem *pNewItem = rNewSet.GetItem( nWhich );
- if (pNewItem != NULL)
+ if (pNewItem != nullptr)
{
if (*pOldItem != *pNewItem)
rNewSet.Put( *pOldItem );
@@ -646,10 +646,10 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
// Get the field first, because we retrieve the TextColl via the field's name
OSL_ENSURE( nId == USHRT_MAX || nId < rDoc.getIDocumentFieldsAccess().GetFieldTypes()->size(),
"FieldType index out of bounds." );
- SwFieldType *pType = (nId != USHRT_MAX) ? (*rDoc.getIDocumentFieldsAccess().GetFieldTypes())[nId] : NULL;
+ SwFieldType *pType = (nId != USHRT_MAX) ? (*rDoc.getIDocumentFieldsAccess().GetFieldTypes())[nId] : nullptr;
OSL_ENSURE(!pType || pType->Which() == RES_SETEXPFLD, "wrong Id for Label");
- SwTextFormatColl * pColl = NULL;
+ SwTextFormatColl * pColl = nullptr;
if( pType )
{
for( auto i = pTextFormatCollTable->size(); i; )
@@ -668,8 +668,8 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_LABEL );
}
- SwTextNode *pNew = NULL;
- SwFlyFrameFormat* pNewFormat = NULL;
+ SwTextNode *pNew = nullptr;
+ SwFlyFrameFormat* pNewFormat = nullptr;
switch ( eType )
{
@@ -719,7 +719,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
// #i115719#
// <title> and <description> attributes are lost when calling <DelFrms()>.
// Thus, keep them and restore them after the calling <MakeFrms()>
- const bool bIsSwFlyFrameFormatInstance( dynamic_cast<SwFlyFrameFormat*>(pOldFormat) != 0 );
+ const bool bIsSwFlyFrameFormatInstance( dynamic_cast<SwFlyFrameFormat*>(pOldFormat) != nullptr );
const OUString sTitle( bIsSwFlyFrameFormatInstance
? static_cast<SwFlyFrameFormat*>(pOldFormat)->GetObjTitle()
: OUString() );
@@ -955,7 +955,7 @@ SwDoc::InsertLabel(
OUString const& rCharacterStyle,
bool const bCpyBrd )
{
- SwUndoInsertLabel * pUndo(0);
+ SwUndoInsertLabel * pUndo(nullptr);
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoInsertLabel(
@@ -995,10 +995,10 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
// Because we get by the TextColl's name, we need to create the field first.
OSL_ENSURE( nId == USHRT_MAX || nId < rDoc.getIDocumentFieldsAccess().GetFieldTypes()->size(),
"FieldType index out of bounds" );
- SwFieldType *pType = nId != USHRT_MAX ? (*rDoc.getIDocumentFieldsAccess().GetFieldTypes())[nId] : 0;
+ SwFieldType *pType = nId != USHRT_MAX ? (*rDoc.getIDocumentFieldsAccess().GetFieldTypes())[nId] : nullptr;
OSL_ENSURE( !pType || pType->Which() == RES_SETEXPFLD, "Wrong label id" );
- SwTextFormatColl *pColl = NULL;
+ SwTextFormatColl *pColl = nullptr;
if( pType )
{
for( auto i = pTextFormatCollTable->size(); i; )
@@ -1017,8 +1017,8 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_LABEL );
}
- SwTextNode* pNew = NULL;
- SwFlyFrameFormat* pNewFormat = NULL;
+ SwTextNode* pNew = nullptr;
+ SwFlyFrameFormat* pNewFormat = nullptr;
// Destroy Frame,
// insert new Frame,
@@ -1232,13 +1232,13 @@ SwFlyFrameFormat* SwDoc::InsertDrawLabel(
OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFormat()->Which(),
"InsertDrawLabel(): not a DrawFrameFormat" );
if (!pContact)
- return 0;
+ return nullptr;
SwDrawFrameFormat* pOldFormat = static_cast<SwDrawFrameFormat *>(pContact->GetFormat());
if (!pOldFormat)
- return 0;
+ return nullptr;
- SwUndoInsertLabel * pUndo = 0;
+ SwUndoInsertLabel * pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().ClearRedo();
@@ -1350,9 +1350,9 @@ const SwFlyFrameFormat* SwDoc::FindFlyByName( const OUString& rName, sal_Int8 nN
for( auto n = rFormats.size(); n; )
{
const SwFrameFormat* pFlyFormat = rFormats[ --n ];
- const SwNodeIndex* pIdx = 0;
+ const SwNodeIndex* pIdx = nullptr;
if( RES_FLYFRMFMT == pFlyFormat->Which() && pFlyFormat->GetName() == rName &&
- 0 != ( pIdx = pFlyFormat->GetContent().GetContentIdx() ) &&
+ nullptr != ( pIdx = pFlyFormat->GetContent().GetContentIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
if( nNdTyp )
@@ -1368,7 +1368,7 @@ const SwFlyFrameFormat* SwDoc::FindFlyByName( const OUString& rName, sal_Int8 nN
return static_cast<const SwFlyFrameFormat*>(pFlyFormat);
}
}
- return 0;
+ return nullptr;
}
void SwDoc::SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName )
@@ -1421,7 +1421,7 @@ void SwDoc::SetAllUniqueFlyNames()
const OUString aNm = pFlyFormat->GetName();
if ( !aNm.isEmpty() )
{
- sal_Int32 *pNum = 0;
+ sal_Int32 *pNum = nullptr;
sal_Int32 nLen = 0;
if ( aNm.startsWith(sGrfNm) )
{
@@ -1467,7 +1467,7 @@ void SwDoc::SetAllUniqueFlyNames()
{
const SwNodeIndex* pIdx;
- if( 0 != ( pIdx = ( pFlyFormat = aArr[ --n ])->GetContent().GetContentIdx() )
+ if( nullptr != ( pIdx = ( pFlyFormat = aArr[ --n ])->GetContent().GetContentIdx() )
&& pIdx->GetNode().GetNodes().IsDocNodes() )
{
switch( GetNodes()[ pIdx->GetIndex() + 1 ]->GetNodeType() )
@@ -1559,8 +1559,8 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
}
}
- return 0 != pNd->FindHeaderStartNode() ||
- 0 != pNd->FindFooterStartNode();
+ return nullptr != pNd->FindHeaderStartNode() ||
+ nullptr != pNd->FindFooterStartNode();
}
short SwDoc::GetTextDirection( const SwPosition& rPos,
@@ -1577,7 +1577,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
}
if ( nRet == -1 )
{
- const SvxFrameDirectionItem* pItem = 0;
+ const SvxFrameDirectionItem* pItem = nullptr;
if( pNd )
{
// Are we in a FlyFrame? Then look at that for the correct attribute
@@ -1587,7 +1587,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
pItem = &pFlyFormat->GetFrmDir();
if( FRMDIR_ENVIRONMENT == pItem->GetValue() )
{
- pItem = 0;
+ pItem = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor())
@@ -1596,10 +1596,10 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
GetNode().GetFlyFormat();
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
if( !pItem )
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9fcbde5c0247..72aa885258d8 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -192,10 +192,10 @@ static void lcl_DelFormatIndices( SwFormat* pFormat )
{
SwFormatContent &rFormatContent = (SwFormatContent&)pFormat->GetContent();
if ( rFormatContent.GetContentIdx() )
- rFormatContent.SetNewContentIdx( 0 );
+ rFormatContent.SetNewContentIdx( nullptr );
SwFormatAnchor &rFormatAnchor = (SwFormatAnchor&)pFormat->GetAnchor();
if ( rFormatAnchor.GetContentAnchor() )
- rFormatAnchor.SetAnchor( 0 );
+ rFormatAnchor.SetAnchor( nullptr );
}
/*
@@ -225,10 +225,10 @@ SwDoc::SwDoc()
m_pDocumentLayoutManager( new ::sw::DocumentLayoutManager( *this ) ),
m_pDocumentStylePoolManager( new ::sw::DocumentStylePoolManager( *this ) ),
m_pDocumentExternalDataManager( new ::sw::DocumentExternalDataManager() ),
- mpDfltFrameFormat( new SwFrameFormat( GetAttrPool(), sFrameFormatStr, 0 ) ),
+ mpDfltFrameFormat( new SwFrameFormat( GetAttrPool(), sFrameFormatStr, nullptr ) ),
mpEmptyPageFormat( new SwFrameFormat( GetAttrPool(), sEmptyPageStr, mpDfltFrameFormat ) ),
mpColumnContFormat( new SwFrameFormat( GetAttrPool(), sColumnCntStr, mpDfltFrameFormat ) ),
- mpDfltCharFormat( new SwCharFormat( GetAttrPool(), sCharFormatStr, 0 ) ),
+ mpDfltCharFormat( new SwCharFormat( GetAttrPool(), sCharFormatStr, nullptr ) ),
mpDfltTextFormatColl( new SwTextFormatColl( GetAttrPool(), sTextCollStr ) ),
mpDfltGrfFormatColl( new SwGrfFormatColl( GetAttrPool(), sGrfCollStr ) ),
mpFrameFormatTable( new SwFrameFormats() ),
@@ -240,21 +240,21 @@ SwDoc::SwDoc()
mpGrfFormatCollTable( new SwGrfFormatColls() ),
mpTOXTypes( new SwTOXTypes() ),
mpDefTOXBases( new SwDefTOXBase_Impl() ),
- mpGlossaryDoc( 0 ),
- mpOutlineRule( 0 ),
+ mpGlossaryDoc( nullptr ),
+ mpOutlineRule( nullptr ),
mpFootnoteInfo( new SwFootnoteInfo ),
mpEndNoteInfo( new SwEndNoteInfo ),
mpLineNumberInfo( new SwLineNumberInfo ),
mpFootnoteIdxs( new SwFootnoteIdxs ),
- mpDocShell( 0 ),
- mpACEWord( 0 ),
- mpURLStateChgd( 0 ),
- mpNumberFormatter( 0 ),
+ mpDocShell( nullptr ),
+ mpACEWord( nullptr ),
+ mpURLStateChgd( nullptr ),
+ mpNumberFormatter( nullptr ),
mpNumRuleTable( new SwNumRuleTable ),
- mpPgPViewPrtData( 0 ),
- mpExtInputRing( 0 ),
- mpStyleAccess( 0 ),
- mpLayoutCache( 0 ),
+ mpPgPViewPrtData( nullptr ),
+ mpExtInputRing( nullptr ),
+ mpStyleAccess( nullptr ),
+ mpLayoutCache( nullptr ),
mpGrammarContact(createGrammarContact()),
mpTableStyles(new SwTableAutoFormatTable),
m_pXmlIdRegistry(),
@@ -358,7 +358,7 @@ SwDoc::SwDoc()
mpStyleAccess = createStyleManager( &aIgnorableParagraphItems );
}
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
{
@@ -390,11 +390,11 @@ SwDoc::~SwDoc()
if (mpDocShell)
{
- mpDocShell->SetUndoManager(0);
+ mpDocShell->SetUndoManager(nullptr);
}
delete mpGrammarContact;
- mpGrammarContact = 0;
+ mpGrammarContact = nullptr;
//!! needs to be done to destroy a possible SwFormatDrop format that may
//!! be connected to a char format which may not otherwise be removed
@@ -403,7 +403,7 @@ SwDoc::~SwDoc()
SwFormatDrop aDrop;
SetDefault(aDrop);
//!! same for SwFormatCharFormat
- SwFormatCharFormat aCharFormat(NULL);
+ SwFormatCharFormat aCharFormat(nullptr);
SetDefault(aCharFormat);
getIDocumentTimerAccess().StopIdling(); // stop idle timer
@@ -463,7 +463,7 @@ SwDoc::~SwDoc()
if( mpExtInputRing )
{
SwPaM* pTmp = mpExtInputRing;
- mpExtInputRing = 0;
+ mpExtInputRing = nullptr;
while( pTmp->GetNext() != pTmp )
delete pTmp->GetNext();
delete pTmp;
@@ -603,7 +603,7 @@ void SwDoc::SetDocShell( SwDocShell* pDSh )
{
if (mpDocShell)
{
- mpDocShell->SetUndoManager(0);
+ mpDocShell->SetUndoManager(nullptr);
}
mpDocShell = pDSh;
if (mpDocShell)
@@ -628,7 +628,7 @@ uno::Reference < embed::XStorage > SwDoc::GetDocStorage()
return mpDocShell->GetStorage();
if( getIDocumentLinksAdministration().GetLinkManager().GetPersist() )
return getIDocumentLinksAdministration().GetLinkManager().GetPersist()->GetStorage();
- return NULL;
+ return nullptr;
}
SfxObjectShell* SwDoc::GetPersist() const
@@ -687,7 +687,7 @@ void SwDoc::ClearDoc()
// #i62440#
// destruction of numbering rules and creation of new outline rule
// *after* the document nodes are deleted.
- mpOutlineRule = NULL;
+ mpOutlineRule = nullptr;
for( SwNumRule* pNumRule : *mpNumRuleTable )
delete pNumRule;
mpNumRuleTable->clear();
@@ -735,7 +735,7 @@ void SwDoc::ClearDoc()
GetDocumentFieldsManager().ClearFieldTypes();
- delete mpNumberFormatter, mpNumberFormatter = 0;
+ delete mpNumberFormatter, mpNumberFormatter = nullptr;
getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD );
pFirstNd->ChgFormatColl( getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ));
@@ -788,7 +788,7 @@ IGrammarContact* getGrammarContact( const SwTextNode& rTextNode )
{
const SwDoc* pDoc = rTextNode.GetDoc();
if( !pDoc || pDoc->IsInDtor() )
- return 0;
+ return nullptr;
return pDoc->getGrammarContact();
}
@@ -895,7 +895,7 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
SAL_INFO( "sw.createcopy", "CC-Nd-Src: " << CNTNT_DOC( this ) );
SAL_INFO( "sw.createcopy", "CC-Nd: " << CNTNT_DOC( pRet ) );
#endif
- pRet->AppendDoc(*this, 0, NULL, bCallInitNew);
+ pRet->AppendDoc(*this, 0, nullptr, bCallInitNew);
#ifdef DBG_UTIL
SAL_INFO( "sw.createcopy", "CC-Nd: " << CNTNT_DOC( pRet ) );
#endif
@@ -1009,7 +1009,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
<< " " << aCpyPam.GetNode().GetIndex() << ")" );
#endif
- this->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
+ this->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
this->getIDocumentFieldsAccess().LockExpFields();
// Position where the appended doc starts. Will be filled in later (uses GetEndOfContent() because SwNodeIndex has no default ctor).
@@ -1062,8 +1062,8 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
// this keeps all other settings as in the pasted document
if ( nStartPageNumber || pTargetPageDesc ) {
SfxPoolItem *pNewItem;
- SwTextNode *aTextNd = 0;
- SwFormat *pFormat = 0;
+ SwTextNode *aTextNd = nullptr;
+ SwFormat *pFormat = nullptr;
// find the first node allowed to contain a RES_PAGEDESC
while (true) {
@@ -1153,10 +1153,10 @@ else
}
}
- this->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
+ this->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
- getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ getIDocumentFieldsAccess().UpdateFields(nullptr, false);
if ( pTargetShell )
pTargetShell->EndAllAction();
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 3616589da8d8..5b44797f25bd 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -144,7 +144,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
if( !GetFootnoteIdxs().empty() && FTNNUM_CHAPTER == GetFootnoteInfo().eNum )
GetFootnoteIdxs().UpdateAllFootnote();
- getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
getIDocumentState().SetModified();
}
@@ -216,7 +216,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
/* Find the last occupied level (backward). */
for (n = MAXLEVEL - 1; n > 0; n--)
{
- if (aCollArr[n] != 0)
+ if (aCollArr[n] != nullptr)
break;
}
@@ -224,7 +224,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
unoccupied) until a valid level is found. If no occupied level
was found n is 0 and aCollArr[0] is 0. In this case no demoting
is possible. */
- if (aCollArr[n] != 0)
+ if (aCollArr[n] != nullptr)
{
while (n < MAXLEVEL - 1)
{
@@ -245,7 +245,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
/* Find the first occupied level (forward). */
for (n = 0; n < MAXLEVEL - 1; n++)
{
- if (aCollArr[n] != 0)
+ if (aCollArr[n] != nullptr)
break;
}
@@ -253,7 +253,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
unoccupied) until a valid level is found. If no occupied level
was found n is MAXLEVEL - 1 and aCollArr[MAXLEVEL - 1] is 0. In
this case no demoting is possible. */
- if (aCollArr[n] != 0)
+ if (aCollArr[n] != nullptr)
{
while (n > 0)
{
@@ -308,7 +308,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
If outline level n has no assigned paragraph style
aMoveArr[n] is set to -1.
*/
- if (aCollArr[n] != NULL)
+ if (aCollArr[n] != nullptr)
{
int m = n;
int nCount = nNum;
@@ -317,7 +317,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
m += nStep;
- if (aCollArr[m] != NULL)
+ if (aCollArr[m] != nullptr)
nCount--;
}
@@ -363,7 +363,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo(UNDO_OUTLINE_LR, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_OUTLINE_LR, nullptr);
SwUndo *const pUndoOLR( new SwUndoOutlineLeftRight( rPam, nOffset ) );
GetIDocumentUndoRedo().AppendUndo(pUndoOLR);
}
@@ -385,7 +385,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
pColl = aCollArr[ aMoveArr[nLevel] ];
- if (pColl != NULL)
+ if (pColl != nullptr)
pTextNd->ChgFormatColl( pColl );
}
@@ -401,7 +401,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().EndUndo(UNDO_OUTLINE_LR, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_OUTLINE_LR, nullptr);
}
ChkCondColls();
@@ -829,18 +829,18 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam,
{
OUString sListId;
- SwUndoInsNum * pUndo = NULL;
+ SwUndoInsNum * pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
// Start/End for attributes!
- GetIDocumentUndoRedo().StartUndo( UNDO_INSNUM, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSNUM, nullptr );
pUndo = new SwUndoInsNum( rPam, rRule );
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwNumRule* pNewOrChangedNumRule = FindNumRulePtr( rRule.GetName() );
bool bNewNumRuleCreated = false;
- if ( pNewOrChangedNumRule == NULL )
+ if ( pNewOrChangedNumRule == nullptr )
{
// create new numbering rule based on given one
pNewOrChangedNumRule = ( *mpNumRuleTable )[MakeNumRule( rRule.GetName(), &rRule )];
@@ -893,7 +893,7 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam,
{
SwTextNode * pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode();
// robust code: consider case that the PaM doesn't denote a text node - e.g. it denotes a graphic node
- if ( pTextNd != NULL )
+ if ( pTextNd != nullptr )
{
SwNumRule * pRule = pTextNd->GetNumRule();
@@ -936,7 +936,7 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam,
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().EndUndo( UNDO_INSNUM, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSNUM, nullptr );
}
getIDocumentState().SetModified();
@@ -1046,7 +1046,7 @@ void SwDoc::ChgNumRuleFormats( const SwNumRule& rRule )
SwNumRule* pRule = FindNumRulePtr( rRule.GetName() );
if( pRule )
{
- SwUndoInsNum* pUndo = 0;
+ SwUndoInsNum* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoInsNum( *pRule, rRule );
@@ -1127,11 +1127,11 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
*pNewRule = FindNumRulePtr( rNewRule );
if( pOldRule && pNewRule && pOldRule != pNewRule )
{
- SwUndoInsNum* pUndo = 0;
+ SwUndoInsNum* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
// Start/End for attributes!
- GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
pUndo = new SwUndoInsNum( rPos, *pNewRule, rOldRule );
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
@@ -1140,7 +1140,7 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
pOldRule->GetTextNodeList( aTextNodeList );
if ( aTextNodeList.size() > 0 )
{
- SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
+ SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr );
sal_uInt16 nChgFormatLevel = 0;
for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
@@ -1168,7 +1168,7 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
pTextNd->NumRuleChgd();
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
getIDocumentState().SetModified();
bRet = true;
@@ -1187,7 +1187,7 @@ namespace
OUString sListId;
ListStyleData()
- : pReplaceNumRule( 0 ),
+ : pReplaceNumRule( nullptr ),
bCreateNewList( false ),
sListId()
{}
@@ -1216,7 +1216,7 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
{
ListStyleData aListStyleData = aMyNumRuleMap[pRule];
- if ( aListStyleData.pReplaceNumRule == 0 )
+ if ( aListStyleData.pReplaceNumRule == nullptr )
{
if (bFirst)
{
@@ -1228,7 +1228,7 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
aListStyleData.sListId, true ));
}
- if ( aListStyleData.pReplaceNumRule == 0 )
+ if ( aListStyleData.pReplaceNumRule == nullptr )
{
aListStyleData.pReplaceNumRule = new SwNumRule(*pRule);
aListStyleData.pReplaceNumRule->SetName( GetUniqueNumRuleName(), getIDocumentListsAccess() );
@@ -1296,16 +1296,16 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
else
- pUndo = 0;
+ pUndo = nullptr;
- SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
+ SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr );
SwNumRuleItem aEmptyRule( aEmptyOUStr );
- const SwNode* pOutlNd = 0;
+ const SwNode* pOutlNd = nullptr;
for( ; nStt <= nEnd; ++nStt )
{
SwTextNode* pTNd = GetNodes()[ nStt ]->GetTextNode();
- SwNumRule* pNumRuleOfTextNode = pTNd ? pTNd->GetNumRule() : 0;
+ SwNumRule* pNumRuleOfTextNode = pTNd ? pTNd->GetNumRule() : nullptr;
if ( pTNd && pNumRuleOfTextNode )
{
// recognize changes of attribute for undo
@@ -1399,7 +1399,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
bool bOverUpper, sal_uInt8* pUpper, sal_uInt8* pLower )
{
const SwTextNode* pNd = rPos.nNode.GetNode().GetTextNode();
- if( !pNd || 0 == pNd->GetNumRule() )
+ if( !pNd || nullptr == pNd->GetNumRule() )
return false;
sal_uInt8 nSrchNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
@@ -1443,7 +1443,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
if( bNext )
++aIdx, pLast = pNd;
else
- --aIdx, pLast = 0;
+ --aIdx, pLast = nullptr;
while( bNext ? ( aIdx.GetIndex() < aIdx.GetNodes().Count() - 1 )
: aIdx.GetIndex() != 0 )
@@ -1517,7 +1517,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
OUString& sListId,
const bool bInvestigateStartNode)
{
- const SwNumRule * pResult = NULL;
+ const SwNumRule * pResult = nullptr;
SwTextNode * pTextNd = rPos.nNode.GetNode().GetTextNode();
SwNode * pStartFromNode = pTextNd;
@@ -1526,7 +1526,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
SwNodeIndex aIdx(rPos.nNode);
// - the start node has also been investigated, if requested.
- const SwNode * pNode = NULL;
+ const SwNode * pNode = nullptr;
do
{
if ( !bInvestigateStartNode )
@@ -1555,7 +1555,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
break;
}
- else if (pTextNd->Len() > 0 || NULL != pTextNd->GetNumRule())
+ else if (pTextNd->Len() > 0 || nullptr != pTextNd->GetNumRule())
{
if (nNonEmptyAllowed == 0)
break;
@@ -1839,7 +1839,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
SwNodeIndex aIdx( nOffset > 0 ? pEnd->nNode : pStt->nNode, nOffs );
SwNodeRange aMvRg( pStt->nNode, 0, pEnd->nNode, +1 );
- SwRangeRedline* pOwnRedl = 0;
+ SwRangeRedline* pOwnRedl = nullptr;
if( getIDocumentRedlineAccess().IsRedlineOn() )
{
// If the range is completely in the own Redline, we can move it!
@@ -1865,21 +1865,21 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos+1 ];
if( *pTmp->Start() == *pREnd )
// then don't!
- pOwnRedl = 0;
+ pOwnRedl = nullptr;
}
if( pOwnRedl &&
!( pRStt->nNode <= aIdx && aIdx <= pREnd->nNode ))
{
// it's not in itself, so don't move it
- pOwnRedl = 0;
+ pOwnRedl = nullptr;
}
}
}
if( !pOwnRedl )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
// First the Insert, then the Delete
SwPosition aInsPos( aIdx );
@@ -1969,14 +1969,14 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
// prevent assertion from aPam's target being deleted
// (Alternatively, one could just let aPam go out of scope, but
// that requires touching a lot of code.)
- aPam.GetBound().nContent.Assign( NULL, 0 );
- aPam.GetBound(false).nContent.Assign( NULL, 0 );
+ aPam.GetBound().nContent.Assign( nullptr, 0 );
+ aPam.GetBound(false).nContent.Assign( nullptr, 0 );
getIDocumentRedlineAccess().AppendRedline( pNewRedline, true );
// Still NEEDS to be optimized!
getIDocumentRedlineAccess().SetRedlineMode( eOld );
- GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
getIDocumentState().SetModified();
return true;
@@ -1997,7 +1997,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
nRedlEndNd = pREnd->nNode.GetIndex();
}
- SwUndoMoveNum* pUndo = 0;
+ SwUndoMoveNum* pUndo = nullptr;
sal_uLong nMoved = 0;
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -2043,7 +2043,7 @@ bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, bool bDel )
bool bResult = false;
SwTextNode * pTextNd = rIdx.GetNode().GetTextNode();
- if (pTextNd && pTextNd->GetNumRule() != NULL &&
+ if (pTextNd && pTextNd->GetNumRule() != nullptr &&
(pTextNd->HasNumber() || pTextNd->HasBullet()))
{
if ( !pTextNd->IsCountedInList() == !bDel)
@@ -2080,10 +2080,10 @@ bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, bool bDel )
SwNumRule* SwDoc::GetNumRuleAtPos( const SwPosition& rPos )
{
- SwNumRule* pRet = NULL;
+ SwNumRule* pRet = nullptr;
SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode();
- if ( pTNd != NULL )
+ if ( pTNd != nullptr )
{
pRet = pTNd->GetNumRule();
}
@@ -2102,7 +2102,7 @@ sal_uInt16 SwDoc::FindNumRule( const OUString& rName ) const
SwNumRule* SwDoc::FindNumRulePtr( const OUString& rName ) const
{
- SwNumRule * pResult = 0;
+ SwNumRule * pResult = nullptr;
pResult = maNumRuleMap[rName];
@@ -2195,7 +2195,7 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c
OUString aName;
if( bAutoNum )
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
{
@@ -2210,13 +2210,13 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c
aName = OUString::number( (n < 0 ? -n : n) );
}
if( pChkStr && pChkStr->isEmpty() )
- pChkStr = 0;
+ pChkStr = nullptr;
}
else if( pChkStr && !pChkStr->isEmpty() )
aName = *pChkStr;
else
{
- pChkStr = 0;
+ pChkStr = nullptr;
aName = SW_RESSTR( STR_NUMRULE_DEFNAME );
}
@@ -2233,7 +2233,7 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c
if( ++nNmLen < aName.getLength() )
{
aName = aName.copy(0, nNmLen );
- pChkStr = 0;
+ pChkStr = nullptr;
}
}
@@ -2241,7 +2241,7 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c
sal_uInt16 n;
for( n = 0; n < mpNumRuleTable->size(); ++n )
- if( 0 != ( pNumRule = (*mpNumRuleTable)[ n ] ) )
+ if( nullptr != ( pNumRule = (*mpNumRuleTable)[ n ] ) )
{
const OUString sNm = pNumRule->GetName();
if( sNm.startsWith( aName ) )
@@ -2252,7 +2252,7 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
if( pChkStr && *pChkStr==sNm )
- pChkStr = 0;
+ pChkStr = nullptr;
}
if( !pChkStr )
@@ -2308,7 +2308,7 @@ bool SwDoc::IsFirstOfNumRuleAtPos( const SwPosition & rPos )
bool bResult = false;
const SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode();
- if ( pTextNode != NULL )
+ if ( pTextNode != nullptr )
{
bResult = pTextNode->IsFirstOfNumRule();
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index a329912a887b..936245a4550f 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -60,7 +60,7 @@ using namespace com::sun::star;
{
SwRedlineTable::size_type nDummy = 0;
const SwRangeRedline* pCurrent = rTable[ n ];
- const SwRangeRedline* pNext = n+1 < rTable.size() ? rTable[ n+1 ] : 0;
+ const SwRangeRedline* pNext = n+1 < rTable.size() ? rTable[ n+1 ] : nullptr;
if( pCurrent == pNext )
++nDummy;
if( n == nWatch )
@@ -222,7 +222,7 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
{
SwExtraRedline* pExtraRedline = GetRedline(nCurRedlinePos);
const SwTableRowRedline* pTableRowRedline = dynamic_cast<const SwTableRowRedline*>(pExtraRedline);
- const SwTableLine *pRedTabLine = pTableRowRedline ? &pTableRowRedline->GetTableLine() : NULL;
+ const SwTableLine *pRedTabLine = pTableRowRedline ? &pTableRowRedline->GetTableLine() : nullptr;
if ( pRedTabLine == &rTableLine )
{
// Redline for this table row
@@ -269,7 +269,7 @@ bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox&
{
SwExtraRedline* pExtraRedline = GetRedline(nCurRedlinePos);
const SwTableCellRedline* pTableCellRedline = dynamic_cast<const SwTableCellRedline*>(pExtraRedline);
- const SwTableBox *pRedTabBox = pTableCellRedline ? &pTableCellRedline->GetTableBox() : NULL;
+ const SwTableBox *pRedTabBox = pTableCellRedline ? &pTableCellRedline->GetTableBox() : nullptr;
if ( pRedTabBox == &rTableBox )
{
// Redline for this table cell
@@ -342,7 +342,7 @@ bool SwRedlineTable::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsP
aNewStt.nNode = rNds.GetEndOfContent();
}
- SwRangeRedline* pNew = 0;
+ SwRangeRedline* pNew = nullptr;
sal_uInt16 nInsPos;
if( aNewStt < *pEnd )
@@ -377,7 +377,7 @@ bool SwRedlineTable::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsP
if( *pNew->GetPoint() > *pEnd )
{
- pC = 0;
+ pC = nullptr;
if( aNewStt.nNode != pEnd->nNode )
do {
SwNode& rCurNd = aNewStt.nNode.GetNode();
@@ -416,13 +416,13 @@ bool SwRedlineTable::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsP
{
pNew->CallDisplayFunc(0, nInsPos);
bAnyIns = true;
- pNew = 0;
+ pNew = nullptr;
if( pInsPos && *pInsPos < nInsPos )
*pInsPos = nInsPos;
}
if( aNewStt >= *pEnd ||
- 0 == (pC = rNds.GoNext( &aNewStt.nNode )) )
+ nullptr == (pC = rNds.GoNext( &aNewStt.nNode )) )
break;
aNewStt.nContent.Assign( pC, 0 );
@@ -430,7 +430,7 @@ bool SwRedlineTable::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsP
} while( aNewStt < *pEnd );
delete pNew;
- delete p, p = 0;
+ delete p, p = nullptr;
return bAnyIns;
}
@@ -463,7 +463,7 @@ bool SwRedlineTable::Remove( const SwRangeRedline* p )
void SwRedlineTable::Remove( sal_uInt16 nP )
{
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
if( !nP && 1 == size() )
pDoc = maVector.front()->GetDoc();
@@ -471,7 +471,7 @@ void SwRedlineTable::Remove( sal_uInt16 nP )
SwViewShell* pSh;
if( pDoc && !pDoc->IsInDtor() &&
- 0 != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()) )
+ nullptr != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()) )
pSh->InvalidateWindows( SwRect( 0, 0, SAL_MAX_INT32, SAL_MAX_INT32 ) );
}
@@ -482,7 +482,7 @@ void SwRedlineTable::DeleteAndDestroyAll()
void SwRedlineTable::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
if( !nP && nL && nL == size() )
pDoc = maVector.front()->GetDoc();
@@ -492,7 +492,7 @@ void SwRedlineTable::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
SwViewShell* pSh;
if( pDoc && !pDoc->IsInDtor() &&
- 0 != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) )
+ nullptr != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) )
pSh->InvalidateWindows( SwRect( 0, 0, SAL_MAX_INT32, SAL_MAX_INT32 ) );
}
@@ -562,7 +562,7 @@ const SwRangeRedline* SwRedlineTable::FindAtPosition( const SwPosition& rSttPos,
sal_uInt16& rPos,
bool bNext ) const
{
- const SwRangeRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = nullptr;
for( ; rPos < maVector.size() ; ++rPos )
{
const SwRangeRedline* pTmp = (*this)[ rPos ];
@@ -613,7 +613,7 @@ bool SwRedlineExtraData::operator == ( const SwRedlineExtraData& ) const
SwRedlineExtraData_FormatColl::SwRedlineExtraData_FormatColl( const OUString& rColl,
sal_uInt16 nPoolFormatId,
const SfxItemSet* pItemSet )
- : sFormatNm(rColl), pSet(0), nPoolId(nPoolFormatId)
+ : sFormatNm(rColl), pSet(nullptr), nPoolId(nPoolFormatId)
{
if( pItemSet && pItemSet->Count() )
pSet = new SfxItemSet( *pItemSet );
@@ -680,7 +680,7 @@ void SwRedlineExtraData_FormatColl::SetItemSet( const SfxItemSet& rSet )
if( rSet.Count() )
pSet = new SfxItemSet( rSet );
else
- pSet = 0;
+ pSet = nullptr;
}
SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
@@ -747,7 +747,7 @@ bool SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) c
}
SwRedlineExtraData_FormattingChanges::SwRedlineExtraData_FormattingChanges( const SfxItemSet* pItemSet )
- : pSet(0)
+ : pSet(nullptr)
{
if( pItemSet && pItemSet->Count() )
pSet = new SfxItemSet( *pItemSet );
@@ -763,7 +763,7 @@ SwRedlineExtraData_FormattingChanges::SwRedlineExtraData_FormattingChanges( cons
}
else
{
- pSet = 0;
+ pSet = nullptr;
}
}
@@ -800,7 +800,7 @@ bool SwRedlineExtraData_FormattingChanges::operator == ( const SwRedlineExtraDat
}
SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
- : pNext( 0 ), pExtraData( 0 ),
+ : pNext( nullptr ), pExtraData( nullptr ),
aStamp( DateTime::SYSTEM ),
eType( eT ), nAuthor( nAut ), nSeqNo( 0 )
{
@@ -811,8 +811,8 @@ SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
SwRedlineData::SwRedlineData(
const SwRedlineData& rCpy,
bool bCpyNext )
- : pNext( ( bCpyNext && rCpy.pNext ) ? new SwRedlineData( *rCpy.pNext ) : 0 )
- , pExtraData( rCpy.pExtraData ? rCpy.pExtraData->CreateNew() : 0 )
+ : pNext( ( bCpyNext && rCpy.pNext ) ? new SwRedlineData( *rCpy.pNext ) : nullptr )
+ , pExtraData( rCpy.pExtraData ? rCpy.pExtraData->CreateNew() : nullptr )
, sComment( rCpy.sComment )
, aStamp( rCpy.aStamp )
, eType( rCpy.eType )
@@ -845,7 +845,7 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData )
if( pData )
pExtraData = pData->CreateNew();
else
- pExtraData = 0;
+ pExtraData = nullptr;
}
OUString SwRedlineData::GetDescr() const
@@ -856,7 +856,7 @@ OUString SwRedlineData::GetDescr() const
SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
: SwPaM( *rPam.GetMark(), *rPam.GetPoint() ),
pRedlineData( new SwRedlineData( eTyp, GetDoc()->getIDocumentRedlineAccess().GetRedlineAuthor() ) ),
- pContentSect( 0 )
+ pContentSect( nullptr )
{
bDelLastPara = bIsLastParaDelete = false;
bIsVisible = true;
@@ -867,7 +867,7 @@ SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam )
: SwPaM( *rPam.GetMark(), *rPam.GetPoint() ),
pRedlineData( new SwRedlineData( rData )),
- pContentSect( 0 )
+ pContentSect( nullptr )
{
bDelLastPara = bIsLastParaDelete = false;
bIsVisible = true;
@@ -878,7 +878,7 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam )
SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos )
: SwPaM( rPos ),
pRedlineData( new SwRedlineData( rData )),
- pContentSect( 0 )
+ pContentSect( nullptr )
{
bDelLastPara = bIsLastParaDelete = false;
bIsVisible = true;
@@ -887,7 +887,7 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPosition& rP
SwRangeRedline::SwRangeRedline( const SwRangeRedline& rCpy )
: SwPaM( *rCpy.GetMark(), *rCpy.GetPoint() ),
pRedlineData( new SwRedlineData( *rCpy.pRedlineData )),
- pContentSect( 0 )
+ pContentSect( nullptr )
{
bDelLastPara = bIsLastParaDelete = false;
bIsVisible = true;
@@ -916,7 +916,7 @@ bool SwRangeRedline::HasValidRange() const
!pPtNd->StartOfSectionNode()->IsTableNode() &&
// invalid if points on the end of content
// end-of-content only invalid if no content index exists
- ( pPtNd != pMkNd || GetContentIdx() != NULL ||
+ ( pPtNd != pMkNd || GetContentIdx() != nullptr ||
pPtNd != &pPtNd->GetNodes().GetEndOfContent() )
)
return true;
@@ -1333,8 +1333,8 @@ void SwRangeRedline::DelCopyOfSection(size_t nMyPos)
*GetMark() = *pEnd;
DeleteMark();
- aPam.GetBound().nContent.Assign( 0, 0 );
- aPam.GetBound( false ).nContent.Assign( 0, 0 );
+ aPam.GetBound().nContent.Assign( nullptr, 0 );
+ aPam.GetBound( false ).nContent.Assign( nullptr, 0 );
aPam.DeleteMark();
pDoc->getIDocumentContentOperations().DelFullPara( aPam );
}
@@ -1408,7 +1408,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
SwFormatColl* pColl = pCNd && pCNd->Len() && aPam.GetPoint()->nNode !=
aPam.GetMark()->nNode
- ? pCNd->GetFormatColl() : 0;
+ ? pCNd->GetFormatColl() : nullptr;
SwNodeIndex aNdIdx( GetPoint()->nNode, -1 );
const sal_Int32 nPos = GetPoint()->nContent.GetIndex();
@@ -1457,7 +1457,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
{
pDoc->getIDocumentContentOperations().DeleteSection( &pContentSect->GetNode() );
}
- delete pContentSect, pContentSect = 0;
+ delete pContentSect, pContentSect = nullptr;
// adjustment of redline table positions must take start and
// end into account, not point and mark.
@@ -1480,7 +1480,7 @@ void SwRangeRedline::SetContentIdx( const SwNodeIndex* pIdx )
}
else if( !pIdx && pContentSect )
{
- delete pContentSect, pContentSect = 0;
+ delete pContentSect, pContentSect = nullptr;
bIsVisible = false;
}
else
@@ -1516,7 +1516,7 @@ bool SwRangeRedline::PopData()
return false;
SwRedlineData* pCur = pRedlineData;
pRedlineData = pCur->pNext;
- pCur->pNext = 0;
+ pCur->pNext = nullptr;
delete pCur;
return true;
}
@@ -1571,7 +1571,7 @@ const SwRedlineData & SwRangeRedline::GetRedlineData(sal_uInt16 nPos) const
{
SwRedlineData * pCur = pRedlineData;
- while (nPos > 0 && NULL != pCur->pNext)
+ while (nPos > 0 && nullptr != pCur->pNext)
{
pCur = pCur->pNext;
@@ -1588,11 +1588,11 @@ OUString SwRangeRedline::GetDescr(sal_uInt16 nPos)
// get description of redline data (e.g.: "insert $1")
OUString aResult = GetRedlineData(nPos).GetDescr();
- SwPaM * pPaM = NULL;
+ SwPaM * pPaM = nullptr;
bool bDeletePaM = false;
// if this redline is visible the content is in this PaM
- if (NULL == pContentSect)
+ if (nullptr == pContentSect)
{
pPaM = this;
}
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 10d87d7bdd25..0d0c18b83db8 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -93,7 +93,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
sal_uInt16 nMode )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_SETRUBYATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_SETRUBYATTR, nullptr );
std::set<sal_uInt16> aDelArr;
aDelArr.insert( RES_TXTATR_CJK_RUBY );
@@ -174,7 +174,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
} while( 30 > rList.size() &&
(_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr );
- GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, nullptr );
return nListEntry;
}
@@ -205,7 +205,7 @@ bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt
// search the start
// look where a ruby attribute starts
const SwpHints* pHts = pTNd->GetpSwpHints();
- const SwTextAttr* pAttr = 0;
+ const SwTextAttr* pAttr = nullptr;
if( pHts )
{
for( size_t nHtIdx = 0; nHtIdx < pHts->Count(); ++nHtIdx )
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 58bb14e6f6fb..4619226d5c61 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -53,13 +53,13 @@
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star;
-SwSortOptions* SwSortElement::pOptions = 0;
-SwDoc* SwSortElement::pDoc = 0;
-const FlatFndBox* SwSortElement::pBox = 0;
-CollatorWrapper* SwSortElement::pSortCollator = 0;
-lang::Locale* SwSortElement::pLocale = 0;
-OUString* SwSortElement::pLastAlgorithm = 0;
-LocaleDataWrapper* SwSortElement::pLclData = 0;
+SwSortOptions* SwSortElement::pOptions = nullptr;
+SwDoc* SwSortElement::pDoc = nullptr;
+const FlatFndBox* SwSortElement::pBox = nullptr;
+CollatorWrapper* SwSortElement::pSortCollator = nullptr;
+lang::Locale* SwSortElement::pLocale = nullptr;
+OUString* SwSortElement::pLastAlgorithm = nullptr;
+LocaleDataWrapper* SwSortElement::pLclData = nullptr;
// List of all sorted elements
@@ -90,13 +90,13 @@ void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
void SwSortElement::Finit()
{
- delete pOptions, pOptions = 0;
- delete pLocale, pLocale = 0;
- delete pLastAlgorithm, pLastAlgorithm = 0;
- delete pSortCollator, pSortCollator = 0;
- delete pLclData, pLclData = 0;
- pDoc = 0;
- pBox = 0;
+ delete pOptions, pOptions = nullptr;
+ delete pLocale, pLocale = nullptr;
+ delete pLastAlgorithm, pLastAlgorithm = nullptr;
+ delete pSortCollator, pSortCollator = nullptr;
+ delete pLclData, pLclData = nullptr;
+ pDoc = nullptr;
+ pBox = nullptr;
}
SwSortElement::~SwSortElement()
@@ -254,7 +254,7 @@ OUString SwSortBoxElement::GetKey(sal_uInt16 nKey) const
if( pMyBox->GetSttNd() )
{
// Iterate over all the Box's TextNodes
- const SwNode *pNd = 0, *pEndNd = pMyBox->GetSttNd()->EndOfSectionNode();
+ const SwNode *pNd = nullptr, *pEndNd = pMyBox->GetSttNd()->EndOfSectionNode();
for( sal_uLong nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx )
if( ( pNd = pDoc->GetNodes()[ nIdx ])->IsTextNode() )
aRetStr += pNd->GetTextNode()->GetText();
@@ -318,12 +318,12 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
if( bUndo )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
}
- SwPaM* pRedlPam = 0;
- SwUndoRedlineSort* pRedlUndo = 0;
- SwUndoSort* pUndoSort = 0;
+ SwPaM* pRedlPam = nullptr;
+ SwUndoRedlineSort* pRedlUndo = nullptr;
+ SwUndoSort* pUndoSort = nullptr;
// To-Do - add 'SwExtraRedlineTable' also ?
if( getIDocumentRedlineAccess().IsRedlineOn() || (!getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() ))
@@ -356,7 +356,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
pCNd = pRedlPam->GetContentNode();
sal_Int32 nCLen = 0;
if( !pCNd &&
- 0 != (pCNd = GetNodes()[ aEndIdx.GetIndex()-1 ]->GetContentNode()))
+ nullptr != (pCNd = GetNodes()[ aEndIdx.GetIndex()-1 ]->GetContentNode()))
{
nCLen = pCNd->Len();
pRedlPam->GetPoint()->nNode.Assign( *pCNd );
@@ -369,7 +369,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
else
{
getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, USHRT_MAX );
- delete pRedlPam, pRedlPam = 0;
+ delete pRedlPam, pRedlPam = nullptr;
}
}
@@ -460,12 +460,12 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( pRedlUndo )
pRedlUndo->SetOffset( aSttIdx );
- delete pRedlPam, pRedlPam = 0;
+ delete pRedlPam, pRedlPam = nullptr;
}
GetIDocumentUndoRedo().DoUndo( bUndo );
if( bUndo )
{
- GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
return true;
@@ -482,7 +482,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// We begin sorting
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
@@ -530,7 +530,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
return false;
// Delete HTML layout
- pTableNd->GetTable().SetHTMLTableLayout( 0 );
+ pTableNd->GetTable().SetHTMLTableLayout( nullptr );
// #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
@@ -540,7 +540,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
pTableNd->DelFrms();
// ? TL_CHART2: ?
- SwUndoSort* pUndoSort = 0;
+ SwUndoSort* pUndoSort = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndoSort = new SwUndoSort( rBoxes[0]->GetSttIdx(),
@@ -742,8 +742,8 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) :
pDoc(pDocPtr),
rBoxRef(rBox),
- pArr(0),
- ppItemSets(0),
+ pArr(nullptr),
+ ppItemSets(nullptr),
nRow(0),
nCol(0)
{ // If the array is symmetric
@@ -940,7 +940,7 @@ const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) con
{
OSL_ENSURE( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "invalid array access");
- return ppItemSets ? *(ppItemSets + (n_Row * nCols + n_Col )) : 0;
+ return ppItemSets ? *(ppItemSets + (n_Row * nCols + n_Col )) : nullptr;
}
sal_uInt16 SwMovedBoxes::GetPos(const SwTableBox* pTableBox) const
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index ae6318d2d531..795c037227cb 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -132,7 +132,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
if( ( nSttIdx = pHt->GetStart() ) < nAktPos )
{
// also check the end
- if( 0 == ( pEndIdx = pHt->End() ) ||
+ if( nullptr == ( pEndIdx = pHt->End() ) ||
*pEndIdx <= nAktPos )
continue; // keep searching
}
@@ -220,7 +220,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
CompareNodeContent aMax( 0, 0 );
CompareNodeContent aMin( ULONG_MAX, SAL_MAX_INT32 );
- const SwTOXMark* pNew = 0;
+ const SwTOXMark* pNew = nullptr;
const SwTOXMark* pMax = &rCurTOXMark;
const SwTOXMark* pMin = &rCurTOXMark;
@@ -243,7 +243,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
continue;
Point aPt;
- const SwContentFrm* pCFrm = pTOXSrc->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwContentFrm* pCFrm = pTOXSrc->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
if (!pCFrm)
continue;
@@ -328,7 +328,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
const SfxItemSet* pSet,
bool bExpand )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_INSTOX, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSTOX, nullptr );
OUString sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), rTOX.GetTOXName() );
SwPaM aPam( rPos );
@@ -345,7 +345,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
// add value for 2nd parameter = true to
// indicate, that a creation of a new table of content has to be performed.
// Value of 1st parameter = default value.
- pNewSection->Update( 0, true );
+ pNewSection->Update( nullptr, true );
}
else if( rTOX.GetTitle().getLength()==1 && IsInReading() )
// insert title of TOX
@@ -359,13 +359,13 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
SwSectionData headerData( TOX_HEADER_SECTION, pNewSection->GetTOXName()+"_Head" );
SwNodeIndex aStt( *pHeadNd ); --aIdx;
- SwSectionFormat* pSectFormat = MakeSectionFormat( 0 );
+ SwSectionFormat* pSectFormat = MakeSectionFormat( nullptr );
GetNodes().InsertTextSection(
- aStt, *pSectFormat, headerData, 0, &aIdx, true, false);
+ aStt, *pSectFormat, headerData, nullptr, &aIdx, true, false);
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_INSTOX, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSTOX, nullptr );
return pNewSection;
}
@@ -381,7 +381,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd
{
SectionType eT = pSectNd->GetSection().GetType();
if( TOX_HEADER_SECTION == eT || TOX_CONTENT_SECTION == eT )
- return 0;
+ return nullptr;
pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode();
}
@@ -390,7 +390,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd
SwSectionData aSectionData( TOX_CONTENT_SECTION, sSectNm );
SwNodeIndex aStt( GetNodes(), nSttNd ), aEnd( GetNodes(), nEndNd );
- SwSectionFormat* pFormat = MakeSectionFormat( 0 );
+ SwSectionFormat* pFormat = MakeSectionFormat( nullptr );
if(pSet)
pFormat->SetFormatAttr(*pSet);
@@ -399,7 +399,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd
if (!pNewSectionNode)
{
DelSectionFormat( pFormat );
- return 0;
+ return nullptr;
}
SwTOXBaseSection *const pNewSection(
@@ -427,7 +427,7 @@ SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos )
}
pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode();
}
- return 0;
+ return nullptr;
}
const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase)
@@ -441,7 +441,7 @@ const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase)
const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate )
{
- SwTOXBase** prBase = 0;
+ SwTOXBase** prBase = nullptr;
switch(eTyp)
{
case TOX_CONTENT: prBase = &mpDefTOXBases->pContBase; break;
@@ -455,7 +455,7 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate )
case TOX_CITATION: /** TODO */break;
}
if (!prBase)
- return NULL;
+ return nullptr;
if(!(*prBase) && bCreate)
{
SwForm aForm(eTyp);
@@ -467,7 +467,7 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate )
void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
{
- SwTOXBase** prBase = 0;
+ SwTOXBase** prBase = nullptr;
switch(rBase.GetType())
{
case TOX_CONTENT: prBase = &mpDefTOXBases->pContBase; break;
@@ -496,10 +496,10 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes )
const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase);
SwSectionFormat const * pFormat = rTOXSect.GetFormat();
/* Save the start node of the TOX' section. */
- SwSectionNode const * pMyNode = pFormat ? pFormat->GetSectionNode() : NULL;
+ SwSectionNode const * pMyNode = pFormat ? pFormat->GetSectionNode() : nullptr;
if (pMyNode)
{
- GetIDocumentUndoRedo().StartUndo( UNDO_CLEARTOXRANGE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_CLEARTOXRANGE, nullptr );
/* Save start node of section's surrounding. */
SwNode const * pStartNd = pMyNode->StartOfSectionNode();
@@ -566,7 +566,7 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes )
DelSectionFormat( const_cast<SwSectionFormat *>(pFormat), bDelNodes );
- GetIDocumentUndoRedo().EndUndo( UNDO_CLEARTOXRANGE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_CLEARTOXRANGE, nullptr );
bRet = true;
}
@@ -589,7 +589,7 @@ const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const
for( auto pTOXType : *mpTOXTypes )
if( eTyp == pTOXType->GetType() && nCnt++ == nId )
return pTOXType;
- return 0;
+ return nullptr;
}
const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp )
@@ -693,7 +693,7 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl
// then find the "Anchor" (Body) position
Point aPt;
SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() );
- const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, 0, false );
+ const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, nullptr, false );
if( pFrm )
{
@@ -702,7 +702,7 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl
OSL_ENSURE( pNd, "Where's the paragraph?" );
}
}
- return pNd ? pNd->FindOutlineNodeOfLevel( nLvl ) : 0;
+ return pNd ? pNd->FindOutlineNodeOfLevel( nLvl ) : nullptr;
}
// Table of contents class
@@ -751,7 +751,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
{
const SwSectionNode* pSectNd;
if( !SwTOXBase::GetRegisteredIn()->HasWriterListeners() ||
- !GetFormat() || 0 == (pSectNd = GetFormat()->GetSectionNode() ) ||
+ !GetFormat() || nullptr == (pSectNd = GetFormat()->GetSectionNode() ) ||
!pSectNd->GetNodes().IsDocNodes() ||
IsHiddenFlag() )
{
@@ -784,7 +784,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
pDefaultPageDesc = pSectNd->FindPageDesc( false, pPgDescNdIdx );
if ( nPgDescNdIdx < pSectNd->GetIndex() )
{
- pDefaultPageDesc = 0;
+ pDefaultPageDesc = nullptr;
}
}
// consider end node of content section in the node array.
@@ -840,7 +840,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// in his own chapter
const SwTextNode* pOwnChapterNode = IsFromChapter()
? ::lcl_FindChapterNode( *pSectNd )
- : 0;
+ : nullptr;
SwNode2Layout aN2L( *pSectNd );
const_cast<SwSectionNode*>(pSectNd)->DelFrms();
@@ -894,9 +894,9 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
SwSectionData headerData( TOX_HEADER_SECTION, GetTOXName()+"_Head" );
SwNodeIndex aStt( *pHeadNd ); --aIdx;
- SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat( 0 );
+ SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat( nullptr );
pDoc->GetNodes().InsertTextSection(
- aStt, *pSectFormat, headerData, 0, &aIdx, true, false);
+ aStt, *pSectFormat, headerData, nullptr, &aIdx, true, false);
}
// This would be a good time to update the Numbering
@@ -940,7 +940,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
InsertAlphaDelimitter( aIntl );
// Sort the List of all TOC Marks and TOC Sections
- std::vector<SwTextFormatColl*> aCollArr( GetTOXForm().GetFormMax(), 0 );
+ std::vector<SwTextFormatColl*> aCollArr( GetTOXForm().GetFormMax(), nullptr );
SwNodeIndex aInsPos( *pFirstEmptyNd, 1 );
for( SwTOXSortTabBases::size_type nCnt = 0; nCnt < aSortArr.size(); ++nCnt )
{
@@ -970,10 +970,10 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
const SwTOXMark& rMark = aSortArr[nCnt]->pTextMark->GetTOXMark();
const OUString sPrimKey = rMark.GetPrimaryKey();
const OUString sSecKey = rMark.GetSecondaryKey();
- const SwTOXMark* pNextMark = 0;
+ const SwTOXMark* pNextMark = nullptr;
while(aSortArr.size() > (nCnt + nRange)&&
aSortArr[nCnt + nRange]->GetType() == TOX_SORT_INDEX &&
- 0 != (pNextMark = &(aSortArr[nCnt + nRange]->pTextMark->GetTOXMark())) &&
+ nullptr != (pNextMark = &(aSortArr[nCnt + nRange]->pTextMark->GetTOXMark())) &&
pNextMark->GetPrimaryKey() == sPrimKey &&
pNextMark->GetSecondaryKey() == sSecKey)
nRange++;
@@ -1077,7 +1077,7 @@ SwTextFormatColl* SwTOXBaseSection::GetTextFormatColl( sal_uInt16 nLevel )
{
SwDoc* pDoc = GetFormat()->GetDoc();
const OUString& rName = GetTOXForm().GetTemplate( nLevel );
- SwTextFormatColl* pColl = !rName.isEmpty() ? pDoc->FindTextFormatCollByName(rName) :0;
+ SwTextFormatColl* pColl = !rName.isEmpty() ? pDoc->FindTextFormatCollByName(rName) :nullptr;
if( !pColl )
{
sal_uInt16 nPoolFormat = 0;
@@ -1141,7 +1141,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
::SetProgressState( 0, pDoc->GetDocShell() );
if( pMark->GetTOXType()->GetType() == eTOXTyp &&
- 0 != ( pTextMark = pMark->GetTextTOXMark() ) )
+ nullptr != ( pTextMark = pMark->GetTextTOXMark() ) )
{
const SwTextNode* pTOXSrc = pTextMark->GetpTextNd();
// Only insert TOXMarks from the Doc, not from the
@@ -1155,7 +1155,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
!pTOXSrc->HasHiddenParaField() &&
!SwScriptInfo::IsInHiddenRange( *pTOXSrc, pTextMark->GetStart() ) )
{
- SwTOXSortTabBase* pBase = 0;
+ SwTOXSortTabBase* pBase = nullptr;
if(TOX_INDEX == eTOXTyp)
{
// index entry mark
@@ -1328,7 +1328,7 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
//#106485# the body node has to be used!
SwContentFrm *pFrm = rTextNode.getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
SwPosition aFieldPos(rTextNode);
- const SwTextNode* pTextNode = 0;
+ const SwTextNode* pTextNode = nullptr;
if(pFrm && !pFrm->IsInDocBody())
pTextNode = GetBodyTextNode( *pDoc, aFieldPos, *pFrm );
if(!pTextNode)
@@ -1403,7 +1403,7 @@ void SwTOXBaseSection::UpdateContent( SwTOXElement eMyType,
::SetProgressState( 0, pDoc->GetDocShell() );
SwNode* pNd = rNds[ nIdx ];
- SwContentNode* pCNd = 0;
+ SwContentNode* pCNd = nullptr;
switch( eMyType )
{
case nsSwTOXElement::TOX_FRAME:
@@ -1502,14 +1502,14 @@ void SwTOXBaseSection::UpdateTable( const SwTextNode* pOwnChapterNode )
SwTable* pTmpTable = SwTable::FindTable( pFrameFormat );
SwTableBox* pFBox;
- if( pTmpTable && 0 != (pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
+ if( pTmpTable && nullptr != (pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
pFBox->GetSttNd() && pFBox->GetSttNd()->GetNodes().IsDocNodes() )
{
const SwTableNode* pTableNd = pFBox->GetSttNd()->FindTableNode();
SwNodeIndex aContentIdx( *pTableNd, 1 );
SwContentNode* pCNd;
- while( 0 != ( pCNd = rNds.GoNext( &aContentIdx ) ) &&
+ while( nullptr != ( pCNd = rNds.GoNext( &aContentIdx ) ) &&
aContentIdx.GetIndex() < pTableNd->EndOfSectionIndex() )
{
if( pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() ||
@@ -1544,7 +1544,7 @@ void SwTOXBaseSection::UpdatePageNum()
return ;
// Insert the current PageNumber into the TOC
- SwPageFrm* pAktPage = 0;
+ SwPageFrm* pAktPage = nullptr;
sal_uInt16 nPage = 0;
SwDoc* pDoc = GetFormat()->GetDoc();
@@ -1558,7 +1558,7 @@ void SwTOXBaseSection::UpdatePageNum()
// Loop over all SourceNodes
std::vector<sal_uInt16> aNums; // the PageNumber
std::vector<SwPageDesc*> aDescs; // The PageDescriptors matching the PageNumbers
- std::vector<sal_uInt16> *pMainNums = 0; // contains page numbers of main entries
+ std::vector<sal_uInt16> *pMainNums = nullptr; // contains page numbers of main entries
// process run in lines
SwTOXSortTabBases::size_type nRange = 0;
@@ -1568,10 +1568,10 @@ void SwTOXBaseSection::UpdatePageNum()
const SwTOXMark& rMark = aSortArr[nCnt]->pTextMark->GetTOXMark();
const OUString sPrimKey = rMark.GetPrimaryKey();
const OUString sSecKey = rMark.GetSecondaryKey();
- const SwTOXMark* pNextMark = 0;
+ const SwTOXMark* pNextMark = nullptr;
while(aSortArr.size() > (nCnt + nRange)&&
aSortArr[nCnt + nRange]->GetType() == TOX_SORT_INDEX &&
- 0 != (pNextMark = &(aSortArr[nCnt + nRange]->pTextMark->GetTOXMark())) &&
+ nullptr != (pNextMark = &(aSortArr[nCnt + nRange]->pTextMark->GetTOXMark())) &&
pNextMark->GetPrimaryKey() == sPrimKey &&
pNextMark->GetSecondaryKey() == sSecKey)
nRange++;
@@ -1598,7 +1598,7 @@ void SwTOXBaseSection::UpdatePageNum()
{
// find the right one
SwTextFrm* pNext;
- while( 0 != ( pNext = static_cast<SwTextFrm*>(pFrm->GetFollow()) )
+ while( nullptr != ( pNext = static_cast<SwTextFrm*>(pFrm->GetFollow()) )
&& rTOXSource.nPos >= pNext->GetOfst() )
pFrm = pNext;
}
@@ -1670,7 +1670,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTextNode* pNd,
const SwTOXInternational& rIntl )
{
// collect starts end ends of main entry character style
- std::unique_ptr< std::vector<sal_uInt16> > xCharStyleIdx(pMainEntryNums ? new std::vector<sal_uInt16> : 0);
+ std::unique_ptr< std::vector<sal_uInt16> > xCharStyleIdx(pMainEntryNums ? new std::vector<sal_uInt16> : nullptr);
OUString sSrchStr = OUStringBuffer().append(C_NUM_REPL).
append(S_PAGE_DELI).append(C_NUM_REPL).makeStringAndClear();
@@ -1697,7 +1697,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTextNode* pNd,
// Delete place holder
SwIndex aPos(pNd, nStartPos);
- SwCharFormat* pPageNoCharFormat = 0;
+ SwCharFormat* pPageNoCharFormat = nullptr;
SwpHints* pHints = pNd->GetpSwpHints();
if(pHints)
for(size_t nHintIdx = 0; nHintIdx < pHints->Count(); ++nHintIdx)
@@ -1803,13 +1803,13 @@ void SwTOXBaseSection::_UpdatePageNum( SwTextNode* pNd,
// search by name
SwDoc* pDoc = pNd->GetDoc();
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
- SwCharFormat* pCharFormat = 0;
+ SwCharFormat* pCharFormat = nullptr;
if(USHRT_MAX != nPoolId)
pCharFormat = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(nPoolId);
else
pCharFormat = pDoc->FindCharFormatByName( GetMainEntryCharStyle() );
if(!pCharFormat)
- pCharFormat = pDoc->MakeCharFormat(GetMainEntryCharStyle(), 0);
+ pCharFormat = pDoc->MakeCharFormat(GetMainEntryCharStyle(), nullptr);
// find the page numbers in aNumStr and set the character style
sal_Int32 nOffset = pNd->GetText().getLength() - aNumStr.getLength();
@@ -1997,7 +1997,7 @@ const SfxItemSet* SwTOXBase::GetAttrSet() const
const SwTOXBaseSection *pSect = dynamic_cast<const SwTOXBaseSection*>(this);
if(pSect && pSect->GetFormat())
return &pSect->GetFormat()->GetAttrSet();
- return 0;
+ return nullptr;
}
void SwTOXBase::SetAttrSet( const SfxItemSet& rSet )
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 9e82eca40289..87b365d6aac6 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -84,10 +84,10 @@ SwExtTextInput::~SwExtTextInput()
if( bInsText )
{
rIdx = nSttCnt;
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_OVERWRITE, nullptr );
pDoc->getIDocumentContentOperations().Overwrite( *this, sText.copy( 0, nOWLen ) );
pDoc->getIDocumentContentOperations().InsertString( *this, sText.copy( nOWLen ) );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_OVERWRITE, nullptr );
}
}
else
@@ -258,7 +258,7 @@ void SwDoc::DeleteExtTextInput( SwExtTextInput* pDel )
if( pDel->GetNext() != mpExtInputRing )
mpExtInputRing = static_cast<SwPaM*>(pDel->GetNext());
else
- mpExtInputRing = 0;
+ mpExtInputRing = nullptr;
}
delete pDel;
}
@@ -266,7 +266,7 @@ void SwDoc::DeleteExtTextInput( SwExtTextInput* pDel )
SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
sal_Int32 nContentPos ) const
{
- SwExtTextInput* pRet = 0;
+ SwExtTextInput* pRet = nullptr;
if( mpExtInputRing )
{
sal_uLong nNdIdx = rNd.GetIndex();
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 80fc4ba64cda..5a677db5fc44 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -77,9 +77,9 @@ namespace TextFormatCollFunc
SwNumRule* GetNumRule( SwTextFormatColl& rTextFormatColl )
{
- SwNumRule* pNumRule( 0 );
+ SwNumRule* pNumRule( nullptr );
- const SwNumRuleItem* pNumRuleItem( 0 );
+ const SwNumRuleItem* pNumRuleItem( nullptr );
rTextFormatColl.GetItemState( RES_PARATR_NUMRULE, false, reinterpret_cast<const SfxPoolItem**>(&pNumRuleItem) );
if ( pNumRuleItem )
{
@@ -121,14 +121,14 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
}
bool bNewParent( false ); // #i66431# - adjust type of <bNewParent>
- const SvxULSpaceItem *pNewULSpace = 0, *pOldULSpace = 0;
- const SvxLRSpaceItem *pNewLRSpace = 0, *pOldLRSpace = 0;
- const SvxFontHeightItem* aFontSizeArr[3] = {0,0,0};
+ const SvxULSpaceItem *pNewULSpace = nullptr, *pOldULSpace = nullptr;
+ const SvxLRSpaceItem *pNewLRSpace = nullptr, *pOldLRSpace = nullptr;
+ const SvxFontHeightItem* aFontSizeArr[3] = {nullptr,nullptr,nullptr};
// #i70223#
const bool bAssignedToListLevelOfOutlineStyle(IsAssignedToListLevelOfOutlineStyle());
- const SwNumRuleItem* pNewNumRuleItem( 0L );
+ const SwNumRuleItem* pNewNumRuleItem( nullptr );
- const SwAttrSetChg *pNewChgSet = 0, *pOldChgSet = 0;
+ const SwAttrSetChg *pNewChgSet = nullptr, *pOldChgSet = nullptr;
switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 )
{
@@ -239,7 +239,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if( bChg )
{
SetFormatAttr( aNew );
- bContinue = 0 != pOldChgSet || bNewParent;
+ bContinue = nullptr != pOldChgSet || bNewParent;
}
// We set it to absolute -> do not propagate it further, unless
// we set it!
@@ -271,7 +271,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if( bChg )
{
SetFormatAttr( aNew );
- bContinue = 0 != pOldChgSet || bNewParent;
+ bContinue = nullptr != pOldChgSet || bNewParent;
}
// We set it to absolute -> do not propagate it further, unless
// we set it!
@@ -306,7 +306,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if( nTmp != aNew.GetHeight() )
{
SetFormatAttr( aNew );
- bContinue = 0 != pOldChgSet || bNewParent;
+ bContinue = nullptr != pOldChgSet || bNewParent;
}
// We set it to absolute -> do not propagate it further, unless
// we set it!
@@ -614,7 +614,7 @@ void SwConditionTextFormatColl::SetConditions( const SwFormatCollConditions& rCn
{
SwTextFormatColl *const pTmpColl = rpFnd->GetTextFormatColl()
? rDoc.CopyTextColl( *rpFnd->GetTextFormatColl() )
- : 0;
+ : nullptr;
std::unique_ptr<SwCollCondition> pNew;
if (USRFLD_EXPRESSION & rpFnd->GetCondition())
pNew.reset(new SwCollCondition( pTmpColl, rpFnd->GetCondition(),
@@ -654,7 +654,7 @@ void SwTextFormatColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLe
// #i100277#
SwIterator<SwTextFormatColl,SwFormatColl> aIter( *this );
SwTextFormatColl* pDerivedTextFormatColl = aIter.First();
- while ( pDerivedTextFormatColl != 0 )
+ while ( pDerivedTextFormatColl != nullptr )
{
if ( !pDerivedTextFormatColl->IsAssignedToListLevelOfOutlineStyle() )
{
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index ff90fa42fca9..8709453ef209 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -268,7 +268,7 @@ SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNodeIndex& rPos, size_t* pFnd
{
if( pFndPos )
*pFndPos = nU;
- return 0;
+ return nullptr;
}
else
nO = nM - 1;
@@ -276,7 +276,7 @@ SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNodeIndex& rPos, size_t* pFnd
}
if( pFndPos )
*pFndPos = nU;
- return 0;
+ return nullptr;
}
const SwSectionNode* SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr(
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 206f44fa10bb..3e73206b0099 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -35,7 +35,7 @@ bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrameFormat& rFormat )
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
if( SfxItemState::SET == rFormat.GetItemState( RES_BOX, true, &pItem ) &&
- 0 != ( pBrd = static_cast<const SvxBoxItem*>(pItem)->GetLeft() ) )
+ nullptr != ( pBrd = static_cast<const SvxBoxItem*>(pItem)->GetLeft() ) )
{
if( *pBrdLn == *pBrd )
bAnyBorderFnd = true;
@@ -102,7 +102,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTableLineBoxes& rCollTL
const SwTableBox& rBox = rCollTLB.GetBox( rStt, &nPos );
if( SfxItemState::SET != rBox.GetFrameFormat()->GetItemState(RES_BOX,true, &pItem )
- || 0 == ( pBrd = GetLineTB( static_cast<const SvxBoxItem*>(pItem), bTop ))
+ || nullptr == ( pBrd = GetLineTB( static_cast<const SvxBoxItem*>(pItem), bTop ))
|| !( *pBrd == rBrdLn ))
break;
nLastPos = nPos;
@@ -116,7 +116,7 @@ static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBo
{
return SfxItemState::SET == rBox.GetFrameFormat()->GetItemState( RES_BOX, true, ppItem )
? GetLineTB( static_cast<const SvxBoxItem*>(*ppItem), bTop )
- : 0;
+ : nullptr;
}
static void lcl_GCBorder_DelBorder( const SwCollectTableLineBoxes& rCollTLB,
@@ -135,9 +135,9 @@ static void lcl_GCBorder_DelBorder( const SwCollectTableLineBoxes& rCollTLB,
{
SvxBoxItem aBox( *static_cast<const SvxBoxItem*>(pItem) );
if( bTop )
- aBox.SetLine( 0, SvxBoxItemLine::TOP );
+ aBox.SetLine( nullptr, SvxBoxItemLine::TOP );
else
- aBox.SetLine( 0, SvxBoxItemLine::BOTTOM );
+ aBox.SetLine( nullptr, SvxBoxItemLine::BOTTOM );
if( pShareFormats )
pShareFormats->SetAttr( *pBox, aBox );
@@ -183,7 +183,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
SwTableBox* pBox;
if( SfxItemState::SET == (pBox = aBoxes[ --i ])->GetFrameFormat()->
GetItemState( RES_BOX, true, &pItem ) &&
- 0 != ( pBrd = static_cast<const SvxBoxItem*>(pItem)->GetRight() ) )
+ nullptr != ( pBrd = static_cast<const SvxBoxItem*>(pItem)->GetRight() ) )
{
aBPara.SetBorder( *pBrd );
const SwTableBox* pNextBox = rBoxes[n+1];
@@ -191,7 +191,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
aBPara.IsAnyBorderFound() )
{
SvxBoxItem aBox( *static_cast<const SvxBoxItem*>(pItem) );
- aBox.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aBox.SetLine( nullptr, SvxBoxItemLine::RIGHT );
if( pGCPara->pShareFormats )
pGCPara->pShareFormats->SetAttr( *pBox, aBox );
else
@@ -225,8 +225,8 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
const SwTableBox *pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
const SwTableBox *pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
- const SfxPoolItem *pBtmItem = 0, *pTopItem = 0;
- const SvxBorderLine *pBtmLine(0), *pTopLine(0);
+ const SfxPoolItem *pBtmItem = nullptr, *pTopItem = nullptr;
+ const SvxBorderLine *pBtmLine(nullptr), *pTopLine(nullptr);
bool bGetTopItem = true, bGetBtmItem = true;
do {
@@ -324,8 +324,8 @@ struct _GCLinePara
SwTableLines* pLns;
SwShareBoxFormats* pShareFormats;
- _GCLinePara( SwTableLines& rLns, _GCLinePara* pPara = 0 )
- : pLns( &rLns ), pShareFormats( pPara ? pPara->pShareFormats : 0 )
+ _GCLinePara( SwTableLines& rLns, _GCLinePara* pPara = nullptr )
+ : pLns( &rLns ), pShareFormats( pPara ? pPara->pShareFormats : nullptr )
{}
};
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 4677dd8e88bb..ecff26464812 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -81,7 +81,7 @@ SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts( const SwStartNode *pSttNd,
SwHTMLTableLayout* pTab,
bool bNoBrTag,
SwHTMLTableLayoutCnts* pNxt ) :
- pNext( pNxt ), pBox( 0 ), pTable( pTab ), pStartNode( pSttNd ),
+ pNext( pNxt ), pBox( nullptr ), pTable( pTab ), pStartNode( pSttNd ),
nPass1Done( 0 ), nWidthSet( 0 ), bNoBreakTag( bNoBrTag )
{}
@@ -127,7 +127,7 @@ SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
SwHTMLTableLayoutConstraints::SwHTMLTableLayoutConstraints(
sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRw, sal_uInt16 nColumn, sal_uInt16 nColSp ):
nRow( nRw ), nCol( nColumn ), nColSpan( nColSp ),
- pNext( 0 ),
+ pNext( nullptr ),
nMinNoAlign( nMin ), nMaxNoAlign( nMax )
{}
@@ -139,7 +139,7 @@ SwHTMLTableLayoutConstraints::~SwHTMLTableLayoutConstraints()
SwHTMLTableLayoutConstraints *SwHTMLTableLayoutConstraints::InsertNext(
SwHTMLTableLayoutConstraints *pNxt )
{
- SwHTMLTableLayoutConstraints *pPrev = 0;
+ SwHTMLTableLayoutConstraints *pPrev = nullptr;
SwHTMLTableLayoutConstraints *pConstr = this;
while( pConstr )
{
@@ -179,8 +179,8 @@ SwHTMLTableLayout::SwHTMLTableLayout( const SwTable * pTable,
: m_aColumns( new SwHTMLTableLayoutColumn*[nCls] )
, m_aCells( new SwHTMLTableLayoutCell*[static_cast<size_t>(nRws)*nCls] )
, m_pSwTable( pTable )
- , m_pLeftFillerBox( 0 )
- , m_pRightFillerBox( 0 )
+ , m_pLeftFillerBox( nullptr )
+ , m_pRightFillerBox( nullptr )
, m_nMin( 0 )
, m_nMax( 0 )
, m_nRows( nRws )
@@ -422,7 +422,7 @@ const SwStartNode *SwHTMLTableLayout::GetAnyBoxStartNode() const
const SwStartNode *pBoxSttNd;
const SwTableBox* pBox = m_pSwTable->GetTabLines()[0]->GetTabBoxes()[0];
- while( 0 == (pBoxSttNd = pBox->GetSttNd()) )
+ while( nullptr == (pBoxSttNd = pBox->GetSttNd()) )
{
OSL_ENSURE( pBox->GetTabLines().size() > 0,
"Box without start node and lines" );
@@ -478,7 +478,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
bool bFixRelWidths = false;
sal_uInt16 i;
- SwHTMLTableLayoutConstraints *pConstraints = 0;
+ SwHTMLTableLayoutConstraints *pConstraints = nullptr;
for( i=0; i<m_nCols; i++ )
{
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 17d6d25cb0a0..5b1532fbd4f3 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -84,7 +84,7 @@ using namespace com::sun::star;
inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText )
{
- bool bRet = rNd.GetFileFilterNms( &rText, 0 );
+ bool bRet = rNd.GetFileFilterNms( &rText, nullptr );
if( bRet )
rText = URIHelper::removePassword( rText, INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_UNAMBIGUOUS);
@@ -97,7 +97,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText,
const SwViewShell &rSh, const SwNoTextFrm *pFrm,
bool bDefect )
{
- static vcl::Font *pFont = 0;
+ static vcl::Font *pFont = nullptr;
if ( !pFont )
{
pFont = new vcl::Font();
@@ -730,7 +730,7 @@ bool paintUsingPrimitivesHelper(
aMappingTransform,
rOutputDevice.GetViewTransformation(),
rTargetRange,
- 0,
+ nullptr,
0.0,
uno::Sequence< beans::PropertyValue >());
@@ -923,7 +923,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
pShell->GetWin();
if( bAnimate &&
- FindFlyFrm() != ::GetFlyFromMarked( 0, pShell ))
+ FindFlyFrm() != ::GetFlyFromMarked( nullptr, pShell ))
{
OutputDevice* pVout;
if( pOut == pShell->GetOut() && SwRootFrm::FlushVout() )
@@ -932,7 +932,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
OUTDEV_VIRDEV == pOut->GetOutDevType() )
pVout = pOut, pOut = pShell->GetWin();
else
- pVout = 0;
+ pVout = nullptr;
OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport() || pShell->isOutputToWindow(),
@@ -940,7 +940,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), sal_IntPtr(this),
- 0, GraphicManagerDrawFlags::STANDARD, pVout );
+ nullptr, GraphicManagerDrawFlags::STANDARD, pVout );
}
else
{
@@ -1046,7 +1046,7 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
pOLENd->GetOLEObj().GetObject().IsGLChart()))
{
const SwFlyFrm *pFly = FindFlyFrm();
- assert( pFly != NULL );
+ assert( pFly != nullptr );
static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm());
}
}
@@ -1066,7 +1066,7 @@ bool SwNoTextFrm::IsTransparent() const
return true;
const SwGrfNode *pNd;
- if( 0 != (pNd = GetNode()->GetGrfNode()) )
+ if( nullptr != (pNd = GetNode()->GetGrfNode()) )
return pNd->IsTransparent();
//#29381# OLE are always transparent
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index b3aef6952bdb..a7ddc4e318b1 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -59,10 +59,10 @@ using namespace ::com::sun::star;
sal_uInt16 SwNumRule::mnRefCount = 0;
SwNumFormat* SwNumRule::maBaseFormats[ RULE_END ][ MAXLEVEL ] = {
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
+ {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } };
SwNumFormat* SwNumRule::maLabelAlignmentBaseFormats[ RULE_END ][ MAXLEVEL ] = {
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
+ {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } };
const sal_uInt16 SwNumRule::maDefNumIndents[ MAXLEVEL ] = {
//inch: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
@@ -87,7 +87,7 @@ const SwNumFormat& SwNumRule::Get( sal_uInt16 i ) const
const SwNumFormat* SwNumRule::GetNumFormat( sal_uInt16 i ) const
{
- const SwNumFormat * pResult = NULL;
+ const SwNumFormat * pResult = nullptr;
OSL_ASSERT( i < MAXLEVEL && meRuleType < RULE_END );
if ( i < MAXLEVEL && meRuleType < RULE_END)
@@ -177,7 +177,7 @@ static void lcl_SetRuleChgd( SwTextNode& rNd, sal_uInt8 nLevel )
SwNumFormat::SwNumFormat() :
SvxNumberFormat(SVX_NUM_ARABIC),
- SwClient( 0 ),
+ SwClient( nullptr ),
m_pVertOrient(new SwFormatVertOrient( 0, text::VertOrientation::NONE))
,m_cGrfBulletCP(USHRT_MAX)//For i120928,record the cp info of graphic within bullet
{
@@ -212,7 +212,7 @@ SwNumFormat::SwNumFormat(const SvxNumberFormat& rNumFormat, SwDoc* pDoc)
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pCFormat = nId != USHRT_MAX
? pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId )
- : pDoc->MakeCharFormat( rCharStyleName, 0 );
+ : pDoc->MakeCharFormat( rCharStyleName, nullptr );
}
pCFormat->Add( this );
}
@@ -285,7 +285,7 @@ void SwNumFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
// Look for the NumRules object in the Doc where this NumFormat is set.
// The format does not need to exist!
- const SwCharFormat* pFormat = 0;
+ const SwCharFormat* pFormat = nullptr;
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
@@ -362,7 +362,7 @@ const SwFormatVertOrient* SwNumFormat::GetGraphicOrientation() const
{
sal_Int16 eOrient = SvxNumberFormat::GetVertOrient();
if(text::VertOrientation::NONE == eOrient)
- return 0;
+ return nullptr;
else
{
m_pVertOrient->SetVertOrient(eOrient);
@@ -376,7 +376,7 @@ SwNumRule::SwNumRule( const OUString& rNm,
bool bAutoFlg )
: maTextNodeList(),
maParagraphStyleList(),
- mpNumRuleMap(0),
+ mpNumRuleMap(nullptr),
msName( rNm ),
meRuleType( eType ),
mnPoolFormatId( USHRT_MAX ),
@@ -474,7 +474,7 @@ SwNumRule::SwNumRule( const OUString& rNm,
SwNumRule::SwNumRule( const SwNumRule& rNumRule )
: maTextNodeList(),
maParagraphStyleList(),
- mpNumRuleMap(0),
+ mpNumRuleMap(nullptr),
msName( rNumRule.msName ),
meRuleType( rNumRule.meRuleType ),
mnPoolFormatId( rNumRule.GetPoolFormatId() ),
@@ -513,17 +513,17 @@ SwNumRule::~SwNumRule()
int n;
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = 0;
+ delete *ppFormats, *ppFormats = nullptr;
// Outline:
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = 0;
+ delete *ppFormats, *ppFormats = nullptr;
ppFormats = &SwNumRule::maLabelAlignmentBaseFormats[0][0];
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = 0;
+ delete *ppFormats, *ppFormats = nullptr;
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = 0;
+ delete *ppFormats, *ppFormats = nullptr;
}
maTextNodeList.clear();
@@ -535,7 +535,7 @@ void SwNumRule::CheckCharFormats( SwDoc* pDoc )
for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
SwCharFormat* pFormat;
- if( maFormats[ n ] && 0 != ( pFormat = maFormats[ n ]->GetCharFormat() ) &&
+ if( maFormats[ n ] && nullptr != ( pFormat = maFormats[ n ]->GetCharFormat() ) &&
pFormat->GetDoc() != pDoc )
{
// copy
@@ -619,7 +619,7 @@ void SwNumRule::Set( sal_uInt16 i, const SwNumFormat* pNumFormat )
}
}
else if( !pNumFormat )
- delete pOld, maFormats[ i ] = 0, mbInvalidRuleFlag = true;
+ delete pOld, maFormats[ i ] = nullptr, mbInvalidRuleFlag = true;
else if( *pOld != *pNumFormat )
*pOld = *pNumFormat, mbInvalidRuleFlag = true;
}
@@ -843,7 +843,7 @@ void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
{
const SvxNumberFormat* pSvxFormat = rNumRule.Get(n);
delete maFormats[n];
- maFormats[n] = pSvxFormat ? new SwNumFormat(*pSvxFormat, pDoc) : 0;
+ maFormats[n] = pSvxFormat ? new SwNumFormat(*pSvxFormat, pDoc) : nullptr;
}
mbInvalidRuleFlag = true;
@@ -861,7 +861,7 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
SwNumFormat aNumFormat = Get(n);
if(aNumFormat.GetCharFormat())
aNumFormat.SetCharFormatName(aNumFormat.GetCharFormat()->GetName());
- aRule.SetLevel(n, aNumFormat, maFormats[n] != 0);
+ aRule.SetLevel(n, aNumFormat, maFormats[n] != nullptr);
}
return aRule;
}
@@ -1141,7 +1141,7 @@ namespace numfunc
mbUserDefinedFontname( false ),
meFontWeight( WEIGHT_DONTKNOW ),
meFontItalic( ITALIC_NONE ),
- mpFont( 0 )
+ mpFont( nullptr )
{
SetToDefault();
LoadConfig();
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 490c1dce6d58..589e0f4d066e 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -59,7 +59,7 @@ bool SwServerObject::GetData( uno::Any & rData,
if( xWrt.Is() )
{
- SwPaM* pPam = 0;
+ SwPaM* pPam = nullptr;
switch( eType )
{
case BOOKMARK_SERVER:
@@ -111,7 +111,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
if( HasDataLinks() )
{
bool bCall = false;
- const SwStartNode* pNd = 0;
+ const SwStartNode* pNd = nullptr;
switch( eType )
{
case BOOKMARK_SERVER:
@@ -135,7 +135,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
if( bCall )
{
// Recognize recursions and flag them
- IsLinkInServer( 0 );
+ IsLinkInServer( nullptr );
SvLinkSource::NotifyDataChanged();
}
}
@@ -147,7 +147,7 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
if( HasDataLinks() )
{
bool bCall = false;
- const SwStartNode* pNd = 0;
+ const SwStartNode* pNd = nullptr;
const SwPosition* pStt = rRange.Start(), *pEnd = rRange.End();
switch( eType )
{
@@ -173,7 +173,7 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
if( bCall )
{
// Recognize recursions and flag them
- IsLinkInServer( 0 );
+ IsLinkInServer( nullptr );
SvLinkSource::NotifyDataChanged();
}
}
@@ -184,8 +184,8 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
sal_uLong nSttNd = 0, nEndNd = 0;
sal_Int32 nStt = 0;
sal_Int32 nEnd = 0;
- const SwNode* pNd = 0;
- const SwNodes* pNds = 0;
+ const SwNode* pNd = nullptr;
+ const SwNodes* pNds = nullptr;
switch( eType )
{
@@ -260,8 +260,8 @@ void SwServerObject::SetNoServer()
::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< ::sw::mark::DdeBookmark* >(CNTNT_TYPE.pBkmk);
if(pDdeBookmark)
{
- CNTNT_TYPE.pBkmk = 0, eType = NONE_SERVER;
- pDdeBookmark->SetRefObject(NULL);
+ CNTNT_TYPE.pBkmk = nullptr, eType = NONE_SERVER;
+ pDdeBookmark->SetRefObject(nullptr);
}
}
}
@@ -281,14 +281,14 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
}
SwDataChanged::SwDataChanged( const SwPaM& rPam )
- : pPam( &rPam ), pPos( 0 ), pDoc( rPam.GetDoc() )
+ : pPam( &rPam ), pPos( nullptr ), pDoc( rPam.GetDoc() )
{
nNode = rPam.GetPoint()->nNode.GetIndex();
nContent = rPam.GetPoint()->nContent.GetIndex();
}
SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos )
- : pPam( 0 ), pPos( &rPos ), pDoc( pDc )
+ : pPam( nullptr ), pPos( &rPos ), pDoc( pDc )
{
nNode = rPos.nNode.GetIndex();
nContent = rPos.nContent.GetIndex();
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index d68377b2ce6d..58165a184929 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -67,8 +67,8 @@ public:
explicit SwStyleManager( SfxItemSet* pIgnorableParagraphItems )
: aAutoCharPool(),
aAutoParaPool( pIgnorableParagraphItems ),
- mpCharCache(0),
- mpParaCache(0)
+ mpCharCache(nullptr),
+ mpParaCache(nullptr)
{}
virtual ~SwStyleManager();
virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
@@ -96,9 +96,9 @@ SwStyleManager::~SwStyleManager()
void SwStyleManager::clearCaches()
{
delete mpCharCache;
- mpCharCache = 0;
+ mpCharCache = nullptr;
delete mpParaCache;
- mpParaCache = 0;
+ mpParaCache = nullptr;
}
StylePool::SfxItemSet_Pointer_t SwStyleManager::getAutomaticStyle( const SfxItemSet& rSet,
diff --git a/sw/source/core/doc/swstylemanager.hxx b/sw/source/core/doc/swstylemanager.hxx
index edd7b3aed398..b2ff39f88e79 100644
--- a/sw/source/core/doc/swstylemanager.hxx
+++ b/sw/source/core/doc/swstylemanager.hxx
@@ -23,7 +23,7 @@
class IStyleAccess;
class SfxItemSet;
-IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems = 0 );
+IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems = nullptr );
#endif // INCLUDED_SW_SOURCE_CORE_DOC_SWSTYLEMANAGER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 37c0639158b4..b89e84921be3 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -88,7 +88,7 @@ const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_31005;
const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_31005;
const sal_uInt16 AUTOFORMAT_FILE_VERSION= SOFFICE_FILEFORMAT_50;
-SwBoxAutoFormat* SwTableAutoFormat::pDfltBoxAutoFormat = 0;
+SwBoxAutoFormat* SwTableAutoFormat::pDfltBoxAutoFormat = nullptr;
#define AUTOTABLE_FORMAT_NAME "autotbl.fmt"
@@ -611,7 +611,7 @@ SwTableAutoFormat::SwTableAutoFormat( const SwTableAutoFormat& rNew )
, m_aShadow( RES_SHADOW )
{
for( sal_uInt8 n = 0; n < 16; ++n )
- aBoxAutoFormat[ n ] = 0;
+ aBoxAutoFormat[ n ] = nullptr;
*this = rNew;
}
@@ -629,7 +629,7 @@ SwTableAutoFormat& SwTableAutoFormat::operator=( const SwTableAutoFormat& rNew )
if( pFormat ) // if is set -> copy
aBoxAutoFormat[ n ] = new SwBoxAutoFormat( *pFormat );
else // else default
- aBoxAutoFormat[ n ] = 0;
+ aBoxAutoFormat[ n ] = nullptr;
}
m_aName = rNew.m_aName;
@@ -735,10 +735,10 @@ void SwTableAutoFormat::UpdateFromSet( sal_uInt8 nPos,
pFormat->SetVerticalAlignment(static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)));
const SwTableBoxNumFormat* pNumFormatItem;
- const SvNumberformat* pNumFormat = 0;
+ const SvNumberformat* pNumFormat = nullptr;
if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true,
reinterpret_cast<const SfxPoolItem**>(&pNumFormatItem) ) && pNFormatr &&
- 0 != (pNumFormat = pNFormatr->GetEntry( pNumFormatItem->GetValue() )) )
+ nullptr != (pNumFormat = pNFormatr->GetEntry( pNumFormatItem->GetValue() )) )
pFormat->SetValueFormat( pNumFormat->GetFormatstring(),
pNumFormat->GetLanguage(),
::GetAppLanguage());
@@ -882,11 +882,11 @@ void SwTableAutoFormat::StoreTableProperties(const SwTable &table)
return;
SwEditShell *pShell = pDoc->GetEditShell();
- SwFormatRowSplit *pRowSplit = 0;
+ SwFormatRowSplit *pRowSplit = nullptr;
SwDoc::GetRowSplit(*pShell->getShellCrsr(false), pRowSplit);
m_bRowSplit = pRowSplit && pRowSplit->GetValue();
delete pRowSplit;
- pRowSplit = 0;
+ pRowSplit = nullptr;
const SfxItemSet &rSet = pFormat->GetAttrSet();
@@ -935,7 +935,7 @@ bool SwTableAutoFormat::Load( SvStream& rStream, const SwAfVersions& rVersions )
if (nVal >= AUTOFORMAT_DATA_ID_31005 && WriterSpecificBlockExists(rStream))
{
- SfxPoolItem* pNew = 0;
+ SfxPoolItem* pNew = nullptr;
READ(m_aBreak, SvxFormatBreakItem, AUTOFORMAT_FILE_VERSION);
READ(m_aPageDesc, SwFormatPageDesc, AUTOFORMAT_FILE_VERSION);
@@ -1117,8 +1117,8 @@ SwTableAutoFormatTable::SwTableAutoFormatTable()
for( i = 0; i <= 15; ++i )
{
- aBox.SetLine( i <= 3 ? &aLn : 0, SvxBoxItemLine::TOP );
- aBox.SetLine( (3 == ( i & 3 )) ? &aLn : 0, SvxBoxItemLine::RIGHT );
+ aBox.SetLine( i <= 3 ? &aLn : nullptr, SvxBoxItemLine::TOP );
+ aBox.SetLine( (3 == ( i & 3 )) ? &aLn : nullptr, SvxBoxItemLine::RIGHT );
const_cast<SwBoxAutoFormat&>(pNew->GetBoxFormat( i )).SetBox( aBox );
}
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index a9d0be95aa2e..120b1a2b442c 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -176,7 +176,7 @@ namespace
maCols.push_front(0);
sal_uInt16 nCnt = 0;
for( auto pLine : rTable.GetTabLines() )
- addLine( nCnt, pLine->GetTabBoxes(), 0, rTable.IsNewModel() );
+ addLine( nCnt, pLine->GetTabBoxes(), nullptr, rTable.IsNewModel() );
}
TableStructure::TableStructure( const SwTable& rTable,
@@ -226,7 +226,7 @@ namespace
addLine( nCnt, rLines[nLine]->GetTabBoxes(),
pSelBoxes, rTable.IsNewModel() );
if( bNoSelection )
- pSelBoxes = 0;
+ pSelBoxes = nullptr;
}
}
if( bNoSelection && mnStartCol < USHRT_MAX )
@@ -318,7 +318,7 @@ namespace
mnStartCol = (sal_uInt16)maLines[nLine].size();
if( pSelBoxes->size() < 2 )
{
- pSelBoxes = 0;
+ pSelBoxes = nullptr;
aInfo.mbSelected = false;
}
}
@@ -339,8 +339,8 @@ namespace
incColSpan( nLine, rnCol );
}
aInfo.mnColSpan = rnCol - nLeftCol;
- aInfo.mpCopy = 0;
- aInfo.mpBox = bCovered ? 0 : pBox;
+ aInfo.mpCopy = nullptr;
+ aInfo.mpBox = bCovered ? nullptr : pBox;
maLines[nLine].push_back( aInfo );
if( aInfo.mbSelected )
{
@@ -374,7 +374,7 @@ namespace
while( mnAddLine )
{
SwTableLine *pLine = rLines[ nLineCount - mnAddLine ];
- addLine( nLine, pLine->GetTabBoxes(), 0, rTable.IsNewModel() );
+ addLine( nLine, pLine->GetTabBoxes(), nullptr, rTable.IsNewModel() );
--mnAddLine;
}
}
@@ -462,11 +462,11 @@ namespace
pCurrBox = pFirstBox;
else
{
- rInfo.mbSelected = rInfo.mpCopy == 0;
+ rInfo.mbSelected = rInfo.mpCopy == nullptr;
break;
}
}
- rInfo.mbSelected = rInfo.mpCopy == 0;
+ rInfo.mbSelected = rInfo.mpCopy == nullptr;
}
}
}
@@ -519,7 +519,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox,
// Do not create empty Sections, otherwise they will be deleted!
std::unique_ptr< SwNodeRange > pRg( pCpyBox ?
new SwNodeRange ( *pCpyBox->GetSttNd(), 1,
- *pCpyBox->GetSttNd()->EndOfSectionNode() ) : 0 );
+ *pCpyBox->GetSttNd()->EndOfSectionNode() ) : nullptr );
SwNodeIndex aInsIdx( *pDstBox->GetSttNd(), bDelContent ? 1 :
pDstBox->GetSttNd()->EndOfSectionIndex() -
@@ -533,7 +533,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox,
SwNodeIndex aSavePos( aInsIdx, -1 );
if( pRg.get() )
- pCpyDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pRg, 0, aInsIdx, NULL, false );
+ pCpyDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pRg, 0, aInsIdx, nullptr, false );
else
pDoc->GetNodes().MakeTextNode( aInsIdx, pDoc->GetDfltTextFormatColl() );
++aSavePos;
@@ -666,7 +666,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes
TableStructure aCopyStruct( rCpyTable );
// Analyze target structure (from start box) and selected substructure
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{ // get all boxes/lines
_FndPara aPara( rSelBoxes, &aFndBox );
ForEach_FndLineCopyCol( GetTabLines(), &aPara );
@@ -722,7 +722,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes
bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox,
SwUndoTableCpyTable* pUndo )
{
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
SwDoc* pDoc = GetFrameFormat()->GetDoc();
@@ -735,7 +735,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox,
OSL_ENSURE( pMyBox, "Index is not in a Box in this Table" );
// First delete the Table's Frames
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.DelFrms( pTableNd->GetTable() );
SwDoc* pCpyDoc = rCpyTable.GetFrameFormat()->GetDoc();
@@ -764,11 +764,11 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox,
// Do not create empty Sections, otherwise they will be deleted!
lcl_CpyBox( rCpyTable, pCpyBox, *this, pMyBox, bDelContent, pUndo );
- if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTable, pCpyBox, false )))
+ if( nullptr == (pTmp = pCpyBox->FindNextBox( rCpyTable, pCpyBox, false )))
break; // no more Boxes
pCpyBox = pTmp;
- if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, false )))
+ if( nullptr == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, false )))
bDelContent = false; // No space left?
else
pMyBox = const_cast<SwTableBox*>(pTmp);
@@ -803,7 +803,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes,
{
OSL_ENSURE( !rSelBoxes.empty(), "Missing selection" );
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
if( IsNewModel() || rCpyTable.IsNewModel() )
return InsNewTable( rCpyTable, rSelBoxes, pUndo );
@@ -817,8 +817,8 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes,
SwTableBox *pSttBox = rSelBoxes[0];
- _FndLine *pFLine, *pInsFLine = 0;
- _FndBox aFndBox( 0, 0 );
+ _FndLine *pFLine, *pInsFLine = nullptr;
+ _FndBox aFndBox( nullptr, nullptr );
// Find all Boxes/Lines
{
_FndPara aPara( rSelBoxes, &aFndBox );
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 520c9c8669b0..c46d561be5d0 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -86,7 +86,7 @@ struct _CpyTabFrm
} Value;
SwTableBoxFormat *pNewFrameFormat;
- explicit _CpyTabFrm( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( 0 )
+ explicit _CpyTabFrm( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr )
{ Value.pFrameFormat = pAktFrameFormat; }
_CpyTabFrm& operator=( const _CpyTabFrm& );
@@ -111,7 +111,7 @@ struct CR_SetBoxWidth
CR_SetBoxWidth( sal_uInt16 eType, SwTwips nDif, SwTwips nSid, SwTwips nTableW,
SwTwips nMax, SwTableNode* pTNd )
- : pTableNd( pTNd ), pUndo( 0 ),
+ : pTableNd( pTNd ), pUndo( nullptr ),
nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 ),
nTableWidth( (sal_uInt16)nTableW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
bSplittBox( false ), bAnyBoxFnd( false )
@@ -206,7 +206,7 @@ struct CR_SetLineHeight
bool bBigger, bTop, bSplittBox, bAnyBoxFnd;
CR_SetLineHeight( sal_uInt16 eType, SwTableNode* pTNd )
- : pTableNd( pTNd ), pUndo( 0 ),
+ : pTableNd( pTNd ), pUndo( nullptr ),
nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 ),
bSplittBox( false ), bAnyBoxFnd( false )
{
@@ -266,7 +266,7 @@ struct _CpyPara
_CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr,
bool bCopyContent = true )
: pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrmArr(rFrmArr),
- pInsLine(0), pInsBox(0), nOldSize(0), nNewSize(0),
+ pInsLine(nullptr), pInsBox(nullptr), nOldSize(0), nNewSize(0),
nMinLeft(ULONG_MAX), nMaxRight(0),
nCpyCnt(nCopies), nInsPos(0),
nLnIdx(0), nBoxIdx(0),
@@ -309,7 +309,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara)
SwTableBoxFormat* pNewFormat = static_cast<SwTableBoxFormat*>(pBox->ClaimFrameFormat());
// Find the selected Boxes in the Line:
- _FndLine const* pCmpLine = NULL;
+ _FndLine const* pCmpLine = nullptr;
SwFormatFrmSize aFrmSz( pNewFormat->GetFrmSize() );
bool bDiffCount = false;
@@ -400,9 +400,9 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara)
SvxBoxItem aNew( rBoxItem );
if( 8 > pCpyPara->nDelBorderFlag )
- aNew.SetLine( 0, SvxBoxItemLine::TOP );
+ aNew.SetLine( nullptr, SvxBoxItemLine::TOP );
else
- aNew.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aNew.SetLine( nullptr, SvxBoxItemLine::RIGHT );
if( 1 == pCpyPara->nDelBorderFlag ||
8 == pCpyPara->nDelBorderFlag )
@@ -493,7 +493,7 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
for( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
if( pFrm->GetTabLine() == &rLine )
return pFrm;
- return 0;
+ return nullptr;
}
bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
@@ -509,7 +509,7 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
else
{
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( GetTabLines(), &aPara );
@@ -517,7 +517,7 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
if( aFndBox.GetLines().empty() )
return false;
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
// Find Lines for the layout update
aFndBox.SetTableLines( *this );
@@ -564,7 +564,7 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
return false;
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( GetTabLines(), &aPara );
@@ -572,7 +572,7 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
if( aFndBox.GetLines().empty() )
return false;
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
_FndBox* pFndBox = &aFndBox;
{
@@ -722,7 +722,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
SwTableBox* pNxtBox = rTableBoxes[ nDelPos + 1 ];
const SvxBoxItem& rNxtBoxItem = pNxtBox->GetFrameFormat()->GetBox();
- SwTableBox* pPrvBox = nDelPos ? rTableBoxes[ nDelPos - 1 ] : 0;
+ SwTableBox* pPrvBox = nDelPos ? rTableBoxes[ nDelPos - 1 ] : nullptr;
if( pNxtBox->GetSttNd() && !rNxtBoxItem.GetLeft() &&
( !pPrvBox || !pPrvBox->GetFrameFormat()->GetBox().GetRight()) )
@@ -744,7 +744,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
const SvxBoxItem& rPrvBoxItem = pPrvBox->GetFrameFormat()->GetBox();
SwTableBox* pNxtBox = nDelPos + 1 < (sal_uInt16)rTableBoxes.size()
- ? rTableBoxes[ nDelPos + 1 ] : 0;
+ ? rTableBoxes[ nDelPos + 1 ] : nullptr;
if( pPrvBox->GetSttNd() && !rPrvBoxItem.GetRight() &&
( !pNxtBox || !pNxtBox->GetFrameFormat()->GetBox().GetLeft()) )
@@ -849,7 +849,7 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns,
sal_uInt16 nLinePos, bool bNxt,
SwSelBoxes* pAllDelBoxes, size_t *const pCurPos)
{
- SwTableBox* pFndBox = 0;
+ SwTableBox* pFndBox = nullptr;
do {
if( bNxt )
++nLinePos;
@@ -883,7 +883,7 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns,
if( std::abs( nFndWidth ) > COLFUZZY ||
std::abs( nBoxWidth - nFndBoxWidth ) > COLFUZZY )
- pFndBox = 0;
+ pFndBox = nullptr;
else if( pAllDelBoxes )
{
// If the predecessor will also be deleted, there's nothing to do
@@ -894,7 +894,7 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns,
// else, we keep on searching.
// We do not need to recheck the Box, however
- pFndBox = 0;
+ pFndBox = nullptr;
if( nFndPos <= *pCurPos )
--*pCurPos;
pAllDelBoxes->erase( pAllDelBoxes->begin() + nFndPos );
@@ -906,8 +906,8 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns,
static void
lcl_SaveUpperLowerBorder( SwTable& rTable, const SwTableBox& rBox,
SwShareBoxFormats& rShareFormats,
- SwSelBoxes* pAllDelBoxes = 0,
- size_t *const pCurPos = 0 )
+ SwSelBoxes* pAllDelBoxes = nullptr,
+ size_t *const pCurPos = nullptr )
{
//JP 16.04.97: 2. part for Bug 36271
const SwTableLine* pLine = rBox.GetUpper();
@@ -936,7 +936,7 @@ lcl_SaveUpperLowerBorder( SwTable& rTable, const SwTableBox& rBox,
nBoxStt += rTableBoxes[ n ]->GetFrameFormat()->GetFrmSize().GetWidth();
SwTwips nBoxWidth = rBox.GetFrameFormat()->GetFrmSize().GetWidth();
- SwTableBox *pPrvBox = 0, *pNxtBox = 0;
+ SwTableBox *pPrvBox = nullptr, *pNxtBox = nullptr;
if( nLnPos ) // Predecessor?
pPrvBox = ::lcl_FndNxtPrvDelBox( *pTableLns, nBoxStt, nBoxWidth,
nLnPos, false, pAllDelBoxes, pCurPos );
@@ -983,7 +983,7 @@ bool SwTable::DeleteSel(
const bool bDelMakeFrms, const bool bCorrBorder )
{
OSL_ENSURE( pDoc, "No doc?" );
- SwTableNode* pTableNd = 0;
+ SwTableNode* pTableNd = nullptr;
if( !rBoxes.empty() )
{
pTableNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
@@ -991,10 +991,10 @@ bool SwTable::DeleteSel(
return false;
}
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
// Find Lines for the Layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
if ( bDelMakeFrms )
{
if( pMerged && !pMerged->empty() )
@@ -1063,11 +1063,11 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->getIDocumentChartDataProviderAccess().CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
// If the rows should get the same (min) height, we first have
// to store the old row heights before deleting the frames
- long* pRowHeights = 0;
+ long* pRowHeights = nullptr;
if ( bSameHeight )
{
pRowHeights = new long[ rBoxes.size() ];
@@ -1082,7 +1082,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
}
// Find Lines for the Layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
@@ -1126,7 +1126,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
}
SwTableBoxFormat* pCpyBoxFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat());
- bool bChkBorder = 0 != pCpyBoxFrameFormat->GetBox().GetTop();
+ bool bChkBorder = nullptr != pCpyBoxFrameFormat->GetBox().GetTop();
if( bChkBorder )
pCpyBoxFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat());
@@ -1156,7 +1156,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
{
pCpyBoxFrameFormat = static_cast<SwTableBoxFormat*>(pNewLine->GetTabBoxes()[ 0 ]->ClaimFrameFormat());
SvxBoxItem aTmp( pCpyBoxFrameFormat->GetBox() );
- aTmp.SetLine( 0, SvxBoxItemLine::TOP );
+ aTmp.SetLine( nullptr, SvxBoxItemLine::TOP );
pCpyBoxFrameFormat->SetFormatAttr( aTmp );
bChkBorder = false;
}
@@ -1205,12 +1205,12 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->getIDocumentChartDataProviderAccess().CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
SwSelBoxes aSelBoxes(rBoxes);
ExpandSelection( aSelBoxes );
// Find Lines for the Layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( aSelBoxes, *this );
aFndBox.DelFrms( *this );
@@ -1277,7 +1277,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
pInsLine->GetTabBoxes()[ nBoxPos + nCnt ]->ClaimFrameFormat();
SvxBoxItem aTmp( aSelBoxItem );
- aTmp.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aTmp.SetLine( nullptr, SvxBoxItemLine::RIGHT );
aFindFrm.pNewFrameFormat->SetFormatAttr( aTmp );
// Remove the Format from the "cache"
@@ -1378,16 +1378,16 @@ struct _InsULPara
_InsULPara( SwTableNode* pTNd, bool bUpperLower, bool bUpper,
SwTableBox* pLeft, SwTableBox* pMerge, SwTableBox* pRight,
- SwTableLine* pLine=0, SwTableBox* pBox=0 )
+ SwTableLine* pLine=nullptr, SwTableBox* pBox=nullptr )
: pTableNd( pTNd ), pInsLine( pLine ), pInsBox( pBox ),
pLeftBox( pLeft ), pRightBox( pRight ), pMergeBox( pMerge )
{ bUL_LR = bUpperLower; bUL = bUpper; }
- void SetLeft( SwTableBox* pBox=0 )
+ void SetLeft( SwTableBox* pBox=nullptr )
{ bUL_LR = false; bUL = true; if( pBox ) pInsBox = pBox; }
- void SetRight( SwTableBox* pBox=0 )
+ void SetRight( SwTableBox* pBox=nullptr )
{ bUL_LR = false; bUL = false; if( pBox ) pInsBox = pBox; }
- void SetLower( SwTableLine* pLine=0 )
+ void SetLower( SwTableLine* pLine=nullptr )
{ bUL_LR = true; bUL = false; if( pLine ) pInsLine = pLine; }
};
@@ -1564,7 +1564,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
return false;
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( GetTabLines(), &aPara );
@@ -1577,7 +1577,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->getIDocumentChartDataProviderAccess().CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
if( pUndo )
pUndo->SetSelBoxes( rBoxes );
@@ -1595,7 +1595,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableLine* pInsLine = new SwTableLine(
static_cast<SwTableLineFormat*>(pFndBox->GetLines().front()->GetLine()->GetFrameFormat()), 0,
- !pFndBox->GetUpper() ? 0 : pFndBox->GetBox() );
+ !pFndBox->GetUpper() ? nullptr : pFndBox->GetBox() );
pInsLine->ClaimFrameFormat()->ResetFormatAttr( RES_FRM_SIZE );
// Add the new Line
@@ -1645,7 +1645,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
if( pLeftBox->GetTabLines().empty() )
- _DeleteBox( *this, pLeftBox, 0, false, false );
+ _DeleteBox( *this, pLeftBox, nullptr, false, false );
else
{
lcl_CalcWidth( pLeftBox ); // calculate the Box's width
@@ -1653,7 +1653,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pLeftBox->GetSttIdx() );
}
if( pRightBox->GetTabLines().empty() )
- _DeleteBox( *this, pRightBox, 0, false, false );
+ _DeleteBox( *this, pRightBox, nullptr, false, false );
else
{
lcl_CalcWidth( pRightBox ); // calculate the Box's width
@@ -1661,7 +1661,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pRightBox->GetSttIdx() );
}
- DeleteSel( pDoc, rBoxes, 0, 0, false, false );
+ DeleteSel( pDoc, rBoxes, nullptr, nullptr, false, false );
// Clean up this Line's structure once again, generally all of them
GCLines();
@@ -1894,7 +1894,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
pCpyPara->pDoc->GetNodes().InsBoxen( pCpyPara->pTableNd, pCpyPara->pInsLine,
aFindFrm.pNewFrameFormat,
pCpyPara->pDoc->GetDfltTextFormatColl(),
- 0, pCpyPara->nInsPos );
+ nullptr, pCpyPara->nInsPos );
pBox = pCpyPara->pInsLine->GetTabBoxes()[ pCpyPara->nInsPos ];
if( bDummy )
pBox->setDummyFlag( true );
@@ -1928,7 +1928,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
*rFndBox.GetBox()->GetSttNd()->EndOfSectionNode() );
SwNodeIndex aInsIdx( *pBox->GetSttNd(), 1 );
- pFromDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aCpyRg, 0, aInsIdx, NULL, false );
+ pFromDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aCpyRg, 0, aInsIdx, nullptr, false );
// Delete the initial TextNode
pCpyPara->pDoc->GetNodes().Delete( aInsIdx );
}
@@ -2022,7 +2022,7 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd )
pBox = GetTableBox( pBox->GetSttNd()->StartOfSectionNode()->GetIndex() + 1 );
SelLineFromBox( pBox, aSelBoxes );
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( aSelBoxes, &aFndBox );
ForEach_FndLineCopyCol( GetTabLines(), &aPara );
@@ -2066,7 +2066,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
bool bCpyName ) const
{
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rSelBoxes, &aFndBox );
ForEach_FndLineCopyCol( (SwTableLines&)GetTabLines(), &aPara );
@@ -2086,7 +2086,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwTable* pNewTable = const_cast<SwTable*>(pInsDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
rPos, 1, 1, GetFrameFormat()->GetHoriOrient().GetHoriOrient(),
- 0, 0, false, IsNewModel() ));
+ nullptr, nullptr, false, IsNewModel() ));
if( !pNewTable )
return false;
@@ -2199,7 +2199,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// We need to delete the initial Box
_DeleteBox( *pNewTable, pNewTable->GetTabLines().back()->GetTabBoxes()[0],
- 0, false, false );
+ nullptr, false, false );
if( pNewTable->IsNewModel() )
lcl_CheckRowSpan( *pNewTable );
@@ -2244,12 +2244,12 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTable,
// Search for the next Line in the Table
nFndPos = rTable.GetTabLines().GetPos( pLine );
if( nFndPos + 1 >= (sal_uInt16)rTable.GetTabLines().size() )
- return 0; // there are no more Boxes
+ return nullptr; // there are no more Boxes
pLine = rTable.GetTabLines()[ nFndPos+1 ];
}
else
- return 0;
+ return nullptr;
if( !pLine->GetTabBoxes().empty() )
{
@@ -2258,7 +2258,7 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTable,
pBox = pBox->GetTabLines().front()->GetTabBoxes().front();
return pBox;
}
- return pLine->FindNextBox( rTable, 0, bOvrTableLns );
+ return pLine->FindNextBox( rTable, nullptr, bOvrTableLns );
}
// Find the previous Box from this Line
@@ -2295,12 +2295,12 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTable,
// Search for the next Line in the Table
nFndPos = rTable.GetTabLines().GetPos( pLine );
if( !nFndPos )
- return 0; // there are no more Boxes
+ return nullptr; // there are no more Boxes
pLine = rTable.GetTabLines()[ nFndPos-1 ];
}
else
- return 0;
+ return nullptr;
if( !pLine->GetTabBoxes().empty() )
{
@@ -2312,7 +2312,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTable,
}
return pBox;
}
- return pLine->FindPreviousBox( rTable, 0, bOvrTableLns );
+ return pLine->FindPreviousBox( rTable, nullptr, bOvrTableLns );
}
// Find the next Box with content from this Line
@@ -2358,7 +2358,7 @@ static SwTwips lcl_GetDistance( SwTableBox* pBox, bool bLeft )
bool bFirst = true;
SwTwips nRet = 0;
SwTableLine* pLine;
- while( pBox && 0 != ( pLine = pBox->GetUpper() ) )
+ while( pBox && nullptr != ( pLine = pBox->GetUpper() ) )
{
sal_uInt16 nStt = 0, nPos = pLine->GetTabBoxes().GetPos( pBox );
@@ -2674,7 +2674,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( rBoxItem.GetRight() )
{
SvxBoxItem aTmp( rBoxItem );
- aTmp.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aTmp.SetLine( nullptr, SvxBoxItemLine::RIGHT );
rParam.aShareFormats.SetAttr( rParam.bLeft
? *pNewBox
: *pBox, aTmp );
@@ -3357,10 +3357,10 @@ static _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
if (rParam.bBigger
&& rParam.m_Boxes.size() == rTable.GetTabSortBoxes().size())
{
- return 0;
+ return nullptr;
}
- _FndBox* pFndBox = new _FndBox( 0, 0 );
+ _FndBox* pFndBox = new _FndBox( nullptr, nullptr );
if( rParam.bBigger )
pFndBox->SetTableLines( rParam.m_Boxes, rTable );
else
@@ -3387,7 +3387,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo )
{
- SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ SetHTMLTableLayout( nullptr ); // Delete HTML Layout
const SwFormatFrmSize& rSz = GetFrameFormat()->GetFrmSize();
const SvxLRSpaceItem& rLR = GetFrameFormat()->GetLRSpace();
@@ -3886,10 +3886,10 @@ static _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
if (!rParam.bBigger
&& rParam.m_Boxes.size() == rTable.GetTabSortBoxes().size())
{
- return 0;
+ return nullptr;
}
- _FndBox* pFndBox = new _FndBox( 0, 0 );
+ _FndBox* pFndBox = new _FndBox( nullptr, nullptr );
if( !rParam.bBigger )
pFndBox->SetTableLines( rParam.m_Boxes, rTable );
else
@@ -4081,7 +4081,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
if( rBoxItem.GetTop() )
{
SvxBoxItem aTmp( rBoxItem );
- aTmp.SetLine( 0, SvxBoxItemLine::TOP );
+ aTmp.SetLine( nullptr, SvxBoxItemLine::TOP );
rParam.aShareFormats.SetAttr( rParam.bTop
? *pOld
: *rNewBoxes[ n ], aTmp );
@@ -4358,7 +4358,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwFrameFormat* SwShareBoxFormat::GetFormat( long nWidth ) const
{
- SwFrameFormat *pRet = 0, *pTmp;
+ SwFrameFormat *pRet = nullptr, *pTmp;
for( auto n = aNewFormats.size(); n; )
if( ( pTmp = aNewFormats[ --n ])->GetFrmSize().GetWidth()
== nWidth )
@@ -4373,7 +4373,7 @@ SwFrameFormat* SwShareBoxFormat::GetFormat( const SfxPoolItem& rItem ) const
{
const SfxPoolItem* pItem;
sal_uInt16 nWhich = rItem.Which();
- SwFrameFormat *pRet = 0, *pTmp;
+ SwFrameFormat *pRet = nullptr, *pTmp;
const SfxPoolItem& rFrmSz = pOldFormat->GetFormatAttr( RES_FRM_SIZE, false );
for( auto n = aNewFormats.size(); n; )
if( SfxItemState::SET == ( pTmp = aNewFormats[ --n ])->
@@ -4444,7 +4444,7 @@ void SwShareBoxFormats::ChangeFrameFormat( SwTableBox* pBox, SwTableLine* pLn,
SwFrameFormat& rFormat )
{
SwClient aCl;
- SwFrameFormat* pOld = 0;
+ SwFrameFormat* pOld = nullptr;
if( pBox )
{
pOld = pBox->GetFrameFormat();
@@ -4469,7 +4469,7 @@ void SwShareBoxFormats::SetSize( SwTableBox& rBox, const SwFormatFrmSize& rSz )
SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(),
*pRet = GetFormat( *pBoxFormat, rSz.GetWidth() );
if( pRet )
- ChangeFrameFormat( &rBox, 0, *pRet );
+ ChangeFrameFormat( &rBox, nullptr, *pRet );
else
{
pRet = rBox.ClaimFrameFormat();
@@ -4483,7 +4483,7 @@ void SwShareBoxFormats::SetAttr( SwTableBox& rBox, const SfxPoolItem& rItem )
SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(),
*pRet = GetFormat( *pBoxFormat, rItem );
if( pRet )
- ChangeFrameFormat( &rBox, 0, *pRet );
+ ChangeFrameFormat( &rBox, nullptr, *pRet );
else
{
pRet = rBox.ClaimFrameFormat();
@@ -4497,7 +4497,7 @@ void SwShareBoxFormats::SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem )
SwFrameFormat *pLineFormat = rLine.GetFrameFormat(),
*pRet = GetFormat( *pLineFormat, rItem );
if( pRet )
- ChangeFrameFormat( 0, &rLine, *pRet );
+ ChangeFrameFormat( nullptr, &rLine, *pRet );
else
{
pRet = rLine.ClaimFrameFormat();
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index db26d1042152..d640c96dfc83 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -151,8 +151,8 @@ std::set<const SwFrameFormat*> SwTextBoxHelper::findTextBoxes(const SwDoc* pDoc)
std::set<const SwFrameFormat*> SwTextBoxHelper::findTextBoxes(const SwNode& rNode)
{
const SwDoc* pDoc = rNode.GetDoc();
- const SwContentNode* pContentNode = 0;
- const SwContentFrm* pContentFrm = 0;
+ const SwContentNode* pContentNode = nullptr;
+ const SwContentFrm* pContentFrm = nullptr;
bool bHaveViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
if (bHaveViewShell && (pContentNode = rNode.GetContentNode()) && (pContentFrm = pContentNode->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout())))
{
@@ -225,7 +225,7 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set<
if (nIndex < 0)
throw lang::IndexOutOfBoundsException();
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
sal_Int32 nCount = 0; // Current logical index.
for (size_t i = 0; i < pPage->GetObjCount(); ++i)
{
@@ -268,14 +268,14 @@ SwFrameFormat* SwTextBoxHelper::findTextBox(uno::Reference<drawing::XShape> xSha
{
SwXShape* pShape = dynamic_cast<SwXShape*>(xShape.get());
if (!pShape)
- return 0;
+ return nullptr;
return findTextBox(pShape->GetFrameFormat());
}
SwFrameFormat* SwTextBoxHelper::findTextBox(const SwFrameFormat* pShape)
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
// Only draw frames can have TextBoxes.
if (pShape && pShape->Which() == RES_DRAWFRMFMT && pShape->GetAttrSet().HasItem(RES_CNTNT))
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index c61bf3baf4bd..7555205b64c8 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -60,14 +60,14 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
const SwFormatINetFormat* pItem = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n ));
- if( pItem != 0 &&
+ if( pItem != nullptr &&
( pItem->GetValue() == sURL || ( !sBkmk.isEmpty() && pItem->GetValue() == sBkmk )))
{
const SwTextINetFormat* pTextAttr = pItem->GetTextINetFormat();
- if (pTextAttr != 0)
+ if (pTextAttr != nullptr)
{
const SwTextNode* pTextNd = pTextAttr->GetpTextNode();
- if (pTextNd != 0)
+ if (pTextNd != nullptr)
{
if( !bAction && pESh )
{
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index 93e2d8a14fcd..658b4c9ef3b7 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -235,9 +235,9 @@ FinalThreadManager::FinalThreadManager(css::uno::Reference< css::uno::XComponent
: m_xContext(context),
maMutex(),
maThreads(),
- mpCancelJobsThread( 0 ),
- mpTerminateOfficeThread( 0 ),
- mpPauseThreadStarting( 0 ),
+ mpCancelJobsThread( nullptr ),
+ mpTerminateOfficeThread( nullptr ),
+ mpPauseThreadStarting( nullptr ),
mbRegisteredAtDesktop( false )
{
@@ -251,16 +251,16 @@ void FinalThreadManager::registerAsListenerAtDesktop()
FinalThreadManager::~FinalThreadManager()
{
- if ( mpPauseThreadStarting != 0 )
+ if ( mpPauseThreadStarting != nullptr )
{
delete mpPauseThreadStarting;
- mpPauseThreadStarting = 0;
+ mpPauseThreadStarting = nullptr;
}
- if ( mpTerminateOfficeThread != 0 )
+ if ( mpTerminateOfficeThread != nullptr )
{
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
- mpTerminateOfficeThread = 0;
+ mpTerminateOfficeThread = nullptr;
}
if ( !maThreads.empty() )
@@ -269,7 +269,7 @@ FinalThreadManager::~FinalThreadManager()
cancelAllJobs();
}
- if ( mpCancelJobsThread != 0 )
+ if ( mpCancelJobsThread != nullptr )
{
if ( !mpCancelJobsThread->allJobsCancelled() )
OSL_FAIL( "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" );
@@ -277,7 +277,7 @@ FinalThreadManager::~FinalThreadManager()
mpCancelJobsThread->stopWhenAllJobsCancelled();
mpCancelJobsThread->join();
delete mpCancelJobsThread;
- mpCancelJobsThread = 0;
+ mpCancelJobsThread = nullptr;
}
}
@@ -334,13 +334,13 @@ void SAL_CALL FinalThreadManager::cancelAllJobs() throw (css::uno::RuntimeExcept
{
osl::MutexGuard aGuard(maMutex);
- if ( mpCancelJobsThread == 0 )
+ if ( mpCancelJobsThread == nullptr )
{
mpCancelJobsThread = new CancelJobsThread( aThreads );;
if ( !mpCancelJobsThread->create() )
{
delete mpCancelJobsThread;
- mpCancelJobsThread = 0;
+ mpCancelJobsThread = nullptr;
while ( !aThreads.empty() )
{
aThreads.front()->cancel();
@@ -361,7 +361,7 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject
cancelAllJobs();
// Sleep 1 second to give the thread for job cancellation some time.
// Probably, all started threads have already finished its work.
- if ( mpCancelJobsThread != 0 &&
+ if ( mpCancelJobsThread != nullptr &&
!mpCancelJobsThread->allJobsCancelled() )
{
TimeValue aSleepTime;
@@ -370,24 +370,24 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject
osl_waitThread( &aSleepTime );
}
- if ( mpCancelJobsThread != 0 &&
+ if ( mpCancelJobsThread != nullptr &&
!mpCancelJobsThread->allJobsCancelled() )
{
- if ( mpTerminateOfficeThread != 0 )
+ if ( mpTerminateOfficeThread != nullptr )
{
if ( mpTerminateOfficeThread->isRunning() )
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
else
delete mpTerminateOfficeThread;
- mpTerminateOfficeThread = 0;
+ mpTerminateOfficeThread = nullptr;
}
mpTerminateOfficeThread = new TerminateOfficeThread( *mpCancelJobsThread,
m_xContext );
if ( !mpTerminateOfficeThread->create() )
{
delete mpTerminateOfficeThread;
- mpTerminateOfficeThread = 0;
+ mpTerminateOfficeThread = nullptr;
}
throw css::frame::TerminationVetoException();
@@ -400,10 +400,10 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject
void SAL_CALL FinalThreadManager::cancelTermination( const css::lang::EventObject& ) throw (css::uno::RuntimeException, std::exception)
{
- if ( mpPauseThreadStarting != 0 )
+ if ( mpPauseThreadStarting != nullptr )
{
delete mpPauseThreadStarting;
- mpPauseThreadStarting = 0;
+ mpPauseThreadStarting = nullptr;
}
return;
@@ -411,25 +411,25 @@ void SAL_CALL FinalThreadManager::cancelTermination( const css::lang::EventObjec
void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObject& ) throw (css::uno::RuntimeException, std::exception)
{
- if ( mpTerminateOfficeThread != 0 )
+ if ( mpTerminateOfficeThread != nullptr )
{
if ( mpTerminateOfficeThread->isRunning() )
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
else
delete mpTerminateOfficeThread;
- mpTerminateOfficeThread = 0;
+ mpTerminateOfficeThread = nullptr;
}
if ( !maThreads.empty() )
cancelAllJobs();
- if ( mpCancelJobsThread != 0 )
+ if ( mpCancelJobsThread != nullptr )
{
mpCancelJobsThread->stopWhenAllJobsCancelled();
mpCancelJobsThread->join();
delete mpCancelJobsThread;
- mpCancelJobsThread = 0;
+ mpCancelJobsThread = nullptr;
}
// get reference of this
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index e01d2f6e7e22..673852c3db89 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -62,7 +62,7 @@ SwContentNode* SwTextNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) cons
SwTextNode* pCpyAttrNd = pCpyTextNd;
// Copy the formats to the other document
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
if( pDoc->IsInsOnlyTextGlossary() )
{
SwNodeIndex aIdx( rIdx, -1 );
@@ -131,7 +131,7 @@ struct _CopyTable
_CopyTable(SwDoc* pDc, _MapTableFrameFormats& rArr, sal_uLong nOldStt,
SwTableNode& rTableNd, const SwTable* pOldTable)
: m_pDoc(pDc), m_nOldTableSttIdx(nOldStt), m_rMapArr(rArr),
- m_pInsLine(0), m_pInsBox(0), m_pTableNd(&rTableNd), m_pOldTable(pOldTable)
+ m_pInsLine(nullptr), m_pInsBox(nullptr), m_pTableNd(&rTableNd), m_pOldTable(pOldTable)
{}
};
@@ -241,7 +241,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
{
if( rIdx < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
rIdx >= pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() )
- return 0;
+ return nullptr;
}
// Copy the TableFrameFormat
@@ -270,7 +270,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
rTable.SetTableChgMode( GetTable().GetTableChgMode() );
rTable.SetTableModel( GetTable().IsNewModel() );
- SwDDEFieldType* pDDEType = 0;
+ SwDDEFieldType* pDDEType = nullptr;
if( typeid(SwDDETable) == typeid( &GetTable() ))
{
// We're copying a DDE table
@@ -297,7 +297,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// without any content in m_TabSortContentBoxes. #i26629#
pTableNd->GetTable().SetTableNode( pTableNd );
rNds._Copy( aRg, aInsPos, false );
- pTableNd->GetTable().SetTableNode( 0 );
+ pTableNd->GetTable().SetTableNode( nullptr );
// Special case for a single box
if( 1 == GetTable().GetTabSortBoxes().size() )
@@ -332,7 +332,7 @@ void SwTextNode::CopyCollFormat( SwTextNode& rDestNd )
SwAttrSet aPgBrkSet( pDestDoc->GetAttrPool(), aBreakSetRange );
const SwAttrSet* pSet;
- if( 0 != ( pSet = rDestNd.GetpSwAttrSet() ) )
+ if( nullptr != ( pSet = rDestNd.GetpSwAttrSet() ) )
{
// Special cases for Break-Attributes
const SfxPoolItem* pAttr;
@@ -344,7 +344,7 @@ void SwTextNode::CopyCollFormat( SwTextNode& rDestNd )
}
rDestNd.ChgFormatColl( pDestDoc->CopyTextColl( *GetTextColl() ));
- if( 0 != ( pSet = GetpSwAttrSet() ) )
+ if( nullptr != ( pSet = GetpSwAttrSet() ) )
pSet->CopyToModify( rDestNd );
if( aPgBrkSet.Count() )
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 9b108233d2a3..1c4673fa637a 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -41,7 +41,7 @@ SwNoTextNode::SwNoTextNode( const SwNodeIndex & rWhere,
SwGrfFormatColl *pGrfColl,
SwAttrSet* pAutoAttr ) :
SwContentNode( rWhere, nNdType, pGrfColl ),
- pContour( 0 ),
+ pContour( nullptr ),
bAutomaticContour( false ),
bContourMapModeValid( true ),
bPixelContour( false )
@@ -92,7 +92,7 @@ void SwNoTextNode::SetContour( const tools::PolyPolygon *pPoly, bool bAutomatic
if ( pPoly )
pContour = new tools::PolyPolygon( *pPoly );
else
- pContour = 0;
+ pContour = nullptr;
bAutomaticContour = bAutomatic;
bContourMapModeValid = true;
bPixelContour = false;
@@ -142,7 +142,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
"scale factor for pixel unsupported" );
OutputDevice* pOutDev =
(bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
- : 0;
+ : nullptr;
sal_uInt16 nPolyCount = pContour->Count();
for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
@@ -190,7 +190,7 @@ void SwNoTextNode::SetContourAPI( const tools::PolyPolygon *pPoly )
if ( pPoly )
pContour = new tools::PolyPolygon( *pPoly );
else
- pContour = 0;
+ pContour = nullptr;
bContourMapModeValid = false;
}
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index e13f547b6125..4c9d515246cf 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -155,7 +155,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SwTOXBase const*const pTOXBase,
SfxItemSet const*const pAttr, bool const bUpdate)
{
- const SwNode* pPrvNd = 0;
+ const SwNode* pPrvNd = nullptr;
sal_uInt16 nRegionRet = 0;
if( rRange.HasMark() &&
0 == ( nRegionRet = IsInsRegionAvailable( rRange, &pPrvNd ) ))
@@ -163,7 +163,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
// demoted to info because this is called from SwXTextSection::attach,
// so it could be invalid input
SAL_INFO("sw.core" , "InsertSwSection: rRange overlaps other sections");
- return 0;
+ return nullptr;
}
// See if the whole Document should be hidden, which we currently are not able to do.
@@ -181,7 +181,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
}
- SwUndoInsSection* pUndoInsSect = 0;
+ SwUndoInsSection* pUndoInsSect = nullptr;
bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
if (bUndo)
{
@@ -190,13 +190,13 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
GetIDocumentUndoRedo().DoUndo(false);
}
- SwSectionFormat* const pFormat = MakeSectionFormat( 0 );
+ SwSectionFormat* const pFormat = MakeSectionFormat( nullptr );
if ( pAttr )
{
pFormat->SetFormatAttr( *pAttr );
}
- SwSectionNode* pNewSectNode = 0;
+ SwSectionNode* pNewSectNode = nullptr;
RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode();
getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)((eOld & ~nsRedlineMode_t::REDLINE_SHOW_MASK) | nsRedlineMode_t::REDLINE_IGNORE));
@@ -297,12 +297,12 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if( !pPos->nContent.GetIndex() )
{
pNewSectNode = GetNodes().InsertTextSection(
- pPos->nNode, *pFormat, rNewData, pTOXBase, 0);
+ pPos->nNode, *pFormat, rNewData, pTOXBase, nullptr);
}
else if( pPos->nContent.GetIndex() == pCNd->Len() )
{
pNewSectNode = GetNodes().InsertTextSection(
- pPos->nNode, *pFormat, rNewData, pTOXBase, 0, false);
+ pPos->nNode, *pFormat, rNewData, pTOXBase, nullptr, false);
}
else
{
@@ -312,7 +312,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
getIDocumentContentOperations().SplitNode( *pPos, false );
pNewSectNode = GetNodes().InsertTextSection(
- pPos->nNode, *pFormat, rNewData, pTOXBase, 0);
+ pPos->nNode, *pFormat, rNewData, pTOXBase, nullptr);
}
}
@@ -398,7 +398,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
const SwContentNode* pCNd = pEnd->nNode.GetNode().GetContentNode();
const SwNode* pNd = &pStt->nNode.GetNode();
const SwSectionNode* pSectNd = pNd->FindSectionNode();
- const SwSectionNode* pEndSectNd = pCNd ? pCNd->FindSectionNode() : 0;
+ const SwSectionNode* pEndSectNd = pCNd ? pCNd->FindSectionNode() : nullptr;
if( pSectNd && pEndSectNd && pSectNd != pEndSectNd )
{
// Try to create an enclosing Section, but only if Start is
@@ -412,7 +412,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
sal_uLong nCmp = pEnd->nNode.GetIndex();
const SwStartNode* pPrvNd;
const SwEndNode* pNxtNd;
- while( 0 != ( pPrvNd = (pNd = &aIdx.GetNode())->GetSectionNode() ) &&
+ while( nullptr != ( pPrvNd = (pNd = &aIdx.GetNode())->GetSectionNode() ) &&
!( aIdx.GetIndex() < nCmp &&
nCmp < pPrvNd->EndOfSectionIndex() ) )
{
@@ -424,7 +424,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
aIdx = pEnd->nNode.GetIndex() + 1;
nCmp = pStt->nNode.GetIndex();
- while( 0 != ( pNxtNd = (pNd = &aIdx.GetNode())->GetEndNode() ) &&
+ while( nullptr != ( pNxtNd = (pNd = &aIdx.GetNode())->GetEndNode() ) &&
pNxtNd->StartOfSectionNode()->IsSectionNode() &&
!( pNxtNd->StartOfSectionIndex() < nCmp &&
nCmp < aIdx.GetIndex() ) )
@@ -452,12 +452,12 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
{
SwNodeIndex aIdx( pEnd->nNode, 1 );
if( aIdx.GetNode().IsEndNode() &&
- 0 != aIdx.GetNode().FindSectionNode() )
+ nullptr != aIdx.GetNode().FindSectionNode() )
{
do {
++aIdx;
} while( aIdx.GetNode().IsEndNode() &&
- 0 != aIdx.GetNode().FindSectionNode() );
+ nullptr != aIdx.GetNode().FindSectionNode() );
{
nRet = 2;
if( ppSttNd )
@@ -503,13 +503,13 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos )
const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode();
if( pSectNd )
return const_cast<SwSection*>(&pSectNd->GetSection());
- return 0;
+ return nullptr;
}
SwSectionFormat* SwDoc::MakeSectionFormat( SwSectionFormat *pDerivedFrom )
{
SwSectionFormat* pNew = new SwSectionFormat(
- pDerivedFrom == 0 ? mpDfltFrameFormat : pDerivedFrom, this );
+ pDerivedFrom == nullptr ? mpDfltFrameFormat : pDerivedFrom, this );
mpSectionFormatTable->push_back( pNew );
return pNew;
}
@@ -518,7 +518,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
{
SwSectionFormats::iterator itFormatPos = std::find( mpSectionFormatTable->begin(), mpSectionFormatTable->end(), pFormat );
- GetIDocumentUndoRedo().StartUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_DELSECTION, nullptr);
if( mpSectionFormatTable->end() != itFormatPos )
{
@@ -528,14 +528,14 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
RES_FTN_AT_TXTEND, true, &pFootnoteEndAtTextEnd ) ||
SfxItemState::SET != pFormat->GetItemState(
RES_END_AT_TXTEND, true, &pFootnoteEndAtTextEnd ))
- pFootnoteEndAtTextEnd = 0;
+ pFootnoteEndAtTextEnd = nullptr;
const SwSectionNode* pSectNd;
if( GetIDocumentUndoRedo().DoesUndo() )
{
if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
SwNodeIndex aUpdIdx( *pIdx );
SwPaM aPaM( *pSectNd->EndOfSectionNode(), *pSectNd );
@@ -544,13 +544,13 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
GetFootnoteIdxs().UpdateFootnote( aUpdIdx );
getIDocumentState().SetModified();
//#126178# start/end undo have to be pairs!
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
return ;
}
GetIDocumentUndoRedo().AppendUndo( MakeUndoDelSection( *pFormat ) );
}
else if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
SwNodeIndex aUpdIdx( *pIdx );
getIDocumentContentOperations().DeleteSection( const_cast<SwNode*>(static_cast<SwNode const *>(pSectNd)) );
@@ -558,7 +558,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
GetFootnoteIdxs().UpdateFootnote( aUpdIdx );
getIDocumentState().SetModified();
//#126178# start/end undo have to be pairs!
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
return ;
}
@@ -577,7 +577,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
//FEATURE::CONDCOLL
sal_uLong nCnt = 0, nSttNd = 0;
if( pIdx && &GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
nSttNd = pSectNd->GetIndex();
nCnt = pSectNd->EndOfSectionIndex() - nSttNd - 1;
@@ -595,13 +595,13 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
//FEATURE::CONDCOLL
SwContentNode* pCNd;
for( ; nCnt--; ++nSttNd )
- if( 0 != (pCNd = GetNodes()[ nSttNd ]->GetContentNode() ) &&
+ if( nullptr != (pCNd = GetNodes()[ nSttNd ]->GetContentNode() ) &&
RES_CONDTXTFMTCOLL == pCNd->GetFormatColl()->Which() )
pCNd->ChkCondColl();
//FEATURE::CONDCOLL
}
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
getIDocumentState().SetModified();
}
@@ -656,7 +656,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData,
// Test if the whole Content Section (Document/TableBox/Fly) should be hidden,
// which we're currently not able to do.
- const SwNodeIndex* pIdx = 0;
+ const SwNodeIndex* pIdx = nullptr;
{
if (rNewData.IsHidden())
{
@@ -763,7 +763,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd )
{
// If the Nodes are not deleted, they need to deregister at the Pages
// (delete Frms) or else they will remain there (Undo does not delete them!)
- pSrch->DelFrms(0);
+ pSrch->DelFrms(nullptr);
++nPos;
}
@@ -772,7 +772,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd )
{
// If the Nodes are not deleted, they need to deregister at the Pages
// (delete Frms) or else they will remain there (Undo does not delete them!)
- pSrch->DelFrms(0);
+ pSrch->DelFrms(nullptr);
}
}
}
@@ -896,7 +896,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
// but by simply rewiring them
bool bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() &&
GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
- SwNode2Layout *pNode2Layout = NULL;
+ SwNode2Layout *pNode2Layout = nullptr;
if( bInsFrm )
{
SwNodeIndex aTmp( *pSectNd );
@@ -1048,7 +1048,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
{
SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() );
SwFrm *pFrm;
- while( 0 != (pFrm = aNode2Layout.NextFrm()) )
+ while( nullptr != (pFrm = aNode2Layout.NextFrm()) )
{
OSL_ENSURE( pFrm->IsSctFrm(), "Depend of Section not a Section." );
SwFrm *pNew = rIdx.GetNode().GetContentNode()->MakeFrm( pFrm );
@@ -1063,7 +1063,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
if ( pTableNode &&
pTableNode->GetIndex() > pS->GetIndex() )
{
- pS = 0;
+ pS = nullptr;
}
}
@@ -1196,7 +1196,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
const SwNodes& rNds = GetNodes();
// Copy the SectionFrameFormat
- SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat( 0 );
+ SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat( nullptr );
pSectFormat->CopyAttrs( *GetSection().GetFormat() );
std::unique_ptr<SwTOXBase> pTOXBase;
@@ -1319,7 +1319,7 @@ void SwSectionNode::NodesArrChgd()
sal_uLong nStart = GetIndex()+1, nEnde = EndOfSectionIndex();
for( sal_uLong n = nStart; n < nEnde; ++n )
// Make up the Format's nesting
- if( 0 != ( pSectNd = rNds[ n ]->GetSectionNode() ) )
+ if( nullptr != ( pSectNd = rNds[ n ]->GetSectionNode() ) )
{
pSectNd->GetSection().GetFormat()->SetDerivedFrom( pFormat );
n = pSectNd->EndOfSectionIndex();
@@ -1382,7 +1382,7 @@ OUString SwDoc::GetUniqueSectionName( const OUString* pChkStr ) const
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
if( pChkStr && *pChkStr==rNm )
- pChkStr = 0;
+ pChkStr = nullptr;
}
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index cef4277322c1..076d43ef009e 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -142,7 +142,7 @@ typedef std::vector<DfltBoxAttrMap_t *> DfltBoxAttrList_t;
static void
lcl_SetDfltBoxAttr(SwTableBox& rBox, DfltBoxAttrList_t & rBoxFormatArr,
- sal_uInt8 const nId, SwTableAutoFormat const*const pAutoFormat = 0)
+ sal_uInt8 const nId, SwTableAutoFormat const*const pAutoFormat = nullptr)
{
DfltBoxAttrMap_t * pMap = rBoxFormatArr[ nId ];
if (!pMap)
@@ -151,7 +151,7 @@ lcl_SetDfltBoxAttr(SwTableBox& rBox, DfltBoxAttrList_t & rBoxFormatArr,
rBoxFormatArr[ nId ] = pMap;
}
- SwTableBoxFormat* pNewTableBoxFormat = 0;
+ SwTableBoxFormat* pNewTableBoxFormat = nullptr;
SwFrameFormat* pBoxFrameFormat = rBox.GetFrameFormat();
DfltBoxAttrMap_t::iterator const iter(pMap->find(pBoxFrameFormat));
if (pMap->end() != iter)
@@ -212,11 +212,11 @@ static SwTableBoxFormat *lcl_CreateAFormatBoxFormat( SwDoc &rDoc, std::vector<Sw
SwTableNode* SwDoc::IsIdxInTable(const SwNodeIndex& rIdx)
{
- SwTableNode* pTableNd = 0;
+ SwTableNode* pTableNd = nullptr;
sal_uLong nIndex = rIdx.GetIndex();
do {
SwNode* pNd = static_cast<SwNode*>(GetNodes()[ nIndex ]->StartOfSectionNode());
- if( 0 != ( pTableNd = pNd->GetTableNode() ) )
+ if( nullptr != ( pTableNd = pNd->GetTableNode() ) )
break;
nIndex = pNd->GetIndex();
@@ -241,23 +241,23 @@ bool SwNodes::InsBoxen( SwTableNode* pTableNd,
// Move Index after the Line's last Box
sal_uLong nIdxPos = 0;
- SwTableBox *pPrvBox = 0, *pNxtBox = 0;
+ SwTableBox *pPrvBox = nullptr, *pNxtBox = nullptr;
if( !pLine->GetTabBoxes().empty() )
{
if( nInsPos < pLine->GetTabBoxes().size() )
{
- if( 0 == (pPrvBox = pLine->FindPreviousBox( pTableNd->GetTable(),
+ if( nullptr == (pPrvBox = pLine->FindPreviousBox( pTableNd->GetTable(),
pLine->GetTabBoxes()[ nInsPos ] )))
pPrvBox = pLine->FindPreviousBox( pTableNd->GetTable() );
}
else
{
- if( 0 == (pNxtBox = pLine->FindNextBox( pTableNd->GetTable(),
+ if( nullptr == (pNxtBox = pLine->FindNextBox( pTableNd->GetTable(),
pLine->GetTabBoxes().back() )))
pNxtBox = pLine->FindNextBox( pTableNd->GetTable() );
}
}
- else if( 0 == ( pNxtBox = pLine->FindNextBox( pTableNd->GetTable() )))
+ else if( nullptr == ( pNxtBox = pLine->FindNextBox( pTableNd->GetTable() )))
pPrvBox = pLine->FindPreviousBox( pTableNd->GetTable() );
if( !pPrvBox && !pNxtBox )
@@ -342,12 +342,12 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
// Do not copy into Footnotes!
if( rPos.nNode < GetNodes().GetEndOfInserts().GetIndex() &&
rPos.nNode >= GetNodes().GetEndOfInserts().StartOfSectionIndex() )
- return 0;
+ return nullptr;
// If the ColumnArray has a wrong count, ignore it!
if( pColArr &&
(size_t)(nCols + ( text::HoriOrientation::NONE == eAdjust ? 2 : 1 )) != pColArr->size() )
- pColArr = 0;
+ pColArr = nullptr;
}
OUString aTableName = GetUniqueTableName();
@@ -388,7 +388,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
nRows,
nRowsToRepeat,
pHeadColl,
- bCalledFromShell ? &pContentNd->GetSwAttrSet() : 0 );
+ bCalledFromShell ? &pContentNd->GetSwAttrSet() : nullptr );
// Create the Box/Line/Table construct
SwTableLineFormat* pLineFormat = MakeTableLineFormat();
@@ -399,10 +399,10 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
if (pContentNd)
{
const SwAttrSet & aNdSet = pContentNd->GetSwAttrSet();
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
- && pItem != NULL)
+ && pItem != nullptr)
{
pTableFormat->SetFormatAttr( *pItem );
}
@@ -465,7 +465,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
rNdTable.SetTableModel( bNewModel );
std::vector<SwTableBoxFormat*> aBoxFormatArr;
- SwTableBoxFormat* pBoxFormat = 0;
+ SwTableBoxFormat* pBoxFormat = nullptr;
if( !bDfltBorders && !pTAFormat )
{
pBoxFormat = MakeTableBoxFormat();
@@ -474,7 +474,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
else
{
const sal_uInt16 nBoxArrLen = pTAFormat ? 16 : 4;
- aBoxFormatArr.resize( nBoxArrLen, NULL );
+ aBoxFormatArr.resize( nBoxArrLen, nullptr );
}
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
@@ -482,7 +482,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
SwTableLines& rLines = rNdTable.GetTabLines();
for( sal_uInt16 n = 0; n < nRows; ++n )
{
- SwTableLine* pLine = new SwTableLine( pLineFormat, nCols, 0 );
+ SwTableLine* pLine = new SwTableLine( pLineFormat, nCols, nullptr );
rLines.insert( rLines.begin() + n, pLine );
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
for( sal_uInt16 i = 0; i < nCols; ++i )
@@ -502,7 +502,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
{
aCharSet.ClearItem();
pTAFormat->UpdateToSet( nId, aCharSet,
- SwTableAutoFormat::UPDATE_CHAR, 0 );
+ SwTableAutoFormat::UPDATE_CHAR, nullptr );
if( aCharSet.Count() )
GetNodes()[ aNdIdx.GetIndex()+1 ]->GetContentNode()->
SetAttr( aCharSet );
@@ -566,7 +566,7 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
const SwAttrSet * pAttrSet)
{
if( !nBoxes )
- return 0;
+ return nullptr;
// If Lines is given, create the Matrix from Lines and Boxes
if( !pHeadlineTextColl || !nLines )
@@ -591,8 +591,8 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
SwTextNode * pTmpNd = new SwTextNode( aIdx, pTextColl );
// #i60422# Propagate some more attributes.
- const SfxPoolItem* pItem = NULL;
- if ( NULL != pAttrSet )
+ const SfxPoolItem* pItem = nullptr;
+ if ( nullptr != pAttrSet )
{
static const sal_uInt16 aPropagateItems[] = {
RES_PARATR_ADJUST,
@@ -632,7 +632,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
sal_uLong nCnt = pStt->nNode.GetIndex();
for( ; nCnt <= pEnd->nNode.GetIndex(); ++nCnt )
if( !GetNodes()[ nCnt ]->IsTextNode() )
- return 0;
+ return nullptr;
}
// Save first node in the selection if it is a context node
@@ -642,10 +642,10 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
pStt = aOriginal.GetMark();
pEnd = aOriginal.GetPoint();
- SwUndoTextToTable* pUndo = 0;
+ SwUndoTextToTable* pUndo = nullptr;
if( GetIDocumentUndoRedo().DoesUndo() )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TEXTTOTABLE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TEXTTOTABLE, nullptr );
pUndo = new SwUndoTextToTable( aOriginal, rInsTableOpts, cCh,
static_cast<sal_uInt16>(eAdjust), pTAFormat );
GetIDocumentUndoRedo().AppendUndo( pUndo );
@@ -690,7 +690,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
// We always use Upper to insert the Table
SwNode2Layout aNode2Layout( aRg.aStart.GetNode() );
- GetIDocumentUndoRedo().DoUndo( 0 != pUndo );
+ GetIDocumentUndoRedo().DoUndo( nullptr != pUndo );
// Create the Box/Line/Table construct
SwTableBoxFormat* pBoxFormat = MakeTableBoxFormat();
@@ -710,10 +710,10 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
if (pSttContentNd)
{
const SwAttrSet & aNdSet = pSttContentNd->GetSwAttrSet();
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
- && pItem != NULL)
+ && pItem != nullptr)
{
pTableFormat->SetFormatAttr( *pItem );
}
@@ -752,18 +752,18 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
std::unique_ptr< std::vector<SwTableBoxFormat*> > aBoxFormatArr2;
if( bUseBoxFormat )
{
- aBoxFormatArr1.reset(new DfltBoxAttrList_t( nBoxArrLen, NULL ));
+ aBoxFormatArr1.reset(new DfltBoxAttrList_t( nBoxArrLen, nullptr ));
}
else
{
- aBoxFormatArr2.reset(new std::vector<SwTableBoxFormat*>( nBoxArrLen, NULL ));
+ aBoxFormatArr2.reset(new std::vector<SwTableBoxFormat*>( nBoxArrLen, nullptr ));
}
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
- SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0;
+ SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : nullptr;
- SwTableBoxFormat *pBoxF = 0;
+ SwTableBoxFormat *pBoxF = nullptr;
SwTableLines& rLines = rNdTable.GetTabLines();
const SwTableLines::size_type nRows = rLines.size();
for( SwTableLines::size_type n = 0; n < nRows; ++n )
@@ -785,7 +785,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
::lcl_SetDfltBoxAttr( *pBox, *aBoxFormatArr1, nId, pTAFormat );
else
{
- bChgSz = 0 == (*aBoxFormatArr2)[ nId ];
+ bChgSz = nullptr == (*aBoxFormatArr2)[ nId ];
pBoxF = ::lcl_CreateAFormatBoxFormat( *this, *aBoxFormatArr2,
*pTAFormat, USHRT_MAX, nId );
}
@@ -795,7 +795,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
{
aCharSet.ClearItem();
pTAFormat->UpdateToSet( nId, aCharSet,
- SwTableAutoFormat::UPDATE_CHAR, 0 );
+ SwTableAutoFormat::UPDATE_CHAR, nullptr );
if( aCharSet.Count() )
{
sal_uLong nSttNd = pBox->GetSttIdx()+1;
@@ -824,7 +824,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
::lcl_SetDfltBoxAttr( *pBox, *aBoxFormatArr1, nId );
else
{
- bChgSz = 0 == (*aBoxFormatArr2)[ nId ];
+ bChgSz = nullptr == (*aBoxFormatArr2)[ nId ];
pBoxF = ::lcl_CreateDfltBoxFormat( *this, *aBoxFormatArr2,
USHRT_MAX, nId );
}
@@ -870,11 +870,11 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
if( pUndo )
{
- GetIDocumentUndoRedo().EndUndo( UNDO_TEXTTOTABLE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_TEXTTOTABLE, nullptr );
}
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty(true, NULL, 0);
+ getIDocumentFieldsAccess().SetFieldsDirty(true, nullptr, 0);
return &rNdTable;
}
@@ -932,7 +932,7 @@ lcl_BalanceTable(SwTable & rTable, size_t const nMaxBoxes,
if (nMaxBoxes != nBoxes)
{
rTableNd.GetNodes().InsBoxen(&rTableNd, pCurrLine, &rBoxFormat, &rTextColl,
- 0, nBoxes, nMaxBoxes - nBoxes);
+ nullptr, nBoxes, nMaxBoxes - nBoxes);
if (pUndo)
{
@@ -995,7 +995,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTextToTable* pUndo )
{
if( rRange.aStart >= rRange.aEnd )
- return 0;
+ return nullptr;
SwTableNode * pTableNd = new SwTableNode( rRange.aStart );
new SwEndNode( rRange.aEnd, *pTableNd );
@@ -1041,12 +1041,12 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
}
- lcl_RemoveBreaks(*pTextNd, (0 == nLines) ? pTableFormat : 0);
+ lcl_RemoveBreaks(*pTextNd, (0 == nLines) ? pTableFormat : nullptr);
// Set the TableNode as StartNode for all TextNodes in the Table
pTextNd->m_pStartOfSection = pTableNd;
- SwTableLine* pLine = new SwTableLine( pLineFormat, 1, 0 );
+ SwTableLine* pLine = new SwTableLine( pLineFormat, 1, nullptr );
rTable.GetTabLines().insert(rTable.GetTabLines().begin() + nLines, pLine);
SwStartNode* pSttNd;
@@ -1115,17 +1115,17 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes )
{
if (rTableNodes.empty())
- return NULL;
+ return nullptr;
const std::vector<SwNodeRange>& rFirstRange = *rTableNodes.begin();
if (rFirstRange.empty())
- return NULL;
+ return nullptr;
const std::vector<SwNodeRange>& rLastRange = *rTableNodes.rbegin();
if (rLastRange.empty())
- return NULL;
+ return nullptr;
/* Save first node in the selection if it is a content node. */
SwContentNode * pSttContentNd = rFirstRange.begin()->aStart.GetNode().GetContentNode();
@@ -1227,10 +1227,10 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if (pSttContentNd)
{
const SwAttrSet & aNdSet = pSttContentNd->GetSwAttrSet();
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
- && pItem != NULL)
+ && pItem != nullptr)
{
pTableFormat->SetFormatAttr( *pItem );
}
@@ -1254,13 +1254,13 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
return &rNdTable;
}
SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange)
{
- SwNodeRange * pResult = NULL;
+ SwNodeRange * pResult = nullptr;
bool bChanged = false;
SwNodeIndex aNewStart = rRange.aStart;
@@ -1352,7 +1352,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTextFormatColl* /*pTextColl*/ /*, SwUndo... pUndo*/ )
{
if( rTableNodes.empty() )
- return 0;
+ return nullptr;
SwTableNode * pTableNd = new SwTableNode( rTableNodes.begin()->begin()->aStart );
//insert the end node after the last text node
@@ -1383,7 +1383,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
if( rNode.IsContentNode() )
{
lcl_RemoveBreaks(static_cast<SwContentNode&>(rNode),
- (0 == nLines) ? pTableFormat : 0);
+ (0 == nLines) ? pTableFormat : nullptr);
}
}
@@ -1392,7 +1392,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
aRowIter != rTableNodes.end();
++aRowIter, nLines++, nBoxes = 0 )
{
- SwTableLine* pLine = new SwTableLine( pLineFormat, 1, 0 );
+ SwTableLine* pLine = new SwTableLine( pLineFormat, 1, nullptr );
rTable.GetTabLines().insert(rTable.GetTabLines().begin() + nLines, pLine);
std::vector< SwNodeRange >::const_iterator aCellIter = aRowIter->begin();
@@ -1451,8 +1451,8 @@ bool SwDoc::TableToText( const SwTableNode* pTableNd, sal_Unicode cCh )
pESh->ClearMark();
SwNodeRange aRg( *pTableNd, 0, *pTableNd->EndOfSectionNode() );
- SwUndoTableToText* pUndo = 0;
- SwNodeRange* pUndoRg = 0;
+ SwUndoTableToText* pUndo = nullptr;
+ SwNodeRange* pUndoRg = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().ClearRedo();
@@ -1492,7 +1492,7 @@ struct _DelTabPara
sal_Unicode cCh;
_DelTabPara( SwNodes& rNodes, sal_Unicode cChar, SwUndoTableToText* pU ) :
- pLastNd(0), rNds( rNodes ), pUndo( pU ), cCh( cChar ) {}
+ pLastNd(nullptr), rNds( rNodes ), pUndo( pU ), cCh( cChar ) {}
_DelTabPara( const _DelTabPara& rPara ) :
pLastNd(rPara.pLastNd), rNds( rPara.rNds ),
pUndo( rPara.pUndo ), cCh( rPara.cCh ) {}
@@ -1532,7 +1532,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
pDelPara->rNds.SectionUp( &aDelRg );
const SwTextNode* pCurTextNd;
if( T2T_PARA != pDelPara->cCh && pDelPara->pLastNd &&
- 0 != ( pCurTextNd = aDelRg.aStart.GetNode().GetTextNode() ))
+ nullptr != ( pCurTextNd = aDelRg.aStart.GetNode().GetTextNode() ))
{
// Join the current text node with the last from the previous box if possible
sal_uLong nNdIdx = aDelRg.aStart.GetIndex();
@@ -1580,12 +1580,12 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// Is a Table selected?
SwTableNode* pTableNd;
if( rRange.aStart.GetIndex() >= rRange.aEnd.GetIndex() ||
- 0 == ( pTableNd = rRange.aStart.GetNode().GetTableNode()) ||
+ nullptr == ( pTableNd = rRange.aStart.GetNode().GetTableNode()) ||
&rRange.aEnd.GetNode() != pTableNd->EndOfSectionNode() )
return false;
// If the Table was alone in a Section, create the Frames via the Table's Upper
- SwNode2Layout* pNode2Layout = 0;
+ SwNode2Layout* pNode2Layout = nullptr;
SwNodeIndex aFrmIdx( rRange.aStart );
SwNode* pFrmNd = FindPrvNxtFrmNode( aFrmIdx, &rRange.aEnd.GetNode() );
if( !pFrmNd )
@@ -1612,9 +1612,9 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
const SfxItemSet& rTableSet = pTableNd->m_pTable->GetFrameFormat()->GetAttrSet();
const SfxPoolItem *pBreak, *pDesc;
if( SfxItemState::SET != rTableSet.GetItemState( RES_PAGEDESC, false, &pDesc ))
- pDesc = 0;
+ pDesc = nullptr;
if( SfxItemState::SET != rTableSet.GetItemState( RES_BREAK, false, &pBreak ))
- pBreak = 0;
+ pBreak = nullptr;
if( pBreak || pDesc )
{
@@ -1642,7 +1642,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwSectionNode *pSNd;
while( aDelRg.aStart.GetIndex() < nEnd )
{
- if( 0 != ( pCNd = aDelRg.aStart.GetNode().GetContentNode()))
+ if( nullptr != ( pCNd = aDelRg.aStart.GetNode().GetContentNode()))
{
if( pFrmNd->IsContentNode() )
static_cast<SwContentNode*>(pFrmNd)->MakeFrms( *pCNd );
@@ -1652,7 +1652,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
static_cast<SwSectionNode*>(pFrmNd)->MakeFrms( aDelRg.aStart );
pFrmNd = pCNd;
}
- else if( 0 != ( pSNd = aDelRg.aStart.GetNode().GetSectionNode()))
+ else if( nullptr != ( pSNd = aDelRg.aStart.GetNode().GetSectionNode()))
{
if( !pSNd->GetSection().IsHidden() && !pSNd->IsContentHidden() )
{
@@ -1717,7 +1717,7 @@ bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
return false;
SwTableSortBoxes aTmpLst;
- SwUndoTableNdsChg* pUndo = 0;
+ SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoTableNdsChg( UNDO_TABLE_INSCOL, rBoxes, *pTableNd,
@@ -1738,7 +1738,7 @@ bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
{
getIDocumentState().SetModified();
::ClearFEShellTabCols();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
}
@@ -1779,7 +1779,7 @@ bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
return false;
SwTableSortBoxes aTmpLst;
- SwUndoTableNdsChg* pUndo = 0;
+ SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoTableNdsChg( UNDO_TABLE_INSROW,rBoxes, *pTableNd,
@@ -1800,7 +1800,7 @@ bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
{
getIDocumentState().SetModified();
::ClearFEShellTabCols();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
}
@@ -1840,7 +1840,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
return false;
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( aBoxes, &aFndBox );
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
@@ -1916,9 +1916,9 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
}
// Thus delete the Rows
- GetIDocumentUndoRedo().StartUndo(UNDO_ROW_DELETE, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_ROW_DELETE, nullptr);
bool bResult = DeleteRowCol( aBoxes );
- GetIDocumentUndoRedo().EndUndo(UNDO_ROW_DELETE, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_ROW_DELETE, nullptr);
return bResult;
}
@@ -1942,9 +1942,9 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor )
}
// Thus delete the Columns
- GetIDocumentUndoRedo().StartUndo(UNDO_COL_DELETE, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_COL_DELETE, nullptr);
bool bResult = DeleteRowCol( aBoxes, true );
- GetIDocumentUndoRedo().EndUndo(UNDO_COL_DELETE, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_COL_DELETE, nullptr);
return bResult;
}
@@ -2108,12 +2108,12 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
return true;
}
- SwUndoTableNdsChg* pUndo = 0;
+ SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoTableNdsChg( UNDO_TABLE_DELBOX, aSelBoxes, *pTableNd,
@@ -2136,13 +2136,13 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
if (pUndo)
pUndo->ReNewBoxes( aSelBoxes );
}
- bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, true, true );
+ bRet = rTable.DeleteSel( this, aSelBoxes, nullptr, pUndo, true, true );
if (bRet)
{
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
}
@@ -2176,7 +2176,7 @@ bool SwDoc::SplitTable( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt,
std::vector<sal_uLong> aNdsCnts;
SwTableSortBoxes aTmpLst;
- SwUndoTableNdsChg* pUndo = 0;
+ SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoTableNdsChg( UNDO_TABLE_SPLIT, rBoxes, *pTableNd, 0, 0,
@@ -2212,7 +2212,7 @@ bool SwDoc::SplitTable( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt,
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
}
@@ -2252,14 +2252,14 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
}
// #i33394#
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, nullptr );
RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode();
getIDocumentRedlineAccess().SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
SwUndoTableMerge *const pUndo( (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoTableMerge( rPam )
- : 0 );
+ : nullptr );
// Find the Boxes via the Layout
SwSelBoxes aBoxes;
@@ -2273,7 +2273,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
{
delete pUndo;
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (GetIDocumentUndoRedo().GetLastUndoInfo(0, & nLastUndoId)
+ if (GetIDocumentUndoRedo().GetLastUndoInfo(nullptr, & nLastUndoId)
&& (UNDO_REDLINE == nLastUndoId))
{
// FIXME: why is this horrible cleanup necessary?
@@ -2300,7 +2300,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
{
rPam.DeleteMark();
rPam.GetPoint()->nNode = *pMergeBox->GetSttNd();
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
rPam.SetMark();
rPam.DeleteMark();
@@ -2320,7 +2320,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
nRet = TBLMERGE_OK;
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
if( pUndo )
{
GetIDocumentUndoRedo().AppendUndo( pUndo );
@@ -2335,14 +2335,14 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
::ClearFEShellTabCols();
getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
}
- GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, nullptr );
return nRet;
}
SwTableNode::SwTableNode( const SwNodeIndex& rIdx )
: SwStartNode( rIdx, ND_TABLENODE )
{
- m_pTable = new SwTable( 0 );
+ m_pTable = new SwTable( nullptr );
}
SwTableNode::~SwTableNode()
@@ -2379,7 +2379,7 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx )
SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() );
- while( 0 != (pFrm = aNode2Layout.NextFrm()) )
+ while( nullptr != (pFrm = aNode2Layout.NextFrm()) )
{
SwFrm *pNew = pNode->MakeFrm( pFrm );
// Will the Node receive Frames before or after?
@@ -2403,10 +2403,10 @@ void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind )
if( !pNd )
return ;
- SwFrm *pFrm( 0L );
- SwLayoutFrm *pUpper( 0L );
+ SwFrm *pFrm( nullptr );
+ SwLayoutFrm *pUpper( nullptr );
SwNode2Layout aNode2Layout( *pNd, GetIndex() );
- while( 0 != (pUpper = aNode2Layout.UpperFrm( pFrm, *this )) )
+ while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, *this )) )
{
SwTabFrm* pNew = MakeFrm( pUpper );
pNew->Paste( pUpper, pFrm );
@@ -2496,8 +2496,8 @@ void SwTableNode::RemoveRedlines()
void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm )
{
- const SwTableBox* pBox = 0;
- SwTabFrm *pTab = 0;
+ const SwTableBox* pBox = nullptr;
+ SwTabFrm *pTab = nullptr;
if( pBoxFrm )
{
@@ -2515,7 +2515,7 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2590,7 +2590,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
if ( pContent && pContent->IsTextFrm() )
{
const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() );
- const SwCursor aTmpCrsr( aPos, 0, false );
+ const SwCursor aTmpCrsr( aPos, nullptr, false );
::GetTableSel( aTmpCrsr, aBoxes, nsSwTableSearchType::TBLSEARCH_COL );
}
@@ -2710,8 +2710,8 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm )
{
- const SwTableBox* pBox = 0;
- SwTabFrm *pTab = 0;
+ const SwTableBox* pBox = nullptr;
+ SwTabFrm *pTab = nullptr;
if( pBoxFrm )
{
@@ -2729,7 +2729,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2817,9 +2817,9 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*
}
aOld.SetLeftMin ( nLeftMin );
- GetTabRows( aOld, 0, pBoxFrm );
+ GetTabRows( aOld, nullptr, pBoxFrm );
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, nullptr );
// check for differences between aOld and rNew:
const size_t nCount = rNew.Count();
@@ -2847,8 +2847,8 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*
// but the pLine will be set if the box is not an overlapping box
// In the new table model the row height can be adjusted,
// when both variables are set.
- const SwTextFrm* pTextFrm = 0;
- const SwTableLine* pLine = 0;
+ const SwTextFrm* pTextFrm = nullptr;
+ const SwTableLine* pLine = nullptr;
// Iterate over all SwCellFrms with Bottom = nOldPos
const SwFrm* pFrm = pTab->GetNextLayoutLeaf();
@@ -2884,14 +2884,14 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*
aNew.SetHeightSizeType( ATT_MIN_SIZE );
// This position must not be in an overlapped box
const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() );
- const SwCursor aTmpCrsr( aPos, 0, false );
+ const SwCursor aTmpCrsr( aPos, nullptr, false );
SetRowHeight( aTmpCrsr, aNew );
// For the new table model we're done, for the old one
// there might be another (sub)row to adjust...
if( pTable->IsNewModel() )
break;
}
- pLine = 0;
+ pLine = nullptr;
}
}
}
@@ -2902,7 +2902,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_ATTR, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_ATTR, nullptr );
::ClearFEShellTabCols();
}
@@ -2956,7 +2956,7 @@ void SwCollectTableLineBoxes::AddBox( const SwTableBox& rBox )
const SwTableBox* SwCollectTableLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
{
- const SwTableBox* pRet = 0;
+ const SwTableBox* pRet = nullptr;
if( !aPosArr.empty() )
{
@@ -3141,7 +3141,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
return false;
SwTable& rTable = pTNd->GetTable();
- rTable.SetHTMLTableLayout( 0 ); // Delete HTML Layout
+ rTable.SetHTMLTableLayout( nullptr ); // Delete HTML Layout
SwTableFormulaUpdate aMsgHint( &rTable );
@@ -3173,7 +3173,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
}
// Find Lines for the Layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rTable );
aFndBox.DelFrms( rTable );
@@ -3182,7 +3182,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
if( pNew )
{
SwSaveRowSpan* pSaveRowSp = pNew->GetTable().CleanUpTopRowSpan( rTable.GetTabLines().size() );
- SwUndoSplitTable* pUndo = 0;
+ SwUndoSplitTable* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoSplitTable(
@@ -3220,7 +3220,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
case HEADLINE_BOXATTRCOPY:
case HEADLINE_BOXATRCOLLCOPY:
{
- SwHistory* pHst = 0;
+ SwHistory* pHst = nullptr;
if( HEADLINE_BOXATRCOLLCOPY == eHdlnMode && pUndo )
pHst = pUndo->GetHistory();
@@ -3270,9 +3270,9 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting(pTNd);
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting(pNew);
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
- return 0 != pNew;
+ return nullptr != pNew;
}
static bool lcl_ChgTableSize( SwTable& rTable )
@@ -3322,7 +3322,7 @@ public:
SwFrameFormat* GetDestFormat( SwFrameFormat* pSrcFormat ) const
{
std::map<SwFrameFormat*, SwFrameFormat*>::const_iterator it = aSrcDestMap.find( pSrcFormat );
- return it == aSrcDestMap.end() ? NULL : it->second;
+ return it == aSrcDestMap.end() ? nullptr : it->second;
}
void InsertSrcDest( SwFrameFormat* pSrcFormat, SwFrameFormat* pDestFormat )
@@ -3341,7 +3341,7 @@ static void lcl_SplitTable_CpyLine( SwTableLine* pLn, _SplitTable_Para* pPara )
{
SwFrameFormat *pSrcFormat = pLn->GetFrameFormat();
SwTableLineFormat* pDestFormat = static_cast<SwTableLineFormat*>( pPara->GetDestFormat( pSrcFormat ) );
- if( pDestFormat == NULL )
+ if( pDestFormat == nullptr )
{
pPara->InsertSrcDest( pSrcFormat, pLn->ClaimFrameFormat() );
}
@@ -3357,7 +3357,7 @@ static void lcl_SplitTable_CpyBox( SwTableBox* pBox, _SplitTable_Para* pPara )
{
SwFrameFormat *pSrcFormat = pBox->GetFrameFormat();
SwTableBoxFormat* pDestFormat = static_cast<SwTableBoxFormat*>(pPara->GetDestFormat( pSrcFormat ));
- if( pDestFormat == NULL )
+ if( pDestFormat == nullptr )
{
pPara->InsertSrcDest( pSrcFormat, pBox->ClaimFrameFormat() );
}
@@ -3377,7 +3377,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter,
SwNode* pNd = &rPos.GetNode();
SwTableNode* pTNd = pNd->FindTableNode();
if( !pTNd || pNd->IsTableNode() )
- return 0;
+ return nullptr;
sal_uLong nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
@@ -3385,7 +3385,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter,
SwTable& rTable = pTNd->GetTable();
SwTableBox* pBox = rTable.GetTableBox( nSttIdx );
if( !pBox )
- return 0;
+ return nullptr;
SwTableLine* pLine = pBox->GetUpper();
while( pLine->GetUpper() )
@@ -3395,7 +3395,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter,
sal_uInt16 nLinePos = rTable.GetTabLines().GetPos( pLine );
if( USHRT_MAX == nLinePos ||
( bAfter ? ++nLinePos >= rTable.GetTabLines().size() : !nLinePos ))
- return 0; // Not found or last Line!
+ return nullptr; // Not found or last Line!
// Find the first Box of the succeeding Line
SwTableLine* pNextLine = rTable.GetTabLines()[ nLinePos ];
@@ -3510,12 +3510,12 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 nMode
return false;
// Delete HTML Layout
- pTableNd->GetTable().SetHTMLTableLayout( 0 );
- pDelTableNd->GetTable().SetHTMLTableLayout( 0 );
+ pTableNd->GetTable().SetHTMLTableLayout( nullptr );
+ pDelTableNd->GetTable().SetHTMLTableLayout( nullptr );
// Both Tables are present; we can start
- SwUndoMergeTable* pUndo = 0;
- SwHistory* pHistory = 0;
+ SwUndoMergeTable* pUndo = nullptr;
+ SwHistory* pHistory = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoMergeTable( *pTableNd, *pDelTableNd, bWithPrev, nMode );
@@ -3545,7 +3545,7 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 nMode
GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
return bRet;
}
@@ -3568,7 +3568,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev,
SwTable& rTable = pTableNd->GetTable();
// Find Lines for the Layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rTable );
aFndBox.DelFrms( rTable );
@@ -3663,7 +3663,7 @@ struct _SetAFormatTabPara
sal_uInt8 nAFormatLine, nAFormatBox;
explicit _SetAFormatTabPara( const SwTableAutoFormat& rNew )
- : rTableFormat( (SwTableAutoFormat&)rNew ), pUndo( 0 ),
+ : rTableFormat( (SwTableAutoFormat&)rNew ), pUndo( nullptr ),
nEndBox( 0 ), nCurBox( 0 ), nAFormatLine( 0 ), nAFormatBox( 0 )
{}
};
@@ -3705,7 +3705,7 @@ static bool lcl_SetAFormatBox(_FndBox & rBox, _SetAFormatTabPara *pSetPara, bool
SfxItemSet aCharSet(pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1);
SfxItemSet aBoxSet(pDoc->GetAttrPool(), aTableBoxSetRange);
sal_uInt8 nPos = pSetPara->nAFormatLine * 4 + pSetPara->nAFormatBox;
- pSetPara->rTableFormat.UpdateToSet(nPos, aCharSet, SwTableAutoFormat::UPDATE_CHAR, 0);
+ pSetPara->rTableFormat.UpdateToSet(nPos, aCharSet, SwTableAutoFormat::UPDATE_CHAR, nullptr);
pSetPara->rTableFormat.UpdateToSet(nPos, aBoxSet, SwTableAutoFormat::UPDATE_BOX, pDoc->GetNumberFormatter());
if (aCharSet.Count())
@@ -3750,7 +3750,7 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat
return false;
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
@@ -3759,7 +3759,7 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat
return false;
SwTable &table = pTableNd->GetTable();
- table.SetHTMLTableLayout( 0 );
+ table.SetHTMLTableLayout( nullptr );
_FndBox* pFndBox = &aFndBox;
while( 1 == pFndBox->GetLines().size() &&
@@ -3772,7 +3772,7 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat
pFndBox = pFndBox->GetUpper()->GetUpper();
// Disable Undo, but first store parameters
- SwUndoTableAutoFormat* pUndo = 0;
+ SwUndoTableAutoFormat* pUndo = nullptr;
bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
if (bUndo)
{
@@ -3792,7 +3792,7 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat
// Set Upper to 0 (thus simulate BaseLine)
_FndBox* pSaveBox = pLine->GetUpper();
- pLine->SetUpper( 0 );
+ pLine->SetUpper( nullptr );
if( !n )
aPara.nAFormatLine = 0;
@@ -3819,7 +3819,7 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat
}
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
return true;
}
@@ -3835,7 +3835,7 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe
return false;
// Find all Boxes/Lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( rBoxes, &aFndBox );
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
@@ -3890,7 +3890,7 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe
if( pCNd )
rGet.UpdateFromSet( nPos, pCNd->GetSwAttrSet(),
- SwTableAutoFormat::UPDATE_CHAR, 0 );
+ SwTableAutoFormat::UPDATE_CHAR, nullptr );
rGet.UpdateFromSet( nPos, pFBox->GetFrameFormat()->GetAttrSet(),
SwTableAutoFormat::UPDATE_BOX,
GetNumberFormatter() );
@@ -3956,7 +3956,7 @@ OUString SwDoc::GetUniqueTableName() const
SwTableFormat* SwDoc::FindTableFormatByName( const OUString& rName, bool bAll ) const
{
- const SwFormat* pRet = 0;
+ const SwFormat* pRet = nullptr;
if( bAll )
pRet = FindFormatByName( *mpTableFrameFormatTable, rName );
else
@@ -3980,7 +3980,7 @@ bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff )
{
SwTableNode* pTableNd = const_cast<SwTableNode*>(rAktBox.GetSttNd()->FindTableNode());
- SwUndo* pUndo = 0;
+ SwUndo* pUndo = nullptr;
if( nsTableChgWidthHeightType::WH_FLAG_INSDEL & eType && dynamic_cast<const SwDDETable*>( &pTableNd->GetTable()) != nullptr)
return false;
@@ -4000,7 +4000,7 @@ bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
{
bRet = pTableNd->GetTable().SetColWidth( rAktBox,
eType, nAbsDiff, nRelDiff,
- (bUndo) ? &pUndo : 0 );
+ (bUndo) ? &pUndo : nullptr );
}
break;
case nsTableChgWidthHeightType::WH_ROW_TOP:
@@ -4009,7 +4009,7 @@ bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
case nsTableChgWidthHeightType::WH_CELL_BOTTOM:
bRet = pTableNd->GetTable().SetRowHeight( rAktBox,
eType, nAbsDiff, nRelDiff,
- (bUndo) ? &pUndo : 0 );
+ (bUndo) ? &pUndo : nullptr );
break;
}
@@ -4023,7 +4023,7 @@ bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
{
getIDocumentState().SetModified();
if( nsTableChgWidthHeightType::WH_FLAG_INSDEL & eType )
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
return bRet;
}
@@ -4031,13 +4031,13 @@ bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
// Optimization: If the Box says it's Text, it remains Text
- const SfxPoolItem* pNumFormatItem = 0;
+ const SfxPoolItem* pNumFormatItem = nullptr;
if( SfxItemState::SET == rBox.GetFrameFormat()->GetItemState( RES_BOXATR_FORMAT,
false, &pNumFormatItem ) && GetNumberFormatter()->IsTextFormat(
static_cast<const SwTableBoxNumFormat*>(pNumFormatItem)->GetValue() ))
return ;
- SwUndoTableNumFormat* pUndo = 0;
+ SwUndoTableNumFormat* pUndo = nullptr;
bool bIsEmptyTextNd;
bool bChgd = true;
@@ -4051,7 +4051,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, nullptr );
pUndo = new SwUndoTableNumFormat( rBox );
pUndo->SetNumFormat( nFormatIdx, fNumber );
}
@@ -4115,7 +4115,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
else
{
// It's not a number
- const SfxPoolItem* pValueItem = 0, *pFormatItem = 0;
+ const SfxPoolItem* pValueItem = nullptr, *pFormatItem = nullptr;
SwTableBoxFormat* pBoxFormat = static_cast<SwTableBoxFormat*>(rBox.GetFrameFormat());
if( SfxItemState::SET == pBoxFormat->GetItemState( RES_BOXATR_FORMAT,
false, &pFormatItem ) ||
@@ -4124,7 +4124,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, nullptr );
pUndo = new SwUndoTableNumFormat( rBox );
}
@@ -4152,7 +4152,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
pUndo->SetBox( rBox );
GetIDocumentUndoRedo().AppendUndo(pUndo);
- GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
const SwTableNode* pTableNd = rBox.GetSttNd()->FindTableNode();
@@ -4199,7 +4199,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
SwPaM aPam(rPos);
aPam.Move(fnMoveBackward);
SwContentNode *pNode = aPam.GetContentNode();
- if ( 0 == pNode )
+ if ( nullptr == pNode )
return ;
if( pNode->IsTextNode() )
{
@@ -4207,7 +4207,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
if (pTextNode && pTextNode->IsNumbered()
&& pTextNode->GetText().isEmpty())
{
- const SfxPoolItem* pFormatItem = 0;
+ const SfxPoolItem* pFormatItem = nullptr;
SfxItemSet rSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
RES_PARATR_BEGIN, RES_PARATR_END - 1,
0);
@@ -4221,8 +4221,8 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
GetIDocumentUndoRedo().AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
}
else
- pUndo = 0;
- SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
+ pUndo = nullptr;
+ SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr );
aRegH.RegisterInModify( pTextNode , *pTextNode );
if ( pUndo )
pUndo->AddNode( *pTextNode , false );
@@ -4239,14 +4239,14 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
{
SwStartNode* pSttNd;
- if( 0 != ( pSttNd = rNode.GetNode().
+ if( nullptr != ( pSttNd = rNode.GetNode().
FindSttNodeByType( SwTableBoxStartNode )) &&
2 == pSttNd->EndOfSectionIndex() - pSttNd->GetIndex() )
{
SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().
GetTableBox( pSttNd->GetIndex() );
- const SfxPoolItem* pFormatItem = 0;
+ const SfxPoolItem* pFormatItem = nullptr;
const SfxItemSet& rSet = pBox->GetFrameFormat()->GetAttrSet();
if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, &pFormatItem ) ||
SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA, false ) ||
@@ -4296,7 +4296,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
bool const bUndo( GetIDocumentUndoRedo().DoesUndo() );
if( !pCpyTable && !pInsTableNd )
{
- SwUndoCpyTable* pUndo = 0;
+ SwUndoCpyTable* pUndo = nullptr;
if (bUndo)
{
GetIDocumentUndoRedo().ClearRedo();
@@ -4314,7 +4314,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( !bRet )
{
delete pUndo;
- pUndo = 0;
+ pUndo = nullptr;
}
else
{
@@ -4333,7 +4333,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
nsRedlineMode_t::REDLINE_SHOW_INSERT |
nsRedlineMode_t::REDLINE_SHOW_DELETE));
- SwUndoTableCpyTable* pUndo = 0;
+ SwUndoTableCpyTable* pUndo = nullptr;
if (bUndo)
{
GetIDocumentUndoRedo().ClearRedo();
@@ -4360,7 +4360,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
GetIDocumentUndoRedo().DoUndo(bUndo);
delete pUndo;
- pUndo = 0;
+ pUndo = nullptr;
}
return false;
}
@@ -4370,7 +4370,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode();
- rInsPos.nContent.Assign( 0, 0 );
+ rInsPos.nContent.Assign( nullptr, 0 );
// no complex into complex, but copy into or from new model is welcome
if( ( !pSrcTableNd->GetTable().IsTableComplex() || pInsTableNd->GetTable().IsNewModel() )
@@ -4431,7 +4431,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( bRet )
{
getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
return bRet;
}
@@ -4441,7 +4441,7 @@ bool SwDoc::_UnProtectTableCells( SwTable& rTable )
bool bChgd = false;
SwUndoAttrTable *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoAttrTable( *rTable.GetTableNode() )
- : 0;
+ : nullptr;
SwTableSortBoxes& rSrtBox = rTable.GetTabSortBoxes();
for (size_t i = rSrtBox.size(); i; )
@@ -4487,7 +4487,7 @@ bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
{
SwUndoAttrTable *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoAttrTable( *rBoxes[0]->GetSttNd()->FindTableNode() )
- : 0;
+ : nullptr;
std::map<SwFrameFormat*, SwTableBoxFormat*> aFormatsMap;
for (size_t i = rBoxes.size(); i; )
@@ -4526,7 +4526,7 @@ bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
bool SwDoc::UnProtectTables( const SwPaM& rPam )
{
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
bool bChgd = false, bHasSel = rPam.HasMark() ||
rPam.GetNext() != &rPam;
@@ -4534,8 +4534,8 @@ bool SwDoc::UnProtectTables( const SwPaM& rPam )
SwTable* pTable;
const SwTableNode* pTableNd;
for( auto n = rFormats.size(); n ; )
- if( 0 != (pTable = SwTable::FindTable( rFormats[ --n ] )) &&
- 0 != (pTableNd = pTable->GetTableNode() ) &&
+ if( nullptr != (pTable = SwTable::FindTable( rFormats[ --n ] )) &&
+ nullptr != (pTableNd = pTable->GetTableNode() ) &&
pTableNd->GetNodes().IsDocNodes() )
{
sal_uLong nTableIdx = pTableNd->GetIndex();
@@ -4560,7 +4560,7 @@ bool SwDoc::UnProtectTables( const SwPaM& rPam )
bChgd |= _UnProtectTableCells( *pTable );
}
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
if( bChgd )
getIDocumentState().SetModified();
@@ -4572,7 +4572,7 @@ bool SwDoc::HasTableAnyProtection( const SwPosition* pPos,
bool* pFullTableProtection )
{
bool bHasProtection = false;
- SwTable* pTable = 0;
+ SwTable* pTable = nullptr;
if( pTableName )
pTable = SwTable::FindTable( FindTableFormatByName( *pTableName ) );
else if( pPos )
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 8a4d95323ae2..61c6a95fc386 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -85,7 +85,7 @@ SwFrameFormat *SwTableFormatCmp::FindNewFormat( std::vector<SwTableFormatCmp*> &
if ( pCmp->pOld == pOld && pCmp->nType == nType )
return pCmp->pNew;
}
- return 0;
+ return nullptr;
}
void SwTableFormatCmp::Delete( std::vector<SwTableFormatCmp*> &rArr )
@@ -112,11 +112,11 @@ static void lcl_GetStartEndCell( const SwCursor& rCrsr,
SwContentNode* pPointNd = rCrsr.GetContentNode();
SwContentNode* pMarkNd = rCrsr.GetContentNode(false);
- SwFrm* pPointFrm = pPointNd ? pPointNd->getLayoutFrm( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : 0;
- SwFrm* pMarkFrm = pMarkNd ? pMarkNd->getLayoutFrm( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : 0;
+ SwFrm* pPointFrm = pPointNd ? pPointNd->getLayoutFrm( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr;
+ SwFrm* pMarkFrm = pMarkNd ? pMarkNd->getLayoutFrm( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr;
- prStart = pPointFrm ? pPointFrm->GetUpper() : 0;
- prEnd = pMarkFrm ? pMarkFrm->GetUpper() : 0;
+ prStart = pPointFrm ? pPointFrm->GetUpper() : nullptr;
+ prEnd = pMarkFrm ? pMarkFrm->GetUpper() : nullptr;
}
static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
@@ -152,12 +152,12 @@ inline void InsertLine( std::vector<SwTableLine*>& rLineArr, SwTableLine* pLine
static bool lcl_IsAnLower( const SwTableLine *pLine, const SwTableLine *pAssumed )
{
const SwTableLine *pTmp = pAssumed->GetUpper() ?
- pAssumed->GetUpper()->GetUpper() : 0;
+ pAssumed->GetUpper()->GetUpper() : nullptr;
while ( pTmp )
{
if ( pTmp == pLine )
return true;
- pTmp = pTmp->GetUpper() ? pTmp->GetUpper()->GetUpper() : 0;
+ pTmp = pTmp->GetUpper() ? pTmp->GetUpper()->GetUpper() : nullptr;
}
return false;
}
@@ -224,7 +224,7 @@ static void lcl_CollectLines( std::vector<SwTableLine*> &rArr, const SwCursor& r
// Copy the selected structure
const SwTable &rTable = aBoxes[0]->GetSttNd()->FindTableNode()->GetTable();
LinesAndTable aPara( rArr, rTable );
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aTmpPara( aBoxes, &aFndBox );
ForEach_FndLineCopyCol( (SwTableLines&)rTable.GetTabLines(), &aTmpPara );
@@ -257,7 +257,7 @@ static void lcl_CollectLines( std::vector<SwTableLine*> &rArr, const SwCursor& r
static void lcl_ProcessRowAttr( std::vector<SwTableFormatCmp*>& rFormatCmp, SwTableLine* pLine, const SfxPoolItem& rNew )
{
SwFrameFormat *pNewFormat;
- if ( 0 != (pNewFormat = SwTableFormatCmp::FindNewFormat( rFormatCmp, pLine->GetFrameFormat(), 0 )))
+ if ( nullptr != (pNewFormat = SwTableFormatCmp::FindNewFormat( rFormatCmp, pLine->GetFrameFormat(), 0 )))
pLine->ChgFrameFormat( static_cast<SwTableLineFormat*>(pNewFormat) );
else
{
@@ -319,7 +319,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew )
void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz )
{
- rpSz = 0;
+ rpSz = nullptr;
SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTableNd )
@@ -337,7 +337,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz )
{
if ( (*rpSz).GetValue() != pLn->GetFrameFormat()->GetRowSplit().GetValue() )
{
- rpSz = 0;
+ rpSz = nullptr;
break;
}
}
@@ -391,7 +391,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew )
void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz )
{
- rpSz = 0;
+ rpSz = nullptr;
SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTableNd )
@@ -409,7 +409,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz )
{
if ( *rpSz != pLn->GetFrameFormat()->GetFrmSize() )
{
- rpSz = 0;
+ rpSz = nullptr;
break;
}
}
@@ -551,7 +551,7 @@ static void lcl_CollectCells( std::vector<SwCellFrm*> &rArr, const SwRect &rUnio
void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
{
SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode();
- SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : 0;
+ SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr;
if( !pTableNd )
return ;
@@ -574,12 +574,12 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
const SvxBoxItem* pSetBox;
const SvxBoxInfoItem *pSetBoxInfo;
- const SvxBorderLine* pLeft = 0;
- const SvxBorderLine* pRight = 0;
- const SvxBorderLine* pTop = 0;
- const SvxBorderLine* pBottom = 0;
- const SvxBorderLine* pHori = 0;
- const SvxBorderLine* pVert = 0;
+ const SvxBorderLine* pLeft = nullptr;
+ const SvxBorderLine* pRight = nullptr;
+ const SvxBorderLine* pTop = nullptr;
+ const SvxBorderLine* pBottom = nullptr;
+ const SvxBorderLine* pHori = nullptr;
+ const SvxBorderLine* pVert = nullptr;
bool bHoriValid = true, bVertValid = true,
bTopValid = true, bBottomValid = true,
bLeftValid = true, bRightValid = true;
@@ -613,7 +613,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
{
// Not set, thus not valid values
bTopValid = bBottomValid = bLeftValid = bRightValid = false;
- pSetBox = 0;
+ pSetBox = nullptr;
}
bool bFirst = true;
@@ -684,7 +684,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
}
else if ( bHoriValid )
{
- aBox.SetLine( 0, SvxBoxItemLine::TOP );
+ aBox.SetLine( nullptr, SvxBoxItemLine::TOP );
nType |= 0x0002;
}
}
@@ -709,7 +709,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
{
if ( bLeftValid )
{
- aBox.SetLine( bRightOver ? pLeft : 0, SvxBoxItemLine::RIGHT );
+ aBox.SetLine( bRightOver ? pLeft : nullptr, SvxBoxItemLine::RIGHT );
bVertValid ? nType |= 0x0020 : nType |= 0x0010;
}
if ( bLeftOver )
@@ -754,7 +754,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
}
else if ( bVertValid )
{
- aBox.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aBox.SetLine( nullptr, SvxBoxItemLine::RIGHT );
nType |= 0x0020;
}
}
@@ -783,7 +783,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
SwTableBox *pBox = const_cast<SwTableBox*>(pCell->GetTabBox());
SwFrameFormat *pNewFormat;
- if ( 0 != (pNewFormat = SwTableFormatCmp::FindNewFormat( aFormatCmp, pBox->GetFrameFormat(), nType )))
+ if ( nullptr != (pNewFormat = SwTableFormatCmp::FindNewFormat( aFormatCmp, pBox->GetFrameFormat(), nType )))
pBox->ChgFrameFormat( static_cast<SwTableBoxFormat*>(pNewFormat) );
else
{
@@ -835,7 +835,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
const SvxBorderLine* pBorderLine )
{
SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode();
- SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : 0;
+ SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr;
if( !pTableNd )
return ;
@@ -909,7 +909,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
{
SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode();
- SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : 0;
+ SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr;
if( !pTableNd )
return ;
@@ -991,7 +991,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
((!aSetBox.GetTop()) != (!rBox.GetTop()))) // != expression is true, if one and only one of the two pointers is !0
{
aSetBoxInfo.SetValid(SvxBoxInfoItemValidFlags::TOP, false );
- aSetBox.SetLine( 0, SvxBoxItemLine::TOP );
+ aSetBox.SetLine( nullptr, SvxBoxItemLine::TOP );
}
}
}
@@ -1010,7 +1010,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
((!aSetBox.GetLeft()) != (!rBox.GetLeft())))
{
aSetBoxInfo.SetValid(SvxBoxInfoItemValidFlags::LEFT, false );
- aSetBox.SetLine( 0, SvxBoxItemLine::LEFT );
+ aSetBox.SetLine( nullptr, SvxBoxItemLine::LEFT );
}
}
}
@@ -1026,7 +1026,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
!(*aSetBoxInfo.GetVert() == *rBox.GetLeft())) ||
((!aSetBoxInfo.GetVert()) != (!rBox.GetLeft())))
{ aSetBoxInfo.SetValid( SvxBoxInfoItemValidFlags::VERT, false );
- aSetBoxInfo.SetLine( 0, SvxBoxInfoItemLine::VERT );
+ aSetBoxInfo.SetLine( nullptr, SvxBoxInfoItemLine::VERT );
}
}
}
@@ -1042,7 +1042,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
!(*aSetBox.GetRight() == *rBox.GetRight())) ||
(!aSetBox.GetRight() != !rBox.GetRight()))
{ aSetBoxInfo.SetValid( SvxBoxInfoItemValidFlags::RIGHT, false );
- aSetBox.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aSetBox.SetLine( nullptr, SvxBoxItemLine::RIGHT );
}
}
@@ -1059,7 +1059,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
!(*aSetBox.GetBottom() == *rBox.GetBottom())) ||
(!aSetBox.GetBottom() != !rBox.GetBottom()))
{ aSetBoxInfo.SetValid( SvxBoxInfoItemValidFlags::BOTTOM, false );
- aSetBox.SetLine( 0, SvxBoxItemLine::BOTTOM );
+ aSetBox.SetLine( nullptr, SvxBoxItemLine::BOTTOM );
}
}
}
@@ -1078,7 +1078,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
((!aSetBoxInfo.GetHori()) != (!rBox.GetBottom())))
{
aSetBoxInfo.SetValid( SvxBoxInfoItemValidFlags::HORI, false );
- aSetBoxInfo.SetLine( 0, SvxBoxInfoItemLine::HORI );
+ aSetBoxInfo.SetLine( nullptr, SvxBoxInfoItemLine::HORI );
}
}
}
@@ -1146,7 +1146,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
SwTableBox *pBox = aBoxes[i];
SwFrameFormat *pNewFormat;
- if ( 0 != (pNewFormat = SwTableFormatCmp::FindNewFormat( aFormatCmp, pBox->GetFrameFormat(), 0 )))
+ if ( nullptr != (pNewFormat = SwTableFormatCmp::FindNewFormat( aFormatCmp, pBox->GetFrameFormat(), 0 )))
pBox->ChgFrameFormat( static_cast<SwTableBoxFormat*>(pNewFormat) );
else
{
@@ -1445,7 +1445,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance )
{
// Check whether the current Crsr has it's Point/Mark in a Table
SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode();
- SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : 0;
+ SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr;
if( !pTableNd )
return ;
@@ -1461,7 +1461,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance )
return; // Robust
SwTabCols aTabCols;
- GetTabCols( aTabCols, 0, static_cast<SwCellFrm*>(pBoxFrm) );
+ GetTabCols( aTabCols, nullptr, static_cast<SwCellFrm*>(pBoxFrm) );
if ( ! aTabCols.Count() )
return;
@@ -1560,7 +1560,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance )
const sal_Int16 nOriHori = pFormat->GetHoriOrient().GetHoriOrient();
// We can leave the "real" work to the SwTable now
- SetTabCols( aTabCols, false, 0, static_cast<SwCellFrm*>(pBoxFrm) );
+ SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrm*>(pBoxFrm) );
// Alignment might have been changed in SetTabCols; restore old value
const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 1ecd44b818fe..6b2eac765d70 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -87,7 +87,7 @@ void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet,
{
const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(rpAttrSet.get());
if( rNode.GetModifyAtAttr() )
- const_cast<SwAttrSet*>(pAttrSet)->SetModifyAtAttr( 0 );
+ const_cast<SwAttrSet*>(pAttrSet)->SetModifyAtAttr( nullptr );
IStyleAccess& rSA = pAttrSet->GetPool()->GetDoc()->GetIStyleAccess();
rpAttrSet = rSA.getAutomaticStyle( rNewAttrSet, rNode.IsTextNode() ?
IStyleAccess::AUTO_STYLE_PARA :
@@ -105,7 +105,7 @@ void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
OSL_ENSURE( pAttrSet, "no SwAttrSet" );
OSL_ENSURE( pParentFormat || !pConditionalFormat, "ConditionalFormat without ParentFormat?" );
- const SwAttrSet* pParentSet = pParentFormat ? &pParentFormat->GetAttrSet() : 0;
+ const SwAttrSet* pParentSet = pParentFormat ? &pParentFormat->GetAttrSet() : nullptr;
if ( pParentSet != pAttrSet->GetParent() )
{
@@ -149,7 +149,7 @@ bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNo
SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
// #i76273# Robust
- SfxItemSet* pStyleNames = 0;
+ SfxItemSet* pStyleNames = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
@@ -197,7 +197,7 @@ bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
// #i76273# Robust
- SfxItemSet* pStyleNames = 0;
+ SfxItemSet* pStyleNames = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
@@ -289,14 +289,14 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
#ifdef DBG_UTIL
, m_nSerial( s_nSerial++)
#endif
- , m_pStartOfSection( 0 )
+ , m_pStartOfSection( nullptr )
{
if( rWhere.GetIndex() )
{
SwNodes& rNodes = const_cast<SwNodes&> (rWhere.GetNodes());
SwNode* pNd = rNodes[ rWhere.GetIndex() -1 ];
rNodes.InsertNode( this, rWhere );
- if( 0 == ( m_pStartOfSection = pNd->GetStartNode()) )
+ if( nullptr == ( m_pStartOfSection = pNd->GetStartNode()) )
{
m_pStartOfSection = pNd->m_pStartOfSection;
if( pNd->GetEndNode() ) // Skip EndNode ? Section
@@ -322,13 +322,13 @@ SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
#ifdef DBG_UTIL
, m_nSerial( s_nSerial++)
#endif
- , m_pStartOfSection( 0 )
+ , m_pStartOfSection( nullptr )
{
if( nPos )
{
SwNode* pNd = rNodes[ nPos - 1 ];
rNodes.InsertNode( this, nPos );
- if( 0 == ( m_pStartOfSection = pNd->GetStartNode()) )
+ if( nullptr == ( m_pStartOfSection = pNd->GetStartNode()) )
{
m_pStartOfSection = pNd->m_pStartOfSection;
if( pNd->GetEndNode() ) // Skip EndNode ? Section!
@@ -383,7 +383,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const
if( pSh )
{
const SwFrm* pFrm;
- if( pNd && 0 != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), 0, 0, false ) ) )
+ if( pNd && nullptr != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), nullptr, nullptr, false ) ) )
{
if ( pFrm->IsInTab() )
@@ -419,10 +419,10 @@ bool SwNode::IsProtect() const
if( pSttNd && static_cast<const SwSectionNode*>(pSttNd)->GetSection().IsProtectFlag() )
return true;
- if( 0 != ( pSttNd = FindTableBoxStartNode() ) )
+ if( nullptr != ( pSttNd = FindTableBoxStartNode() ) )
{
SwContentFrm* pCFrm;
- if( IsContentNode() && 0 != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ))
+ if( IsContentNode() && nullptr != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ))
return pCFrm->IsProtected();
const SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().
@@ -441,7 +441,7 @@ bool SwNode::IsProtect() const
return rAnchor.GetContentAnchor() && rAnchor.GetContentAnchor()->nNode.GetNode().IsProtect();
}
- if( 0 != ( pSttNd = FindFootnoteStartNode() ) )
+ if( nullptr != ( pSttNd = FindFootnoteStartNode() ) )
{
const SwTextFootnote* pTFootnote = GetDoc()->GetFootnoteIdxs().SeekEntry(
SwNodeIndex( *pSttNd ) );
@@ -459,10 +459,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
{
if ( !GetNodes().IsDocNodes() )
{
- return 0;
+ return nullptr;
}
- const SwPageDesc* pPgDesc = 0;
+ const SwPageDesc* pPgDesc = nullptr;
const SwContentNode* pNode;
if( ND_STARTNODE & m_nNodeType )
@@ -487,8 +487,8 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
{
const SwFrm* pFrm;
const SwPageFrm* pPage;
- if( pNode && 0 != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, bCalcLay ) ) &&
- 0 != ( pPage = pFrm->FindPageFrm() ) )
+ if( pNode && nullptr != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) &&
+ nullptr != ( pPage = pFrm->FindPageFrm() ) )
{
pPgDesc = pPage->GetPageDesc();
if ( pPgDescNdIdx )
@@ -505,10 +505,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
const SwNode* pNd = this;
const SwStartNode* pSttNd;
if( pNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() &&
- 0 != ( pSttNd = pNd->FindFlyStartNode() ) )
+ nullptr != ( pSttNd = pNd->FindFlyStartNode() ) )
{
// Find the right Anchor first
- const SwFrameFormat* pFormat = 0;
+ const SwFrameFormat* pFormat = nullptr;
const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
for( size_t n = 0; n < rFormats.size(); ++n )
@@ -545,14 +545,14 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( pFormat == pFrameFormat )
{
pNd = pFlyNd;
- pFlyNd = 0;
+ pFlyNd = nullptr;
break;
}
pAnchor = &pFrameFormat->GetAnchor();
if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetContentAnchor() )
{
- pFlyNd = 0;
+ pFlyNd = nullptr;
break;
}
@@ -564,7 +564,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( n >= rFormats.size() )
{
OSL_ENSURE( false, "FlySection, but no Format found" );
- return 0;
+ return nullptr;
}
}
}
@@ -577,13 +577,13 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( pNd->GetIndex() > GetNodes().GetEndOfAutotext().GetIndex() )
{
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
else
{
// Find the Body text node
- if( 0 != ( pSttNd = pNd->FindHeaderStartNode() ) ||
- 0 != ( pSttNd = pNd->FindFooterStartNode() ))
+ if( nullptr != ( pSttNd = pNd->FindHeaderStartNode() ) ||
+ nullptr != ( pSttNd = pNd->FindFooterStartNode() ))
{
// Then find this StartNode in the PageDescs
sal_uInt16 nId;
@@ -629,15 +629,15 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( !pPgDesc )
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
- else if( 0 != ( pSttNd = pNd->FindFootnoteStartNode() ))
+ else if( nullptr != ( pSttNd = pNd->FindFootnoteStartNode() ))
{
// the Anchor can only be in the Body text
const SwTextFootnote* pTextFootnote;
const SwFootnoteIdxs& rFootnoteArr = pDoc->GetFootnoteIdxs();
for( size_t n = 0; n < rFootnoteArr.size(); ++n )
- if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
static_cast<SwNode const *>(pSttNd) ==
&pTextFootnote->GetStartNode()->GetNode() )
{
@@ -653,7 +653,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
"Where is this Node?" );
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
}
}
@@ -666,7 +666,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
for( i = 0; i < nMaxItems; ++i )
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
+ if( nullptr != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
static_cast<const SwFormatPageDesc*>(pItem)->GetDefinedIn() )
{
const SwModify* pMod = static_cast<const SwFormatPageDesc*>(pItem)->GetDefinedIn();
@@ -677,7 +677,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
}
}
- if( 0 != ( pNd = aInfo.GetFoundNode() ))
+ if( nullptr != ( pNd = aInfo.GetFoundNode() ))
{
if( pNd->IsContentNode() )
pPgDesc = static_cast<const SwFormatPageDesc&>(pNd->GetContentNode()->
@@ -703,7 +703,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
/// If the node is located in a Fly, we return it formatted accordingly
SwFrameFormat* SwNode::GetFlyFormat() const
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
const SwNode* pSttNd = FindFlyStartNode();
if( pSttNd )
{
@@ -738,7 +738,7 @@ SwFrameFormat* SwNode::GetFlyFormat() const
SwTableBox* SwNode::GetTableBox() const
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
const SwNode* pSttNd = FindTableBoxStartNode();
if( pSttNd )
pBox = const_cast<SwTableBox*>(pSttNd->FindTableNode()->GetTable().GetTableBox(
@@ -752,12 +752,12 @@ SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp )
while( eTyp != pTmp->GetStartNodeType() && pTmp->GetIndex() )
pTmp = pTmp->m_pStartOfSection;
- return eTyp == pTmp->GetStartNodeType() ? pTmp : 0;
+ return eTyp == pTmp->GetStartNodeType() ? pTmp : nullptr;
}
const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
{
- const SwTextNode* pRet = 0;
+ const SwTextNode* pRet = nullptr;
const SwOutlineNodes& rONds = GetNodes().GetOutLineNds();
if( MAXLEVEL > nLvl && !rONds.empty() )
{
@@ -781,14 +781,14 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
const SwContentNode* pCNd = GetContentNode();
Point aPt( 0, 0 );
- const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false ),
- * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false ) : 0;
- const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : 0;
+ const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ),
+ * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr;
+ const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : nullptr;
if( pPgFrm && pMyFrm &&
pPgFrm->Frm().Top() > pMyFrm->Frm().Top() )
{
// The one asking precedes the Page, thus its invalid
- pRet = 0;
+ pRet = nullptr;
}
}
else
@@ -910,7 +910,7 @@ void SwStartNode::CheckSectionCondColl() const
sal_uLong nEndIdx = EndOfSectionIndex();
const SwNodes& rNds = GetNodes();
SwContentNode* pCNd;
- while( 0 != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
+ while( nullptr != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
pCNd->ChkCondColl();
//FEATURE::CONDCOLL
}
@@ -995,7 +995,7 @@ SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType
SwFormatColl *pColl )
: SwModify( pColl ), // CrsrsShell, FrameFormat,
SwNode( rWhere, nNdType ),
- m_pCondColl( 0 ),
+ m_pCondColl( nullptr ),
mbSetModifyAtAttr( false )
{
}
@@ -1009,7 +1009,7 @@ SwContentNode::~SwContentNode()
delete m_pCondColl;
if ( mpAttrSet.get() && mbSetModifyAtAttr )
- const_cast<SwAttrSet*>(static_cast<const SwAttrSet*>(mpAttrSet.get()))->SetModifyAtAttr( 0 );
+ const_cast<SwAttrSet*>(static_cast<const SwAttrSet*>(mpAttrSet.get()))->SetModifyAtAttr( nullptr );
}
void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
@@ -1039,7 +1039,7 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNe
// Else register anyways when dying
static_cast<SwModify*>(GetRegisteredIn())->Remove( this );
if ( GetpSwAttrSet() )
- AttrSetHandleHelper::SetParent( mpAttrSet, *this, 0, 0 );
+ AttrSetHandleHelper::SetParent( mpAttrSet, *this, nullptr, nullptr );
}
}
}
@@ -1095,17 +1095,17 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNe
bool SwContentNode::InvalidateNumRule()
{
- SwNumRule* pRule = 0;
+ SwNumRule* pRule = nullptr;
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
- 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, true )) &&
+ nullptr != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, true )) &&
!static_cast<const SwNumRuleItem*>(pItem)->GetValue().isEmpty() &&
- 0 != (pRule = GetDoc()->FindNumRulePtr(
+ nullptr != (pRule = GetDoc()->FindNumRulePtr(
static_cast<const SwNumRuleItem*>(pItem)->GetValue() ) ) )
{
pRule->SetInvalidRule( true );
}
- return 0 != pRule;
+ return nullptr != pRule;
}
SwContentFrm *SwContentNode::getLayoutFrm( const SwRootFrm* _pRoot,
@@ -1119,8 +1119,8 @@ SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
const bool bCalcFrm ) const
{
SwRect aRet;
- SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT, pPoint, 0, bCalcFrm ) );
+ SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
+ FRM_CNTNT, pPoint, nullptr, bCalcFrm ) );
if( pFrm )
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
@@ -1130,9 +1130,9 @@ SwRect SwContentNode::FindPageFrmRect( const bool bPrtArea, const Point* pPoint,
const bool bCalcFrm ) const
{
SwRect aRet;
- SwFrm* pFrm = ::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT, pPoint, 0, bCalcFrm );
- if( pFrm && 0 != ( pFrm = pFrm->FindPageFrm() ))
+ SwFrm* pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
+ FRM_CNTNT, pPoint, nullptr, bCalcFrm );
+ if( pFrm && nullptr != ( pFrm = pFrm->FindPageFrm() ))
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
}
@@ -1156,7 +1156,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl *pNewColl )
// TODO: HACK: We need to recheck this condition according to the new template!
if( true /*pNewColl */ )
{
- SetCondFormatColl( 0 );
+ SetCondFormatColl( nullptr );
}
//FEATURE::CONDCOLL
@@ -1288,7 +1288,7 @@ void SwContentNode::MakeFrms( SwContentNode& rNode )
SwNode2Layout aNode2Layout( *this, rNode.GetIndex() );
- while( 0 != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) )
+ while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) )
{
SwFrm *pNew = rNode.MakeFrm( pUpper );
pNew->Paste( pUpper, pFrm );
@@ -1347,7 +1347,7 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable )
SwContentFrm* pMaster = pFrm->FindMaster();
pMaster->SetFollow( pFrm->GetFollow() );
}
- pFrm->SetFollow( 0 );//So it doesn't get funny ideas.
+ pFrm->SetFollow( nullptr );//So it doesn't get funny ideas.
//Otherwise it could be possible that a follow
//gets destroyed before its master. Following
//the now invalid pointer will then lead to an
@@ -1362,7 +1362,7 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable )
OSL_ENSURE( pFootnote, "You promised a FootnoteFrm?" );
SwContentFrm* pCFrm;
if( !pFootnote->GetFollow() && !pFootnote->GetMaster() &&
- 0 != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() )
+ nullptr != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() )
{
OSL_ENSURE( pCFrm->IsTextFrm(), "NoTextFrm has Footnote?" );
static_cast<SwTextFrm*>(pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
@@ -1440,7 +1440,7 @@ bool SwContentNode::SetAttr(const SfxPoolItem& rAttr )
if( IsModifyLocked() ||
( !HasWriterListeners() && RES_PARATR_NUMRULE != rAttr.Which() ))
{
- bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr );
+ bRet = nullptr != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr );
}
else
{
@@ -1466,7 +1466,7 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet )
SetInCache( false );
}
- const SfxPoolItem* pFnd = 0;
+ const SfxPoolItem* pFnd = nullptr;
if( SfxItemState::SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) )
{
OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
@@ -1494,8 +1494,8 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet )
// fact that nobody else uses the attribute set behind the handle.
// FME 2007-07-10 #i78124# If autostyle does not have a parent,
// the string is empty.
- const SfxPoolItem* pNameItem = 0;
- if ( 0 != GetCondFormatColl() ||
+ const SfxPoolItem* pNameItem = nullptr;
+ if ( nullptr != GetCondFormatColl() ||
SfxItemState::SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) ||
static_cast<const SfxStringItem*>(pNameItem)->GetValue().isEmpty() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFormatColl(), GetFormatColl() );
@@ -1556,7 +1556,7 @@ bool SwContentNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
nDel = ClearItemsFromAttrSet( aClearWhichIds );
}
else
- nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, 0, 0 );
+ nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, nullptr, nullptr );
if( !GetpSwAttrSet()->Count() ) // Empt? Delete
mpAttrSet.reset();
@@ -1697,7 +1697,7 @@ sal_uInt16 SwContentNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>&
const SfxPoolItem* SwContentNode::GetNoCondAttr( sal_uInt16 nWhich,
bool bInParents ) const
{
- const SfxPoolItem* pFnd = 0;
+ const SfxPoolItem* pFnd = nullptr;
if( m_pCondColl && m_pCondColl->GetRegisteredIn() )
{
if( !GetpSwAttrSet() || ( SfxItemState::SET != GetpSwAttrSet()->GetItemState(
@@ -1790,7 +1790,7 @@ void SwContentNode::SetCondFormatColl( SwFormatColl* pColl )
if( pColl )
m_pCondColl = new SwDepend( this, pColl );
else
- m_pCondColl = 0;
+ m_pCondColl = nullptr;
if( GetpSwAttrSet() )
{
@@ -1832,7 +1832,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
nCond = PARA_IN_TABLEBODY;
const SwTableNode* pTableNd = pSttNd->FindTableNode();
const SwTableBox* pBox;
- if( pTableNd && 0 != ( pBox = pTableNd->GetTable().
+ if( pTableNd && nullptr != ( pBox = pTableNd->GetTable().
GetTableBox( pSttNd->GetIndex() ) ) && pBox &&
pBox->IsInHeadline( &pTableNd->GetTable() ) )
nCond = PARA_IN_TABLEHEAD;
@@ -1847,7 +1847,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
const SwNode* pSrchNd = pSttNd;
for( size_t n = 0; n < rFootnoteArr.size(); ++n )
- if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
pSrchNd == &pTextFootnote->GetStartNode()->GetNode() )
{
if( pTextFootnote->GetFootnote().IsEndNote() )
@@ -1869,7 +1869,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
}
pSttNd = pSttNd->GetIndex()
? pSttNd->StartOfSectionNode()
- : 0;
+ : nullptr;
}
}
@@ -1902,7 +1902,7 @@ void SwContentNode::ChkCondColl()
// Check, just to be sure
if( RES_CONDTXTFMTCOLL == GetFormatColl()->Which() )
{
- SwCollCondition aTmp( 0, 0, 0 );
+ SwCollCondition aTmp( nullptr, 0, 0 );
const SwCollCondition* pCColl;
bool bDone = false;
@@ -1930,12 +1930,12 @@ void SwContentNode::ChkCondColl()
HasCondition( aTmp );
}
else
- pCColl = 0;
+ pCColl = nullptr;
if( pCColl )
SetCondFormatColl( pCColl->GetTextFormatColl() );
else if( m_pCondColl )
- SetCondFormatColl( 0 );
+ SetCondFormatColl( nullptr );
}
}
}
@@ -1976,7 +1976,7 @@ short SwContentNode::GetTextDirection( const SwPosition& rPos,
SwOLENodes* SwContentNode::CreateOLENodesArray( const SwFormatColl& rColl, bool bOnlyWithInvalidSize )
{
- SwOLENodes *pNodes = 0;
+ SwOLENodes *pNodes = nullptr;
SwIterator<SwContentNode,SwFormatColl> aIter( rColl );
for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
{
@@ -2023,7 +2023,7 @@ bool SwNode::IsInRedlines() const
const SwDoc * pDoc = GetDoc();
bool bResult = false;
- if (pDoc != NULL)
+ if (pDoc != nullptr)
bResult = pDoc->getIDocumentRedlineAccess().IsInRedlines(*this);
return bResult;
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 85b050ad291e..969a95060d6e 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -51,18 +51,18 @@ public:
// Inserts a Frame under every pUpper of the array
void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
- SwFrm* GetFrm( const Point* pDocPos = 0,
- const SwPosition *pPos = 0,
+ SwFrm* GetFrm( const Point* pDocPos = nullptr,
+ const SwPosition *pPos = nullptr,
const bool bCalcFrm = true ) const;
};
SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
{
if( pIdx->GetIndex() >= rNodes.Count() - 1 )
- return 0;
+ return nullptr;
SwNodeIndex aTmp(*pIdx, +1);
- SwNode* pNd = 0;
+ SwNode* pNd = nullptr;
while( aTmp < rNodes.Count()-1 )
{
pNd = &aTmp.GetNode();
@@ -73,7 +73,7 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ;
else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() )
{
- pNd = 0;
+ pNd = nullptr;
break;
}
if ( bFound )
@@ -82,7 +82,7 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
}
if( aTmp == rNodes.Count()-1 )
- pNd = 0;
+ pNd = nullptr;
else if( pNd )
(*pIdx) = aTmp;
return pNd;
@@ -91,10 +91,10 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
{
if( !pIdx->GetIndex() )
- return 0;
+ return nullptr;
SwNodeIndex aTmp( *pIdx, -1 );
- SwNode* pNd(0);
+ SwNode* pNd(nullptr);
while( aTmp.GetIndex() )
{
pNd = &aTmp.GetNode();
@@ -105,7 +105,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First();
else if( pNd->IsStartNode() && !pNd->IsSectionNode() )
{
- pNd = 0;
+ pNd = nullptr;
break;
}
if ( bFound )
@@ -114,7 +114,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
}
if( !aTmp.GetIndex() )
- pNd = 0;
+ pNd = nullptr;
else if( pNd )
(*pIdx) = aTmp;
return pNd;
@@ -130,7 +130,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
* We insert before or after it.
*/
SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch )
- : pUpperFrms( NULL ), nIndex( nIdx ), bInit( false )
+ : pUpperFrms( nullptr ), nIndex( nIdx ), bInit( false )
{
const SwNode* pNd;
if( bSearch || rNode.IsSectionNode() )
@@ -142,7 +142,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc
SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 );
pNd = GoPreviousWithFrm( &aTmp );
if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() )
- pNd = NULL; // Do not go over the limits
+ pNd = nullptr; // Do not go over the limits
bMaster = false;
}
else
@@ -151,7 +151,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc
pNd = GoNextWithFrm( rNode.GetNodes(), &aTmp );
bMaster = true;
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
- pNd = NULL; // Do not go over the limits
+ pNd = nullptr; // Do not go over the limits
}
}
else
@@ -172,8 +172,8 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc
}
else
{
- pIter = NULL;
- pMod = 0;
+ pIter = nullptr;
+ pMod = nullptr;
}
}
@@ -195,7 +195,7 @@ SwFrm* SwNode2LayImpl::NextFrm()
{
SwFrm* pRet;
if( !pIter )
- return NULL;
+ return nullptr;
if( !bInit )
{
pRet = pIter->First();
@@ -247,14 +247,14 @@ SwFrm* SwNode2LayImpl::NextFrm()
}
pRet = pIter->Next();
}
- return NULL;
+ return nullptr;
}
void SwNode2LayImpl::SaveUpperFrms()
{
pUpperFrms = new std::vector<SwFrm*>;
SwFrm* pFrm;
- while( 0 != (pFrm = NextFrm()) )
+ while( nullptr != (pFrm = NextFrm()) )
{
SwFrm* pPrv = pFrm->GetPrev();
pFrm = pFrm->GetUpper();
@@ -271,15 +271,15 @@ void SwNode2LayImpl::SaveUpperFrms()
}
}
delete pIter;
- pIter = NULL;
- pMod = 0;
+ pIter = nullptr;
+ pMod = nullptr;
}
SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
{
rpFrm = NextFrm();
if( !rpFrm )
- return NULL;
+ return nullptr;
SwLayoutFrm* pUpper = rpFrm->GetUpper();
if( rpFrm->IsSctFrm() )
{
@@ -306,7 +306,7 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
}
OSL_ENSURE( pFrm->IsLayoutFrm(),
"<SwNode2LayImpl::UpperFrm(..)> - expected upper frame isn't a layout frame." );
- rpFrm = bMaster ? NULL
+ rpFrm = bMaster ? nullptr
: static_cast<SwLayoutFrm*>(pFrm)->Lower();
OSL_ENSURE( !rpFrm || rpFrm->IsFlowFrm(),
"<SwNode2LayImpl::UpperFrm(..)> - expected sibling isn't a flow frame." );
@@ -317,7 +317,7 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
pUpper->Paste( rpFrm->GetUpper(),
bMaster ? rpFrm : rpFrm->GetNext() );
static_cast<SwSectionFrm*>(pUpper)->Init();
- rpFrm = NULL;
+ rpFrm = nullptr;
// 'Go down' the section frame as long as the layout frame
// is found, which would contain content.
while ( pUpper->Lower() &&
@@ -343,7 +343,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
bool bFirst = true;
for( ; nStt < nEnd; ++nStt )
{
- SwFrm* pNew = 0;
+ SwFrm* pNew = nullptr;
SwFrm* pNxt;
SwLayoutFrm* pUp;
if( (pNd = rNds[nStt])->IsContentNode() )
@@ -417,7 +417,7 @@ SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
const bool bCalcFrm ) const
{
// test if change of member pIter -> pMod broke anything
- return pMod ? ::GetFrmOfModify( 0, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrm ) : 0;
+ return pMod ? ::GetFrmOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrm ) : nullptr;
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 4b9d55c907a7..376aaea9ed1a 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -125,7 +125,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// in the idle-handler of the doc
if( GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, &rDelPos.GetNode(), nSz ) &&
rNds.GetDoc() != GetDoc() )
- rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
// NEVER include nodes from the RedLineArea
sal_uLong nNd = rInsPos.GetIndex();
@@ -189,7 +189,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
{
bool bSavePersData(GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(rNds));
bool bRestPersData(GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(*this));
- SwDoc* pDestDoc = rNds.GetDoc() != GetDoc() ? rNds.GetDoc() : 0;
+ SwDoc* pDestDoc = rNds.GetDoc() != GetDoc() ? rNds.GetDoc() : nullptr;
OSL_ENSURE(!pDestDoc, "SwNodes::ChgNode(): "
"the code to handle text fields here looks broken\n"
"if the target is in a different document.");
@@ -317,7 +317,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
SwTextMeta *const pTextMeta(
static_txtattr_cast<SwTextMeta*>(pAttr));
// force removal of UNO object
- pTextMeta->ChgTextNode(0);
+ pTextMeta->ChgTextNode(nullptr);
pTextMeta->ChgTextNode(pTextNd);
}
break;
@@ -344,9 +344,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// declare all fields as invalid, updating will happen
// in the idle-handler of the doc
- GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
if( rNds.GetDoc() != GetDoc() )
- rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
if( bNewFrms )
bNewFrms = &GetDoc()->GetNodes() == &rNds &&
@@ -366,7 +366,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
aFrmNdIdx = rNds.GetEndOfContent();
pFrmNd = SwNodes::GoPrevSection( &aFrmNdIdx, true, false );
if( pFrmNd && !static_cast<SwContentNode*>(pFrmNd)->HasWriterListeners() )
- pFrmNd = 0;
+ pFrmNd = nullptr;
OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" );
}
if( pFrmNd )
@@ -504,7 +504,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNodeIndex aMvIdx( aRg.aEnd, 1 );
- SwContentNode* pCNd = 0;
+ SwContentNode* pCNd = nullptr;
SwNode* pTmpNd = &aMvIdx.GetNode();
if( pTmpNd->IsContentNode() )
{
@@ -518,7 +518,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
m_pOutlineNodes->erase( pCNd );
}
else
- pCNd = 0;
+ pCNd = nullptr;
}
BigPtrArray::Move( aMvIdx.GetIndex(), aIdx.GetIndex() );
@@ -736,7 +736,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// also set correct StartNode for all decreased nodes
while( aTmpSIdx < aTmpEIdx )
- if( 0 != (( pAktNode = &aTmpEIdx.GetNode())->GetEndNode()) )
+ if( nullptr != (( pAktNode = &aTmpEIdx.GetNode())->GetEndNode()) )
aTmpEIdx = pAktNode->StartOfSectionIndex();
else
{
@@ -1283,15 +1283,15 @@ void SwNodes::GoEndOfSection(SwNodeIndex *pIdx)
SwContentNode* SwNodes::GoNext(SwNodeIndex *pIdx) const
{
if( pIdx->GetIndex() >= Count() - 1 )
- return 0;
+ return nullptr;
SwNodeIndex aTmp(*pIdx, +1);
- SwNode* pNd = 0;
+ SwNode* pNd = nullptr;
while( aTmp < Count()-1 && !( pNd = &aTmp.GetNode())->IsContentNode() )
++aTmp;
if( aTmp == Count()-1 )
- pNd = 0;
+ pNd = nullptr;
else
(*pIdx) = aTmp;
return static_cast<SwContentNode*>(pNd);
@@ -1300,15 +1300,15 @@ SwContentNode* SwNodes::GoNext(SwNodeIndex *pIdx) const
SwContentNode* SwNodes::GoPrevious(SwNodeIndex *pIdx)
{
if( !pIdx->GetIndex() )
- return 0;
+ return nullptr;
SwNodeIndex aTmp( *pIdx, -1 );
- SwNode* pNd = 0;
+ SwNode* pNd = nullptr;
while( aTmp.GetIndex() && !( pNd = &aTmp.GetNode())->IsContentNode() )
--aTmp;
if( !aTmp.GetIndex() )
- pNd = 0;
+ pNd = nullptr;
else
(*pIdx) = aTmp;
return static_cast<SwContentNode*>(pNd);
@@ -1361,7 +1361,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
SwNode* aEndNdArr[] = { m_pEndOfContent,
m_pEndOfPostIts, m_pEndOfInserts,
m_pEndOfAutotext, m_pEndOfRedlines,
- 0
+ nullptr
};
SwNode** ppEndNdArr = aEndNdArr;
@@ -1550,7 +1550,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
// Also, a selection is invalidated.
pEnd->nContent = pStt->nContent;
rPam.DeleteMark();
- GetDoc()->GetDocShell()->Broadcast( SwFormatFieldHint( 0,
+ GetDoc()->GetDocShell()->Broadcast( SwFormatFieldHint( nullptr,
rNodes.IsDocNodes() ? SwFormatFieldHintWhich::INSERTED : SwFormatFieldHintWhich::REMOVED ) );
return;
}
@@ -1672,7 +1672,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
// Also, a selection is invalidated.
*pEnd = *pStt;
rPam.DeleteMark();
- GetDoc()->GetDocShell()->Broadcast( SwFormatFieldHint( 0,
+ GetDoc()->GetDocShell()->Broadcast( SwFormatFieldHint( nullptr,
rNodes.IsDocNodes() ? SwFormatFieldHintWhich::INSERTED : SwFormatFieldHintWhich::REMOVED ) );
}
@@ -1961,7 +1961,7 @@ SwContentNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
{
const SwSectionNode* pSectNd;
if( ( bSkipHidden || bSkipProtect ) &&
- 0 != (pSectNd = pNd->FindSectionNode() ) &&
+ nullptr != (pSectNd = pNd->FindSectionNode() ) &&
( ( bSkipHidden && pSectNd->GetSection().IsHiddenFlag() ) ||
( bSkipProtect && pSectNd->GetSection().IsProtectFlag() )) )
{
@@ -1976,7 +1976,7 @@ SwContentNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
++aTmp;
bFirst = false;
}
- return 0;
+ return nullptr;
}
///@see SwNodes::GoNextSection (TODO: seems to be C&P programming here)
@@ -2019,7 +2019,7 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
{
const SwSectionNode* pSectNd;
if( ( bSkipHidden || bSkipProtect ) &&
- 0 != (pSectNd = pNd->FindSectionNode() ) &&
+ nullptr != (pSectNd = pNd->FindSectionNode() ) &&
( ( bSkipHidden && pSectNd->GetSection().IsHiddenFlag() ) ||
( bSkipProtect && pSectNd->GetSection().IsProtectFlag() )) )
{
@@ -2033,7 +2033,7 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
}
--aTmp;
}
- return 0;
+ return nullptr;
}
//TODO: improve documentation
@@ -2050,7 +2050,7 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
const SwNode* pEnd ) const
{
- SwNode* pFrmNd = 0;
+ SwNode* pFrmNd = nullptr;
// no layout -> skip
if( GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
@@ -2082,7 +2082,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
rFrmIdx = aIdx;
// search forward or backward for a content node
- else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, true, false )) &&
+ else if( nullptr != ( pFrmNd = GoPrevSection( &aIdx, true, false )) &&
::CheckNodesRange( aIdx, rFrmIdx, true ) &&
// Never out of the table at the start
pFrmNd->FindTableNode() == pTableNd &&
@@ -2104,7 +2104,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// NEVER leave the section when doing this!
if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsContentNode() ) ||
- ( 0 != ( pFrmNd = GoNextSection( &aIdx, true, false )) &&
+ ( nullptr != ( pFrmNd = GoNextSection( &aIdx, true, false )) &&
::CheckNodesRange( aIdx, rFrmIdx, true ) &&
( pFrmNd->FindTableNode() == pTableNd &&
// NEVER go out of the table cell at the end
@@ -2119,7 +2119,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// SttNode is a section or a table!
SwTableNode* pTableNode;
if (pSttNd->IsTableNode() &&
- 0 != (pTableNode = pFrmNd->FindTableNode()) &&
+ nullptr != (pTableNode = pFrmNd->FindTableNode()) &&
// TABLE IN TABLE:
pTableNode != pSttNd->StartOfSectionNode()->FindTableNode())
{
@@ -2145,7 +2145,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
rFrmIdx = aIdx;
else
{
- pFrmNd = 0;
+ pFrmNd = nullptr;
// is there some sectionnodes before a tablenode?
while( aIdx.GetNode().IsSectionNode() )
@@ -2322,7 +2322,7 @@ void SwNodes::InsertNode( const SwNodePtr pNode,
// ->#112139#
SwNode * SwNodes::DocumentSectionStartNode(SwNode * pNode) const
{
- if (NULL != pNode)
+ if (nullptr != pNode)
{
SwNodeIndex aIdx(*pNode);
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index c3ee22c092bd..698cf64873f9 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -345,7 +345,7 @@ bool SwSection::CalcHiddenFlag() const
do {
if( pSect->IsHidden() && pSect->IsCondHidden() )
return true;
- } while( 0 != ( pSect = pSect->GetParent()) );
+ } while( nullptr != ( pSect = pSect->GetParent()) );
return false;
}
@@ -562,7 +562,7 @@ OUString SwSection::GetLinkFileName() const
OUString sFilter;
if (m_RefLink->GetLinkManager() &&
sfx2::LinkManager::GetDisplayNames(
- m_RefLink, 0, &sTmp, &sRange, &sFilter ))
+ m_RefLink, nullptr, &sTmp, &sRange, &sFilter ))
{
sTmp += OUString(sfx2::cTokenSeparator) + sFilter
+ OUString(sfx2::cTokenSeparator) + sRange;
@@ -606,11 +606,11 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
::sfx2::SvBaseLink* pBLnk = &(*rLnks[ --n ]);
if( pBLnk && !pBLnk->IsVisible() &&
dynamic_cast< const SwBaseLink *>( pBLnk ) != nullptr &&
- 0 != ( pNd = static_cast<SwBaseLink*>(pBLnk)->GetAnchor() ) )
+ nullptr != ( pNd = static_cast<SwBaseLink*>(pBLnk)->GetAnchor() ) )
{
pNd = pNd->StartOfSectionNode(); // If it's a SectionNode
const SwSectionNode* pParent;
- while( 0 != ( pParent = pNd->FindSectionNode() ) &&
+ while( nullptr != ( pParent = pNd->FindSectionNode() ) &&
( CONTENT_SECTION == pParent->GetSection().GetType()
|| pNd == &rSectNd ))
pNd = pParent->StartOfSectionNode();
@@ -624,7 +624,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
const SwTOXBase* SwSection::GetTOXBase() const
{
- const SwTOXBase* pRet = 0;
+ const SwTOXBase* pRet = nullptr;
if( TOX_CONTENT_SECTION == GetType() )
pRet = dynamic_cast<const SwTOXBaseSection*>(this);
return pRet;
@@ -645,7 +645,7 @@ SwSectionFormat::~SwSectionFormat()
SwSectionNode* pSectNd;
const SwNodeIndex* pIdx = GetContent( false ).GetContentIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
SwSection& rSect = pSectNd->GetSection();
// If it was a linked Section, we need to make all Child Links
@@ -688,7 +688,7 @@ void SwSectionFormat::DelFrms()
SwSectionNode* pSectNd;
const SwNodeIndex* pIdx = GetContent(false).GetContentIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
// First delete the <SwSectionFrm> of the <SwSectionFormat> instance
// mba: test iteration as objects are removed in iteration
@@ -730,7 +730,7 @@ void SwSectionFormat::MakeFrms()
const SwNodeIndex* pIdx = GetContent(false).GetContentIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
- 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
+ nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
SwNodeIndex aIdx( *pIdx );
pSectNd->MakeFrms( &aIdx );
@@ -838,7 +838,7 @@ void SwSectionFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
- SetXTextSection(uno::Reference<text::XTextSection>(0));
+ SetXTextSection(uno::Reference<text::XTextSection>(nullptr));
}
}
@@ -908,7 +908,7 @@ void SwSectionFormat::GetChildSections( SwSections& rArr,
const SwNodeIndex* pIdx;
for( SwSectionFormat* pLast = aIter.First(); pLast; pLast = aIter.Next() )
if( bAllSections ||
- ( 0 != ( pIdx = pLast->GetContent(false).
+ ( nullptr != ( pIdx = pLast->GetContent(false).
GetContentIdx()) && &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
{
SwSection* pDummy = pLast->GetSection();
@@ -944,10 +944,10 @@ void SwSectionFormat::UpdateParent()
if( !HasWriterListeners() )
return;
- SwSection* pSection = 0;
- const SvxProtectItem* pProtect(0);
+ SwSection* pSection = nullptr;
+ const SvxProtectItem* pProtect(nullptr);
// edit in readonly sections
- const SwFormatEditInReadonly* pEditInReadonly = 0;
+ const SwFormatEditInReadonly* pEditInReadonly = nullptr;
bool bIsHidden = false;
SwIterator<SwClient,SwSectionFormat> aIter(*this);
@@ -1025,7 +1025,7 @@ SwSectionNode* SwSectionFormat::GetSectionNode(bool const bAlways)
const SwNodeIndex* pIdx = GetContent(false).GetContentIdx();
if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
return pIdx->GetNode().GetSectionNode();
- return 0;
+ return nullptr;
}
// Is this Section valid for the GlobalDocument?
@@ -1039,7 +1039,7 @@ const SwSection* SwSectionFormat::GetGlobalDocSection() const
!pNd->StartOfSectionNode()->IsSectionNode() &&
!pNd->StartOfSectionNode()->FindSectionNode() )
return &pNd->GetSection();
- return 0;
+ return nullptr;
}
// sw::Metadatable
@@ -1161,7 +1161,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
{
// It's in the Section, so update. But only if it's not in the same File!
OUString sFName;
- sfx2::LinkManager::GetDisplayNames( pBLink, 0, &sFName );
+ sfx2::LinkManager::GetDisplayNames( pBLink, nullptr, &sFName );
if( sFName != sName )
{
pBLink->DataChanged( sMimeType, aValue );
@@ -1244,7 +1244,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwSection& rSection = pSectNd->GetSection();
rSection.SetConnectFlag(false);
- Reader* pRead = 0;
+ Reader* pRead = nullptr;
switch( nDataFormat )
{
case SotClipboardFormatId::STRING:
@@ -1263,7 +1263,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
break;
OUString sFilter;
OUString sRange;
- sfx2::LinkManager::GetDisplayNames( this, 0, &sFileName,
+ sfx2::LinkManager::GetDisplayNames( this, nullptr, &sFileName,
&sRange, &sFilter );
RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE;
@@ -1293,7 +1293,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
rSection.SetConnectFlag();
SwNodeIndex aSave( pPam->GetPoint()->nNode, -1 );
- SwNodeRange* pCpyRg = 0;
+ SwNodeRange* pCpyRg = nullptr;
if( xDocSh->GetMedium() &&
rSection.GetLinkFilePassword().isEmpty() )
@@ -1324,7 +1324,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwNodeIndex& rInsPos = pPam->GetPoint()->nNode;
- SwPaM* pCpyPam = 0;
+ SwPaM* pCpyPam = nullptr;
if( !bRecursion &&
pSrcDoc->GetDocumentLinksAdministrationManager().SelectServerObj( sRange, pCpyPam, pCpyRg )
&& pCpyPam )
@@ -1339,7 +1339,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
}
if( pCpyRg && pSrcDoc == pDoc &&
pCpyRg->aStart < rInsPos && rInsPos < pCpyRg->aEnd )
- delete pCpyRg, pCpyRg = 0;
+ delete pCpyRg, pCpyRg = nullptr;
}
else if( pSrcDoc != pDoc )
pCpyRg = new SwNodeRange( pSrcDoc->GetNodes().GetEndOfExtras(), 2,
@@ -1363,7 +1363,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwTableNumFormatMerge aTNFM( *pSrcDoc, *pDoc );
- pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, NULL, bCreateFrm );
+ pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, nullptr, bCreateFrm );
++aSave;
if( !bCreateFrm )
@@ -1429,7 +1429,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
if( pESh )
{
pESh->Pop( false );
- pPam = 0; // pam was deleted earlier
+ pPam = nullptr; // pam was deleted earlier
}
}
@@ -1440,7 +1440,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
pDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
if( pESh )
pESh->EndAllAction();
@@ -1539,8 +1539,8 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
pFormat->GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *pLnk,
static_cast<sal_uInt16>(m_Data.GetType()),
sFile,
- ( !sFltr.isEmpty() ? &sFltr : 0 ),
- ( !sRange.isEmpty() ? &sRange : 0 ) );
+ ( !sFltr.isEmpty() ? &sFltr : nullptr ),
+ ( !sRange.isEmpty() ? &sRange : nullptr ) );
}
break;
default:
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index ff47a8261f1e..9831eec9d2be 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -114,7 +114,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
}
SwFrameFormat* pFormat;
- if( nEvent && 0 != ( pFormat = pContentNode->GetFlyFormat() ))
+ if( nEvent && nullptr != ( pFormat = pContentNode->GetFlyFormat() ))
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( EVENT_OBJECT_IMAGE, pFormat );
@@ -130,7 +130,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
bool bDontNotify = false;
Size aGrfSz, aOldSz;
- SwGrfNode* pSwGrfNode = NULL;
+ SwGrfNode* pSwGrfNode = nullptr;
if (pContentNode->IsGrfNode())
{
@@ -151,7 +151,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
( GRAPHIC_DEFAULT != aGrf.GetType() ||
GRAPHIC_DEFAULT != rGrfObj.GetType() ) )
{
- aGrfSz = ::GetGraphicSizeTwip( aGrf, 0 );
+ aGrfSz = ::GetGraphicSizeTwip( aGrf, nullptr );
if( bGraphicPieceArrived && GRAPHIC_DEFAULT != aGrf.GetType() &&
( !aOldSz.Width() || !aOldSz.Height() ) )
@@ -292,7 +292,7 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO
{
bool bRet = false;
SwViewShell *pSh = pGrfNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
- CurrShell *pCurr = 0;
+ CurrShell *pCurr = nullptr;
if ( pGrfNd->GetDoc()->GetEditShell() )
pCurr = new CurrShell( pSh );
@@ -302,7 +302,7 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO
{
SwFrameFormat* pFormat;
if( pGrfNd->IsChgTwipSize() &&
- 0 != (pFormat = pGrfNd->GetFlyFormat()) )
+ nullptr != (pFormat = pGrfNd->GetFlyFormat()) )
{
Size aCalcSz( aSz );
if ( !aSz.Height() && aSz.Width() )
@@ -340,8 +340,8 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO
SwNode *pANd;
SwTableNode *pTableNd;
if( pAPos &&
- 0 != (pANd = & pAPos->nNode.GetNode()) &&
- 0 != (pTableNd = pANd->FindTableNode()) )
+ nullptr != (pANd = & pAPos->nNode.GetNode()) &&
+ nullptr != (pTableNd = pANd->FindTableNode()) )
{
const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
@@ -457,12 +457,12 @@ const SwNode* SwBaseLink::GetAnchor() const
{
return &pAPos->nNode.GetNode();
}
- return 0;
+ return nullptr;
}
}
OSL_ENSURE( false, "GetAnchor is not shadowed" );
- return 0;
+ return nullptr;
}
bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx
index cb1e380faeab..46e58dab9f7c 100644
--- a/sw/source/core/docnode/threadmanager.cxx
+++ b/sw/source/core/docnode/threadmanager.cxx
@@ -142,7 +142,7 @@ void ThreadManager::RemoveThread( const oslInterlockedCount nThreadID,
}
// Try to start thread from waiting ones
- TryToStartNewThread( 0 );
+ TryToStartNewThread( nullptr );
}
else
{
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 5f8a77550a74..b0087471967b 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -100,7 +100,7 @@ void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor )
*/
SwFrameFormat *FindFrameFormat( SdrObject *pObj )
{
- SwFrameFormat* pRetval = 0L;
+ SwFrameFormat* pRetval = nullptr;
if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
@@ -152,9 +152,9 @@ SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj )
SwContact* GetUserCall( const SdrObject* pObj )
{
SdrObject *pTmp;
- while ( !pObj->GetUserCall() && 0 != (pTmp = pObj->GetUpGroup()) )
+ while ( !pObj->GetUserCall() && nullptr != (pTmp = pObj->GetUpGroup()) )
pObj = pTmp;
- OSL_ENSURE( !pObj->GetUserCall() || 0 != dynamic_cast< const SwContact*> (pObj->GetUserCall()),
+ OSL_ENSURE( !pObj->GetUserCall() || nullptr != dynamic_cast< const SwContact*> (pObj->GetUserCall()),
"<::GetUserCall(..)> - wrong type of found object user call." );
return static_cast<SwContact*>(pObj->GetUserCall());
}
@@ -399,7 +399,7 @@ SwFlyDrawContact::~SwFlyDrawContact()
{
if ( mpMasterObj )
{
- mpMasterObj->SetUserCall( 0 );
+ mpMasterObj->SetUserCall( nullptr );
if ( mpMasterObj->GetPage() )
mpMasterObj->GetPage()->RemoveObject( mpMasterObj->GetOrdNum() );
delete mpMasterObj;
@@ -416,7 +416,7 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr
OSL_ENSURE( GetUserCall( _pSdrObj ) == this,
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
- const SwAnchoredObject* pRetAnchoredObj = 0L;
+ const SwAnchoredObject* pRetAnchoredObj = nullptr;
if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr )
{
@@ -435,7 +435,7 @@ SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( SdrObject* _pSdrObj )
OSL_ENSURE( GetUserCall( _pSdrObj ) == this,
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
- SwAnchoredObject* pRetAnchoredObj = 0L;
+ SwAnchoredObject* pRetAnchoredObj = nullptr;
if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr )
{
@@ -683,7 +683,7 @@ const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj
_pSdrObj == GetMaster(),
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
- const SwAnchoredObject* pRetAnchoredObj = 0L;
+ const SwAnchoredObject* pRetAnchoredObj = nullptr;
if ( _pSdrObj )
{
@@ -716,7 +716,7 @@ SwAnchoredObject* SwDrawContact::GetAnchoredObj( SdrObject* _pSdrObj )
OSL_ENSURE( GetUserCall( _pSdrObj ) == this || _pSdrObj == GetMaster(),
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
- SwAnchoredObject* pRetAnchoredObj = 0L;
+ SwAnchoredObject* pRetAnchoredObj = nullptr;
if ( _pSdrObj )
{
@@ -737,14 +737,14 @@ const SdrObject* SwDrawContact::GetMaster() const
{
return !mbMasterObjCleared
? maAnchoredDrawObj.GetDrawObj()
- : 0L;
+ : nullptr;
}
SdrObject* SwDrawContact::GetMaster()
{
return !mbMasterObjCleared
? maAnchoredDrawObj.DrawObj()
- : 0L;
+ : nullptr;
}
/**
@@ -768,7 +768,7 @@ void SwDrawContact::SetMaster( SdrObject* _pNewMaster )
const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const
{
- const SwFrm* pAnchorFrm = 0L;
+ const SwFrm* pAnchorFrm = nullptr;
if ( !_pDrawObj ||
_pDrawObj == GetMaster() ||
( !_pDrawObj->GetUserCall() &&
@@ -789,7 +789,7 @@ const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const
}
SwFrm* SwDrawContact::GetAnchorFrm( SdrObject* _pDrawObj )
{
- SwFrm* pAnchorFrm = 0L;
+ SwFrm* pAnchorFrm = nullptr;
if ( !_pDrawObj ||
_pDrawObj == GetMaster() ||
( !_pDrawObj->GetUserCall() &&
@@ -832,7 +832,7 @@ void SwDrawContact::DestroyVirtObj( SwDrawVirtObj* _pVirtObj )
if ( _pVirtObj )
{
delete _pVirtObj;
- _pVirtObj = 0;
+ _pVirtObj = nullptr;
}
}
@@ -842,7 +842,7 @@ void SwDrawContact::DestroyVirtObj( SwDrawVirtObj* _pVirtObj )
*/
SwDrawVirtObj* SwDrawContact::AddVirtObj()
{
- SwDrawVirtObj* pAddedDrawVirtObj = 0L;
+ SwDrawVirtObj* pAddedDrawVirtObj = nullptr;
// check, if a disconnected 'virtual' drawing object exist and use it
std::list<SwDrawVirtObj*>::const_iterator aFoundVirtObjIter =
@@ -917,7 +917,7 @@ bool SwDrawContact::VirtObjAnchoredAtFrmPred::operator() ( const SwDrawVirtObj*
/// get drawing object ('master' or 'virtual') by frame.
SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm )
{
- SdrObject* pRetDrawObj = 0L;
+ SdrObject* pRetDrawObj = nullptr;
// #i26791# - compare master frames instead of direct frames
const SwFrm* pProposedAnchorFrm = &_rAnchorFrm;
@@ -1111,7 +1111,7 @@ class NestedUserCallHdl
void DrawContactDeleted()
{
- mpDrawContact = 0;
+ mpDrawContact = nullptr;
}
bool IsNestedUserCall() const
@@ -1198,7 +1198,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
NotifyBackgrdOfAllVirtObjs( pOldBoundRect );
}
DisconnectFromLayout( false );
- SetMaster( NULL );
+ SetMaster( nullptr );
delete this;
// --> #i65784# Prevent memory corruption
aNestedUserCallHdl.DrawContactDeleted();
@@ -1423,7 +1423,7 @@ namespace
static const SwFormatAnchor* lcl_getAnchorFormat( const SfxPoolItem& _rItem )
{
sal_uInt16 nWhich = _rItem.Which();
- const SwFormatAnchor* pAnchorFormat = NULL;
+ const SwFormatAnchor* pAnchorFormat = nullptr;
if ( RES_ATTRSET_CHG == nWhich )
{
static_cast<const SwAttrSetChg&>(_rItem).GetChgSet()->
@@ -1443,7 +1443,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
"<SwDrawContact::Modify(..)> called during disconnection.");
sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
- const SwFormatAnchor* pNewAnchorFormat = pNew ? lcl_getAnchorFormat( *pNew ) : NULL;
+ const SwFormatAnchor* pNewAnchorFormat = pNew ? lcl_getAnchorFormat( *pNew ) : nullptr;
if ( pNewAnchorFormat )
{
@@ -1456,7 +1456,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
// determine old object rectangle of 'master' drawing object
// for notification
- const Rectangle* pOldRect = 0L;
+ const Rectangle* pOldRect = nullptr;
Rectangle aOldRect;
if ( GetAnchorFrm() )
{
@@ -1471,7 +1471,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), pOldRect );
NotifyBackgrdOfAllVirtObjs( pOldRect );
- const SwFormatAnchor* pOldAnchorFormat = pOld ? lcl_getAnchorFormat( *pOld ) : NULL;
+ const SwFormatAnchor* pOldAnchorFormat = pOld ? lcl_getAnchorFormat( *pOld ) : nullptr;
if ( !pOldAnchorFormat || ( pOldAnchorFormat->GetAnchorId() != pNewAnchorFormat->GetAnchorId() ) )
{
OSL_ENSURE( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" );
@@ -1506,8 +1506,8 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState(
RES_WRAP_INFLUENCE_ON_OBJPOS, false ) ) ) )
{
- lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
- NotifyBackgrdOfAllVirtObjs( 0L );
+ lcl_NotifyBackgroundOfObj( *this, *GetMaster(), nullptr );
+ NotifyBackgrdOfAllVirtObjs( nullptr );
_InvalidateObjs( true );
}
else if ( RES_UL_SPACE == nWhich || RES_LR_SPACE == nWhich ||
@@ -1526,15 +1526,15 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState(
RES_FOLLOW_TEXT_FLOW, false ) ) ) )
{
- lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
- NotifyBackgrdOfAllVirtObjs( 0L );
+ lcl_NotifyBackgroundOfObj( *this, *GetMaster(), nullptr );
+ NotifyBackgrdOfAllVirtObjs( nullptr );
_InvalidateObjs();
}
// #i35443#
else if ( RES_ATTRSET_CHG == nWhich )
{
- lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
- NotifyBackgrdOfAllVirtObjs( 0L );
+ lcl_NotifyBackgroundOfObj( *this, *GetMaster(), nullptr );
+ NotifyBackgrdOfAllVirtObjs( nullptr );
_InvalidateObjs();
}
else if ( RES_REMOVE_UNO_OBJECT == nWhich )
@@ -1550,7 +1550,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
// #i51474#
- GetAnchoredObj( 0L )->ResetLayoutProcessBools();
+ GetAnchoredObj( nullptr )->ResetLayoutProcessBools();
}
// #i26791#
@@ -1577,7 +1577,7 @@ void SwDrawContact::_InvalidateObjs( const bool _bUpdateSortedObjsList )
}
// invalidate position of 'master' drawing object
- SwAnchoredObject* pAnchoredObj = GetAnchoredObj( 0L );
+ SwAnchoredObject* pAnchoredObj = GetAnchoredObj( nullptr );
pAnchoredObj->InvalidateObjPos();
// #i28701#
if ( _bUpdateSortedObjsList )
@@ -1644,7 +1644,7 @@ void SwDrawContact::RemoveMasterFromDrawPage()
{
if ( GetMaster() )
{
- GetMaster()->SetUserCall( 0 );
+ GetMaster()->SetUserCall( nullptr );
if ( GetMaster()->IsInserted() )
{
static_cast<SwFrameFormat*>(GetRegisteredIn())->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0)->
@@ -1782,7 +1782,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
// anchor at first found frame the 'master' object and
// at the following frames 'virtual' drawing objects.
// Note: method is similar to <SwFlyFrameFormat::MakeFrms(..)>
- SwModify *pModify = 0;
+ SwModify *pModify = nullptr;
if( pAnch->GetContentAnchor() )
{
if ( pAnch->GetAnchorId() == FLY_AT_FLY )
@@ -1823,7 +1823,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
}
SwIterator<SwFrm,SwModify> aIter( *pModify );
- SwFrm* pAnchorFrmOfMaster = 0;
+ SwFrm* pAnchorFrmOfMaster = nullptr;
for( SwFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
// append drawing object, if
@@ -1958,7 +1958,7 @@ void SwDrawContact::ChangeMasterObject( SdrObject *pNewMaster )
// consider 'virtual' drawing objects
RemoveAllVirtObjs();
- GetMaster()->SetUserCall( 0 );
+ GetMaster()->SetUserCall( nullptr );
SetMaster( pNewMaster );
GetMaster()->SetUserCall( this );
@@ -2219,7 +2219,7 @@ void SwDrawVirtObj::AddToDrawingPage()
// insert 'virtual' drawing object into page, set layer and user call.
SdrPage* pDrawPg;
// #i27030# - apply order number of referenced object
- if ( 0 != ( pDrawPg = pOrgMasterSdrObj->GetPage() ) )
+ if ( nullptr != ( pDrawPg = pOrgMasterSdrObj->GetPage() ) )
{
// #i27030# - apply order number of referenced object
pDrawPg->InsertObject( this, GetReferencedObj().GetOrdNum() );
@@ -2242,7 +2242,7 @@ void SwDrawVirtObj::AddToDrawingPage()
void SwDrawVirtObj::RemoveFromDrawingPage()
{
- SetUserCall( 0 );
+ SetUserCall( nullptr );
if ( GetPage() )
{
GetPage()->RemoveObject( GetOrdNum() );
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 04c10c069b80..67ce43953a14 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -540,7 +540,7 @@ void SwVirtFlyDrawObj::SetSnapRect(const Rectangle& )
SetRect();
SetChanged();
BroadcastObjectChange();
- if (pUserCall!=NULL)
+ if (pUserCall!=nullptr)
pUserCall->Changed(*this, SDRUSERCALL_RESIZE, aTmp);
}
@@ -561,7 +561,7 @@ void SwVirtFlyDrawObj::SetLogicRect(const Rectangle& )
SetRect();
SetChanged();
BroadcastObjectChange();
- if (pUserCall!=NULL)
+ if (pUserCall!=nullptr)
pUserCall->Changed(*this, SDRUSERCALL_RESIZE, aTmp);
}
@@ -994,7 +994,7 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons
pFlyFrm->GetFormat()->GetIMapObject( rRec.aPos, pFlyFrm ))
return const_cast<SdrObject*>(static_cast<SdrObject const *>(this));
- return 0;
+ return nullptr;
}
}
}
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 1c83dd3d3a66..31d69f70ae07 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -51,15 +51,15 @@ using namespace ::com::sun::star::frame;
SwDPage::SwDPage(SwDrawModel& rNewModel, bool bMasterPage) :
FmFormPage(rNewModel, bMasterPage),
- pGridLst( 0 ),
+ pGridLst( nullptr ),
pDoc(&rNewModel.GetDoc())
{
}
SwDPage::SwDPage(const SwDPage& rSrcPage) :
FmFormPage( rSrcPage ),
- pGridLst( 0 ),
- pDoc( 0 )
+ pGridLst( nullptr ),
+ pDoc( nullptr )
{
if ( rSrcPage.pGridLst )
{
@@ -89,13 +89,13 @@ void SwDPage::lateInit(const SwDPage& rPage, SwDrawModel* const pNewModel)
SwDPage* SwDPage::Clone() const
{
- return Clone( 0 );
+ return Clone( nullptr );
}
SwDPage* SwDPage::Clone(SdrModel* const pNewModel) const
{
SwDPage* const pNewPage = new SwDPage( *this );
- SwDrawModel* pSwDrawModel = 0;
+ SwDrawModel* pSwDrawModel = nullptr;
if ( pNewModel )
{
pSwDrawModel = &dynamic_cast<SwDrawModel&>(*pNewModel);
@@ -110,7 +110,7 @@ SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, size_t nObjNum )
SdrObject *pOld = GetObj( nObjNum );
OSL_ENSURE( pOld, "Oups, Object not replaced" );
SdrObjUserCall* pContact;
- if ( 0 != ( pContact = GetUserCall(pOld) ) &&
+ if ( nullptr != ( pContact = GetUserCall(pOld) ) &&
RES_DRAWFRMFMT == static_cast<SwContact*>(pContact)->GetFormat()->Which())
static_cast<SwDrawContact*>(pContact)->ChangeMasterObject( pNewObj );
return FmFormPage::ReplaceObject( pNewObj, nObjNum );
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index f463541d5b3d..786d86f91d3a 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -82,7 +82,7 @@ SwDrawModel::SwDrawModel(SwDoc *const pDoc)
*pRangeArr; pRangeArr += 2 )
for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
nW < nEnd; ++nW )
- if( 0 != (pItem = rDocPool.GetPoolDefaultItem( nW )) &&
+ if( nullptr != (pItem = rDocPool.GetPoolDefaultItem( nW )) &&
0 != (nSlotId = rDocPool.GetSlotId( nW ) ) &&
nSlotId != nW &&
0 != (nEdtWhich = pSdrPool->GetWhich( nSlotId )) &&
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 251b591c2d42..cdfc35a61873 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -77,7 +77,7 @@ bool SwSdrHdl::IsFocusHdl() const
static const SwFrm *lcl_FindAnchor( const SdrObject *pObj, bool bAll )
{
const SwVirtFlyDrawObj *pVirt = dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr ?
- static_cast<const SwVirtFlyDrawObj*>(pObj) : 0;
+ static_cast<const SwVirtFlyDrawObj*>(pObj) : nullptr;
if ( pVirt )
{
if ( bAll || !pVirt->GetFlyFrm()->IsFlyInCntFrm() )
@@ -89,7 +89,7 @@ static const SwFrm *lcl_FindAnchor( const SdrObject *pObj, bool bAll )
if ( pCont )
return pCont->GetAnchorFrm( pObj );
}
- return 0;
+ return nullptr;
}
SwDrawView::SwDrawView( SwViewShellImp &rI, SdrModel *pMd, OutputDevice *pOutDev) :
@@ -175,7 +175,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt
if(aInnerBound.isInside(basegfx::B2DPoint(rPnt.X(), rPnt.Y())))
{
// exclude this hit
- pRetval = 0;
+ pRetval = nullptr;
}
}
}
@@ -221,7 +221,7 @@ void SwDrawView::AddCustomHdl()
return;
const SwFrm* pAnch;
- if(0 == (pAnch = CalcAnchor()))
+ if(nullptr == (pAnch = CalcAnchor()))
return;
Point aPos(aAnchorPoint);
@@ -284,7 +284,7 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
}
}
}
- return 0;
+ return nullptr;
}
SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
@@ -299,11 +299,11 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
if ( pFly )
{
SdrObject *pRet = const_cast<SdrObject*>(static_cast<SdrObject const *>(pFly->GetVirtDrawObj()));
- return pRet != pObj ? pRet : 0;
+ return pRet != pObj ? pRet : nullptr;
}
}
}
- return 0;
+ return nullptr;
}
/// determine maximal order number for a 'child' object of given 'parent' object
@@ -537,7 +537,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
{
size_t nTmpNewPos( nNewPos );
const SwFrameFormat* pParentFrameFormat =
- pParentAnchoredObj ? &(pParentAnchoredObj->GetFrameFormat()) : 0L;
+ pParentAnchoredObj ? &(pParentAnchoredObj->GetFrameFormat()) : nullptr;
const SdrObject* pTmpObj = pDrawPage->GetObj( nNewPos + 1 );
while ( pTmpObj )
{
@@ -547,7 +547,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
// section), no anchor frame exists.
const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, true );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
- ? pTmpAnchorFrm->FindFlyFrm() : 0L;
+ ? pTmpAnchorFrm->FindFlyFrm() : nullptr;
if ( pTmpParentObj &&
&(pTmpParentObj->GetFrameFormat()) != pParentFrameFormat )
{
@@ -600,7 +600,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
// section), no anchor frame exists.
const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, true );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
- ? pTmpAnchorFrm->FindFlyFrm() : 0L;
+ ? pTmpAnchorFrm->FindFlyFrm() : nullptr;
if ( pTmpParentObj &&
( ( pTmpParentObj == pFlyFrm ) ||
( pFlyFrm->IsUpperOf( *pTmpParentObj ) ) ) )
@@ -668,7 +668,7 @@ const SwFrm* SwDrawView::CalcAnchor()
{
const SdrMarkList &rMrkList = GetMarkedObjectList();
if ( rMrkList.GetMarkCount() != 1 )
- return NULL;
+ return nullptr;
SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -707,7 +707,7 @@ const SwFrm* SwDrawView::CalcAnchor()
if ( IsAction() )
{
if ( !TakeDragObjAnchorPos( aPt, bTopRight ) )
- return NULL;
+ return nullptr;
}
else
{
@@ -739,7 +739,7 @@ const SwFrm* SwDrawView::CalcAnchor()
if( pAnch && !pAnch->IsProtected() )
aAnchorPoint = pAnch->GetFrmAnchorPos( ::HasWrap( pObj ) );
else
- pAnch = 0;
+ pAnch = nullptr;
return pAnch;
}
@@ -818,7 +818,7 @@ void SwDrawView::CheckPossibilities()
for ( size_t i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- const SwFrm *pFrm = NULL;
+ const SwFrm *pFrm = nullptr;
if ( dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr )
{
const SwFlyFrm *pFly = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
@@ -925,7 +925,7 @@ void SwDrawView::DeleteMarked()
SwRootFrm *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
if ( pTmpRoot )
pTmpRoot->StartAllAction();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
// replace marked <SwDrawVirtObj>-objects by its reference objects.
{
SdrPageView* pDrawPageView = rImp.GetPageView();
@@ -960,7 +960,7 @@ void SwDrawView::DeleteMarked()
for (std::vector<SwFrameFormat*>::iterator i = aTextBoxesToDelete.begin(); i != aTextBoxesToDelete.end(); ++i)
pDoc->getIDocumentLayoutAccess().DelLayoutFormat(*i);
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
if( pTmpRoot )
pTmpRoot->EndAllAction();
}
@@ -970,7 +970,7 @@ SdrUndoManager* SwDrawView::getSdrUndoManagerForEnhancedTextEdit() const
{
SwDoc* pDoc = Imp().GetShell()->GetDoc();
- return pDoc ? dynamic_cast< SdrUndoManager* >(&(pDoc->GetUndoManager())) : 0;
+ return pDoc ? dynamic_cast< SdrUndoManager* >(&(pDoc->GetUndoManager())) : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index f0e5e3d33d84..1c1de66998cd 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -83,7 +83,7 @@ void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, SwPaM* pPrev )
SwAutoCorrDoc::SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam,
sal_Unicode cIns )
- : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( 0 )
+ : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( nullptr )
, m_nEndUndoCounter(0)
, bUndoIdInitialized( cIns == 0 )
{
@@ -274,7 +274,7 @@ bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString&
*/
OUString const* SwAutoCorrDoc::GetPrevPara(bool const bAtNormalPos)
{
- OUString const* pStr(0);
+ OUString const* pStr(nullptr);
if( bAtNormalPos || !pIdx )
pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 );
@@ -366,7 +366,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos,
const SwTableNode* pTableNd = pContentNd->FindTableNode();
if( pTableNd )
{
- aCpyPam.GetPoint()->nContent.Assign( 0, 0 );
+ aCpyPam.GetPoint()->nContent.Assign( nullptr, 0 );
aCpyPam.GetPoint()->nNode = *pTableNd;
}
aCpyPam.SetMark();
@@ -471,7 +471,7 @@ void SwDontExpandItem::SaveDontExpandItems( const SwPosition& rPos )
const sal_Int32 n = rPos.nContent.GetIndex();
if( !pTextNd->GetAttr( *pDontExpItems, n, n,
n != pTextNd->GetText().getLength() ))
- delete pDontExpItems, pDontExpItems = 0;
+ delete pDontExpItems, pDontExpItems = nullptr;
}
}
@@ -497,7 +497,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
break;
const sal_Int32* pAttrEnd;
- if( 0 != ( pAttrEnd = pHt->End() ) &&
+ if( nullptr != ( pAttrEnd = pHt->End() ) &&
( ( nAttrStart < nStart &&
( pHt->DontExpand() ? nStart < *pAttrEnd
: nStart <= *pAttrEnd )) ||
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 394e20fbed4a..9577162a976a 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -166,7 +166,7 @@ class SwAutoFormat
bool IsNoAlphaLine( const SwTextNode&) const;
bool IsEnumericChar( const SwTextNode&) const;
static bool IsBlanksInString( const SwTextNode&);
- sal_uInt16 CalcLevel( const SwTextNode&, sal_uInt16 *pDigitLvl = 0 ) const;
+ sal_uInt16 CalcLevel( const SwTextNode&, sal_uInt16 *pDigitLvl = nullptr ) const;
sal_Int32 GetBigIndent( sal_Int32& rAktSpacePos ) const;
static OUString DelLeadingBlanks(const OUString& rStr);
@@ -176,8 +176,8 @@ class SwAutoFormat
bool IsFirstCharCapital( const SwTextNode& rNd ) const;
sal_uInt16 GetDigitLevel( const SwTextNode& rTextNd, sal_Int32& rPos,
- OUString* pPrefix = 0, OUString* pPostfix = 0,
- OUString* pNumTypes = 0 ) const;
+ OUString* pPrefix = nullptr, OUString* pPostfix = nullptr,
+ OUString* pNumTypes = nullptr ) const;
/// get the FORMATTED TextFrame
SwTextFrm* GetFrm( const SwTextNode& rTextNd ) const;
@@ -224,18 +224,18 @@ class SwAutoFormat
bool SetRedlineText( sal_uInt16 nId )
{ if( m_aFlags.bWithRedlining ) _SetRedlineText( nId ); return true; }
bool ClearRedlineText()
- { if( m_aFlags.bWithRedlining ) m_pDoc->GetDocumentRedlineManager().SetAutoFormatRedlineComment(0); return true; }
+ { if( m_aFlags.bWithRedlining ) m_pDoc->GetDocumentRedlineManager().SetAutoFormatRedlineComment(nullptr); return true; }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags,
- SwNodeIndex* pSttNd = 0, SwNodeIndex* pEndNd = 0 );
+ SwNodeIndex* pSttNd = nullptr, SwNodeIndex* pEndNd = nullptr );
};
const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
{
while( *pSrc && *pSrc != c )
++pSrc;
- return *pSrc ? pSrc : 0;
+ return *pSrc ? pSrc : nullptr;
}
SwTextFrm* SwAutoFormat::GetFrm( const SwTextNode& rTextNd ) const
@@ -292,7 +292,7 @@ void SwAutoFormat::_SetRedlineText( sal_uInt16 nActionId )
OUString SwAutoFormat::GoNextPara()
{
- SwNode* pNewNd = 0;
+ SwNode* pNewNd = nullptr;
do {
// has to be checked twice before and after incrementation
if( m_aNdIdx.GetIndex() >= m_aEndNdIdx.GetIndex() )
@@ -361,7 +361,7 @@ bool SwAutoFormat::HasObjects( const SwNode& rNd )
const SwTextNode* SwAutoFormat::GetNextNode() const
{
if( m_aNdIdx.GetIndex()+1 >= m_aEndNdIdx.GetIndex() )
- return 0;
+ return nullptr;
return m_pDoc->GetNodes()[ m_aNdIdx.GetIndex() + 1 ]->GetTextNode();
}
@@ -468,7 +468,7 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTextNode& rNd, sal_uInt16 *pDigitLvl
sal_Int32 SwAutoFormat::GetBigIndent( sal_Int32& rAktSpacePos ) const
{
SwTextFrmInfo aFInfo( GetFrm( *m_pCurTextNd ) );
- const SwTextFrm* pNxtFrm = 0;
+ const SwTextFrm* pNxtFrm = nullptr;
if( !m_bMoreLines )
{
@@ -656,7 +656,7 @@ bool SwAutoFormat::DoTable()
m_aDelPam.Move( fnMoveForward );
m_pDoc->InsertTable( SwInsertTableOptions( tabopts::ALL_TBL_INS_ATTR , 1 ),
*m_aDelPam.GetPoint(), 1, nColCnt, eHori,
- 0, &aPosArr );
+ nullptr, &aPosArr );
m_aDelPam.GetPoint()->nNode = aIdx;
}
return 1 < aPosArr.size();
@@ -1385,8 +1385,8 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
// #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
- const SwNumRule* pCur = 0;
- if( m_aFlags.bSetNumRule && 0 != (pCur = m_pCurTextNd->GetNumRule()) )
+ const SwNumRule* pCur = nullptr;
+ if( m_aFlags.bSetNumRule && nullptr != (pCur = m_pCurTextNd->GetNumRule()) )
aRule = *pCur;
// replace bullet character with defined one
@@ -1395,7 +1395,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
const sal_Unicode* pFndBulletChr;
if( m_aFlags.bChgEnumNum &&
2 < rStr.getLength() &&
- 0 != ( pFndBulletChr = StrChr( pBulletChar, rStr[ nTextStt ] ))
+ nullptr != ( pFndBulletChr = StrChr( pBulletChar, rStr[ nTextStt ] ))
&& IsSpace( rStr[ nTextStt + 1 ] ) )
{
if( m_aFlags.bAFormatByInput )
@@ -1410,7 +1410,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
int nBulletPos = pFndBulletChr - pBulletChar;
sal_Unicode cBullChar;
- const vcl::Font* pBullFnt( 0 );
+ const vcl::Font* pBullFnt( nullptr );
if( nBulletPos < cnPosEnDash )
{
cBullChar = m_aFlags.cBullet;
@@ -1807,7 +1807,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
SwAutoCorrDoc aACorrDoc( *m_pEditShell, m_aDelPam );
- SwTextFrmInfo aFInfo( 0 );
+ SwTextFrmInfo aFInfo( nullptr );
sal_Int32 nSttPos, nLastBlank = nPos;
bool bFirst = m_aFlags.bCapitalStartSentence, bFirstSent = bFirst;
@@ -1853,7 +1853,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
pText = &m_pCurTextNd->GetText();
m_aDelPam.SetMark();
- aFInfo.SetFrm( 0 );
+ aFInfo.SetFrm( nullptr );
}
nPos += sReplace.getLength() - 1;
@@ -1905,7 +1905,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
pText = &m_pCurTextNd->GetText();
m_aDelPam.SetMark();
m_aDelPam.DeleteMark();
- aFInfo.SetFrm( 0 );
+ aFInfo.SetFrm( nullptr );
}
nPos += sReplace.getLength() - 1;
@@ -1946,7 +1946,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
pText = &m_pCurTextNd->GetText();
m_aDelPam.SetMark();
m_aDelPam.DeleteMark();
- aFInfo.SetFrm( 0 );
+ aFInfo.SetFrm( nullptr );
}
//#125102# in case of the mode REDLINE_SHOW_DELETE the ** are still contained in pText
if(0 == (m_pDoc->getIDocumentRedlineAccess().GetRedlineMode() & nsRedlineMode_t::REDLINE_SHOW_DELETE))
@@ -2001,7 +2001,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
m_aDelPam.GetPoint()->nContent = nPos;
SetRedlineText( STR_AUTOFMTREDL_USE_REPLACE );
if( m_aFlags.bAutoCorrect &&
- aACorrDoc.ChgAutoCorrWord( nSttPos, nPos, *pATst, 0 ) )
+ aACorrDoc.ChgAutoCorrWord( nSttPos, nPos, *pATst, nullptr ) )
{
nPos = m_aDelPam.GetPoint()->nContent.GetIndex();
@@ -2078,7 +2078,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags,
m_aEndNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfContent() ),
m_pEditShell( pEdShell ),
m_pDoc( pEdShell->GetDoc() ),
- m_pCurTextNd( 0 ), m_pCurTextFrm( 0 ),
+ m_pCurTextNd( nullptr ), m_pCurTextFrm( nullptr ),
m_nRedlAutoFormatSeqId( 0 )
{
OSL_ENSURE( (pSttNd && pEndNd) || (!pSttNd && !pEndNd),
@@ -2089,7 +2089,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags,
bool bReplaceStyles = !m_aFlags.bAFormatByInput || m_aFlags.bReplaceStyles;
- const SwTextNode* pNxtNd = 0;
+ const SwTextNode* pNxtNd = nullptr;
bool bNxtEmpty = false;
bool bNxtAlpha = false;
sal_uInt16 nNxtLevel = 0;
@@ -2143,7 +2143,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags,
sal_uInt16 nDigitLvl = 0;
// set defaults
- SwTextFrmInfo aFInfo( 0 );
+ SwTextFrmInfo aFInfo( nullptr );
// This is the automat for autoformatting
m_eStat = READ_NEXT_PARA;
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index f0312a8f26ba..59a22b133605 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -38,7 +38,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
bool bUndoGroup = pCrsr->GetNext() != pCrsr;
if( bUndoGroup )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, nullptr);
}
for(SwPaM& rCurCrsr : pCrsr->GetRingContainer())
@@ -46,7 +46,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
if( bUndoGroup )
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_RESETATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_RESETATTR, nullptr);
}
CallChgLnk();
EndAllAction();
@@ -74,7 +74,7 @@ void SwEditShell::GCAttr()
if( pNd->IsTextNode() )
static_cast<SwTextNode*>(pNd)->GCAttr();
}
- while( 0 != ( pNd = GetDoc()->GetNodes().GoNext( &aIdx )) &&
+ while( nullptr != ( pNd = GetDoc()->GetNodes().GoNext( &aIdx )) &&
aIdx <= rEnd );
}
}
@@ -103,7 +103,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
if( pCrsr->GetNext() != pCrsr ) // Ring of Cursors
{
bool bIsTableMode = IsTableMode();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
@@ -114,7 +114,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
}
else
{
@@ -134,7 +134,7 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM*
if( pCrsr->GetNext() != pCrsr ) // Ring of Cursors
{
bool bIsTableMode = IsTableMode();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer())
{
@@ -145,7 +145,7 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM*
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
}
else
{
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 8b624ffba171..88de80c275a4 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -150,7 +150,7 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet,
break;
default:
- pNd = 0;
+ pNd = nullptr;
}
if( pNd )
@@ -263,7 +263,7 @@ SwTextFormatColl* SwEditShell::GetPaMTextFormatColl( SwPaM* pPaM ) const
// if the maximum number of node that can be inspected has been reached
if (numberOfLookup >= getMaxLookup())
- return NULL;
+ return nullptr;
if( pNd->IsTextNode() )
{
@@ -271,14 +271,14 @@ SwTextFormatColl* SwEditShell::GetPaMTextFormatColl( SwPaM* pPaM ) const
SwTextFormatColl* pFormat = pNd->GetTextNode()->GetTextColl();
// if the paragraph format exist stop here and return it
- if( pFormat != NULL )
+ if( pFormat != nullptr )
return pFormat;
}
}
}
// if none of the selected node contain a named paragraph format
- return NULL;
+ return nullptr;
}
std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell::GetItemWithPaM( sal_uInt16 nWhich )
@@ -293,8 +293,8 @@ std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell
sal_Int32 nSttCnt = rCurrentPaM.Start()->nContent.GetIndex();
sal_Int32 nEndCnt = rCurrentPaM.End()->nContent.GetIndex();
- SwPaM* pNewPaM = 0;
- const SfxPoolItem* pItem = 0;
+ SwPaM* pNewPaM = nullptr;
+ const SfxPoolItem* pItem = nullptr;
// for all the nodes in the current selection
for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
@@ -398,7 +398,7 @@ bool SwEditShell::GetCurFootnote( SwFormatFootnote* pFillFootnote )
pFillFootnote->SetNumber( rFootnote );
pFillFootnote->SetEndNote( rFootnote.IsEndNote() );
}
- return 0 != pFootnote;
+ return nullptr != pFootnote;
}
bool SwEditShell::SetCurFootnote( const SwFormatFootnote& rFillFootnote )
@@ -490,7 +490,7 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const
SwContentNode* pCNd;
for( sal_uLong n = nSttNd; bRet && n <= nEndNd; ++n )
- if( 0 != ( pCNd = GetDoc()->GetNodes()[ n ]->GetTextNode() ))
+ if( nullptr != ( pCNd = GetDoc()->GetNodes()[ n ]->GetTextNode() ))
{
const SvxLRSpaceItem& rLS = static_cast<const SvxLRSpaceItem&>(
pCNd->GetAttr( RES_LR_SPACE ));
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index e0d4eadcfb07..b41d1b410989 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -53,7 +53,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
// group the Undo in the table
if( pUndo && !*pUndo )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
*pUndo = true;
}
SwPaM aDelPam( *rPam.Start() );
@@ -65,7 +65,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
if( pEndSelPos->nNode.GetIndex() <= rEndNd.GetIndex() )
{
*aDelPam.GetPoint() = *pEndSelPos;
- pEndSelPos = 0; // misuse a pointer as a flag
+ pEndSelPos = nullptr; // misuse a pointer as a flag
}
else
{
@@ -136,7 +136,7 @@ long SwEditShell::Delete()
// If undo container then close here
if( bUndo )
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
EndAllAction();
nRet = 1;
@@ -156,7 +156,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
// Fill list of insert positions
{
- SwPosition * pPos = 0;
+ SwPosition * pPos = nullptr;
std::shared_ptr<SwPosition> pInsertPos;
sal_uInt16 nMove = 0;
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
@@ -178,8 +178,8 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
// by simulated cursor movements from the given first insert position
if( nMove )
{
- SwCursor aCrsr( *pPos, 0, false);
- if( aCrsr.UpDown( false, nMove, 0, 0 ) )
+ SwCursor aCrsr( *pPos, nullptr, false);
+ if( aCrsr.UpDown( false, nMove, nullptr, 0 ) )
{
pInsertPos.reset( new SwPosition( *aCrsr.GetPoint() ) );
aInsertList.push_back( pInsertPos );
@@ -198,7 +198,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
}
pDestShell->StartAllAction();
- SwPosition *pPos = 0;
+ SwPosition *pPos = nullptr;
bool bRet = false;
bool bFirstMove = true;
SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
@@ -206,7 +206,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
// For block selection this list is filled with the insert positions
std::list< std::shared_ptr<SwPosition> >::iterator pNextInsert = aInsertList.begin();
- pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
if( !pPos )
@@ -285,7 +285,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
#endif
// close Undo container here
- pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
pDestShell->EndAllAction();
pDestShell->SaveTableBoxContent( pDestShell->GetCrsr()->GetPoint() );
@@ -308,7 +308,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
if( !HasReadonlySel() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
@@ -321,7 +321,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
}
// close Undo container here
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
EndAllAction();
}
return bRet;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index b263122a5127..db47d26fc823 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -85,9 +85,9 @@ SwTextFormatColl* SwEditShell::MakeTextFormatColl(const OUString& rFormatCollNam
SwTextFormatColl* pParent)
{
SwTextFormatColl *pColl;
- if ( pParent == 0 )
+ if ( pParent == nullptr )
pParent = &GetTextFormatColl(0);
- if ( (pColl=GetDoc()->MakeTextFormatColl(rFormatCollName, pParent)) == 0 )
+ if ( (pColl=GetDoc()->MakeTextFormatColl(rFormatCollName, pParent)) == nullptr )
{
OSL_FAIL( "MakeTextFormatColl failed" );
}
@@ -113,11 +113,11 @@ void SwEditShell::FillByEx(SwTextFormatColl* pColl, bool bReset)
// Do NOT copy AutoNumRules into the template
const SfxPoolItem* pItem;
- const SwNumRule* pRule = 0;
+ const SwNumRule* pRule = nullptr;
if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false ) ||
SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC,false ) ||
( SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ false, &pItem ) && nullptr != (pRule = GetDoc()->FindNumRulePtr(
static_cast<const SwNumRuleItem*>(pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() )
)
@@ -127,7 +127,7 @@ void SwEditShell::FillByEx(SwTextFormatColl* pColl, bool bReset)
aSet.ClearItem( RES_PAGEDESC );
if( pRule || (SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ false, &pItem ) && nullptr != (pRule = GetDoc()->FindNumRulePtr(
static_cast<const SwNumRuleItem*>(pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() ))
aSet.ClearItem( RES_PARATR_NUMRULE );
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index a8e1543366ae..a4a67ccf7bf2 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -108,7 +108,7 @@ SwFieldType* SwEditShell::GetFieldType(size_t nField, sal_uInt16 nResId, bool bU
}
}
}
- return 0;
+ return nullptr;
}
/// get first type with given ResId and name
@@ -211,15 +211,15 @@ void SwEditShell::Insert2(SwField& rField, const bool bForceExpandHints)
static SwTextField* lcl_FindInputField( SwDoc* pDoc, SwField& rField )
{
// Search field via its address. For input fields this needs to be done in protected fields.
- SwTextField* pTField = 0;
+ SwTextField* pTField = nullptr;
if( RES_INPUTFLD == rField.Which() )
{
const sal_uInt32 nMaxItems =
pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INPUTFIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- const SfxPoolItem* pItem = NULL;
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n ) )
+ const SfxPoolItem* pItem = nullptr;
+ if( nullptr != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n ) )
&& static_cast<const SwFormatField*>(pItem)->GetField() == &rField )
{
pTField = const_cast<SwFormatField*>(static_cast<const SwFormatField*>(pItem))->GetTextField();
@@ -234,8 +234,8 @@ static SwTextField* lcl_FindInputField( SwDoc* pDoc, SwField& rField )
pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- const SfxPoolItem* pItem = NULL;
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
+ const SfxPoolItem* pItem = nullptr;
+ if( nullptr != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
&& static_cast<const SwFormatField*>(pItem)->GetField() == &rField )
{
pTField = const_cast<SwFormatField*>(static_cast<const SwFormatField*>(pItem))->GetTextField();
@@ -252,7 +252,7 @@ void SwEditShell::UpdateFields( SwField &rField )
StartAllAction();
{
// If there are no selections so take the value of the current cursor position.
- SwMsgPoolItem* pMsgHint = 0;
+ SwMsgPoolItem* pMsgHint = nullptr;
SwRefMarkFieldUpdate aRefMkHt( GetOut() );
sal_uInt16 nFieldWhich = rField.GetTyp()->Which();
if( RES_GETREFFLD == nFieldWhich )
@@ -269,7 +269,7 @@ void SwEditShell::UpdateFields( SwField &rField )
if (!pTextField) // #i30221#
pTextField = lcl_FindInputField( GetDoc(), rField);
- if (pTextField != 0)
+ if (pTextField != nullptr)
GetDoc()->getIDocumentFieldsAccess().UpdateField(pTextField, rField, pMsgHint, true);
}
@@ -309,7 +309,7 @@ void SwEditShell::UpdateFields( SwField &rField )
if( aPam.Start()->nContent != pCurStt->nContent )
bOkay = false;
- if( 0 != (pTextField = GetTextFieldAtPos( pCurStt, true )) )
+ if( nullptr != (pTextField = GetTextFieldAtPos( pCurStt, true )) )
{
pFormatField = const_cast<SwFormatField*>(&pTextField->GetFormatField());
SwField *pCurField = pFormatField->GetField();
@@ -368,7 +368,7 @@ void SwEditShell::UpdateExpFields(bool bCloseDB)
{
SET_CURR_SHELL( this );
StartAllAction();
- GetDoc()->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ GetDoc()->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
if (bCloseDB)
{
#if HAVE_FEATURE_DBCONNECTIVITY
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index a8502effbda2..81e9ba762ee3 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -41,7 +41,7 @@ SwCharFormat& SwEditShell::GetCharFormat(sal_uInt16 nFormat) const
SwCharFormat* SwEditShell::GetCurCharFormat() const
{
- SwCharFormat *pFormat = 0;
+ SwCharFormat *pFormat = nullptr;
SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_TXTATR_CHARFMT,
RES_TXTATR_CHARFMT );
const SfxPoolItem* pItem;
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 58c1b0d82b1a..9017f73e0213 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -157,7 +157,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
else
{
bEndUndo = true;
- pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
--rPos.nNode;
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
pCrsr->SetMark();
@@ -167,7 +167,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
if( bEndUndo )
{
- pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
EndAllAction();
@@ -199,7 +199,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
else
{
bEndUndo = true;
- pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
--rPos.nNode;
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
}
@@ -208,7 +208,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
if( bEndUndo )
{
- pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
EndAllAction();
@@ -229,7 +229,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos() - 1;
- rPos.nContent.Assign( 0, 0 );
+ rPos.nContent.Assign( nullptr, 0 );
SwDoc* pMyDoc = GetDoc();
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
@@ -260,7 +260,7 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
{
// we need at least one node!
rPos.nNode = nDelIdx - 1;
- rPos.nContent.Assign( 0, 0 );
+ rPos.nContent.Assign( nullptr, 0 );
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
++nDelIdx;
@@ -368,7 +368,7 @@ bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
SwGlblDocContent::SwGlblDocContent( sal_uLong nPos )
{
eType = GLBLDOC_UNKNOWN;
- PTR.pTOX = 0;
+ PTR.pTOX = nullptr;
nDocPos = nPos;
}
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 97b26356d61c..c5a2b4284903 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -182,7 +182,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
SwTableNode* pTableNd;
SwSelBoxes aBoxes;
GetTableSel( *this, aBoxes );
- if( !aBoxes.empty() && 0 != (pTableNd = const_cast<SwTableNode*>(aBoxes[0]
+ if( !aBoxes.empty() && nullptr != (pTableNd = const_cast<SwTableNode*>(aBoxes[0]
->GetSttNd()->FindTableNode()) ))
{
// check if the table name can be copied
@@ -198,7 +198,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
break;
}
}
- bRet = pInsDoc->InsCopyOfTable( aPos, aBoxes, 0, bCpyTableNm );
+ bRet = pInsDoc->InsCopyOfTable( aPos, aBoxes, nullptr, bCpyTableNm );
}
else
bRet = false;
@@ -215,7 +215,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
if( !rPaM.HasMark() )
{
SwContentNode *const pNd = rPaM.GetContentNode();
- if (0 != pNd &&
+ if (nullptr != pNd &&
( bColSel || !pNd->GetTextNode() ) )
{
rPaM.SetMark();
@@ -248,7 +248,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
pInsDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pInsDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
// set the saved Node position back to the correct Node
if( bRet && pSttNd )
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 203235e3319d..ce7921cfc5ea 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -178,7 +178,7 @@ void SwEditShell::Overwrite(const OUString &rStr)
long SwEditShell::SplitNode( bool bAutoFormat, bool bCheckTableStart )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
@@ -187,7 +187,7 @@ long SwEditShell::SplitNode( bool bAutoFormat, bool bCheckTableStart )
GetDoc()->getIDocumentContentOperations().SplitNode( *rPaM.GetPoint(), bCheckTableStart );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
if( bAutoFormat )
AutoFormatBySplitNode();
@@ -202,7 +202,7 @@ bool SwEditShell::AppendTextNode()
{
bool bRet = false;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
@@ -210,7 +210,7 @@ bool SwEditShell::AppendTextNode()
bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( *rPaM.GetPoint()) || bRet;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
ClearTableBoxContent();
@@ -221,7 +221,7 @@ bool SwEditShell::AppendTextNode()
// the returned SwGrfNode pointer is used in GetGraphic() and GetGraphicSize()
SwGrfNode * SwEditShell::_GetGrfNode() const
{
- SwGrfNode *pGrfNode = 0;
+ SwGrfNode *pGrfNode = nullptr;
SwPaM* pCrsr = GetCrsr();
if( !pCrsr->HasMark() ||
pCrsr->GetPoint()->nNode == pCrsr->GetMark()->nNode )
@@ -235,7 +235,7 @@ SwGrfNode * SwEditShell::_GetGrfNode() const
const Graphic* SwEditShell::GetGraphic( bool bWait ) const
{
SwGrfNode* pGrfNode = _GetGrfNode();
- const Graphic* pGrf( 0L );
+ const Graphic* pGrf( nullptr );
if ( pGrfNode )
{
pGrf = &(pGrfNode->GetGrf(bWait && GRAPHIC_DEFAULT == pGrfNode->GetGrf().GetType()));
@@ -256,7 +256,7 @@ bool SwEditShell::IsGrfSwapOut( bool bOnlyLinked ) const
const GraphicObject* SwEditShell::GetGraphicObj() const
{
SwGrfNode* pGrfNode = _GetGrfNode();
- return pGrfNode ? &(pGrfNode->GetGrfObj()) : 0L;
+ return pGrfNode ? &(pGrfNode->GetGrfObj()) : nullptr;
}
sal_uInt16 SwEditShell::GetGraphicType() const
@@ -273,7 +273,7 @@ bool SwEditShell::GetGrfSize(Size& rSz) const
SwPaM* pCurrentCrsr = GetCrsr();
if( ( !pCurrentCrsr->HasMark()
|| pCurrentCrsr->GetPoint()->nNode == pCurrentCrsr->GetMark()->nNode )
- && 0 != ( pNoTextNd = pCurrentCrsr->GetNode().GetNoTextNode() ) )
+ && nullptr != ( pNoTextNd = pCurrentCrsr->GetNode().GetNoTextNode() ) )
{
rSz = pNoTextNd->GetTwipSize();
return true;
@@ -332,7 +332,7 @@ void SwEditShell::ClearAutomaticContour()
if( pNd->HasAutomaticContour() )
{
StartAllAction();
- pNd->SetContour( NULL );
+ pNd->SetContour( nullptr );
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper());
const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround();
pFly->GetFormat()->NotifyClients( &rSur, &rSur );
@@ -365,7 +365,7 @@ bool SwEditShell::HasOLEObj( const OUString &rName ) const
{
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while ( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwNode& rNd = aIdx.GetNode();
@@ -609,7 +609,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString&
if( rFormat.GetValue().isEmpty() || ( rStr.isEmpty() && !HasSelection() ) )
return false;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_UI_INSERT_URLTXT, nullptr);
bool bInsText = true;
if( !rStr.isEmpty() )
@@ -652,7 +652,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString&
ClearMark();
if( bInsText )
DontExpandFormat();
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_UI_INSERT_URLTXT, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_UI_INSERT_URLTXT, nullptr );
EndAllAction();
return true;
}
@@ -668,7 +668,7 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
SwIterator<SwTextINetFormat,SwCharFormat> aIter(*(*pFormats)[--n]);
for( SwTextINetFormat* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
{
- if( 0 != ( pTextNd = pFnd->GetpTextNode()) &&
+ if( nullptr != ( pTextNd = pFnd->GetpTextNode()) &&
pTextNd->GetNodes().IsDocNodes() )
{
SwTextINetFormat& rAttr = *pFnd;
@@ -748,7 +748,7 @@ void SwEditShell::SetNumberingRestart()
switch( pNd->GetNodeType() )
{
case ND_TEXTNODE:
- if( 0 != ( pCntFrm = static_cast<SwTextNode*>(pNd)->getLayoutFrm( GetLayout() )) )
+ if( nullptr != ( pCntFrm = static_cast<SwTextNode*>(pNd)->getLayoutFrm( GetLayout() )) )
{
// skip hidden frames - ignore protection!
if( !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() )
@@ -817,7 +817,7 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos )
SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode;
SwNodeIndex aStart( rPtIdx );
SwContentNode* pCNd;
- SwContentFrm *pCntFrm = 0;
+ SwContentFrm *pCntFrm = nullptr;
sal_uLong nTmpPos;
if( !bActPos )
@@ -827,8 +827,8 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos )
aStart = nTmpPos + 1;
else
{
- if( 0 != ( pCNd = pPam->GetContentNode() ) &&
- 0 != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) )
+ if( nullptr != ( pCNd = pPam->GetContentNode() ) &&
+ nullptr != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) )
{
const SwStartNode *pTmp;
if( pCntFrm->IsInFly() ) // Fly
@@ -853,10 +853,10 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos )
OSL_ENSURE( pCNd && pCntFrm, "Missing Layout-Information" );
}
- while( 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection(
+ while( nullptr != ( pCNd = GetDoc()->GetNodes().GoNextSection(
&aStart, true, false )) && ( !bActPos || aStart <= rPtIdx ) )
{
- if( 0 != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) && pCntFrm->IsTextFrm() )
+ if( nullptr != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) && pCntFrm->IsTextFrm() )
{
const sal_Int32 nActPos = bActPos && aStart == rPtIdx ?
pPam->GetPoint()->nContent.GetIndex() : COMPLETE_STRING;
@@ -1021,13 +1021,13 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
if( rPaM.HasMark() )
GetDoc()->getIDocumentContentOperations().TransliterateText( rPaM, aTrans );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
}
else
GetDoc()->getIDocumentContentOperations().TransliterateText( *pCrsr, aTrans );
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index e7dfcf26b1ce..8e30a1129487 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -173,9 +173,9 @@ public:
void ShowSelection();
};
-static SwSpellIter* pSpellIter = 0;
-static SwConvIter* pConvIter = 0;
-static SwHyphIter* pHyphIter = 0;
+static SwSpellIter* pSpellIter = nullptr;
+static SwConvIter* pConvIter = nullptr;
+static SwHyphIter* pHyphIter = nullptr;
// With that we save a GetFrm() in Hyphenate.
// Caution: There are external declaration to these pointers in txtedt.cxx!
@@ -183,11 +183,11 @@ const SwTextNode *pLinguNode;
SwTextFrm *pLinguFrm;
SwLinguIter::SwLinguIter()
- : pSh(0)
- , pStart(0)
- , pEnd(0)
- , pCurr(0)
- , pCurrX(0)
+ : pSh(nullptr)
+ , pStart(nullptr)
+ , pEnd(nullptr)
+ , pCurr(nullptr)
+ , pCurrX(nullptr)
, nCrsrCnt(0)
{
// TODO missing: ensurance of re-entrance, OSL_ENSURE( etc.
@@ -212,7 +212,7 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
if( pShell->HasSelection() || pCrsr != pCrsr->GetNext() )
{
- bSetCurr = 0 != GetCurr();
+ bSetCurr = nullptr != GetCurr();
nCrsrCnt = pSh->GetCrsrCnt();
if( pSh->IsTableMode() )
pSh->TableCrsrToCursor();
@@ -250,8 +250,8 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
pCrsr->SetMark();
- pLinguFrm = 0;
- pLinguNode = 0;
+ pLinguFrm = nullptr;
+ pLinguNode = nullptr;
}
void SwLinguIter::_End(bool bRestoreSelection)
@@ -273,7 +273,7 @@ void SwLinguIter::_End(bool bRestoreSelection)
DELETEZ(pCurr);
DELETEZ(pCurrX);
- pSh = 0;
+ pSh = nullptr;
}
void SwSpellIter::Start( SwEditShell *pShell, SwDocPositions eStart,
@@ -592,12 +592,12 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked()
bool SwEditShell::HasConvIter()
{
- return 0 != pConvIter;
+ return nullptr != pConvIter;
}
bool SwEditShell::HasHyphIter()
{
- return 0 != pHyphIter;
+ return nullptr != pHyphIter;
}
void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd )
@@ -612,7 +612,7 @@ void SwEditShell::SpellStart(
SwDocPositions eStart, SwDocPositions eEnd, SwDocPositions eCurr,
SwConversionArgs *pConvArgs )
{
- SwLinguIter *pLinguIter = 0;
+ SwLinguIter *pLinguIter = nullptr;
// do not spell if interactive spelling is active elsewhere
if (!pConvArgs && !pSpellIter)
@@ -653,13 +653,13 @@ void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection
{
OSL_ENSURE( pSpellIter, "wo ist mein Iterator?" );
pSpellIter->_End(bRestoreSelection);
- delete pSpellIter, pSpellIter = 0;
+ delete pSpellIter, pSpellIter = nullptr;
}
if (pConvArgs && pConvIter && pConvIter->GetSh() == this)
{
OSL_ENSURE( pConvIter, "wo ist mein Iterator?" );
pConvIter->_End();
- delete pConvIter, pConvIter = 0;
+ delete pConvIter, pConvIter = nullptr;
}
}
@@ -752,7 +752,7 @@ void SwEditShell::HyphEnd()
{
OSL_ENSURE( pHyphIter, "No Iterator" );
pHyphIter->End();
- delete pHyphIter, pHyphIter = 0;
+ delete pHyphIter, pHyphIter = nullptr;
}
}
@@ -761,7 +761,7 @@ uno::Reference< uno::XInterface >
SwEditShell::HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
{
if (pHyphIter->GetSh() != this)
- return 0;
+ return nullptr;
if( pPageCnt && !*pPageCnt && !*pPageSt )
{
@@ -827,7 +827,7 @@ uno::Reference< XSpellAlternatives >
uno::Reference< XSpellAlternatives > xSpellAlt;
if( IsTableMode() )
- return NULL;
+ return nullptr;
SwPaM* pCrsr = GetCrsr();
SwPosition aPos( *pCrsr->GetPoint() );
Point aPt( *pPt );
@@ -835,8 +835,8 @@ uno::Reference< XSpellAlternatives >
SwTextNode *pNode;
SwWrongList *pWrong;
if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) &&
- 0 != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
- 0 != (pWrong = pNode->GetWrong()) &&
+ nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
+ nullptr != (pWrong = pNode->GetWrong()) &&
!pNode->IsInProtectSect() )
{
sal_Int32 nBegin = aPos.nContent.GetIndex();
@@ -891,7 +891,7 @@ uno::Reference< XSpellAlternatives >
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : 0;
+ pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -947,8 +947,8 @@ bool SwEditShell::GetGrammarCorrection(
SwTextNode *pNode;
SwGrammarMarkUp *pWrong;
if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) &&
- 0 != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
- 0 != (pWrong = pNode->GetGrammarCheck()) &&
+ nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) &&
+ nullptr != (pWrong = pNode->GetGrammarCheck()) &&
!pNode->IsInProtectSect() )
{
sal_Int32 nBegin = aPos.nContent.GetIndex();
@@ -1015,7 +1015,7 @@ bool SwEditShell::GetGrammarCorrection(
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : 0;
+ pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -1117,7 +1117,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b
// iterate over the new portions, beginning at the end to take advantage of the previously
// saved content positions
- mpDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_TEXT_CORRECTION, NULL );
+ mpDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_TEXT_CORRECTION, nullptr );
StartAction();
SwPaM *pCrsr = GetCrsr();
@@ -1247,7 +1247,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b
// set continuation position for spell/grammar checking to the end of this sentence
pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) );
- mpDoc->GetIDocumentUndoRedo().EndUndo( UNDO_UI_TEXT_CORRECTION, NULL );
+ mpDoc->GetIDocumentUndoRedo().EndUndo( UNDO_UI_TEXT_CORRECTION, nullptr );
EndAction();
}
}
@@ -1360,7 +1360,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
}
uno::Any aSpellRet =
pMySh->GetDoc()->Spell(*pCrsr,
- xSpeller, 0, 0, bIsGrammarCheck );
+ xSpeller, nullptr, nullptr, bIsGrammarCheck );
aSpellRet >>= xSpellRet;
aSpellRet >>= aGrammarResult;
bGoOn = GetCrsrCnt() > 1;
@@ -1409,7 +1409,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
if(bStartSent)
{
// create a portion from the start part
- AddPortion(0, 0, aDeletedRedlines);
+ AddPortion(nullptr, nullptr, aDeletedRedlines);
}
// Set the cursor to the error already found
*pCrsr->GetPoint() = *GetCurrX();
@@ -1457,10 +1457,10 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
{
do
{
- xSpellRet = 0;
+ xSpellRet = nullptr;
// don't search for grammar errors here anymore!
pMySh->GetDoc()->Spell(*pCrsr,
- xSpeller, 0, 0, false ) >>= xSpellRet;
+ xSpeller, nullptr, nullptr, false ) >>= xSpellRet;
if ( *pCrsr->GetPoint() > *pCrsr->GetMark() )
pCrsr->Exchange();
SetCurr( new SwPosition( *pCrsr->GetPoint() ));
@@ -1473,13 +1473,13 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
*pCrsr->GetMark() = *GetCurr();
}
// add the portion
- AddPortion(0, 0, aDeletedRedlines);
+ AddPortion(nullptr, nullptr, aDeletedRedlines);
if(xSpellRet.is())
{
*pCrsr->GetPoint() = *GetCurr();
*pCrsr->GetMark() = *GetCurrX();
- AddPortion(xSpellRet, 0, aDeletedRedlines);
+ AddPortion(xSpellRet, nullptr, aDeletedRedlines);
// move the cursor to the end of the error string
*pCrsr->GetPoint() = *GetCurrX();
// and save the end of the error as new start position
@@ -1506,7 +1506,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
*pMySh->GetCrsr()->GetPoint() = *GetEnd();
if(*GetCurrX() < *GetEnd())
{
- AddPortion(0, 0, aDeletedRedlines);
+ AddPortion(nullptr, nullptr, aDeletedRedlines);
}
// set the shell cursor to the end of the sentence to prevent a visible selection
*pCrsr->GetMark() = *GetEnd();
@@ -1608,7 +1608,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
pMySh->GetSelectedText( sText );
if(!sText.isEmpty())
{
- if(xAlt.is() || pGrammarResult != 0)
+ if(xAlt.is() || pGrammarResult != nullptr)
{
CreatePortion(xAlt, pGrammarResult, false, false);
}
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 2d1d92a8a116..2e862cd530fe 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -133,12 +133,12 @@ bool SwEditShell::NoNum()
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Multiple selection?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam ));
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
bRet = GetDoc()->NoNum( *pCrsr );
@@ -278,14 +278,14 @@ void SwEditShell::DelNumRules()
SwPaM* pCrsr = GetCrsr();
if( pCrsr->IsMultiSelection() )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
{
GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
GetDoc()->DelNumRules( *pCrsr );
@@ -311,12 +311,12 @@ bool SwEditShell::NumUpDown( bool bDown )
bRet = GetDoc()->NumUpDown( *pCrsr, bDown );
else
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
GetDoc()->getIDocumentState().SetModified();
@@ -341,7 +341,7 @@ void SwEditShell::ChangeIndentOfAllListLevels( const short nDiff )
StartAllAction();
const SwNumRule *pCurNumRule = GetNumRuleAtCurrCrsrPos();
- if ( pCurNumRule != NULL )
+ if ( pCurNumRule != nullptr )
{
SwNumRule aRule(*pCurNumRule);
const SwNumFormat& aRootNumFormat(aRule.Get(0));
@@ -374,7 +374,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
else
{
const SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode();
- if ( pTextNode != NULL
+ if ( pTextNode != nullptr
&& pTextNode->GetActualListLevel() >= 0 )
{
aRule.SetIndent( nIndent, static_cast< sal_uInt16 >( pTextNode->GetActualListLevel() ) );
@@ -532,13 +532,13 @@ bool SwEditShell::OutlineUpDown( short nOffset )
bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset );
else
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->OutlineUpDown(
aRangeArr.SetPam( n, aPam ), nOffset );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
GetDoc()->getIDocumentState().SetModified();
EndAllAction();
@@ -654,7 +654,7 @@ bool SwEditShell::IsNoNum( bool bChkStart ) const
&& ( !bChkStart || IsSttPara() ) )
{
const SwTextNode* pTextNd = GetCrsr()->GetNode().GetTextNode();
- if ( pTextNd != NULL )
+ if ( pTextNd != nullptr )
{
bResult = !pTextNd->IsCountedInList();
}
@@ -672,11 +672,11 @@ sal_uInt8 SwEditShell::GetNumLevel() const
const SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "GetNumLevel() without text node" );
- if ( pTextNd == NULL )
+ if ( pTextNd == nullptr )
return nLevel;
const SwNumRule* pRule = pTextNd->GetNumRule();
- if ( pRule != NULL )
+ if ( pRule != nullptr )
{
const int nListLevelOfTextNode( pTextNd->GetActualListLevel() );
if ( nListLevelOfTextNode >= 0 )
@@ -695,7 +695,7 @@ const SwNumRule* SwEditShell::GetNumRuleAtCurrCrsrPos() const
const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const
{
- const SwNumRule* pNumRuleAtCurrentSelection = NULL;
+ const SwNumRule* pNumRuleAtCurrentSelection = nullptr;
bool bDifferentNumRuleFound = false;
for(const SwPaM& rCurrentCrsr : GetCrsr()->GetRingContainer())
@@ -705,19 +705,19 @@ const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const
for ( SwNodeIndex aNode = rCurrentCrsr.Start()->nNode; aNode <= aEndNode; ++aNode )
{
const SwNumRule* pNumRule = SwDoc::GetNumRuleAtPos( SwPosition( aNode ) );
- if ( pNumRule == NULL )
+ if ( pNumRule == nullptr )
{
continue;
}
else if ( pNumRule != pNumRuleAtCurrentSelection )
{
- if ( pNumRuleAtCurrentSelection == NULL )
+ if ( pNumRuleAtCurrentSelection == nullptr )
{
pNumRuleAtCurrentSelection = pNumRule;
}
else
{
- pNumRuleAtCurrentSelection = NULL;
+ pNumRuleAtCurrentSelection = nullptr;
bDifferentNumRuleFound = true;
break;
}
@@ -737,7 +737,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPaM* pCrsr = GetCrsr();
if( IsMultiSelection() )
@@ -770,7 +770,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
true, bResetIndentAttrs );
GetDoc()->SetCounted( *pCrsr, true );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
EndAllAction();
}
@@ -801,12 +801,12 @@ void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM )
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr();
if( pCrsr->IsMultiSelection() ) // multiple selection ?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
GetDoc()->SetNumRuleStart( *pCrsr->GetPoint(), bFlag );
@@ -828,12 +828,12 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM )
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr();
if( pCrsr->IsMultiSelection() ) // multiple selection ?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
GetDoc()->SetNodeNumStart( *pCrsr->GetPoint(), nStt );
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index 47be00cacd46..769d872cbafc 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -120,7 +120,7 @@ bool SwEditShell::SetRedlineComment( const OUString& rS )
const SwRangeRedline* SwEditShell::GetCurrRedline() const
{
- return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCrsr()->GetPoint(), 0 );
+ return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCrsr()->GetPoint(), nullptr );
}
void SwEditShell::UpdateRedlineAttr()
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index f508e1e5dc0d..52b3cfa02511 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -35,21 +35,21 @@ SwSection const*
SwEditShell::InsertSection(
SwSectionData & rNewData, SfxItemSet const*const pAttr)
{
- const SwSection* pRet = 0;
+ const SwSection* pRet = nullptr;
if( !IsTableMode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr );
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
SwSection const*const pNew =
- GetDoc()->InsertSwSection( rPaM, rNewData, 0, pAttr );
+ GetDoc()->InsertSwSection( rPaM, rNewData, nullptr, pAttr );
if( !pRet )
pRet = pNew;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
EndAllAction();
}
return pRet;
@@ -71,7 +71,7 @@ bool SwEditShell::IsInsRegionAvailable() const
const SwSection* SwEditShell::GetCurrSection() const
{
if( IsTableMode() )
- return 0;
+ return nullptr;
return SwDoc::GetCurrSection( *GetCrsr()->GetPoint() );
}
@@ -107,7 +107,7 @@ SwSection* SwEditShell::GetAnySection( bool bOutOfTab, const Point* pPt )
}
return pSect->GetSection();
}
- return NULL;
+ return nullptr;
}
size_t SwEditShell::GetSectionFormatCount() const
@@ -211,9 +211,9 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet,
while( aSIdx < aEIdx )
{
- if( 0 != (pSttSectNd = aSIdx.GetNode().GetSectionNode())
+ if( nullptr != (pSttSectNd = aSIdx.GetNode().GetSectionNode())
|| ( aSIdx.GetNode().IsEndNode() &&
- 0 != ( pSttSectNd = aSIdx.GetNode().
+ nullptr != ( pSttSectNd = aSIdx.GetNode().
StartOfSectionNode()->GetSectionNode())) )
_SetSectionAttr( *pSttSectNd->GetSection().GetFormat(),
rSet );
@@ -259,7 +259,7 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
const SwContentNode* pCNd;
// check the selection, if Start at Node begin and End at Node end
if( pStt->nContent.GetIndex() ||
- ( 0 == ( pCNd = pEnd->nNode.GetNode().GetContentNode() )) ||
+ ( nullptr == ( pCNd = pEnd->nNode.GetNode().GetContentNode() )) ||
pCNd->Len() != pEnd->nContent.GetIndex() )
{
nRet = 0;
@@ -304,24 +304,24 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
*/
static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
{
- const SwNode* pReturn = NULL;
+ const SwNode* pReturn = nullptr;
// the current position
- OSL_ENSURE( pCurrentPos != NULL, "Strange, we have no position!" );
+ OSL_ENSURE( pCurrentPos != nullptr, "Strange, we have no position!" );
const SwNode& rCurrentNode = pCurrentPos->nNode.GetNode();
// find innermost section or table. At the end of this scope,
// pInntermostNode contain the section/table before/after which we should
// insert our empty paragraph, or it will be NULL if none is found.
- const SwNode* pInnermostNode = NULL;
+ const SwNode* pInnermostNode = nullptr;
{
const SwNode* pTableNode = rCurrentNode.FindTableNode();
const SwNode* pSectionNode = rCurrentNode.FindSectionNode();
// find the table/section which is close
- if( pTableNode == NULL )
+ if( pTableNode == nullptr )
pInnermostNode = pSectionNode;
- else if ( pSectionNode == NULL )
+ else if ( pSectionNode == nullptr )
pInnermostNode = pTableNode;
else
{
@@ -337,7 +337,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
// inside a protected area.
// Now, pInnermostNode is NULL or the innermost section or table node.
- if( (pInnermostNode != NULL) && !pInnermostNode->IsProtect() )
+ if( (pInnermostNode != nullptr) && !pInnermostNode->IsProtect() )
{
OSL_ENSURE( pInnermostNode->IsTableNode() ||
pInnermostNode->IsSectionNode(), "wrong node found" );
@@ -380,7 +380,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
pReturn = pInnermostNode;
}
- OSL_ENSURE( ( pReturn == NULL ) || pReturn->IsStartNode() ||
+ OSL_ENSURE( ( pReturn == nullptr ) || pReturn->IsStartNode() ||
pReturn->IsEndNode(),
"SpecialInsertNode failed" );
return pReturn;
@@ -391,7 +391,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
*/
bool SwEditShell::CanSpecialInsert() const
{
- return NULL != lcl_SpecialInsertNode( GetCrsr()->GetPoint() );
+ return nullptr != lcl_SpecialInsertNode( GetCrsr()->GetPoint() );
}
/** check whether a node can be special-inserted (alt-Enter), and do so. Return
@@ -404,7 +404,7 @@ bool SwEditShell::DoSpecialInsert()
// get current node
SwPosition* pCursorPos = GetCrsr()->GetPoint();
const SwNode* pInsertNode = lcl_SpecialInsertNode( pCursorPos );
- if( pInsertNode != NULL )
+ if( pInsertNode != nullptr )
{
StartAllAction();
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index ce7939436e32..ce789117b54b 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -110,7 +110,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp
const SwTable *pTable = GetDoc()->InsertTable( rInsTableOpts, *pPos,
nRows, nCols,
eAdj, pTAFormat,
- 0, true );
+ nullptr, true );
if( bEndUndo )
EndUndo( UNDO_END );
@@ -129,7 +129,7 @@ bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts,
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
if( rPaM.HasMark() )
- bRet |= 0 != GetDoc()->TextToTable( rInsTableOpts, rPaM, cCh,
+ bRet |= nullptr != GetDoc()->TextToTable( rInsTableOpts, rPaM, cCh,
eAdj, pTAFormat );
}
EndAllAction();
@@ -161,7 +161,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh )
SwNodeIndex aTabIdx( *pTableNd );
pCrsr->DeleteMark();
pCrsr->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
- pCrsr->GetPoint()->nContent.Assign( 0, 0 );
+ pCrsr->GetPoint()->nContent.Assign( nullptr, 0 );
// move sPoint and Mark out of the area!
pCrsr->SetMark();
pCrsr->DeleteMark();
@@ -359,12 +359,12 @@ void SwEditShell::SetTableBoxFormulaAttrs( const SfxItemSet& rSet )
ClearTableBoxContent();
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
for (size_t n = 0; n < aBoxes.size(); ++n)
{
GetDoc()->SetTableBoxFormulaAttrs( *aBoxes[ n ], rSet );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
EndAllAction();
}
@@ -373,7 +373,7 @@ bool SwEditShell::IsTableBoxTextFormat() const
if( IsTableMode() )
return false;
- const SwTableBox *pBox = 0;
+ const SwTableBox *pBox = nullptr;
{
SwFrm *pFrm = GetCurrFrm();
do {
@@ -413,7 +413,7 @@ OUString SwEditShell::GetTableBoxText() const
OUString sRet;
if( !IsTableMode() )
{
- const SwTableBox *pBox = 0;
+ const SwTableBox *pBox = nullptr;
{
SwFrm *pFrm = GetCurrFrm();
do {
@@ -437,11 +437,11 @@ bool SwEditShell::SplitTable( sal_uInt16 eMode )
if( pCrsr->GetNode().FindTableNode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, true );
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
ClearFEShellTabCols();
EndAllAction();
}
@@ -455,11 +455,11 @@ bool SwEditShell::MergeTable( bool bWithPrev, sal_uInt16 nMode )
if( pCrsr->GetNode().FindTableNode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
bRet = GetDoc()->MergeTable( *pCrsr->GetPoint(), bWithPrev, nMode );
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
ClearFEShellTabCols();
EndAllAction();
}
@@ -493,14 +493,14 @@ bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const
}
else
{
- const SwTableNode* pTmpTableNd = 0;
+ const SwTableNode* pTmpTableNd = nullptr;
if( bWithPrev )
{
pTmpTableNd = rNds[ pTableNd->GetIndex() - 1 ]->FindTableNode();
// Consider table in table case
if ( pTmpTableNd && pTmpTableNd->EndOfSectionIndex() != pTableNd->GetIndex() - 1 )
- pTmpTableNd = 0;
+ pTmpTableNd = nullptr;
}
else
pTmpTableNd = rNds[ pTableNd->EndOfSectionIndex() + 1 ]->GetTableNode();
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index e04d160dc224..630a3ac3ab93 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -161,7 +161,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOX) != nullptr, "no TOXBaseSection!" );
SwTOXBaseSection* pTOX = const_cast<SwTOXBaseSection*>(static_cast<const SwTOXBaseSection*>(&rTOX));
OSL_ENSURE(pTOX, "no current listing");
- if( pTOX && 0 != pTOX->GetFormat()->GetSectionNode() )
+ if( pTOX && nullptr != pTOX->GetFormat()->GetSectionNode() )
{
SwDoc* pMyDoc = GetDoc();
SwDocShell* pDocSh = pMyDoc->GetDocShell();
@@ -173,7 +173,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
::StartProgress( STR_STATSTR_TOX_UPDATE, 0, 0, pDocSh );
::SetProgressText( STR_STATSTR_TOX_UPDATE, pDocSh );
- pMyDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
+ pMyDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr);
// create listing stub
pTOX->Update(pSet);
@@ -188,7 +188,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// insert page numbering
pTOX->UpdatePageNum();
- pMyDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
+ pMyDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr);
::EndProgress( pDocSh );
EndAllAction();
@@ -250,7 +250,7 @@ const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
return static_cast<const SwTOXBaseSection*>(pSect);
}
}
- return 0;
+ return nullptr;
}
/** Update of all listings after reading-in a file */
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 5603cb9ae62b..1a6f18be7f7d 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -53,8 +53,8 @@ void SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext)
return;
}
- SwFrameFormat * pSelFormat(0);
- SdrMarkList * pMarkList(0);
+ SwFrameFormat * pSelFormat(nullptr);
+ SdrMarkList * pMarkList(nullptr);
rContext.GetSelections(pSelFormat, pMarkList);
if (pSelFormat) // select frame
@@ -113,7 +113,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
// Keep Cursor - so that we're able to set it at
// the same position for autoformat or autocorrection
SwUndoId nLastUndoId(UNDO_EMPTY);
- GetLastUndoInfo(0, & nLastUndoId);
+ GetLastUndoInfo(nullptr, & nLastUndoId);
const bool bRestoreCrsr = nCount == 1
&& ( UNDO_AUTOFORMAT == nLastUndoId
|| UNDO_AUTOCORRECT == nLastUndoId
@@ -172,7 +172,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
ClearMark();
SwUndoId nFirstRedoId(UNDO_EMPTY);
- GetDoc()->GetIDocumentUndoRedo().GetFirstRedoInfo(0, & nFirstRedoId);
+ GetDoc()->GetIDocumentUndoRedo().GetFirstRedoInfo(nullptr, & nFirstRedoId);
const bool bRestoreCrsr = nCount == 1 && UNDO_SETDEFTATTR == nFirstRedoId;
Push();
@@ -229,8 +229,8 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount)
static void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList )
{
- OSL_ENSURE( pShell != NULL, "need shell!" );
- OSL_ENSURE( pSdrMarkList != NULL, "need mark list" );
+ OSL_ENSURE( pShell != nullptr, "need shell!" );
+ OSL_ENSURE( pSdrMarkList != nullptr, "need mark list" );
if( dynamic_cast<const SwFEShell*>( pShell) != nullptr )
{
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index c222812dd4c9..7c8bf15d00ae 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -172,7 +172,7 @@ SwMvContext::~SwMvContext()
SwFrameFormat *SwEditShell::GetTableFormat() // fastest test on a table
{
const SwTableNode* pTableNd = IsCrsrInTable();
- return pTableNd ? static_cast<SwFrameFormat*>(pTableNd->GetTable().GetFrameFormat()) : 0;
+ return pTableNd ? static_cast<SwFrameFormat*>(pTableNd->GetTable().GetFrameFormat()) : nullptr;
}
// TODO: Why is this called 3x for a new document?
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 7f0d6127e899..6ce9a3fa4ac5 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -261,7 +261,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
SwPosition aFieldPos(rFieldTextNode);
SwDoc& rDoc = *const_cast<SwDoc*>(rFieldTextNode.GetDoc());
SwContentFrm *pFrm = rFieldTextNode.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() );
- const SwTextNode* pTextNode = 0;
+ const SwTextNode* pTextNode = nullptr;
if(pFrm && !pFrm->IsInDocBody())
pTextNode = GetBodyTextNode( rDoc, aFieldPos, *pFrm );
//if no text node could be found or the field is in the document
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index a6f2163e5471..5ef6d3ff8bb3 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -154,7 +154,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const
{
SwTextField * const pTextField =
static_txtattr_cast<SwTextField*>(pTextNd->GetTextAttrForCharAt(nSttPos, RES_TXTATR_FIELD));
- if ( pTextField == NULL )
+ if ( pTextField == nullptr )
break;
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status
@@ -202,7 +202,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const
const SwTextInputField * pTextInputField =
dynamic_cast< const SwTextInputField* >(
pTextNd->GetTextAttrAt( nSttPos, RES_TXTATR_INPUTFIELD ) );
- if ( pTextInputField == NULL )
+ if ( pTextInputField == nullptr )
break;
nRet = rCalcPara.rCalc.Calculate( pTextInputField->GetFieldContent() ).GetDouble();
}
@@ -251,7 +251,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const
// structure needed for calculation of tables
SwTableCalcPara::SwTableCalcPara( SwCalc& rCalculator, const SwTable& rTable )
- : pLastTableBox( 0 ), nStackCnt( 0 ), nMaxSize( cMAXSTACKSIZE ),
+ : pLastTableBox( nullptr ), nStackCnt( 0 ), nMaxSize( cMAXSTACKSIZE ),
rCalc( rCalculator ), pTable( &rTable )
{
pBoxStk = new SwTableSortBoxes;
@@ -317,7 +317,7 @@ void SwTableFormula::_MakeFormula( const SwTable& rTable, OUString& rNewStr,
if( pCalcPara->rCalc.IsCalcError() ) // stop if there is already an error set
return;
- SwTableBox *pEndBox = 0;
+ SwTableBox *pEndBox = nullptr;
rFirstBox = rFirstBox.copy(1); // erase label of this box
// a region in this area?
@@ -327,14 +327,14 @@ void SwTableFormula::_MakeFormula( const SwTable& rTable, OUString& rNewStr,
// Is it actually a valid pointer?
if( rTable.GetTabSortBoxes().find( pEndBox ) == rTable.GetTabSortBoxes().end() )
- pEndBox = 0;
+ pEndBox = nullptr;
rFirstBox = rFirstBox.copy( pLastBox->getLength()+1 );
}
SwTableBox* pSttBox = reinterpret_cast<SwTableBox*>(
sal::static_int_cast<sal_IntPtr>(rFirstBox.toInt64()));
// Is it actually a valid pointer?
if( rTable.GetTabSortBoxes().find( pSttBox ) == rTable.GetTabSortBoxes().end() )
- pSttBox = 0;
+ pSttBox = nullptr;
rNewStr += " ";
if( pEndBox && pSttBox ) // area?
@@ -532,8 +532,8 @@ void SwTableFormula::BoxNmsToPtr( const SwTable& rTable, OUString& rNewStr,
/// create external formula (for UI)
void SwTableFormula::PtrToBoxNm( const SwTable* pTable )
{
- const SwNode* pNd = 0;
- FnScanFormula fnFormula = 0;
+ const SwNode* pNd = nullptr;
+ FnScanFormula fnFormula = nullptr;
switch (m_eNmType)
{
case INTRNL_NAME:
@@ -557,8 +557,8 @@ void SwTableFormula::PtrToBoxNm( const SwTable* pTable )
/// create internal formula (in CORE)
void SwTableFormula::BoxNmToPtr( const SwTable* pTable )
{
- const SwNode* pNd = 0;
- FnScanFormula fnFormula = 0;
+ const SwNode* pNd = nullptr;
+ FnScanFormula fnFormula = nullptr;
switch (m_eNmType)
{
case EXTRNL_NAME:
@@ -582,8 +582,8 @@ void SwTableFormula::BoxNmToPtr( const SwTable* pTable )
/// create relative formula (for copy)
void SwTableFormula::ToRelBoxNm( const SwTable* pTable )
{
- const SwNode* pNd = 0;
- FnScanFormula fnFormula = 0;
+ const SwNode* pNd = nullptr;
+ FnScanFormula fnFormula = nullptr;
switch (m_eNmType)
{
case INTRNL_NAME:
@@ -691,7 +691,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa
(this->*fnFormula)( *pTable, aStr, sBox, &aFirstBox, pPara );
}
else
- (this->*fnFormula)( *pTable, aStr, sBox, 0, pPara );
+ (this->*fnFormula)( *pTable, aStr, sBox, nullptr, pPara );
}
nFormula = nEnd+1;
@@ -702,15 +702,15 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa
const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm )
{
const SwFrameFormats& rTableFormats = *rDoc.GetTableFrameFormats();
- const SwTable* pTmpTable = 0, *pRet = 0;
+ const SwTable* pTmpTable = nullptr, *pRet = nullptr;
for( auto nFormatCnt = rTableFormats.size(); nFormatCnt; )
{
SwFrameFormat* pFormat = rTableFormats[ --nFormatCnt ];
// if we are called from Sw3Writer, a number is dependent on the format name
SwTableBox* pFBox;
if ( rNm.equals(pFormat->GetName().getToken(0, 0x0a)) &&
- 0 != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
- 0 != (pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
+ nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
+ nullptr != (pFBox = pTmpTable->GetTabSortBoxes()[0] ) &&
pFBox->GetSttNd() &&
pFBox->GetSttNd()->GetNodes().IsDocNodes() )
{
@@ -728,7 +728,7 @@ static const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
SwContentNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
OSL_ENSURE( pCNd, "Box has no TextNode" );
Point aPt; // get the first frame of the layout - table headline
- return pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, NULL, false );
+ return pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
}
static sal_Int32 lcl_GetLongBoxNum( OUString& rStr )
@@ -753,14 +753,14 @@ static const SwTableBox* lcl_RelToBox( const SwTable& rTable,
const OUString& _sGetName )
{
// get line
- const SwTableBox* pBox = 0;
+ const SwTableBox* pBox = nullptr;
OUString sGetName = _sGetName;
// Is it really a relative value?
if ( cRelIdentifier == sGetName[0] ) // yes
{
if( !pRefBox )
- return 0;
+ return nullptr;
sGetName = sGetName.copy( 1 );
@@ -784,17 +784,17 @@ static const SwTableBox* lcl_RelToBox( const SwTable& rTable,
if( nBoxOffset < 0 || nBoxOffset >= USHRT_MAX ||
nLineOffset < 0 || nLineOffset >= USHRT_MAX )
- return 0;
+ return nullptr;
if( static_cast<size_t>(nLineOffset) >= pLines->size() )
- return 0;
+ return nullptr;
pLine = (*pLines)[ nLineOffset ];
// ... then search the box
pBoxes = &pLine->GetTabBoxes();
if( static_cast<size_t>(nBoxOffset) >= pBoxes->size() )
- return 0;
+ return nullptr;
pBox = (*pBoxes)[ nBoxOffset ];
while (!sGetName.isEmpty())
@@ -886,7 +886,7 @@ void SwTableFormula::_GetFormulaBoxes( const SwTable& rTable, OUString& ,
OUString& rFirstBox, OUString* pLastBox, void* pPara ) const
{
SwSelBoxes* pBoxes = static_cast<SwSelBoxes*>(pPara);
- SwTableBox* pEndBox = 0;
+ SwTableBox* pEndBox = nullptr;
rFirstBox = rFirstBox.copy(1); // delete box label
// area in these parentheses?
@@ -896,7 +896,7 @@ void SwTableFormula::_GetFormulaBoxes( const SwTable& rTable, OUString& ,
// Is it actually a valid pointer?
if( rTable.GetTabSortBoxes().find( pEndBox ) == rTable.GetTabSortBoxes().end() )
- pEndBox = 0;
+ pEndBox = nullptr;
rFirstBox = rFirstBox.copy( pLastBox->getLength()+1 );
}
@@ -923,12 +923,12 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
// get all selected boxes via layout
const SwLayoutFrm *pStt, *pEnd;
const SwFrm* pFrm = lcl_GetBoxFrm( rSttBox );
- pStt = pFrm ? pFrm->GetUpper() : 0;
- pEnd = ( 0 != (pFrm = lcl_GetBoxFrm( rEndBox ))) ? pFrm->GetUpper() : 0;
+ pStt = pFrm ? pFrm->GetUpper() : nullptr;
+ pEnd = ( nullptr != (pFrm = lcl_GetBoxFrm( rEndBox ))) ? pFrm->GetUpper() : nullptr;
if( !pStt || !pEnd )
return ; // no valid selection
- GetTableSel( pStt, pEnd, rBoxes, 0 );
+ GetTableSel( pStt, pEnd, rBoxes, nullptr );
const SwTable* pTable = pStt->FindTabFrm()->GetTable();
@@ -978,7 +978,7 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTable, OUString& ,
bool* pBValid = static_cast<bool*>(pPara);
if( *pBValid ) // wrong is wrong
{
- SwTableBox* pSttBox = 0, *pEndBox = 0;
+ SwTableBox* pSttBox = nullptr, *pEndBox = nullptr;
rFirstBox = rFirstBox.copy(1); // Kennung fuer Box loeschen
// area in this parenthesis?
@@ -996,7 +996,7 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTable, OUString& ,
case REL_NAME:
{
const SwNode* pNd = GetNodeOfFormula();
- const SwTableBox* pBox = !pNd ? 0
+ const SwTableBox* pBox = !pNd ? nullptr
: const_cast<SwTableBox *>(rTable.GetTableBox(
pNd->FindTableBoxStartNode()->GetIndex() ));
if( pLastBox )
@@ -1024,7 +1024,7 @@ bool SwTableFormula::HasValidBoxes() const
{
bool bRet = true;
const SwNode* pNd = GetNodeOfFormula();
- if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
+ if( pNd && nullptr != ( pNd = pNd->FindTableNode() ) )
ScanString( &SwTableFormula::_HasValidBoxes,
static_cast<const SwTableNode*>(pNd)->GetTable(), &bRet );
return bRet;
@@ -1091,7 +1091,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTable, OUString& rNewStr,
if( pTableNmBox == pLastBox )
rFirstBox = rFirstBox.copy( nLastBoxLen + 1 );
- SwTableBox* pSttBox = 0, *pEndBox = 0;
+ SwTableBox* pSttBox = nullptr, *pEndBox = nullptr;
switch (m_eNmType)
{
case INTRNL_NAME:
@@ -1104,7 +1104,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTable, OUString& rNewStr,
{
const SwNode* pNd = GetNodeOfFormula();
const SwTableBox* pBox = pNd ? pTable->GetTableBox(
- pNd->FindTableBoxStartNode()->GetIndex() ) : 0;
+ pNd->FindTableBoxStartNode()->GetIndex() ) : nullptr;
if( pLastBox )
pEndBox = const_cast<SwTableBox*>(lcl_RelToBox( *pTable, pBox, *pLastBox ));
pSttBox = const_cast<SwTableBox*>(lcl_RelToBox( *pTable, pBox, rFirstBox ));
@@ -1119,9 +1119,9 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTable, OUString& rNewStr,
}
if( pLastBox && pTable->GetTabSortBoxes().find( pEndBox ) == pTable->GetTabSortBoxes().end() )
- pEndBox = 0;
+ pEndBox = nullptr;
if( pTable->GetTabSortBoxes().find( pSttBox ) == pTable->GetTabSortBoxes().end() )
- pSttBox = 0;
+ pSttBox = nullptr;
if( TBL_SPLITTBL == rTableUpd.m_eFlags )
{
@@ -1193,7 +1193,7 @@ void SwTableFormula::ToSplitMergeBoxNm( SwTableFormulaUpdate& rTableUpd )
{
const SwTable* pTable;
const SwNode* pNd = GetNodeOfFormula();
- if( pNd && 0 != ( pNd = pNd->FindTableNode() ))
+ if( pNd && nullptr != ( pNd = pNd->FindTableNode() ))
pTable = &static_cast<const SwTableNode*>(pNd)->GetTable();
else
pTable = rTableUpd.m_pTable;
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 5a1b89dee044..ead6558aaf89 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -120,7 +120,7 @@ public:
else if( pSh )
pSh->StartAction();
}
- pLast->ModifyNotification( 0, &aUpdateDDE );
+ pLast->ModifyNotification( nullptr, &aUpdateDDE );
bCallModify = true;
}
}
@@ -168,7 +168,7 @@ void SwIntrnlRefLink::Closed()
const SwNode* SwIntrnlRefLink::GetAnchor() const
{
// here, any anchor of the normal NodesArray should be sufficient
- const SwNode* pNd = 0;
+ const SwNode* pNd = nullptr;
SwIterator<SwClient,SwFieldType> aIter(rFieldType);
for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next())
{
@@ -184,7 +184,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const
if( pNd && &rFieldType.GetDoc()->GetNodes() == &pNd->GetNodes() )
break;
- pNd = 0;
+ pNd = nullptr;
}
return pNd;
}
@@ -230,7 +230,7 @@ bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
SwDDEFieldType::SwDDEFieldType(const OUString& rName,
const OUString& rCmd, SfxLinkUpdateMode nUpdateType )
: SwFieldType( RES_DDEFLD ),
- aName( rName ), pDoc( 0 ), nRefCnt( 0 )
+ aName( rName ), pDoc( nullptr ), nRefCnt( 0 )
{
bCRLFFlag = bDeleted = false;
refLink = new SwIntrnlRefLink( *this, nUpdateType, SotClipboardFormatId::STRING );
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index e1d674a7573c..fe5df4207a42 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -138,7 +138,7 @@ void SwDDETable::ChangeContent()
const IDocumentSettingAccess& rIDSA = GetFrameFormat()->getIDocumentSettingAccess();
SwDoc* pDoc = GetFrameFormat()->GetDoc();
if( AUTOUPD_FIELD_AND_CHARTS == rIDSA.getFieldUpdateFlags(true) )
- pDoc->getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 );
+ pDoc->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
}
SwDDEFieldType* SwDDETable::GetDDEFieldType()
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 14fa99da286a..8227ccb5e92f 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -153,7 +153,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc,
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
const SwFormatPageDesc *pDesc;
- if( 0 != (pDesc = static_cast<const SwFormatPageDesc*>(rPool.GetItem2( RES_PAGEDESC, n )) )
+ if( nullptr != (pDesc = static_cast<const SwFormatPageDesc*>(rPool.GetItem2( RES_PAGEDESC, n )) )
&& pDesc->GetNumOffset() && pDesc->GetDefinedIn() )
{
const SwContentNode* pNd = dynamic_cast<const SwContentNode*>( pDesc->GetDefinedIn() );
@@ -865,7 +865,7 @@ static void lcl_GetLocalDataWrapper( sal_uLong nLang,
OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
sal_uInt16 nLang, const OUString& rName ) const
{
- const LocaleDataWrapper *pAppLocalData = 0, *pLocalData = 0;
+ const LocaleDataWrapper *pAppLocalData = nullptr, *pLocalData = nullptr;
SwDocShell *pDocShell(GetDoc()->GetDocShell());
OSL_ENSURE(pDocShell, "no SwDocShell");
if (!pDocShell) { return OUString(); }
@@ -1651,14 +1651,14 @@ SwPostItField::SwPostItField( SwPostItFieldType* pT,
, sInitials( rInitials )
, sName( rName )
, aDateTime( rDateTime )
- , mpText( NULL )
- , m_pTextObject( NULL )
+ , mpText( nullptr )
+ , m_pTextObject( nullptr )
{
}
SwPostItField::~SwPostItField()
{
- if ( m_pTextObject != NULL )
+ if ( m_pTextObject != nullptr )
{
m_pTextObject->DisposeEditSource();
m_pTextObject->release();
@@ -1800,7 +1800,7 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
if (mpText)
{
delete mpText;
- mpText = 0;
+ mpText = nullptr;
}
break;
case FIELD_PROP_PAR3:
@@ -2088,7 +2088,7 @@ bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFields& rTmpLst )
// Always the first! (in Tab-Headline, header/footer )
Point aPt;
- const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
_SetGetExpField* pNew;
@@ -2147,9 +2147,9 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField,
{
// determine the correct offset
Point aPt;
- const SwContentFrm* pFrm = pTextNode->getLayoutFrm( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
- const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
- const SwPageFrm* pPgFrm = 0;
+ const SwContentFrm* pFrm = pTextNode->getLayoutFrm( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
+ const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
+ const SwPageFrm* pPgFrm = nullptr;
const short nDiff = ( pFrm && pRefFrm )
? (pPgFrm = pFrm->FindPageFrm())->GetPhyPageNum() -
pRefFrm->FindPageFrm()->GetPhyPageNum() + 1
@@ -2166,7 +2166,7 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField,
}
}
// start formatting
- const_cast<SwFormatField&>(pTextField->GetFormatField()).ModifyNotification( 0, 0 );
+ const_cast<SwFormatField&>(pTextField->GetFormatField()).ModifyNotification( nullptr, nullptr );
}
// queries for relative page numbering
@@ -2230,7 +2230,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
const SwRefPageSetField* pSetField =
static_cast<const SwRefPageSetField*>(pRefTextField->GetFormatField().GetField());
Point aPt;
- const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, 0, false );
+ const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, nullptr, false );
if( pSetField->IsOn() && pRefFrm )
{
// determine the correct offset
@@ -2289,7 +2289,7 @@ bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
// field type to jump to and edit
SwJumpEditFieldType::SwJumpEditFieldType( SwDoc* pD )
- : SwFieldType( RES_JUMPEDITFLD ), pDoc( pD ), aDep( this, 0 )
+ : SwFieldType( RES_JUMPEDITFLD ), pDoc( pD ), aDep( this, nullptr )
{
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 252f1b946019..042106994284 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -134,14 +134,14 @@ OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
const SwContentFrm *pCFrm, Point &rPt )
{
- SwTextNode* pTextNode = 0;
+ SwTextNode* pTextNode = nullptr;
if ( !pCFrm )
{
const SwNodes& rNodes = rDoc.GetNodes();
rPos.nNode = *rNodes.GetEndOfContent().StartOfSectionNode();
SwContentNode* pCNd;
- while( 0 != (pCNd = rNodes.GoNext( &rPos.nNode ) ) &&
- 0 == ( pTextNode = pCNd->GetTextNode() ) )
+ while( nullptr != (pCNd = rNodes.GoNext( &rPos.nNode ) ) &&
+ nullptr == ( pTextNode = pCNd->GetTextNode() ) )
;
OSL_ENSURE( pTextNode, "Where is the 1. TextNode?" );
rPos.nContent.Assign( pTextNode, 0 );
@@ -164,7 +164,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
const SwFrm& rFrm )
{
const SwLayoutFrm* pLayout = rFrm.GetUpper();
- const SwTextNode* pTextNode = 0;
+ const SwTextNode* pTextNode = nullptr;
while( pLayout )
{
@@ -197,7 +197,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
// do not break yet, might be as well in Header/Footer/Footnote/Fly
pLayout = static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm()
- ? static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm()->GetUpper() : 0;
+ ? static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm()->GetUpper() : nullptr;
continue;
}
else
@@ -222,8 +222,8 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
if( pLayout->IsHeaderFrm() )
{
const SwTabFrm *pTab;
- if( 0 != ( pCntFrm = pPgFrm->FindFirstBodyContent()) &&
- 0 != (pTab = pCntFrm->FindTabFrm()) && pTab->IsFollow() &&
+ if( nullptr != ( pCntFrm = pPgFrm->FindFirstBodyContent()) &&
+ nullptr != (pTab = pCntFrm->FindTabFrm()) && pTab->IsFollow() &&
pTab->GetTable()->GetRowsToRepeat() > 0 &&
pTab->IsInHeadline( *pCntFrm ) )
{
@@ -272,7 +272,7 @@ SwFieldType* SwGetExpFieldType::Copy() const
void SwGetExpFieldType::Modify( const SfxPoolItem*, const SfxPoolItem* pNew )
{
if( pNew && RES_DOCPOS_UPDATE == pNew->Which() )
- NotifyClients( 0, pNew );
+ NotifyClients( nullptr, pNew );
// do not expand anything else
}
@@ -487,7 +487,7 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, sal_uInt16 nTyp )
: SwValueFieldType( pDc, RES_SETEXPFLD ),
sName( rName ),
- pOutlChgNd( 0 ),
+ pOutlChgNd( nullptr ),
sDelim( "." ),
nType(nTyp), nLevel( UCHAR_MAX ),
bDeleted( false )
@@ -545,7 +545,7 @@ sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField )
{
const SwTextNode* pNd;
if( pF->GetField() != &rField && pF->GetTextField() &&
- 0 != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
+ nullptr != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
pNd->GetNodes().IsDocNodes() )
{
InsertSort( aArr, static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
@@ -590,7 +590,7 @@ size_t SwSetExpFieldType::GetSeqFieldList( SwSeqFieldList& rList )
{
const SwTextNode* pNd;
if( pF->GetTextField() &&
- 0 != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
+ nullptr != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
pNd->GetNodes().IsDocNodes() )
{
_SeqFieldLstElem* pNew = new _SeqFieldLstElem(
@@ -776,7 +776,7 @@ SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const OUString& rFormel,
sal_uLong nFormat)
: SwFormulaField( pTyp, nFormat, 0.0 ), nSeqNo( USHRT_MAX ),
nSubType(0)
- , mpFormatField(0)
+ , mpFormatField(nullptr)
{
SetFormula(rFormel);
// ignore SubType
@@ -1132,7 +1132,7 @@ SwInputField::SwInputField( SwInputFieldType* pFieldType,
, aPText(rPrompt)
, nSubType(nSub)
, mbIsFormField( bIsFormField )
- , mpFormatField( NULL )
+ , mpFormatField( nullptr )
{
}
@@ -1149,10 +1149,10 @@ void SwInputField::SetFormatField( SwFormatField& rFormatField )
void SwInputField::LockNotifyContentChange()
{
- if ( GetFormatField() != NULL )
+ if ( GetFormatField() != nullptr )
{
SwTextInputField* pTextInputField = dynamic_cast< SwTextInputField* >(GetFormatField()->GetTextField());
- if ( pTextInputField != NULL )
+ if ( pTextInputField != nullptr )
{
pTextInputField->LockNotifyContentChange();
}
@@ -1161,10 +1161,10 @@ void SwInputField::LockNotifyContentChange()
void SwInputField::UnlockNotifyContentChange()
{
- if ( GetFormatField() != NULL )
+ if ( GetFormatField() != nullptr )
{
SwTextInputField* pTextInputField = dynamic_cast< SwTextInputField* >(GetFormatField()->GetTextField());
- if ( pTextInputField != NULL )
+ if ( pTextInputField != nullptr )
{
pTextInputField->UnlockNotifyContentChange();
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 40b96c2e4307..28a3034713ae 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -482,7 +482,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
OUString sExpand;
SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
- Color* pCol = 0;
+ Color* pCol = nullptr;
// Bug #60010
sal_uInt16 nFormatLng = ::lcl_GetLanguageOfFormat( nLng, nFormat, *pFormatter );
@@ -735,7 +735,7 @@ OUString SwFormulaField::GetExpandedFormula() const
if (nFormat && nFormat != SAL_MAX_UINT32 && static_cast<SwValueFieldType *>(GetTyp())->UseFormat())
{
OUString sFormattedValue;
- Color* pCol = 0;
+ Color* pCol = nullptr;
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 82dd5afc1ff7..f08447899223 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -45,23 +45,23 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
{
SwLayoutStatus aRet = INVISIBLE;
SwTextNode* pTextNode = rAnchorPos.nNode.GetNode().GetTextNode();
- if ( pTextNode == NULL )
+ if ( pTextNode == nullptr )
return aRet;
SwIterator<SwTextFrm,SwContentNode> aIter( *pTextNode );
- for( SwTextFrm* pTextFrm = aIter.First(); pTextFrm != NULL; pTextFrm = aIter.Next() )
+ for( SwTextFrm* pTextFrm = aIter.First(); pTextFrm != nullptr; pTextFrm = aIter.Next() )
{
if( !pTextFrm->IsFollow() )
{
pTextFrm = pTextFrm->GetFrmAtPos( rAnchorPos );
- SwPageFrm *pPage = pTextFrm ? pTextFrm->FindPageFrm() : 0;
- if ( pPage != NULL && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
+ SwPageFrm *pPage = pTextFrm ? pTextFrm->FindPageFrm() : nullptr;
+ if ( pPage != nullptr && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
{
aRet = VISIBLE;
o_rInfo.mpAnchorFrm = pTextFrm;
pTextFrm->GetCharRect( o_rInfo.mPosition, rAnchorPos );
- if ( pAnnotationStartPos != NULL )
+ if ( pAnnotationStartPos != nullptr )
{
o_rInfo.mnStartNodeIdx = pAnnotationStartPos->nNode.GetIndex();
o_rInfo.mnStartContent = pAnnotationStartPos->nContent.GetIndex();
@@ -81,7 +81,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
const IDocumentRedlineAccess& rIDRA = pTextNode->getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineMode() ) )
{
- const SwRangeRedline* pRedline = rIDRA.GetRedline( rAnchorPos, 0 );
+ const SwRangeRedline* pRedline = rIDRA.GetRedline( rAnchorPos, nullptr );
if( pRedline )
{
if( nsRedlineType_t::REDLINE_INSERT == pRedline->GetType() )
@@ -119,7 +119,7 @@ void SwPostItHelper::setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode )
unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pRoot, const Point& rPoint )
{
unsigned long nRet = 0;
- const SwFrm* pPage = pRoot->GetPageAtPos( rPoint, 0, true );
+ const SwFrm* pPage = pRoot->GetPageAtPos( rPoint, nullptr, true );
if( pPage )
{
nRet = pPage->GetPhyPageNum();
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index ceffe044258d..60268b75b437 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -95,8 +95,8 @@ static void lcl_GetLayTree( const SwFrm* pFrm, std::vector<const SwFrm*>& rArr )
bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
const SwTextNode& rBehindNd, sal_Int32 nSttPos )
{
- const SwTextFrm *pMyFrm = static_cast<SwTextFrm*>(rMyNd.getLayoutFrm( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false) ),
- *pFrm = static_cast<SwTextFrm*>(rBehindNd.getLayoutFrm( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false) );
+ const SwTextFrm *pMyFrm = static_cast<SwTextFrm*>(rMyNd.getLayoutFrm( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ),
+ *pFrm = static_cast<SwTextFrm*>(rBehindNd.getLayoutFrm( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) );
while( pFrm && !pFrm->IsInside( nSttPos ) )
pFrm = pFrm->GetFollow();
@@ -162,7 +162,7 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
bRefIsLower = pRefFrm->Frm().Left() < pFieldFrm->Frm().Left() ||
( pRefFrm->Frm().Left() == pFieldFrm->Frm().Left() &&
pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() );
- pRefFrm = 0;
+ pRefFrm = nullptr;
}
else if( ( FRM_COLUMN | FRM_CELL ) & pFieldFrm->GetType() )
pFieldFrm = aArr[ nCnt - 1 ];
@@ -242,7 +242,7 @@ const SwTextNode* SwGetRefField::GetReferencedTextNode() const
{
SwGetRefFieldType *pTyp = dynamic_cast<SwGetRefFieldType*>(GetTyp());
if (!pTyp)
- return NULL;
+ return nullptr;
sal_Int32 nDummy = -1;
return SwGetRefFieldType::FindAnchor( pTyp->GetDoc(), sSetRefName, nSubType, nSeqNo, &nDummy );
}
@@ -420,17 +420,17 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
case REF_PAGE:
case REF_PAGE_PGDESC:
{
- const SwTextFrm* pFrm = static_cast<SwTextFrm*>(pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false)),
+ const SwTextFrm* pFrm = static_cast<SwTextFrm*>(pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)),
*pSave = pFrm;
while( pFrm && !pFrm->IsInside( nNumStart ) )
pFrm = pFrm->GetFollow();
- if( pFrm || 0 != ( pFrm = pSave ))
+ if( pFrm || nullptr != ( pFrm = pSave ))
{
sal_uInt16 nPageNo = pFrm->GetVirtPageNum();
const SwPageFrm *pPage;
if( REF_PAGE_PGDESC == GetFormat() &&
- 0 != ( pPage = pFrm->FindPageFrm() ) &&
+ nullptr != ( pPage = pFrm->FindPageFrm() ) &&
pPage->GetPageDesc() )
sText = pPage->GetPageDesc()->GetNumType().GetNumStr( nPageNo );
else
@@ -524,7 +524,7 @@ OUString SwGetRefField::MakeRefNumStr( const SwTextNode& rTextNodeOfField,
rTextNodeOfField.FindFooterStartNode()
== rTextNodeOfReferencedItem.FindFooterStartNode() )
{
- const SwNodeNum* pNodeNumForTextNodeOfField( 0 );
+ const SwNodeNum* pNodeNumForTextNodeOfField( nullptr );
if ( rTextNodeOfField.HasNumber() &&
rTextNodeOfField.GetNumRule() == rTextNodeOfReferencedItem.GetNumRule() )
{
@@ -799,7 +799,7 @@ void SwGetRefFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
SwGetRefField* pGRef = static_cast<SwGetRefField*>(pFormatField->GetField());
const SwTextField* pTField;
if( !pGRef->GetLanguage() &&
- 0 != ( pTField = pFormatField->GetTextField()) &&
+ nullptr != ( pTField = pFormatField->GetTextField()) &&
pTField->GetpTextNode() )
{
pGRef->SetLanguage( pTField->GetpTextNode()->GetLang(
@@ -820,7 +820,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark
{
OSL_ENSURE( pStt, "Why did no one check the StartPos?" );
- SwTextNode* pTextNd = 0;
+ SwTextNode* pTextNd = nullptr;
switch( nSubType )
{
case REF_SETREFATTR:
@@ -905,7 +905,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark
if( pIdx )
{
SwNodeIndex aIdx( *pIdx, 1 );
- if( 0 == ( pTextNd = aIdx.GetNode().GetTextNode()))
+ if( nullptr == ( pTextNd = aIdx.GetNode().GetTextNode()))
pTextNd = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext( &aIdx ));
}
*pStt = 0;
@@ -1106,7 +1106,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
{
case REF_SEQUENCEFLD:
{
- _RefIdsMap* pMap = 0;
+ _RefIdsMap* pMap = nullptr;
for( auto n = aFieldMap.size(); n; )
{
if (aFieldMap[ --n ]->GetName() == rRefField.GetSetRefName())
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index 1aa3992539fd..b97e01b5fe75 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -79,13 +79,13 @@ OUString SwTableField::GetFieldName() const
const SwNode* SwTableField::GetNodeOfFormula() const
{
if( !GetTyp()->HasWriterListeners() )
- return 0;
+ return nullptr;
SwIterator<SwFormatField,SwFieldType> aIter( *GetTyp() );
for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
if( this == pFormatField->GetField() )
return &pFormatField->GetTextField()->GetTextNode();
- return 0;
+ return nullptr;
}
OUString SwTableField::GetCommand()
@@ -93,7 +93,7 @@ OUString SwTableField::GetCommand()
if (EXTRNL_NAME != GetNameType())
{
SwNode const*const pNd = GetNodeOfFormula();
- SwTableNode const*const pTableNd = (pNd) ? pNd->FindTableNode() : 0;
+ SwTableNode const*const pTableNd = (pNd) ? pNd->FindTableNode() : nullptr;
if (pTableNd)
{
PtrToBoxNm( &pTableNd->GetTable() );
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 8c563a857fe5..4f3c8552d274 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -97,8 +97,8 @@ SwTextAPIEditSource::SwTextAPIEditSource(SwDoc* pDoc)
{
pImpl->mpPool = &pDoc->GetDocShell()->GetPool();
pImpl->mpDoc = pDoc;
- pImpl->mpOutliner = 0;
- pImpl->mpTextForwarder = 0;
+ pImpl->mpOutliner = nullptr;
+ pImpl->mpTextForwarder = nullptr;
pImpl->mnRef = 1;
}
@@ -110,8 +110,8 @@ SwTextAPIEditSource::~SwTextAPIEditSource()
void SwTextAPIEditSource::Dispose()
{
- pImpl->mpPool=0;
- pImpl->mpDoc=0;
+ pImpl->mpPool=nullptr;
+ pImpl->mpDoc=nullptr;
DELETEZ(pImpl->mpTextForwarder);
DELETEZ(pImpl->mpOutliner);
}
@@ -119,7 +119,7 @@ void SwTextAPIEditSource::Dispose()
SvxTextForwarder* SwTextAPIEditSource::GetTextForwarder()
{
if( !pImpl->mpPool )
- return 0; // mpPool == 0 can be used to flag this as disposed
+ return nullptr; // mpPool == 0 can be used to flag this as disposed
if( !pImpl->mpOutliner )
{
@@ -173,7 +173,7 @@ OutlinerParaObject* SwTextAPIEditSource::CreateText()
if ( pImpl->mpPool && pImpl->mpOutliner )
return pImpl->mpOutliner->CreateParaObject();
else
- return 0;
+ return nullptr;
}
OUString SwTextAPIEditSource::GetText()
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index c0839cfa10f8..e14ffa13e037 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -234,7 +234,7 @@ OUString SwUserFieldType::GetContent( sal_uInt32 nFormat )
if (nFormat && nFormat != SAL_MAX_UINT32)
{
OUString sFormattedValue;
- Color* pCol = 0;
+ Color* pCol = nullptr;
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index afba625ccd3d..f82afebe55b8 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -221,7 +221,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
pClpDoc->getIDocumentRedlineAccess().SetRedlineMode_intern((RedlineMode_t)0 );
pClpDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pClpDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pClpDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pClpDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
return bRet;
}
@@ -234,7 +234,7 @@ static const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt )
if ( pF->IsContentFrm() )
pF = static_cast<const SwContentFrm*>(pF)->GetFollow();
else
- pF = 0;
+ pF = nullptr;
}
if ( pF )
return pF->Frm().Pos();
@@ -248,7 +248,7 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm*
{
bool bRet = true;
rAnchor.SetAnchor( &rPos );
- SwContentFrm* pTmpFrm = rNd.GetContentNode()->getLayoutFrm( rDestShell.GetLayout(), &rInsPt, 0, false );
+ SwContentFrm* pTmpFrm = rNd.GetContentNode()->getLayoutFrm( rDestShell.GetLayout(), &rInsPt, nullptr, false );
SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm();
if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) )
{
@@ -346,7 +346,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() )
bRet = false;
else
- bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt,
+ bRet = ::lcl_SetAnchor( aPos, *pNd, nullptr, rInsPt,
*pDestShell, aAnchor, aNewAnch, false );
}
else
@@ -356,7 +356,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
bRet = false;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(),
- pCrsr->GetNode(), 0, rInsPt,
+ pCrsr->GetNode(), nullptr, rInsPt,
*pDestShell, aAnchor,
aNewAnch, false );
}
@@ -365,7 +365,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrm* pTmpRoot = pDestShell->GetLayout();
- const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, 0, true );
+ const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true );
if ( pPg )
aNewAnch = pPg->Frm().Pos();
}
@@ -519,7 +519,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrm* pTmpRoot = pDestShell->GetLayout();
- const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, 0, true );
+ const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true );
if ( pPg )
aNewAnch = pPg->Frm().Pos();
}
@@ -575,9 +575,9 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
SwSelBoxes aBoxes;
GetTableSel( *this, aBoxes );
if( !aBoxes.empty() &&
- 0 != (pTableNd = aBoxes[0]->GetSttNd()->FindTableNode()) )
+ nullptr != (pTableNd = aBoxes[0]->GetSttNd()->FindTableNode()) )
{
- SwPosition* pDstPos = 0;
+ SwPosition* pDstPos = nullptr;
if( this == pDestShell )
{
// same shell? Then create new Crsr at the
@@ -599,7 +599,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
if( GetDoc() == pDestShell->GetDoc() )
ParkTableCrsr();
- bRet = pDestShell->GetDoc()->InsCopyOfTable( *pDstPos, aBoxes,0,
+ bRet = pDestShell->GetDoc()->InsCopyOfTable( *pDstPos, aBoxes,nullptr,
bIsMove && this == pDestShell &&
aBoxes.size() == pTableNd->GetTable().
GetTabSortBoxes().size(),
@@ -655,7 +655,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
pDestShell->StartAllAction();
}
pDestShell->GetDoc()->getIDocumentFieldsAccess().UnlockExpFields();
- pDestShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ pDestShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
pDestShell->EndAllAction();
return bRet;
@@ -703,7 +703,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
bool bRet = true;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
GetDoc()->getIDocumentFieldsAccess().LockExpFields();
// When the clipboard content has been created by a rectangular selection
@@ -753,10 +753,10 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
{ // Now we have to look for insertion positions...
if( !nMove ) // Annotate the last given insert position
aStartPos = aInsertPos;
- SwCursor aCrsr( aStartPos, 0, false);
+ SwCursor aCrsr( aStartPos, nullptr, false);
// Check if we find another insert position by moving
// down the last given position
- if( aCrsr.UpDown( false, ++nMove, 0, 0 ) )
+ if( aCrsr.UpDown( false, ++nMove, nullptr, 0 ) )
aInsertPos = *aCrsr.GetPoint();
else // if there is no paragraph we have to create it
bCompletePara = nCount > 0;
@@ -823,7 +823,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
{
if( pSrcNd &&
- 0 != ( pDestNd = GetDoc()->IsIdxInTable( rPaM.GetPoint()->nNode )) &&
+ nullptr != ( pDestNd = GetDoc()->IsIdxInTable( rPaM.GetPoint()->nNode )) &&
// are we at the beginning of the cell? (if not, we will insert a nested table)
// first paragraph of the cell?
rPaM.GetNode().GetIndex() == rPaM.GetNode().FindTableBoxStartNode()->GetIndex()+1 &&
@@ -977,7 +977,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
{
Point aPt;
(void)lcl_SetAnchor( *rPaM.GetPoint(), rPaM.GetNode(),
- 0, aPt, *this, aAnchor, aPt, false );
+ nullptr, aPt, *this, aAnchor, aPt, false );
}
SwFrameFormat * pNew = GetDoc()->getIDocumentLayoutAccess().CopyLayoutFormat( *pCpyFormat, aAnchor, true, true );
@@ -1044,7 +1044,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
// **
// find out if the clipboard document starts with a table
- bool bStartWithTable = 0 != aCpyPam.Start()->nNode.GetNode().FindTableNode();
+ bool bStartWithTable = nullptr != aCpyPam.Start()->nNode.GetNode().FindTableNode();
SwPosition aInsertPosition( rInsPos );
{
@@ -1103,7 +1103,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
// have new table formulas been inserted?
if( pTableFieldTyp->HasWriterListeners() )
@@ -1118,7 +1118,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
StartAllAction();
}
GetDoc()->getIDocumentFieldsAccess().UnlockExpFields();
- GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
EndAllAction();
return bRet;
@@ -1203,7 +1203,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
}
}
GetDoc()->getIDocumentFieldsAccess().UnlockExpFields();
- GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
Pop(false);
EndAllAction();
@@ -1339,7 +1339,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
SvtPathOptions aPathOpt;
FmFormModel* pModel = new FmFormModel( aPathOpt.GetPalettePath(),
- 0, GetDoc()->GetDocShell() );
+ nullptr, GetDoc()->GetDocShell() );
pModel->GetItemPool().FreezeIdRanges();
rStrm.Seek(0);
@@ -1372,15 +1372,15 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
{
case SwPasteSdr::Replace:
{
- const SwFrameFormat* pFormat(0);
- const SwFrm* pAnchor(0);
+ const SwFrameFormat* pFormat(nullptr);
+ const SwFrm* pAnchor(nullptr);
if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr )
{
pFormat = FindFrameFormat( pOldObj );
Point aNullPt;
SwFlyFrm* pFlyFrm = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrm( &aNullPt );
- pAnchor = pFlyFrm ? pFlyFrm->GetAnchorFrm() : NULL;
+ pAnchor = pFlyFrm ? pFlyFrm->GetAnchorFrm() : nullptr;
if (!pAnchor || pAnchor->FindFooterOrHeader())
{
@@ -1462,7 +1462,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
if(pSdrGrafObj)
{
- SdrObject* pTarget = 0;
+ SdrObject* pTarget = nullptr;
if(0 != pView->GetMarkedObjectList().GetMarkCount())
{
@@ -1518,7 +1518,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
// #i50824#
// method <lcl_RemoveOleObjsFromSdrModel> replaced by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
lcl_ConvertSdrOle2ObjsToSdrGrafObjs( pModel );
- pView->Paste(*pModel, aPos, NULL, SdrInsertFlags::NONE, OUString(), OUString());
+ pView->Paste(*pModel, aPos, nullptr, SdrInsertFlags::NONE, OUString(), OUString());
const size_t nCnt = pView->GetMarkedObjectList().GetMarkCount();
if( nCnt )
@@ -1557,7 +1557,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
bool SwFEShell::Paste(const Graphic &rGrf, const OUString& rURL)
{
SET_CURR_SHELL( this );
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
SdrView *pView = Imp()->GetDrawView();
bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() &&
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index 391ce161675e..95cee40fa3e7 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -53,7 +53,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
StartAllAction();
SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();
- const SwFrm *pFlow = 0;
+ const SwFrm *pFlow = nullptr;
::boost::optional<sal_uInt16> oPageNumOffset;
OSL_ENSURE( !GetCrsr()->HasMark(), "ChgCurPageDesc only without selection!");
@@ -131,7 +131,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const OUString& rName,
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
if( USHRT_MAX != nPoolId &&
- 0 != (pDesc = GetDoc()->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId ))
+ nullptr != (pDesc = GetDoc()->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId ))
&& pPos )
// appended always
*pPos = GetDoc()->GetPageDescCnt() - 1 ;
@@ -186,21 +186,21 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
- if( 0 != (pCNd = rPaM.GetContentNode() ) &&
- 0 != ( pPtFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, 0, false )) )
+ if( nullptr != (pCNd = rPaM.GetContentNode() ) &&
+ nullptr != ( pPtFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) )
pPtFrm = pPtFrm->FindPageFrm();
else
- pPtFrm = 0;
+ pPtFrm = nullptr;
if( rPaM.HasMark() &&
- 0 != (pCNd = rPaM.GetContentNode( false ) ) &&
- 0 != ( pMkFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, 0, false )) )
+ nullptr != (pCNd = rPaM.GetContentNode( false ) ) &&
+ nullptr != ( pMkFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) )
pMkFrm = pMkFrm->FindPageFrm();
else
pMkFrm = pPtFrm;
if( !pMkFrm || !pPtFrm )
- pFnd = 0;
+ pFnd = nullptr;
else if( pMkFrm == pPtFrm )
pFnd = static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc();
else
@@ -218,7 +218,7 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
{
pMkFrm = pMkFrm->GetNext();
if( !pMkFrm || pFnd != static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc() )
- pFnd = 0;
+ pFnd = nullptr;
}
}
@@ -226,7 +226,7 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
pRetDesc = pFnd;
else if( pFnd != pRetDesc )
{
- pRetDesc = 0;
+ pRetDesc = nullptr;
break;
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index b800d0aa5833..6daaa57bc1b7 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -89,8 +89,8 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor,
else
{
const SwContentNode *pCntNd = rNode.GetContentNode();
- const SwContentFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, 0, false ) : 0;
- const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : 0;
+ const SwContentFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ) : nullptr;
+ const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : nullptr;
rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 );
rAnchor.SetType( FLY_AT_PAGE );
@@ -164,7 +164,7 @@ static bool lcl_FindAnchorPos(
aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly!
rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
pNewAnch = ::FindAnchor(
- aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( rFrm.getRootFrm(), 0, 0, false ),
+ aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( rFrm.getRootFrm(), nullptr, nullptr, false ),
aTmpPnt )->FindFlyFrm();
if( pNewAnch && &rFrm != pNewAnch && !pNewAnch->IsProtected() )
@@ -262,7 +262,7 @@ SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const
// A Fly is only accessible if it is selected
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
if( rMrkList.GetMarkCount() != 1 )
- return 0;
+ return nullptr;
SdrObject *pO = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -270,14 +270,14 @@ SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const
return pFlyObj ? pFlyObj->GetFlyFrm() : nullptr;
}
- return 0;
+ return nullptr;
}
// Get current fly in which the cursor is positioned
SwFlyFrm* SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const
{
SwContentFrm *pContent = GetCurrFrm(bCalcFrm);
- return pContent ? pContent->FindFlyFrm() : 0;
+ return pContent ? pContent->FindFlyFrm() : nullptr;
}
// Get selected fly, but if none Get current fly in which the cursor is positioned
@@ -295,19 +295,19 @@ const SwFrameFormat* SwFEShell::IsFlyInFly()
SET_CURR_SHELL( this );
if ( !Imp()->HasDrawView() )
- return NULL;
+ return nullptr;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
if ( !rMrkList.GetMarkCount() )
{
SwFlyFrm *pFly = GetCurrFlyFrm(false);
if (!pFly)
- return NULL;
+ return nullptr;
return pFly->GetFormat();
}
else if ( rMrkList.GetMarkCount() != 1 ||
!GetUserCall(rMrkList.GetMark( 0 )->GetMarkedSdrObj()) )
- return NULL;
+ return nullptr;
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -341,13 +341,13 @@ const SwFrameFormat* SwFEShell::IsFlyInFly()
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// determine text frame by left-top-corner of object
SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode();
- pTextFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, 0, false) : NULL;
+ pTextFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, nullptr, false) : nullptr;
}
- const SwFrm *pTmp = pTextFrm ? ::FindAnchor(pTextFrm, aTmpPos) : NULL;
- const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : NULL;
+ const SwFrm *pTmp = pTextFrm ? ::FindAnchor(pTextFrm, aTmpPos) : nullptr;
+ const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : nullptr;
if( pFly )
return pFly->GetFormat();
- return NULL;
+ return nullptr;
}
void SwFEShell::SetFlyPos( const Point& rAbsPos )
@@ -406,8 +406,8 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
bool bFlyFrame = dynamic_cast<SwVirtFlyDrawObj *>(pObj) != nullptr;
- SwFlyFrm* pFly = 0L;
- const SwFrm* pFooterOrHeader = NULL;
+ SwFlyFrm* pFly = nullptr;
+ const SwFrm* pFooterOrHeader = nullptr;
if( bFlyFrame )
{
@@ -439,7 +439,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
// Search nearest SwFlyFrm starting from the upper-left corner
// of the fly
- SwContentFrm *pTextFrm = NULL;
+ SwContentFrm *pTextFrm = nullptr;
{
SwCrsrMoveState aState( MV_SETONLYTEXT );
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
@@ -450,11 +450,11 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
{
SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode();
assert(pCNode);
- pTextFrm = pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false);
+ pTextFrm = pCNode->getLayoutFrm(GetLayout(), nullptr, &aPos, false);
}
}
- const SwFrm *pNewAnch = NULL;
- if( pTextFrm != NULL )
+ const SwFrm *pNewAnch = nullptr;
+ if( pTextFrm != nullptr )
{
if ( FLY_AT_PAGE == nAnchorId )
{
@@ -473,7 +473,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
if( pNewAnch && !pNewAnch->IsProtected() )
{
- const SwFlyFrm* pCheck = bFlyFrame ? pNewAnch->FindFlyFrm() : 0;
+ const SwFlyFrm* pCheck = bFlyFrame ? pNewAnch->FindFlyFrm() : nullptr;
// If we land inside the frame, make sure
// that the frame does not land inside its own content
while( pCheck )
@@ -481,7 +481,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
if( pCheck == pFly )
break;
const SwFrm *pTmp = pCheck->GetAnchorFrm();
- pCheck = pTmp ? pTmp->FindFlyFrm() : NULL;
+ pCheck = pTmp ? pTmp->FindFlyFrm() : nullptr;
}
// Do not switch from header/footer to another area,
@@ -500,7 +500,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
{
SwPosition pos = *aAnch.GetContentAnchor();
pos.nNode = *pTextFrm->GetNode();
- pos.nContent.Assign(0,0);
+ pos.nContent.Assign(nullptr,0);
aAnch.SetAnchor( &pos );
break;
}
@@ -532,7 +532,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
else
{
pos.nNode = *pTextFrm->GetNode();
- pos.nContent.Assign(0,0);
+ pos.nContent.Assign(nullptr,0);
}
aAnch.SetAnchor( &pos );
break;
@@ -550,7 +550,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
// re-created. Thus, delete all fly frames except the <this> before the
// anchor attribute is change and re-create them afterwards.
{
- SwHandleAnchorNodeChg* pHandleAnchorNodeChg( 0L );
+ SwHandleAnchorNodeChg* pHandleAnchorNodeChg( nullptr );
SwFlyFrameFormat* pFlyFrameFormat( dynamic_cast<SwFlyFrameFormat*>(&rFormat) );
if ( pFlyFrameFormat )
{
@@ -657,8 +657,8 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal
SwFlyFrameFormat *pRet;
if( bMoveContent )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, NULL );
- SwFormatAnchor* pOldAnchor = 0;
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, nullptr );
+ SwFormatAnchor* pOldAnchor = nullptr;
bool bHOriChgd = false, bVOriChgd = false;
SwFormatVertOrient aOldV;
SwFormatHoriOrient aOldH;
@@ -716,7 +716,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal
GetDoc()->GetIDocumentUndoRedo().DoesUndo();
SwUndoId nLastUndoId(UNDO_EMPTY);
if (bDoesUndo &&
- GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(0,
+ GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(nullptr,
& nLastUndoId))
{
if (UNDO_INSLAYFMT == nLastUndoId)
@@ -737,7 +737,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal
}
delete pOldAnchor;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, nullptr );
}
else
/* If called from a shell try to propagate an
@@ -753,7 +753,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal
else
{
GetLayout()->SetAssertFlyPages();
- pRet = 0;
+ pRet = nullptr;
}
}
EndAllActionAndCall();
@@ -767,7 +767,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
const SfxItemSet* pGrfAttrSet,
SwFrameFormat* pFrameFormat )
{
- SwFlyFrameFormat* pFormat = 0;
+ SwFlyFrameFormat* pFormat = nullptr;
SET_CURR_SHELL( this );
StartAllAction();
SwShellCrsr *pStartCursor = dynamic_cast<SwShellCrsr*>(this->GetSwCrsr());
@@ -850,7 +850,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj,
const SfxItemSet* pGrfAttrSet,
SwFrameFormat* pFrameFormat )
{
- SwFlyFrameFormat* pFormat = 0;
+ SwFlyFrameFormat* pFormat = nullptr;
SET_CURR_SHELL( this );
StartAllAction();
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
@@ -893,7 +893,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aTmpPt( rInsertPosition );
GetLayout()->GetCrsrOfst( aPam.GetPoint(), aTmpPt, &aState );
- const SwFrm* pFrm = aPam.GetContentNode()->getLayoutFrm( GetLayout(), 0, 0, false );
+ const SwFrm* pFrm = aPam.GetContentNode()->getLayoutFrm( GetLayout(), nullptr, nullptr, false );
const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(),
rInsertPosition.Y() - pFrm->Frm().Top() );
rDrawObj.SetRelativePos( aRelPos );
@@ -1153,17 +1153,17 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
// Returns frame-format if frame, otherwise 0
SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
SwLayoutFrm *pFly = GetSelectedFlyFrm();
if( pFly && ( pRet = static_cast<SwFrameFormat*>(pFly->GetFormat()->DerivedFrom()) ) ==
GetDoc()->GetDfltFrameFormat() )
- pRet = 0;
+ pRet = nullptr;
return pRet;
}
void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos )
{
- SwFlyFrm *pFly = 0;
+ SwFlyFrm *pFly = nullptr;
if(pDocPos)
{
const SwFrameFormat* pFormat = GetFormatFromObj( *pDocPos );
@@ -1182,14 +1182,14 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi
SwFlyFrameFormat* pFlyFormat = pFly->GetFormat();
const Point aPt( pFly->Frm().Pos() );
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
const SfxPoolItem* pItem;
if( SfxItemState::SET == pNewFormat->GetItemState( RES_ANCHOR, false, &pItem ))
{
pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrameFormatSetRange );
pSet->Put( *pItem );
if( !sw_ChkAndSetNewAnchor( *pFly, *pSet ))
- delete pSet, pSet = 0;
+ delete pSet, pSet = nullptr;
}
if( GetDoc()->SetFrameFormatToFly( *pFlyFormat, *pNewFormat, pSet, bKeepOrient ))
@@ -1211,7 +1211,7 @@ const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const
const SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm();
if (pFly)
return pFly->GetFormat();
- return 0;
+ return nullptr;
}
SwFrameFormat* SwFEShell::GetFlyFrameFormat()
@@ -1219,7 +1219,7 @@ SwFrameFormat* SwFEShell::GetFlyFrameFormat()
SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm();
if (pFly)
return pFly->GetFormat();
- return 0;
+ return nullptr;
}
SwRect SwFEShell::GetFlyRect() const
@@ -1289,12 +1289,12 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
const SwFormatFrmSize& rFrmSz = pFly->GetFormat()->GetFrmSize();
if (m_bCheckForOLEInCaption &&
0 != rFrmSz.GetWidthPercent() &&
- 0 != (pAnchor = pFly->GetAnchorFrm()) &&
+ nullptr != (pAnchor = pFly->GetAnchorFrm()) &&
pAnchor->IsTextFrm() &&
!pAnchor->GetNext() && !pAnchor->GetPrev() &&
pAnchor->GetUpper()->IsFlyFrm() &&
- 0 != ( pTNd = static_cast<const SwTextFrm*>(pAnchor)->GetNode()->GetTextNode()) &&
- 0 != ( pHts = pTNd->GetpSwpHints() ))
+ nullptr != ( pTNd = static_cast<const SwTextFrm*>(pAnchor)->GetNode()->GetTextNode()) &&
+ nullptr != ( pHts = pTNd->GetpSwpHints() ))
{
// search for a sequence field:
const size_t nEnd = pHts->Count();
@@ -1340,7 +1340,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
OSL_ENSURE( pFly->Lower()->IsNoTextFrm(), "Request without NoText" );
SwNoTextNode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetNoTextNode();
OSL_ENSURE( pNd, "Request without Node" );
- pNd->SetContour( 0 );
+ pNd->SetContour( nullptr );
ClrContourCache();
}
@@ -1392,14 +1392,14 @@ SwFrameFormat* SwFEShell::WizardGetFly()
SwNodeIndex& rCrsrNd = GetCrsr()->GetPoint()->nNode;
if( rCrsrNd.GetIndex() > mpDoc->GetNodes().GetEndOfExtras().GetIndex() )
// Cursor is in the body area!
- return 0;
+ return nullptr;
for( auto pFormat : rSpzArr )
{
const SwNodeIndex* pIdx = pFormat->GetContent( false ).GetContentIdx();
SwStartNode* pSttNd;
if( pIdx &&
- 0 != ( pSttNd = pIdx->GetNode().GetStartNode() ) &&
+ nullptr != ( pSttNd = pIdx->GetNode().GetStartNode() ) &&
pSttNd->GetIndex() < rCrsrNd.GetIndex() &&
rCrsrNd.GetIndex() < pSttNd->EndOfSectionIndex() )
{
@@ -1408,7 +1408,7 @@ SwFrameFormat* SwFEShell::WizardGetFly()
}
}
}
- return 0;
+ return nullptr;
}
void SwFEShell::SetFlyName( const OUString& rName )
@@ -1454,11 +1454,11 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
OUString *pDescription ) const
{
if( !Imp()->HasDrawView() )
- return 0;
+ return nullptr;
SdrObject* pObj;
SdrPageView* pPV;
- const SwFrameFormat* pRet = 0;
+ const SwFrameFormat* pRet = nullptr;
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
const auto nOld = pDView->GetHitTolerancePixel();
@@ -1475,8 +1475,8 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
const SwFormatURL &rURL = pFly->GetFormat()->GetURL();
if( !rURL.GetURL().isEmpty() || rURL.GetMap() )
{
- bool bSetTargetFrameName = pTargetFrameName != 0;
- bool bSetDescription = pDescription != 0;
+ bool bSetTargetFrameName = pTargetFrameName != nullptr;
+ bool bSetDescription = pDescription != nullptr;
if ( rURL.GetMap() )
{
IMapObject *pObject = pFly->GetFormat()->GetIMapObject( rPt, pFly );
@@ -1530,7 +1530,7 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
OUString &rName, bool &rbLink ) const
{
if( !Imp()->HasDrawView() )
- return 0;
+ return nullptr;
SdrObject* pObj;
SdrPageView* pPV;
@@ -1554,23 +1554,23 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
// halfway ready graphic?
::sfx2::SvLinkSource* pLnkObj = pNd->GetLink()->GetObj();
if( pLnkObj && pLnkObj->IsPending() )
- return 0;
+ return nullptr;
rbLink = true;
}
- pNd->GetFileFilterNms( &rName, 0 );
+ pNd->GetFileFilterNms( &rName, nullptr );
if ( rName.isEmpty() )
rName = pFly->GetFormat()->GetName();
return &pNd->GetGrf(true);
}
}
}
- return 0;
+ return nullptr;
}
const SwFrameFormat* SwFEShell::GetFormatFromObj( const Point& rPt, SwRect** pRectToFill ) const
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
if( Imp()->HasDrawView() )
{
@@ -1608,8 +1608,8 @@ const SwFrameFormat* SwFEShell::GetFormatFromAnyObj( const Point& rPt ) const
Point aPt( rPt );
GetLayout()->GetCrsrOfst( &aPos, aPt );
SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode();
- SwFrm* pFrm = pNd->getLayoutFrm( GetLayout(), &rPt, 0, false )->FindFlyFrm();
- pRet = pFrm ? static_cast<SwLayoutFrm*>(pFrm)->GetFormat() : 0;
+ SwFrm* pFrm = pNd->getLayoutFrm( GetLayout(), &rPt, nullptr, false )->FindFlyFrm();
+ pRet = pFrm ? static_cast<SwLayoutFrm*>(pFrm)->GetFormat() : nullptr;
}
return pRet;
}
@@ -1790,7 +1790,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam
// delete "Sdr-Object", insert the graphic instead
DelSelectedObj();
- GetDoc()->getIDocumentContentOperations().Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, NULL, NULL );
+ GetDoc()->getIDocumentContentOperations().Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, nullptr, nullptr );
EndUndo();
EndAllAction();
@@ -1801,13 +1801,13 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam
static sal_uInt16 SwFormatGetPageNum(const SwFlyFrameFormat * pFormat)
{
- OSL_ENSURE(pFormat != NULL, "invalid argument");
+ OSL_ENSURE(pFormat != nullptr, "invalid argument");
SwFlyFrm * pFrm = pFormat->GetFrm();
sal_uInt16 aResult;
- if (pFrm != NULL)
+ if (pFrm != nullptr)
aResult = pFrm->GetPhyPageNum();
else
aResult = pFormat->GetAnchor().GetPageNum();
@@ -2015,7 +2015,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
if (!pFly)
pFly = FindFlyFrm( xObj );
OSL_ENSURE( pFly , "No fly frame!" );
- SwFrameFormat * pFrameFormat = pFly ? pFly->GetFormat() : 0;
+ SwFrameFormat * pFrameFormat = pFly ? pFly->GetFormat() : nullptr;
// baseline to baseline alignment should only be applied to formulas anchored as char
if ( pFly && pFrameFormat && FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
@@ -2068,7 +2068,7 @@ void SwFEShell::AlignAllFormulasToBaseline()
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while ( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwOLENode *pOleNode = dynamic_cast< SwOLENode * >( &aIdx.GetNode() );
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index ca5b36f52236..bfa252acd5e3 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -48,10 +48,10 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
{
SwOLENode *pNd = static_cast<SwNoTextFrm*>(pFly->Lower())->GetNode()->GetOLENode();
if ( !pNd || pNd->GetOLEObj().GetOleRef() != xObj )
- pFly = 0;
+ pFly = nullptr;
}
else
- pFly = 0;
+ pFly = nullptr;
if ( !pFly )
{
@@ -61,7 +61,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
sal_uLong nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1,
nEndIdx = GetNodes().GetEndOfAutotext().GetIndex();
while( nSttIdx < nEndIdx &&
- 0 != (pStNd = GetNodes()[ nSttIdx ]->GetStartNode()) )
+ nullptr != (pStNd = GetNodes()[ nSttIdx ]->GetStartNode()) )
{
SwNode *pNd = GetNodes()[ nSttIdx+1 ];
if ( pNd->IsOLENode() &&
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 9597d844eea4..69d6b438f0d0 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -93,7 +93,7 @@ using namespace com::sun::star;
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh )
{
if ( !pLst )
- pLst = pSh->HasDrawView() ? &pSh->Imp()->GetDrawView()->GetMarkedObjectList():0;
+ pLst = pSh->HasDrawView() ? &pSh->Imp()->GetDrawView()->GetMarkedObjectList():nullptr;
if ( pLst && pLst->GetMarkCount() == 1 )
{
@@ -101,7 +101,7 @@ SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh )
if ( pO && dynamic_cast<const SwVirtFlyDrawObj*>( pO) != nullptr )
return static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm();
}
- return 0;
+ return nullptr;
}
static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
@@ -142,7 +142,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
const bool bHadSelection = rMrkList.GetMarkCount();
const bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
const bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
- SwFlyFrm* pOldSelFly = 0;
+ SwFlyFrm* pOldSelFly = nullptr;
const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() );
if( bHadSelection )
@@ -294,11 +294,11 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
{
const SdrMarkList* pMrkList;
if( !Imp()->GetDrawView() ||
- 0 == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) ||
+ nullptr == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) ||
1 != pMrkList->GetMarkCount())
return false;
SwFrm* pOld;
- SwFlyFrm* pFly = NULL;
+ SwFlyFrm* pFly = nullptr;
SdrObject *pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
@@ -418,7 +418,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
OSL_ENSURE( pOld->IsFlyFrm(), "Wrong anchor, fly frame expected.");
SwPageFrm* pPage = pOld->FindPageFrm();
OSL_ENSURE( pPage, "Where's my page?" );
- SwFlyFrm* pNewFly = NULL;
+ SwFlyFrm* pNewFly = nullptr;
if( pPage->GetSortedObjs() )
{
bool bOld = false;
@@ -435,13 +435,13 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
bOld = true;
else
{
- const SwFlyFrm* pCheck = pFly ? pTmp : 0;
+ const SwFlyFrm* pCheck = pFly ? pTmp : nullptr;
while( pCheck )
{
if( pCheck == pFly )
break;
const SwFrm *pNxt = pCheck->GetAnchorFrm();
- pCheck = pNxt ? pNxt->FindFlyFrm() : NULL;
+ pCheck = pNxt ? pNxt->FindFlyFrm() : nullptr;
}
if( pCheck || pTmp->IsProtected() )
continue;
@@ -509,7 +509,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
// re-created. Thus, delete all fly frames except the <this> before the
// anchor attribute is change and re-create them afterwards.
{
- SwHandleAnchorNodeChg* pHandleAnchorNodeChg( 0L );
+ SwHandleAnchorNodeChg* pHandleAnchorNodeChg( nullptr );
SwFlyFrameFormat* pFlyFrameFormat( dynamic_cast<SwFlyFrameFormat*>(&rFormat) );
if ( pFlyFrameFormat )
{
@@ -534,8 +534,8 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
const SdrMarkList* SwFEShell::_GetMarkList() const
{
- const SdrMarkList* pMarkList = NULL;
- if( Imp()->GetDrawView() != NULL )
+ const SdrMarkList* pMarkList = nullptr;
+ if( Imp()->GetDrawView() != nullptr )
pMarkList = &Imp()->GetDrawView()->GetMarkedObjectList();
return pMarkList;
}
@@ -546,14 +546,14 @@ FrmTypeFlags SwFEShell::GetSelFrmType() const
// get marked frame list, and check if anything is selected
const SdrMarkList* pMarkList = _GetMarkList();
- if( pMarkList == NULL || pMarkList->GetMarkCount() == 0 )
+ if( pMarkList == nullptr || pMarkList->GetMarkCount() == 0 )
eType = FrmTypeFlags::NONE;
else
{
// obtain marked item as fly frame; if no fly frame, it must
// be a draw object
const SwFlyFrm* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)));
- if ( pFly != NULL )
+ if ( pFly != nullptr )
{
if( pFly->IsFlyLayFrm() )
eType = FrmTypeFlags::FLY_FREE;
@@ -580,7 +580,7 @@ bool SwFEShell::IsSelContainsControl() const
// basically, copy the mechanism from GetSelFrmType(), but call
// CheckControl... if you get a drawing object
const SdrMarkList* pMarkList = _GetMarkList();
- if( pMarkList != NULL && pMarkList->GetMarkCount() == 1 )
+ if( pMarkList != nullptr && pMarkList->GetMarkCount() == 1 )
{
// if we have one marked object, get the SdrObject and check
// whether it contains a control
@@ -661,7 +661,7 @@ long SwFEShell::BeginDrag( const Point* pPt, bool bIsShift)
m_pChainFrom.reset();
m_pChainTo.reset();
SdrHdl* pHdl = pView->PickHandle( *pPt );
- if (pView->BegDragObj( *pPt, 0, pHdl ))
+ if (pView->BegDragObj( *pPt, nullptr, pHdl ))
pView->GetDragMethod()->SetShiftPressed( bIsShift );
::FrameNotify( this );
return 1;
@@ -764,7 +764,7 @@ const SwFrameFormat* SwFEShell::SelFlyGrabCrsr()
return pFly->GetFormat();
}
}
- return 0;
+ return nullptr;
}
// Selection to above/below (Z-Order)
@@ -977,7 +977,7 @@ bool SwFEShell::IsFrmSelected() const
if ( !Imp()->HasDrawView() )
return false;
else
- return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
+ return nullptr != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
}
@@ -1023,7 +1023,7 @@ void SwFEShell::EndTextEdit()
SdrView *pView = Imp()->GetDrawView();
SdrObject *pObj = pView->GetTextEditObject();
SdrObjUserCall* pUserCall;
- if( 0 != ( pUserCall = GetUserCall(pObj) ) )
+ if( nullptr != ( pUserCall = GetUserCall(pObj) ) )
{
SdrObject *pTmp = static_cast<SwContact*>(pUserCall)->GetMaster();
if( !pTmp )
@@ -1091,7 +1091,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
SdrObject* SwFEShell::GetObjAt( const Point& rPt )
{
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
SET_CURR_SHELL(this);
SwDrawView *pDView = Imp()->GetDrawView();
if( pDView )
@@ -1261,10 +1261,10 @@ namespace
const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool bFlat, const svx::ISdrObjectFilter* pFilter )
{
if( !Imp()->HasDrawView() )
- return NULL;
+ return nullptr;
- const SdrObject *pBest = 0,
- *pTop = 0;
+ const SdrObject *pBest = nullptr,
+ *pTop = nullptr;
const long nTmp = bNext ? LONG_MAX : 0;
Point aBestPos( nTmp, nTmp );
@@ -1290,7 +1290,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
if( !pBest || rMrkList.GetMarkCount() == 1 )
{
// Determine starting point
- SdrObjList* pList = NULL;
+ SdrObjList* pList = nullptr;
if ( rMrkList.GetMarkCount() )
{
const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
@@ -1309,7 +1309,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
// If no object is selected, we check if we just entered a group.
// In this case we want to iterate over the group members.
aPos = GetCharRect().Center();
- const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0;
+ const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : nullptr;
if ( pStartObj && dynamic_cast<const SdrObjGroup*>( pStartObj) != nullptr )
pList = pStartObj->GetSubList();
}
@@ -1584,7 +1584,7 @@ bool SwFEShell::ImpEndCreate()
// default for controls character bound, otherwise paragraph bound.
SwFormatAnchor aAnch;
- const SwFrm *pAnch = 0;
+ const SwFrm *pAnch = nullptr;
bool bCharBound = false;
if( dynamic_cast<const SdrUnoObj*>( &rSdrObj) != nullptr )
{
@@ -1632,7 +1632,7 @@ bool SwFEShell::ImpEndCreate()
//bool bBodyOnly = OBJ_NONE != nIdent;
bool bBodyOnly = 0xFFFF == nIdent;
bool bAtPage = false;
- const SwFrm* pPage = 0;
+ const SwFrm* pPage = nullptr;
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aPoint( aPt );
SwPosition aPos( GetDoc()->GetNodes() );
@@ -1647,7 +1647,7 @@ bool SwFEShell::ImpEndCreate()
}
SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode();
- pAnch = pCNode ? pCNode->getLayoutFrm( GetLayout(), &aPoint, 0, false ) : NULL;
+ pAnch = pCNode ? pCNode->getLayoutFrm( GetLayout(), &aPoint, nullptr, false ) : nullptr;
if (!pAnch)
{
// Hidden content. Anchor to the page instead
@@ -1671,7 +1671,7 @@ bool SwFEShell::ImpEndCreate()
}
pTmp = pTmp->GetAnchorFrm()
? pTmp->GetAnchorFrm()->FindFlyFrm()
- : 0;
+ : nullptr;
pTmpFrm = pTmp;
}
}
@@ -1773,7 +1773,7 @@ bool SwFEShell::ImpEndCreate()
SwFlyFrm* pFlyFrm;
if( NewFlyFrm( aSet, true ) &&
::GetHtmlMode( GetDoc()->GetDocShell() ) &&
- 0 != ( pFlyFrm = GetSelectedFlyFrm() ))
+ nullptr != ( pFlyFrm = GetSelectedFlyFrm() ))
{
SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT );
// horizontal orientation:
@@ -2091,7 +2091,7 @@ Point SwFEShell::GetAnchorObjDiff() const
else
{
const SdrObject *pObj = pView->GetMarkedObjectList().GetMarkCount() == 1 ?
- pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() : 0;
+ pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() : nullptr;
if ( pObj )
aRet -= pObj->GetAnchorPos();
}
@@ -2157,8 +2157,8 @@ bool SwFEShell::IsGroupAllowed() const
if ( IsObjSelected() > 1 )
{
bIsGroupAllowed = true;
- const SdrObject* pUpGroup = 0L;
- const SwFrm* pHeaderFooterFrm = 0L;
+ const SdrObject* pUpGroup = nullptr;
+ const SwFrm* pHeaderFooterFrm = nullptr;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( size_t i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
{
@@ -2175,7 +2175,7 @@ bool SwFEShell::IsGroupAllowed() const
// same header/footer or not in header/footer.
if ( bIsGroupAllowed )
{
- const SwFrm* pAnchorFrm = 0L;
+ const SwFrm* pAnchorFrm = nullptr;
if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
const SwFlyFrm* pFlyFrm =
@@ -2368,7 +2368,7 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const
if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() )
{
SwOLENode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetOLENode();
- uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : 0 );
+ uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : nullptr );
if ( xObj.is() )
{
// TODO/LATER: use correct aspect
@@ -2398,7 +2398,7 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const
else
{
SwDrawContact* pTmp = static_cast<SwDrawContact*>(GetUserCall(pObj));
- pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : NULL;
+ pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : nullptr;
}
if( pAnch && pAnch->IsProtected() )
return eType;
@@ -2711,7 +2711,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
SdrModel* pDrawModel = pDrawView->GetModel();
SdrObject* pObj = SdrObjFactory::MakeNewObject(
SdrInventor, eSdrObjectKind,
- 0L, pDrawModel);
+ nullptr, pDrawModel);
if(pObj)
{
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 9baf44586d81..8068b6732935 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -71,16 +71,16 @@ using namespace ::com::sun::star;
inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; }
// table column cache
-SwTabCols *pLastCols = 0;
-const SwTable *pColumnCacheLastTable = 0;
-const SwTabFrm *pColumnCacheLastTabFrm = 0;
-const SwFrm *pColumnCacheLastCellFrm = 0;
+SwTabCols *pLastCols = nullptr;
+const SwTable *pColumnCacheLastTable = nullptr;
+const SwTabFrm *pColumnCacheLastTabFrm = nullptr;
+const SwFrm *pColumnCacheLastCellFrm = nullptr;
// table row cache
-SwTabCols *pLastRows = 0;
-const SwTable *pRowCacheLastTable = 0;
-const SwTabFrm *pRowCacheLastTabFrm = 0;
-const SwFrm *pRowCacheLastCellFrm = 0;
+SwTabCols *pLastRows = nullptr;
+const SwTable *pRowCacheLastTable = nullptr;
+const SwTabFrm *pRowCacheLastTabFrm = nullptr;
+const SwFrm *pRowCacheLastCellFrm = nullptr;
class TableWait
{
@@ -132,7 +132,7 @@ void SwFEShell::ParkCursorInTab()
/* Set cursor to end of selection to ensure IsLastCellInRow works
properly. */
{
- SwCursor aTmpCrsr( aEndPos, 0, false );
+ SwCursor aTmpCrsr( aEndPos, nullptr, false );
*pSwCrsr = aTmpCrsr;
}
@@ -146,13 +146,13 @@ void SwFEShell::ParkCursorInTab()
it to the next cell. */
{
- SwCursor aTmpCrsr( aStartPos, 0, false );
+ SwCursor aTmpCrsr( aStartPos, nullptr, false );
*pSwCrsr = aTmpCrsr;
}
if (! pSwCrsr->GoPrevCell())
{
- SwCursor aTmpCrsr( aEndPos, 0, false );
+ SwCursor aTmpCrsr( aEndPos, nullptr, false );
*pSwCrsr = aTmpCrsr;
pSwCrsr->GoNextCell();
}
@@ -164,13 +164,13 @@ void SwFEShell::ParkCursorInTab()
to the previous cell. */
{
- SwCursor aTmpCrsr( aEndPos, 0, false );
+ SwCursor aTmpCrsr( aEndPos, nullptr, false );
*pSwCrsr = aTmpCrsr;
}
if (! pSwCrsr->GoNextCell())
{
- SwCursor aTmpCrsr( aStartPos, 0, false );
+ SwCursor aTmpCrsr( aStartPos, nullptr, false );
*pSwCrsr = aTmpCrsr;
pSwCrsr->GoPrevCell();
}
@@ -359,7 +359,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable)
SwTableNode* pTableNd = static_cast<SwContentFrm*>(pFrm)->GetNode()->FindTableNode();
// search all boxes / lines
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
{
_FndPara aPara( aBoxes, &aFndBox );
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
@@ -460,7 +460,7 @@ sal_uInt16 SwFEShell::MergeTab()
SET_CURR_SHELL( this );
StartAllAction();
- TableWait aWait(pTableCrsr->GetSelectedBoxesCount(), 0,
+ TableWait aWait(pTableCrsr->GetSelectedBoxesCount(), nullptr,
*GetDoc()->GetDocShell(),
pTableNd->GetTable().GetTabLines().size() );
@@ -572,7 +572,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
}
if ( !pLastCols )
{
- SwDoc::GetTabCols( rToFill, 0, static_cast<const SwCellFrm*>(pBox) );
+ SwDoc::GetTabCols( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) );
pLastCols = new SwTabCols( rToFill );
pColumnCacheLastTable = pTab->GetTable();
@@ -628,7 +628,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
}
if ( !pLastRows )
{
- SwDoc::GetTabRows( rToFill, 0, static_cast<const SwCellFrm*>(pBox) );
+ SwDoc::GetTabRows( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) );
pLastRows = new SwTabCols( rToFill );
pRowCacheLastTable = pTab->GetTable();
@@ -650,7 +650,7 @@ void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly )
pBox = pBox->GetUpper();
} while ( !pBox->IsCellFrm() );
- GetDoc()->SetTabCols( rNew, bCurRowOnly, 0, static_cast<SwCellFrm*>(pBox) );
+ GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<SwCellFrm*>(pBox) );
EndAllActionAndCall();
}
@@ -691,7 +691,7 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly )
pBox = pBox->GetUpper();
} while ( !pBox->IsCellFrm() );
- GetDoc()->SetTabRows( rNew, bCurColOnly, 0, static_cast<SwCellFrm*>(pBox) );
+ GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<SwCellFrm*>(pBox) );
EndAllActionAndCall();
}
@@ -709,7 +709,7 @@ void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const
{
SET_CURR_SHELL( this );
StartAllAction();
- GetDoc()->SetTabRows( rNew, bCurColOnly, 0, static_cast<const SwCellFrm*>(pBox) );
+ GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<const SwCellFrm*>(pBox) );
EndAllActionAndCall();
}
}
@@ -997,7 +997,7 @@ bool SwFEShell::CanUnProtectCells() const
sal_uInt16 SwFEShell::GetRowsToRepeat() const
{
const SwFrm *pFrm = GetCurrFrm();
- const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
+ const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr;
if( pTab )
return pTab->GetTable()->GetRowsToRepeat();
return 0;
@@ -1006,7 +1006,7 @@ sal_uInt16 SwFEShell::GetRowsToRepeat() const
void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet )
{
SwFrm *pFrm = GetCurrFrm();
- SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
+ SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr;
if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet )
{
SwWait aWait( *GetDoc()->GetDocShell(), true );
@@ -1025,10 +1025,10 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos )
const SwContentNode *pNd;
const SwContentFrm *pFrm;
- if( 0 != ( pNd = rPos.nNode.GetNode().GetContentNode() ))
+ if( nullptr != ( pNd = rPos.nNode.GetNode().GetContentNode() ))
pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, &rPos, false );
else
- pFrm = 0;
+ pFrm = nullptr;
if ( pFrm && pFrm->IsInTab() )
{
@@ -1093,7 +1093,7 @@ bool SwFEShell::CheckHeadline( bool bRepeat ) const
if ( !IsTableMode() )
{
SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER
- SwTabFrm* pTab = (pFrm && pFrm->IsInTab()) ? pFrm->FindTabFrm() : NULL;
+ SwTabFrm* pTab = (pFrm && pFrm->IsInTab()) ? pFrm->FindTabFrm() : nullptr;
if (pTab)
{
if ( bRepeat )
@@ -1117,7 +1117,7 @@ void SwFEShell::AdjustCellWidth( bool bBalance )
// switch on wait-cursor, as we do not know how
// much content is affected
- TableWait aWait(::std::numeric_limits<size_t>::max(), 0,
+ TableWait aWait(::std::numeric_limits<size_t>::max(), nullptr,
*GetDoc()->GetDocShell());
GetDoc()->AdjustCellWidth( *getShellCrsr( false ), bBalance );
@@ -1389,7 +1389,7 @@ static const SwFrm *lcl_FindFrmInTab( const SwLayoutFrm *pLay, const Point &rPt,
pFrm = pFrm->FindNext();
}
- return 0;
+ return nullptr;
}
static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
@@ -1399,13 +1399,13 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
// Method is called for
// - Moving columns/rows with the mouse or
// - Enhanced table selection
- const bool bMouseMoveRowCols = 0 == pbCol;
+ const bool bMouseMoveRowCols = nullptr == pbCol;
bool bCloseToRow = false;
bool bCloseToCol = false;
const SwFrm *pFrm = pLay->ContainsContent();
- const SwFrm* pRet = 0;
+ const SwFrm* pRet = nullptr;
if ( pFrm )
{
@@ -1487,7 +1487,7 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
const SwFrm* pTmp = bSearchForFrmInTab ?
::lcl_FindFrmInTab( static_cast<const SwLayoutFrm*>(pFrm), aPt, nTmpFuzzy ) :
- 0;
+ nullptr;
if ( pTmp )
{
@@ -1578,7 +1578,7 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
// robust:
OSL_ENSURE( !pRet || pRet->IsCellFrm(), "lcl_FindFrm() is supposed to find a cell frame!" );
- return pRet && pRet->IsCellFrm() ? static_cast<const SwCellFrm*>(pRet) : 0;
+ return pRet && pRet->IsCellFrm() ? static_cast<const SwCellFrm*>(pRet) : nullptr;
}
// pbCol = 0 => Used for moving table rows/cols with mouse
@@ -1603,7 +1603,7 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con
while ( pPage && !pPage->Frm().IsNear( rPt, nFuzzy ) )
pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
- const SwCellFrm *pFrm = 0;
+ const SwCellFrm *pFrm = nullptr;
if ( pPage )
{
// We cannot search the box by GetCrsrOfst or GetContentPos.
@@ -1767,7 +1767,7 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr
if ( pEnd )
aEndPt = *pEnd;
- SwPosition* ppPos[2] = { 0, 0 };
+ SwPosition* ppPos[2] = { nullptr, nullptr };
Point paPt [2] = { rPt, aEndPt };
bool pbRow[2] = { false, false };
bool pbCol[2] = { false, false };
@@ -1784,7 +1784,7 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr
pFrm = static_cast<const SwCellFrm*>( static_cast<const SwLayoutFrm*>( pFrm->Lower() )->Lower() );
if( pFrm && pFrm->GetTabBox()->GetSttNd() &&
pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() )
- pFrm = 0;
+ pFrm = nullptr;
}
if ( pFrm )
@@ -1900,7 +1900,7 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const
pFrm = static_cast<const SwCellFrm*>(static_cast<const SwLayoutFrm*>(pFrm->Lower())->Lower());
if( pFrm && pFrm->GetTabBox()->GetSttNd() &&
pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() )
- pFrm = 0;
+ pFrm = nullptr;
}
if( pFrm )
@@ -1958,7 +1958,7 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const
// -> #i23726#
SwTextNode * SwFEShell::GetNumRuleNodeAtPos( const Point &rPt)
{
- SwTextNode * pResult = NULL;
+ SwTextNode * pResult = nullptr;
SwContentAtPos aContentAtPos
(SwContentAtPos::SW_NUMLABEL);
@@ -2030,7 +2030,7 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
{
SET_CURR_SHELL( this );
StartAllAction();
- GetDoc()->SetTabCols( rNew, bCurRowOnly, 0, static_cast<const SwCellFrm*>(pBox) );
+ GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<const SwCellFrm*>(pBox) );
EndAllActionAndCall();
}
}
@@ -2092,7 +2092,7 @@ void SwFEShell::SetTableAttr( const SfxItemSet &rNew )
SET_CURR_SHELL( this );
StartAllAction();
SwTabFrm *pTab = pFrm->FindTabFrm();
- pTab->GetTable()->SetHTMLTableLayout( 0 );
+ pTab->GetTable()->SetHTMLTableLayout( nullptr );
GetDoc()->SetAttr( rNew, *pTab->GetFormat() );
GetDoc()->getIDocumentState().SetModified();
EndAllActionAndCall();
@@ -2106,15 +2106,15 @@ void SwFEShell::SetTableAttr( const SfxItemSet &rNew )
*/
static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp )
{
- OSL_ENSURE( pShell != NULL, "need shell" );
+ OSL_ENSURE( pShell != nullptr, "need shell" );
SwPaM* pPam = pShell->GetCrsr();
const SwStartNode* pTableBox = pPam->GetNode().FindTableBoxStartNode();
- OSL_ENSURE( pTableBox != NULL, "I'm living in a box... NOT!" );
+ OSL_ENSURE( pTableBox != nullptr, "I'm living in a box... NOT!" );
// move cursor to start node of table box
pPam->GetPoint()->nNode = pTableBox->GetIndex();
- pPam->GetPoint()->nContent.Assign( NULL, 0 );
+ pPam->GetPoint()->nContent.Assign( nullptr, 0 );
GoInContent( *pPam, fnMoveForward );
// go to beginning end of table box
@@ -2201,7 +2201,7 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff )
*const_cast<SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()),
eType, nDiff, nLogDiff );
- delete pLastCols, pLastCols = 0;
+ delete pLastCols, pLastCols = nullptr;
EndAllActionAndCall();
if( bRet && (eType & (nsTableChgWidthHeightType::WH_FLAG_BIGGER | nsTableChgWidthHeightType::WH_FLAG_INSDEL)) == nsTableChgWidthHeightType::WH_FLAG_INSDEL )
@@ -2258,7 +2258,7 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul
bool SwFEShell::GetAutoSum( OUString& rFormula ) const
{
SwFrm *pFrm = GetCurrFrm();
- SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : 0;
+ SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : nullptr;
if( !pTab )
return false;
@@ -2365,7 +2365,7 @@ bool SwFEShell::IsTableRightToLeft() const
bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
{
SwFrm *pFrm = const_cast<SwFrm *>(GetBox( rPt ));
- const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0;
+ const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : nullptr;
OSL_ENSURE( pTabFrm, "Table not found" );
return pTabFrm && pTabFrm->IsRightToLeft();
}
@@ -2373,7 +2373,7 @@ bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
bool SwFEShell::IsTableVertical() const
{
SwFrm *pFrm = GetCurrFrm();
- SwTabFrm *pTab = (pFrm && pFrm->IsInTab()) ? pFrm->ImplFindTabFrm() : NULL;
+ SwTabFrm *pTab = (pFrm && pFrm->IsInTab()) ? pFrm->ImplFindTabFrm() : nullptr;
if (!pTab)
return false;
return pTab->IsVertical();
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 98469a66155b..21c01eba28e6 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -81,7 +81,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
const SwFrm *pFrm = Imp()->HasDrawView()
? ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)))
- : 0;
+ : nullptr;
if( !pFrm )
{
@@ -146,7 +146,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
break;
case RECT_HEADERFOOTER_PRT: bFrm = false; /* no break */
- case RECT_HEADERFOOTER: if( 0 == (pFrm = pFrm->FindFooterOrHeader()) )
+ case RECT_HEADERFOOTER: if( nullptr == (pFrm = pFrm->FindFooterOrHeader()) )
return GetLayout()->Frm();
break;
@@ -200,7 +200,7 @@ bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum,
rDisplay = rNum.GetNumStr( rVirtNum );
}
- return 0 != pPage;
+ return nullptr != pPage;
}
bool SwFEShell::IsDirectlyInSection() const
@@ -392,7 +392,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
const bool bCpyBrd )
{
// get node index of cursor position, SwDoc can do everything else itself
- SwContentFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( false );
+ SwContentFrm *pCnt = LTYPE_DRAW==eType ? nullptr : GetCurrFrm( false );
if( LTYPE_DRAW==eType || pCnt )
{
StartAllAction();
@@ -401,7 +401,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
sal_uLong nIdx = 0;
bool bInnerCntIsFly = false;
- SwFlyFrameFormat* pFlyFormat = 0;
+ SwFlyFrameFormat* pFlyFormat = nullptr;
switch( eType )
{
case LTYPE_OBJECT:
@@ -611,9 +611,9 @@ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm,
}
if( !pFrm )
{
- pPara->pFrameFormat = 0;
- pPara->pPrtRect = 0;
- pPara->pFrmRect = 0;
+ pPara->pFrameFormat = nullptr;
+ pPara->pPrtRect = nullptr;
+ pPara->pFrmRect = nullptr;
}
}
break;
@@ -682,7 +682,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
if( _opRef )
{
pFrm = GetCurrFrm();
- if( 0 != ( pFly = pFrm->FindFlyFrm() ) )
+ if( nullptr != ( pFly = pFrm->FindFlyFrm() ) )
pFrm = pFly->GetAnchorFrm();
}
else
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 269cdd516434..ae6065c2f94d 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -161,7 +161,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
// Check for complex tables. If Yes, search selected boxes via
// the layout. Otherwise via the table structure (for macros !!)
const SwContentNode* pContentNd = rCrsr.GetNode().GetContentNode();
- const SwTableNode* pTableNd = pContentNd ? pContentNd->FindTableNode() : 0;
+ const SwTableNode* pTableNd = pContentNd ? pContentNd->FindTableNode() : nullptr;
if( pTableNd && pTableNd->GetTable().IsNewModel() )
{
SwTable::SearchType eSearch;
@@ -187,7 +187,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
OSL_ENSURE( pMarkBox, "Point in table, mark outside?" );
- const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0;
+ const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : nullptr;
sal_uInt16 nSttPos = rLines.GetPos( pLine );
OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" );
pLine = rTable.GetTableBox( rCrsr.GetNode().StartOfSectionIndex() )->GetUpper();
@@ -227,12 +227,12 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
}
const SwContentNode *pCntNd = rCrsr.GetContentNode();
const SwLayoutFrm *pStart = pCntNd ?
- pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : 0;
+ pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : nullptr;
pCntNd = rCrsr.GetContentNode(false);
const SwLayoutFrm *pEnd = pCntNd ?
- pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : 0;
+ pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : nullptr;
if( pStart && pEnd )
- GetTableSel( pStart, pEnd, rBoxes, 0, eSearchType );
+ GetTableSel( pStart, pEnd, rBoxes, nullptr, eSearchType );
}
}
@@ -263,10 +263,10 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
Point aCurrentTopRight( 0, LONG_MAX );
Point aCurrentBottomLeft( LONG_MAX, 0 );
Point aCurrentBottomRight( 0, 0 );
- const SwCellFrm* pCurrentTopLeftFrm = 0;
- const SwCellFrm* pCurrentTopRightFrm = 0;
- const SwCellFrm* pCurrentBottomLeftFrm = 0;
- const SwCellFrm* pCurrentBottomRightFrm = 0;
+ const SwCellFrm* pCurrentTopLeftFrm = nullptr;
+ const SwCellFrm* pCurrentTopRightFrm = nullptr;
+ const SwCellFrm* pCurrentBottomLeftFrm = nullptr;
+ const SwCellFrm* pCurrentBottomRightFrm = nullptr;
// Now find boxes for each entry and emit
for (size_t i = 0; i < aUnions.size() && bTableIsValid; ++i)
@@ -392,7 +392,7 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
pTable->SetONECalcLowers();
pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut());
pTable->SetCompletePaint();
- if( 0 == (pTable = pTable->GetFollow()) )
+ if( nullptr == (pTable = pTable->GetFollow()) )
break;
}
@@ -429,7 +429,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
// #i22135# - Also the content of the table could be
// invisible - e.g. in a hidden section
// Robust: check, if content was found (e.g. empty table cells)
- if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == NULL )
+ if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr )
return false;
const SwLayoutFrm *pStart = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper();
@@ -441,7 +441,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
pCNd = aIdx.GetNodes().GoNextSection( &aIdx, false, false );
// #i22135# - Robust: check, if content was found and if it's visible
- if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == NULL )
+ if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr )
{
return false;
}
@@ -634,7 +634,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
pTable->SetONECalcLowers();
pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut());
pTable->SetCompletePaint();
- if( 0 == (pTable = pTable->GetFollow()) )
+ if( nullptr == (pTable = pTable->GetFollow()) )
break;
}
--nLoopMax;
@@ -707,7 +707,7 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
if( pRow->Frm().IsOver( pUnion->GetUnion() ) )
{
- const SwCellFrm* pUpperCell = 0;
+ const SwCellFrm* pUpperCell = nullptr;
const SwLayoutFrm *pCell = pRow->FirstCell();
while( pCell && pRow->IsAnLower( pCell ) )
@@ -858,7 +858,7 @@ static void lcl_InsTableBox( SwTableNode* pTableNd, SwDoc* pDoc, SwTableBox* pBo
else
pDoc->GetNodes().InsBoxen( pTableNd, pBox->GetUpper(),
static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()),
- pDoc->GetDfltTextFormatColl(), 0,
+ pDoc->GetDfltTextFormatColl(), nullptr,
nInsPos, nCnt );
}
@@ -931,7 +931,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
_MergePos aPosArr; // Sort-Array with the frame positions
long nWidth;
- SwTableBox* pLastBox = 0;
+ SwTableBox* pLastBox = nullptr;
SWRECTFN( pStart->GetUpper() )
@@ -1031,7 +1031,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
.GetItemState( RES_BOX, false, &pItem ))
{
SvxBoxItem aBox( *static_cast<const SvxBoxItem*>(pItem) );
- aBox.SetLine( 0, SvxBoxItemLine::RIGHT );
+ aBox.SetLine( nullptr, SvxBoxItemLine::RIGHT );
pBox->GetFrameFormat()->SetFormatAttr( aBox );
}
}
@@ -1305,7 +1305,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
lcl_InsTableBox( pTableNd, pDoc, pTmpBox, nInsPos );
(*ppMergeBox) = pInsLine->GetTabBoxes()[ nInsPos ];
pInsLine->GetTabBoxes().erase( pInsLine->GetTabBoxes().begin() + nInsPos ); // remove again
- (*ppMergeBox)->SetUpper( 0 );
+ (*ppMergeBox)->SetUpper( nullptr );
(*ppMergeBox)->ClaimFrameFormat();
// define the border: the upper/left side of the first box,
@@ -1435,7 +1435,7 @@ sal_uInt16 CheckMergeSel( const SwPaM& rPam )
pCntNd = rPam.GetContentNode(false);
const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(),
&aPt )->GetUpper();
- GetTableSel( pStart, pEnd, aBoxes, 0 );
+ GetTableSel( pStart, pEnd, aBoxes, nullptr );
return CheckMergeSel( aBoxes );
}
@@ -1446,7 +1446,7 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
{
eRet = TBLMERGE_OK;
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
_FndPara aPara( rBoxes, &aFndBox );
const SwTableNode* pTableNd = aPara.rBoxes[0]->GetSttNd()->FindTableNode();
ForEach_FndLineCopyCol( (SwTableLines&)pTableNd->GetTable().GetTabLines(), &aPara );
@@ -1454,14 +1454,14 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
{
bool bMergeSelOk = true;
_FndBox* pFndBox = &aFndBox;
- _FndLine* pFndLine = 0;
+ _FndLine* pFndLine = nullptr;
while( pFndBox && 1 == pFndBox->GetLines().size() )
{
pFndLine = pFndBox->GetLines().front().get();
if( 1 == pFndLine->GetBoxes().size() )
pFndBox = pFndLine->GetBoxes().front().get();
else
- pFndBox = 0;
+ pFndBox = nullptr;
}
if( pFndBox )
{
@@ -1509,7 +1509,7 @@ static SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish,
}
pTmp = pTmp->GetUpper()->GetUpper();
if ( pTmp && !pTmp->IsCellFrm() )
- pTmp = 0;
+ pTmp = nullptr;
}
return nRet;
}
@@ -1671,7 +1671,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
}
const SwContentFrm* pLastContent = pTab->FindLastContent();
- rpEnd = pLastContent ? pLastContent->GetUpper() : 0;
+ rpEnd = pLastContent ? pLastContent->GetUpper() : nullptr;
// --> Made code robust. If pTab does not have a lower,
// we would crash here.
if ( !pLastContent ) return;
@@ -1874,7 +1874,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
// A follow flow row may contain emtpy cells. These are not
// considered by FirstCell(). Therefore we have to find
// the first cell manually:
- const SwFrm* pTmpCell = 0;
+ const SwFrm* pTmpCell = nullptr;
if ( pTable->IsFollow() && pRow && pRow->IsInFollowFlowRow() )
{
const SwFrm* pTmpRow = pRow;
@@ -1890,7 +1890,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
static_cast<const SwLayoutFrm*>(pTmpCell) :
pRow ?
pRow->FirstCell() :
- 0;
+ nullptr;
while ( pFirst && !::IsFrmInTableSel( aUnion, pFirst ) )
{
@@ -1903,7 +1903,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
else
pFirst = ::lcl_FindNextCellFrm( pFirst );
}
- const SwLayoutFrm* pLast = 0;
+ const SwLayoutFrm* pLast = nullptr;
const SwFrm* pLastContent = pTable->FindLastContent();
if ( pLastContent )
pLast = ::lcl_FindCellFrm( pLastContent->GetUpper() );
@@ -1927,7 +1927,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
pTable = pTable->GetFollow();
if ( pTable != pEndTable && pEndTable->IsAnFollow( pTable ) )
- pTable = 0;
+ pTable = nullptr;
}
}
@@ -2136,7 +2136,7 @@ void _FndBox::SetTableLines( const SwTable &rTable )
inline void UnsetFollow( SwFlowFrm *pTab )
{
- pTab->m_pPrecede = 0;
+ pTab->m_pPrecede = nullptr;
}
//When bAccTableDispose is FALSE,the acc table should not be disposed.
@@ -2181,7 +2181,7 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose )
{
bool bDel = true;
SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ?
- static_cast<SwTabFrm*>(pFrm->GetUpper()) : 0;
+ static_cast<SwTabFrm*>(pFrm->GetUpper()) : nullptr;
if ( !pUp )
{
const sal_uInt16 nRepeat =
@@ -2203,7 +2203,7 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose )
if ( pUp )
{
SwTabFrm *pFollow = pUp->GetFollow();
- SwTabFrm *pPrev = pUp->IsFollow() ? pUp : 0;
+ SwTabFrm *pPrev = pUp->IsFollow() ? pUp : nullptr;
if ( pPrev )
{
SwFrm *pTmp = pPrev->FindPrev();
@@ -2283,8 +2283,8 @@ static void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers )
OSL_ENSURE( rTabFrm.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" );
// Delete remaining headlines:
- SwRowFrm* pLower = 0;
- while ( 0 != ( pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()) ) && pLower->IsRepeatedHeadline() )
+ SwRowFrm* pLower = nullptr;
+ while ( nullptr != ( pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()) ) && pLower->IsRepeatedHeadline() )
{
pLower->Cut();
SwFrm::DestroyFrm(pLower);
@@ -2333,8 +2333,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
{
if ( !pTable->IsFollow() )
{
- SwRowFrm *pSibling = 0;
- SwFrm *pUpperFrm = 0;
+ SwRowFrm *pSibling = nullptr;
+ SwFrm *pUpperFrm = nullptr;
int i;
for ( i = rTable.GetTabLines().size()-1;
i >= 0 && !pSibling; --i )
@@ -2359,7 +2359,7 @@ void _FndBox::MakeFrms( SwTable &rTable )
{
pUpperFrm = pSibling->GetUpper();
if ( !pLineBehind )
- pSibling = 0;
+ pSibling = nullptr;
}
else
// ???? or is this the last Follow of the table ????
@@ -2406,8 +2406,8 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
{
if( !pTable->IsFollow() )
{
- SwRowFrm* pSibling = 0;
- SwLayoutFrm *pUpperFrm = 0;
+ SwRowFrm* pSibling = nullptr;
+ SwLayoutFrm *pUpperFrm = nullptr;
if ( bBehind )
{
if ( pLineBehind )
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 8327c64fbc81..a86822b10ed1 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -68,7 +68,7 @@ SwGrfNode::SwGrfNode(
SwAttrSet* pAutoAttr ) :
SwNoTextNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
maGrfObj(),
- mpReplacementGraphic(0),
+ mpReplacementGraphic(nullptr),
// #i73788#
mbLinkedInputStreamReady( false ),
mbIsStreamReadOnly( false )
@@ -78,7 +78,7 @@ SwGrfNode::SwGrfNode(
bFrameInPaint = bScaleImageMap = false;
bGraphicArrived = true;
- ReRead(rGrfName, rFltName, pGraphic, 0, false);
+ ReRead(rGrfName, rFltName, pGraphic, nullptr, false);
}
SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
@@ -86,7 +86,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
SwGrfFormatColl *pGrfColl, SwAttrSet* pAutoAttr ) :
SwNoTextNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
maGrfObj(rGrfObj),
- mpReplacementGraphic(0),
+ mpReplacementGraphic(nullptr),
// #i73788#
mbLinkedInputStreamReady( false ),
mbIsStreamReadOnly( false )
@@ -109,7 +109,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
SwAttrSet* pAutoAttr ) :
SwNoTextNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
maGrfObj(),
- mpReplacementGraphic(0),
+ mpReplacementGraphic(nullptr),
// #i73788#
mbLinkedInputStreamReady( false ),
mbIsStreamReadOnly( false )
@@ -144,7 +144,7 @@ bool SwGrfNode::ReRead(
bool bReadGrf = false;
bool bSetTwipSize = true;
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
OSL_ENSURE( pGraphic || pGrfObj || !rGrfName.isEmpty(),
"GraphicNode without a name, Graphic or GraphicObject" );
@@ -165,7 +165,7 @@ bool SwGrfNode::ReRead(
nNewType = OBJECT_CLIENT_DDE;
else
{
- sfx2::MakeLnkName( sCmd, 0, rGrfName, OUString(), &rFltName );
+ sfx2::MakeLnkName( sCmd, nullptr, rGrfName, OUString(), &rFltName );
nNewType = OBJECT_CLIENT_GRF;
}
@@ -277,7 +277,7 @@ bool SwGrfNode::ReRead(
// Bug 39281: Do not delete Size immediately - Events on ImageMaps should have
// something to work with when swapping
if( bSetTwipSize )
- SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), 0 ) );
+ SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), nullptr ) );
// create an updates for the frames
if( bReadGrf && bNewGrf )
@@ -292,7 +292,7 @@ bool SwGrfNode::ReRead(
SwGrfNode::~SwGrfNode()
{
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
// #i73788#
mpThreadConsumer.reset();
@@ -458,7 +458,7 @@ bool SwGrfNode::ImportGraphic( SvStream& rStrm )
if(!GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aURL, rStrm))
{
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
maGrfObj.SetGraphic( aGraphic );
onGraphicChanged();
@@ -536,7 +536,7 @@ bool SwGrfNode::SwapIn( bool bWaitForData )
{
// no default bitmap anymore, thus re-paint
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
maGrfObj.SetGraphic( Graphic() );
onGraphicChanged();
@@ -596,7 +596,7 @@ bool SwGrfNode::SwapIn( bool bWaitForData )
if( bRet )
{
if( !nGrfSize.Width() && !nGrfSize.Height() )
- SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), 0 ) );
+ SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), nullptr ) );
}
bInSwapIn = false;
return bRet;
@@ -630,7 +630,7 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const
sal_uInt16 nType = refLink->GetObjType();
if( OBJECT_CLIENT_GRF == nType )
bRet = sfx2::LinkManager::GetDisplayNames(
- refLink, 0, pFileNm, 0, pFilterNm );
+ refLink, nullptr, pFileNm, nullptr, pFilterNm );
else if( OBJECT_CLIENT_DDE == nType && pFileNm && pFilterNm )
{
OUString sApp;
@@ -721,7 +721,7 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName )
rIDLA.GetLinkManager().InsertFileLink( *refLink,
OBJECT_CLIENT_GRF, rGrfName,
- (!bSync && !rFltName.isEmpty() ? &rFltName : 0) );
+ (!bSync && !rFltName.isEmpty() ? &rFltName : nullptr) );
}
}
maGrfObj.SetLink( rGrfName );
@@ -887,7 +887,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
const uno::Reference< embed::XStorage >& _refPics,
const OUString& rStreamName ) const
{
- SvStream* pStrm( 0L );
+ SvStream* pStrm( nullptr );
if( _refPics.is() && !rStreamName.isEmpty() )
{
@@ -935,7 +935,7 @@ SwContentNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
OUString sFile, sFilter;
if( IsLinkedFile() )
- sfx2::LinkManager::GetDisplayNames( refLink, 0, &sFile, 0, &sFilter );
+ sfx2::LinkManager::GetDisplayNames( refLink, nullptr, &sFile, nullptr, &sFilter );
else if( IsLinkedDDE() )
{
OUString sTmp1, sTmp2;
@@ -1090,15 +1090,15 @@ void SwGrfNode::TriggerAsyncRetrieveInputStream()
return;
}
- if ( mpThreadConsumer.get() == 0 )
+ if ( mpThreadConsumer.get() == nullptr )
{
mpThreadConsumer.reset( new SwAsyncRetrieveInputStreamThreadConsumer( *this ) );
OUString sGrfNm;
- sfx2::LinkManager::GetDisplayNames( refLink, 0, &sGrfNm );
+ sfx2::LinkManager::GetDisplayNames( refLink, nullptr, &sGrfNm );
OUString sReferer;
SfxObjectShell * sh = GetDoc()->GetPersist();
- if (sh != 0 && sh->HasName())
+ if (sh != nullptr && sh->HasName())
{
sReferer = sh->GetMedium()->GetName();
}
@@ -1150,7 +1150,7 @@ bool SwGrfNode::IsAsyncRetrieveInputStreamPossible() const
if ( IsLinkedFile() )
{
OUString sGrfNm;
- sfx2::LinkManager::GetDisplayNames( refLink, 0, &sGrfNm );
+ sfx2::LinkManager::GetDisplayNames( refLink, nullptr, &sGrfNm );
if ( !sGrfNm.startsWith( "vnd.sun.star.pkg:" ) )
{
bRet = true;
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 51ed829fe27c..d12e8daad94f 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -129,8 +129,8 @@ public:
bool bExactRange;
ParaRstFormat(const SwPosition* pStt, const SwPosition* pEnd,
- SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = 0)
- : pFormatColl(0)
+ SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = nullptr)
+ : pFormatColl(nullptr)
, pHistory(pHst)
, pSttNd(pStt)
, pEndNd(pEnd)
@@ -160,7 +160,7 @@ private:
SwFlyFrameFormat* _InsNoTextNode( const SwPosition&rPos, SwNoTextNode*,
const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet,
- SwFrameFormat* = 0 );
+ SwFrameFormat* = nullptr );
/* Copy a range within the same or to another document.
Position may not lie within range! */
bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 20cdc585b25e..14c9c3662eff 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -71,7 +71,7 @@ public:
sal_uInt16 nType, /// type of this portion
sal_Int32 nHeight = 0, /// font height of the painted text
sal_Int32 nWidth = 0, /// width of this portion
- const SwFont* pFont = 0 /// font of this portion
+ const SwFont* pFont = nullptr /// font of this portion
) = 0;
/** line break. This method is called whenever a line break in the
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index d97f7faa1ab7..279fbee62bff 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -87,8 +87,8 @@ public:
UndoRedoContext(SwDoc & rDoc, IShellCursorSupplier & rCursorSupplier)
: m_rDoc(rDoc)
, m_rCursorSupplier(rCursorSupplier)
- , m_pSelFormat(0)
- , m_pMarkList(0)
+ , m_pSelFormat(nullptr)
+ , m_pMarkList(nullptr)
{ }
SwDoc & GetDoc() const { return m_rDoc; }
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 9987c519284d..95a7cbdbfd57 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -63,7 +63,7 @@ public:
SwUndoId *const o_pId) const override;
virtual SwUndoComments_t GetUndoComments() const override;
virtual bool GetFirstRedoInfo(OUString *const o_pStr,
- SwUndoId *const o_pId = 0) const override;
+ SwUndoId *const o_pId = nullptr) const override;
virtual SwUndoComments_t GetRedoComments() const override;
virtual bool Repeat(::sw::RepeatContext & rContext,
sal_uInt16 const nRepeatCnt) override;
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 201a00e33d89..2e18078a5ac1 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -257,7 +257,7 @@ class SwUndoTableNumFormat : public SwUndo
bool bNewValue : 1;
public:
- SwUndoTableNumFormat( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
+ SwUndoTableNumFormat( const SwTableBox& rBox, const SfxItemSet* pNewSet = nullptr );
virtual ~SwUndoTableNumFormat();
@@ -373,7 +373,7 @@ public:
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
};
-void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = nullptr );
#endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index 0d3bc22d84ad..79755d3eb510 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -35,7 +35,7 @@ class SwDontExpandItem
public:
SwDontExpandItem() :
- pDontExpItems(0){}
+ pDontExpItems(nullptr){}
~SwDontExpandItem();
void SaveDontExpandItems( const SwPosition& rPos );
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 8b9fc5d2d10a..6324679224e1 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -41,7 +41,7 @@ class SwBlinkPortion
public:
SwBlinkPortion(const SwLinePortion* pPortion, sal_uInt16 nDirection)
: pPor(pPortion)
- , pFrm(NULL)
+ , pFrm(nullptr)
, nDir(nDirection)
{
}
diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index 4ac9df775543..6d887e43d15d 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -27,7 +27,7 @@ class SwBorderAttrs;
class SwBodyFrm: public SwLayoutFrm
{
protected:
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
public:
SwBodyFrm( SwFrameFormat*, SwFrm* );
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 573a84e322b5..a6d4dc975525 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -36,15 +36,15 @@ class SwCellFrm: public SwLayoutFrm
virtual ~SwCellFrm();
protected:
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
public:
SwCellFrm( const SwTableBox &, SwFrm*, bool bInsertContent = true );
- virtual bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ virtual bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual void CheckDirection( bool bVert ) override;
// #i103961#
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index cabf271d8436..92f574ba0a87 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -48,7 +48,7 @@ class SwContentFrm: public SwFrm, public SwFlowFrm
virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
+ SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr );
virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool& ) override;
@@ -70,7 +70,7 @@ public:
TYPEINFO_OVERRIDE(); // already in base class
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
inline const SwContentNode *GetNode() const;
inline SwContentNode *GetNode();
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index d6863c574b01..0febbf8f9a07 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -88,7 +88,7 @@ public:
if( SwProtocol::Record( nFunc ) )
Ctor( pFrm, nFunc, nAct, pPar );
else
- pImpl = NULL;
+ pImpl = nullptr;
}
~SwEnterLeave()
{
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index b2d745619b45..bec2ad9ddbd0 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -60,36 +60,36 @@ class _SetGetExpField
} eSetGetExpFieldType;
public:
- _SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextField* pField = 0,
- const SwIndex* pIdx = 0 );
+ _SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextField* pField = nullptr,
+ const SwIndex* pIdx = nullptr );
_SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextINetFormat& rINet,
- const SwIndex* pIdx = 0 );
+ const SwIndex* pIdx = nullptr );
_SetGetExpField( const SwSectionNode& rSectNode,
- const SwPosition* pPos = 0 );
+ const SwPosition* pPos = nullptr );
_SetGetExpField( const SwTableBox& rTableBox,
- const SwPosition* pPos = 0 );
+ const SwPosition* pPos = nullptr );
_SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextTOXMark& rTOX,
const SwIndex* pIdx );
_SetGetExpField( const SwPosition& rPos );
- _SetGetExpField( const SwFlyFrameFormat& rFlyFormat, const SwPosition* pPos = 0 );
+ _SetGetExpField( const SwFlyFrameFormat& rFlyFormat, const SwPosition* pPos = nullptr );
bool operator==( const _SetGetExpField& rField ) const;
bool operator<( const _SetGetExpField& rField ) const;
const SwTextField* GetTextField() const
- { return TEXTFIELD == eSetGetExpFieldType ? CNTNT.pTextField : 0; }
+ { return TEXTFIELD == eSetGetExpFieldType ? CNTNT.pTextField : nullptr; }
const SwSection* GetSection() const
- { return SECTIONNODE == eSetGetExpFieldType ? CNTNT.pSection : 0; }
+ { return SECTIONNODE == eSetGetExpFieldType ? CNTNT.pSection : nullptr; }
const SwTextINetFormat* GetINetFormat() const
- { return TEXTINET == eSetGetExpFieldType ? CNTNT.pTextINet : 0; }
+ { return TEXTINET == eSetGetExpFieldType ? CNTNT.pTextINet : nullptr; }
const SwFlyFrameFormat* GetFlyFormat() const
- { return FLYFRAME == eSetGetExpFieldType ? CNTNT.pFlyFormat : 0; }
+ { return FLYFRAME == eSetGetExpFieldType ? CNTNT.pFlyFormat : nullptr; }
sal_uLong GetNode() const { return nNode; }
sal_Int32 GetContent() const { return nContent; }
@@ -113,7 +113,7 @@ public:
struct _HashStr : public SwHash
{
OUString aSetStr;
- _HashStr( const OUString& rName, const OUString& rText, _HashStr* = 0 );
+ _HashStr( const OUString& rName, const OUString& rText, _HashStr* = nullptr );
};
struct SwCalcFieldType : public SwHash
@@ -127,7 +127,7 @@ struct SwCalcFieldType : public SwHash
// search for the string that was saved under rName in the hash table
OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName,
- sal_uInt16* pPos = 0 );
+ sal_uInt16* pPos = nullptr );
const int GETFLD_ALL = 3; // combine flags via OR
const int GETFLD_CALC = 1;
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index 0dac71b4d0f4..54e94bbecdeb 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -57,11 +57,11 @@ public:
// Functions for moving boxes
void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox,
- sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=nullptr);
void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox,
- sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=nullptr);
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource,
- const SwTableBox* pTar, bool bMovedBefore, SwUndoSort* pUD=0);
+ const SwTableBox* pTar, bool bMovedBefore, SwUndoSort* pUD=nullptr);
// Elements for sorting text and table content
struct SwSortElement
@@ -74,7 +74,7 @@ struct SwSortElement
static OUString* pLastAlgorithm;
static LocaleDataWrapper* pLclData;
- static void Init( SwDoc*, const SwSortOptions& rOpt, FlatFndBox* = 0 );
+ static void Init( SwDoc*, const SwSortOptions& rOpt, FlatFndBox* = nullptr );
static void Finit();
virtual ~SwSortElement();
@@ -150,7 +150,7 @@ private:
bool bSym;
};
-inline bool FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
+inline bool FlatFndBox::HasItemSets() const { return nullptr != ppItemSets; }
#endif
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 2a0aa97da2ff..2b084ede4ebd 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -74,7 +74,7 @@ public:
// <_bNewTOX> : distinguish between the creation of a new table-of-content
// (true) or an update of a table-of-content (false)
- void Update( const SfxItemSet* pAttr = 0,
+ void Update( const SfxItemSet* pAttr = nullptr,
const bool _bNewTOX = false );
void UpdatePageNum(); // insert page numbering
TYPEINFO_OVERRIDE(); // for rtti
@@ -96,14 +96,14 @@ struct SwDefTOXBase_Impl
SwTOXBase* pBiblioBase;
SwDefTOXBase_Impl() :
- pContBase(0),
- pIdxBase(0),
- pUserBase(0),
- pTableBase(0),
- pObjBase(0),
- pIllBase(0),
- pAuthBase(0),
- pBiblioBase(0)
+ pContBase(nullptr),
+ pIdxBase(nullptr),
+ pUserBase(nullptr),
+ pTableBase(nullptr),
+ pObjBase(nullptr),
+ pIllBase(nullptr),
+ pAuthBase(nullptr),
+ pBiblioBase(nullptr)
{
}
~SwDefTOXBase_Impl()
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index 98b2e4a52090..a8852e164cbc 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -114,7 +114,7 @@ public:
vcl::TextLayoutCache const*const pCachedVclData = nullptr)
: m_pCachedVclData(pCachedVclData)
{
- m_pFrm = NULL;
+ m_pFrm = nullptr;
m_pSh = pSh;
m_pOut = &rOut;
m_pScriptInfo = pSI;
@@ -127,7 +127,7 @@ public:
m_nNumberOfBlanks = 0;
m_nCursorBidiLevel = 0;
m_bBullet = bBullet;
- m_pUnderFnt = 0;
+ m_pUnderFnt = nullptr;
m_bGreyWave = false;
m_bSpaceStop = false;
m_bSnapToGrid = false;
@@ -136,11 +136,11 @@ public:
// These values are initialized but have to be set explicitly via their
// Set-function before they may be accessed by their Get-function:
- m_pWrong = 0;
- m_pGrammarCheck = 0;
- m_pSmartTags = 0;
- m_pFnt = 0;
- m_pHyphPos = 0;
+ m_pWrong = nullptr;
+ m_pGrammarCheck = nullptr;
+ m_pSmartTags = nullptr;
+ m_pFnt = nullptr;
+ m_pHyphPos = nullptr;
m_nLeft = 0;
m_nRight = 0;
m_nKanaDiff = 0;
@@ -605,7 +605,7 @@ public:
// sets a new color at the output device if necessary if a font is passed
// as argument, the change if made to the font otherwise the font at the
// output device is changed returns if the font has been changed
- bool ApplyAutoColor( vcl::Font* pFnt = 0 );
+ bool ApplyAutoColor( vcl::Font* pFnt = nullptr );
};
#endif
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 0141db0cf85a..dad1fe298a39 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -51,7 +51,7 @@ class SwDrawView : public FmFormView
on the calculation of the maximal order number
*/
static sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
- const SdrObject* _pExclChildObj = 0L );
+ const SdrObject* _pExclChildObj = nullptr );
/** method to move 'repeated' objects of the given moved object to the
according level
@@ -79,7 +79,7 @@ protected:
virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const override;
public:
- SwDrawView( SwViewShellImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
+ SwDrawView( SwViewShellImp &rI, SdrModel *pMd, OutputDevice* pOutDev=nullptr );
// from base class
virtual SdrObject* GetMaxToTopObj(SdrObject* pObj) const override;
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index 6421a9efc6bd..d94bd5e9fda5 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -94,7 +94,7 @@ class SwFlowFrm
optional input parameter - pointer to frame, which should be used
instead of the direct previous frame.
*/
- const SwFrm* _GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm = 0L ) const;
+ const SwFrm* _GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm = nullptr ) const;
/** method to detemine the upper space amount, which is considered for
the previous frame
@@ -158,10 +158,10 @@ public:
bool IsPrevObjMove() const;
/** hook tree onto new parent with minimal operations and notifications */
- void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 );
+ void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = nullptr );
bool HasFollow() const { return m_pFollow != nullptr; }
- bool IsFollow() const { return 0 != m_pPrecede; }
+ bool IsFollow() const { return nullptr != m_pPrecede; }
bool IsAnFollow( const SwFlowFrm *pFlow ) const;
const SwFlowFrm *GetFollow() const { return m_pFollow; }
SwFlowFrm *GetFollow() { return m_pFollow; }
@@ -190,8 +190,8 @@ public:
@param _bConsiderGrid
optional input parameter - consider the page grid while calculating?
*/
- SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = NULL,
- const SwFrm* pPr = NULL,
+ SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = nullptr,
+ const SwFrm* pPr = nullptr,
const bool _bConsiderGrid = true ) const;
/** method to determine the upper space amount, which is considered for
@@ -203,7 +203,7 @@ public:
SwTwips GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const;
/** calculation of lower space */
- SwTwips CalcLowerSpace( const SwBorderAttrs* _pAttrs = 0L ) const;
+ SwTwips CalcLowerSpace( const SwBorderAttrs* _pAttrs = nullptr ) const;
/** calculation of the additional space to be considered, if flow frame
is the last inside a table cell
@@ -218,7 +218,7 @@ public:
@return SwTwips
*/
SwTwips CalcAddLowerSpaceAsLastInTableCell(
- const SwBorderAttrs* _pAttrs = 0L ) const;
+ const SwBorderAttrs* _pAttrs = nullptr ) const;
void CheckKeep();
@@ -233,7 +233,7 @@ public:
inline bool SwFlowFrm::IsFwdMoveAllowed()
{
- return m_rThis.GetIndPrev() != 0;
+ return m_rThis.GetIndPrev() != nullptr;
}
//use this to protect a SwLayoutFrm for a given scope from getting merged with
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 0e781ae4e29a..cbd417c01dc0 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -65,7 +65,7 @@ class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
void FinitDrawObj(); // constructors
void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
+ SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr );
using SwLayoutFrm::CalcRel;
@@ -121,7 +121,7 @@ protected:
Point m_aContentPos; // content area's position relatively to Frm
bool m_bValidContentPos;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
void MakePrtArea( const SwBorderAttrs &rAttrs );
void MakeContentPos( const SwBorderAttrs &rAttrs );
@@ -158,20 +158,20 @@ public:
// get client information
virtual bool GetInfo( SfxPoolItem& ) const override;
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual Size ChgSize( const Size& aNewSize ) override;
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
virtual void CheckDirection( bool bVert ) override;
virtual void Cut() override;
#ifdef DBG_UTIL
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
#endif
SwTwips _Shrink( SwTwips, bool bTst );
SwTwips _Grow ( SwTwips, bool bTst );
- void _Invalidate( SwPageFrm *pPage = 0 );
+ void _Invalidate( SwPageFrm *pPage = nullptr );
bool FrmSizeChg( const SwFormatFrmSize & );
@@ -181,7 +181,7 @@ public:
static void ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow );
static void UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow );
- SwFlyFrm *FindChainNeighbour( SwFrameFormat &rFormat, SwFrm *pAnch = 0 );
+ SwFlyFrm *FindChainNeighbour( SwFrameFormat &rFormat, SwFrm *pAnch = nullptr );
// #i26791#
const SwVirtFlyDrawObj* GetVirtDrawObj() const;
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 080d2be0c039..2a38939f9de5 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -195,7 +195,7 @@ public:
SwFlyInCntFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor );
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
void SetRefPoint( const Point& rPoint, const Point &rRelAttr,
const Point &rRelPos );
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 943503dce718..42b1a443661d 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -478,7 +478,7 @@ public:
virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs & ) const;
- void PaintBaBo( const SwRect&, const SwPageFrm *pPage = 0,
+ void PaintBaBo( const SwRect&, const SwPageFrm *pPage = nullptr,
const bool bLowerBorder = false, const bool bOnlyTextBackground = false ) const;
void PaintBackground( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs &,
@@ -560,13 +560,13 @@ public:
@return boolean, indicating, if frame is moveable in given environment
*/
- bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = 0L ) const;
+ bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = nullptr ) const;
// Is it permitted for the (Text)Frm to add a footnote in the current
// environment (not e.g. for repeating table headlines)
bool IsFootnoteAllowed() const;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 );
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr );
virtual void CheckDirection( bool bVert );
@@ -577,7 +577,7 @@ public:
inline bool HasFixSize() const { return mbFixSize; }
// check all pages (starting from the given) and correct them if needed
- static void CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields = true, SwPageFrm** ppPrev = 0);
+ static void CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields = true, SwPageFrm** ppPrev = nullptr);
// might return 0, with and without const
SwFrm *GetNext() { return mpNext; }
@@ -671,7 +671,7 @@ public:
virtual void Cut() = 0;
//Add a method to change the acc table dispose state.
void SetAccTableDispose(bool bDispose) { mbIfAccTableShouldDisposing = bDispose;}
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) = 0;
void ValidateLineNum() { mbValidLineNum = true; }
@@ -748,22 +748,22 @@ public:
*/
void InvalidateNextPrtArea();
- void InvalidatePage( const SwPageFrm *pPage = 0 ) const;
+ void InvalidatePage( const SwPageFrm *pPage = nullptr ) const;
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const;
virtual bool GetCharRect( SwRect &, const SwPosition&,
- SwCrsrMoveState* = 0 ) const;
+ SwCrsrMoveState* = nullptr ) const;
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const;
+ SwPrintData const*const pPrintData = nullptr ) const;
// HACK: shortcut between frame and formatting
// It's your own fault if you cast void* incorrectly! In any case check
// the void* for 0.
virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
- const void *pVoid = 0, bool bNotify = true );
+ const void *pVoid = nullptr, bool bNotify = true );
// true if it is the correct class, false otherwise
inline bool IsLayoutFrm() const;
@@ -856,7 +856,7 @@ public:
public:
// if writer is NULL, dumps the layout structure as XML in layout.xml
- virtual void dumpAsXml(xmlTextWriterPtr writer = NULL) const;
+ virtual void dumpAsXml(xmlTextWriterPtr writer = nullptr) const;
void dumpInfosAsXml(xmlTextWriterPtr writer) const;
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
void dumpChildrenAsXml(xmlTextWriterPtr writer) const;
@@ -1004,7 +1004,7 @@ inline const SwFrm *SwFrm::FindFooterOrHeader() const
}
inline SwTabFrm *SwFrm::FindTabFrm()
{
- return IsInTab() ? ImplFindTabFrm() : 0;
+ return IsInTab() ? ImplFindTabFrm() : nullptr;
}
inline const SwFootnoteBossFrm *SwFrm::FindFootnoteBossFrm( bool bFootnote ) const
{
@@ -1012,32 +1012,32 @@ inline const SwFootnoteBossFrm *SwFrm::FindFootnoteBossFrm( bool bFootnote ) con
}
inline SwFootnoteFrm *SwFrm::FindFootnoteFrm()
{
- return IsInFootnote() ? ImplFindFootnoteFrm() : 0;
+ return IsInFootnote() ? ImplFindFootnoteFrm() : nullptr;
}
inline SwFlyFrm *SwFrm::FindFlyFrm()
{
- return IsInFly() ? ImplFindFlyFrm() : 0;
+ return IsInFly() ? ImplFindFlyFrm() : nullptr;
}
inline SwSectionFrm *SwFrm::FindSctFrm()
{
- return IsInSct() ? ImplFindSctFrm() : 0;
+ return IsInSct() ? ImplFindSctFrm() : nullptr;
}
inline const SwTabFrm *SwFrm::FindTabFrm() const
{
- return IsInTab() ? const_cast<SwFrm*>(this)->ImplFindTabFrm() : 0;
+ return IsInTab() ? const_cast<SwFrm*>(this)->ImplFindTabFrm() : nullptr;
}
inline const SwFootnoteFrm *SwFrm::FindFootnoteFrm() const
{
- return IsInFootnote() ? const_cast<SwFrm*>(this)->ImplFindFootnoteFrm() : 0;
+ return IsInFootnote() ? const_cast<SwFrm*>(this)->ImplFindFootnoteFrm() : nullptr;
}
inline const SwFlyFrm *SwFrm::FindFlyFrm() const
{
- return IsInFly() ? const_cast<SwFrm*>(this)->ImplFindFlyFrm() : 0;
+ return IsInFly() ? const_cast<SwFrm*>(this)->ImplFindFlyFrm() : nullptr;
}
inline const SwSectionFrm *SwFrm::FindSctFrm() const
{
- return IsInSct() ? const_cast<SwFrm*>(this)->ImplFindSctFrm() : 0;
+ return IsInSct() ? const_cast<SwFrm*>(this)->ImplFindSctFrm() : nullptr;
}
inline SwFrm *SwFrm::FindNext()
{
diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx
index 13930343eb13..ae613d3bdcf5 100644
--- a/sw/source/core/inc/frminf.hxx
+++ b/sw/source/core/inc/frminf.hxx
@@ -63,7 +63,7 @@ public:
// Is it a comparison? Returns position in frame.
sal_Int32 GetBigIndent( sal_Int32& rFndPos,
- const SwTextFrm *pNextFrm = 0 ) const;
+ const SwTextFrm *pNextFrm = nullptr ) const;
};
#endif
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 7d746ff4abfc..fe82b38c8e6f 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -102,13 +102,13 @@ void PaintCharacterBorder(
// Implementation in feshview.cxx
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh );
-SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart = NULL );
+SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart = nullptr );
void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow );
// Get ContentNodes, create ContentFrms, and add them to LayFrm.
void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, sal_uLong nIndex,
bool bPages = false, sal_uLong nEndIndex = 0,
- SwFrm *pPrv = 0 );
+ SwFrm *pPrv = nullptr );
// Creation of frames for a specific section (uses _InsertCnt)
void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
@@ -133,7 +133,7 @@ void RegistFlys( SwPageFrm*, const SwLayoutFrm* );
// notification of Fly's background if needed
void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
- const SwRect* pOldRect = 0 );
+ const SwRect* pOldRect = nullptr );
void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
@@ -156,8 +156,8 @@ const SwFrm * FindPage( const SwRect &rRect, const SwFrm *pPage );
SwFrm* GetFrmOfModify( const SwRootFrm* pLayout,
SwModify const&,
sal_uInt16 const nFrmType,
- const Point* = 0,
- const SwPosition *pPos = 0,
+ const Point* = nullptr,
+ const SwPosition *pPos = nullptr,
const bool bCalcFrm = false );
// Should extra data (redline stroke, line numbers) be painted?
@@ -313,14 +313,14 @@ class SwBorderAttrs : public SwCacheObj
// #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if
// borders/shadow have to be joined with previous frame.
void _GetTopLine ( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm = 0L );
+ const SwFrm* _pPrevFrm = nullptr );
void _GetBottomLine( const SwFrm& _rFrm );
// calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
// #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if
// borders/shadow have to be joined with previous frame.
void _CalcJoinedWithPrev( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm = 0L );
+ const SwFrm* _pPrevFrm = nullptr );
void _CalcJoinedWithNext( const SwFrm& _rFrm );
// internal helper method for _CalcJoinedWithPrev and _CalcJoinedWithNext
@@ -362,7 +362,7 @@ public:
// #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if
// borders/shadow have to be joined with previous frame.
inline sal_uInt16 GetTopLine ( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm = 0L ) const;
+ const SwFrm* _pPrevFrm = nullptr ) const;
inline sal_uInt16 GetBottomLine( const SwFrm& _rFrm ) const;
inline void SetGetCacheLine( bool bNew ) const;
@@ -370,7 +370,7 @@ public:
// #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if
// borders/shadow have to be joined with previous frame.
bool JoinedWithPrev( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm = 0L ) const;
+ const SwFrm* _pPrevFrm = nullptr ) const;
bool JoinedWithNext( const SwFrm& _rFrm ) const;
};
@@ -551,7 +551,7 @@ private:
public:
SwDeletionChecker( const SwFrm* pFrm )
: mpFrm( pFrm ),
- mpRegIn( pFrm ? const_cast<SwFrm*>(pFrm)->GetRegisteredIn() : 0 )
+ mpRegIn( pFrm ? const_cast<SwFrm*>(pFrm)->GetRegisteredIn() : nullptr )
{
}
diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index b5dcd15cbad6..6d62c2e01754 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -86,7 +86,7 @@ public:
static void ChangeFootnoteRef( const SwContentFrm *pOld, const SwTextFootnote *,
SwContentFrm *pNew );
void RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock = false,
- const SwTextFootnote *pAttr = 0 );
+ const SwTextFootnote *pAttr = nullptr );
// Set DeadLine (in document coordinates) so that the text formatter can
// temporarily limit footnote height.
@@ -106,7 +106,7 @@ public:
SwFootnoteFrm* _pFootnote,
SwFootnoteFrms& _rFootnoteArr,
const bool _bCollectOnlyPreviousFootnotes = false,
- const SwFootnoteBossFrm* _pRefFootnoteBossFrm = NULL);
+ const SwFootnoteBossFrm* _pRefFootnoteBossFrm = nullptr);
// The parameter <_bCollectOnlyPreviousFootnotes> controls if only footnotes
// that are positioned before the footnote boss-frame <this> have to be
// collected.
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index d17c70804ee9..ab8f83d76ef9 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -42,7 +42,7 @@ public:
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage,
const SwBorderAttrs & ) const override;
virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override;
@@ -74,7 +74,7 @@ public:
SwFootnoteFrm( SwFrameFormat*, SwFrm*, SwContentFrm*, SwTextFootnote* );
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override;
diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx
index 50315e12fc51..273bda293568 100644
--- a/sw/source/core/inc/hffrm.hxx
+++ b/sw/source/core/inc/hffrm.hxx
@@ -32,7 +32,7 @@ protected:
public:
SwHeadFootFrm(SwFrameFormat * pFrm, SwFrm*, sal_uInt16 aType);
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual SwTwips GrowFrm( SwTwips,
bool bTst = false, bool bInfo = false ) override;
virtual SwTwips ShrinkFrm( SwTwips,
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 1dca77688910..020ac06cface 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -130,7 +130,7 @@ public:
bool IsWaitAllowed() const { return bWaitAllowed; }
bool IsNextCycle() const { return bNextCycle; }
bool IsInput() const { return bInput; }
- bool IsWait() const { return 0 != pWait; }
+ bool IsWait() const { return nullptr != pWait; }
bool IsPaint() const { return bPaint; }
bool IsIdle() const { return bIdle; }
bool IsReschedule() const { return bReschedule; }
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index d75e2dd7a28a..53dd324d4dac 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -43,7 +43,7 @@ class SwLayoutCache
sal_uInt16 nLockCount;
public:
- SwLayoutCache() : pImpl( NULL ), nLockCount( 0 ) {}
+ SwLayoutCache() : pImpl( nullptr ), nLockCount( 0 ) {}
~SwLayoutCache();
void Read( SvStream &rStream );
@@ -53,7 +53,7 @@ public:
bool IsLocked() const { return nLockCount > 0; }
sal_uInt16& GetLockCount() { return nLockCount; }
SwLayCacheImpl *LockImpl()
- { if( nLockCount & 0x8000 ) return NULL;
+ { if( nLockCount & 0x8000 ) return nullptr;
if ( pImpl )
++nLockCount;
return pImpl; }
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index bcc568c12785..7a422eabbecf 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -51,7 +51,7 @@ protected:
virtual void DestroyImpl() override;
virtual ~SwLayoutFrm();
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
SwFrm * m_pLower;
@@ -85,10 +85,10 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
/**
* Finds the closest Content for the SPoint
@@ -97,13 +97,13 @@ public:
const SwContentFrm* GetContentPos( Point &rPoint, const bool bDontLeave,
const bool bBodyOnly = false,
const bool bCalc = false,
- const SwCrsrMoveState *pCMS = 0,
+ const SwCrsrMoveState *pCMS = nullptr,
const bool bDefaultExpand = true ) const;
SwLayoutFrm( SwFrameFormat*, SwFrm* );
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
const SwFrm *Lower() const { return m_pLower; }
SwFrm *Lower() { return m_pLower; }
const SwContentFrm *ContainsContent() const;
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 508fe87e0c3a..b0bb4420c299 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -50,10 +50,10 @@ namespace sw { namespace mark
bool bSaveOtherPos,
const ::sw::mark::IMark& rBkmk,
const SwNodeIndex& rMvPos,
- const SwIndex* pIdx =0);
+ const SwIndex* pIdx =nullptr);
void SetInDoc(SwDoc* pDoc,
const SwNodeIndex&,
- const SwIndex* pIdx =0);
+ const SwIndex* pIdx =nullptr);
private:
OUString m_aName;
@@ -85,9 +85,9 @@ namespace sw { namespace mark
void _DelBookmarks(const SwNodeIndex& rStt,
const SwNodeIndex& rEnd,
- ::std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =0,
- const SwIndex* pSttIdx =0,
- const SwIndex* pEndIdx =0);
+ ::std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =nullptr,
+ const SwIndex* pSttIdx =nullptr,
+ const SwIndex* pEndIdx =nullptr);
/** data structure to temporarily hold fly anchor positions relative to some
* location. */
diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx
index 923d02c9b015..2c861d3fb2d6 100644
--- a/sw/source/core/inc/node2lay.hxx
+++ b/sw/source/core/inc/node2lay.hxx
@@ -66,8 +66,8 @@ public:
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode& rNode );
void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
- SwFrm *GetFrm( const Point* pDocPos = 0,
- const SwPosition *pPos = 0,
+ SwFrm *GetFrm( const Point* pDocPos = nullptr,
+ const SwPosition *pPos = nullptr,
const bool bCalcFrm = true ) const;
};
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 72638294e1ae..f82410698d86 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -34,7 +34,7 @@ class SwNoTextFrm: public SwContentFrm
void InitCtor();
- void Format ( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ void Format ( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
void PaintPicture( vcl::RenderContext*, const SwRect& ) const;
virtual void DestroyImpl() override;
@@ -47,17 +47,17 @@ public:
SwNoTextFrm( SwNoTextNode * const, SwFrm* );
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual bool GetCharRect( SwRect &, const SwPosition&,
- SwCrsrMoveState* = 0) const override;
+ SwCrsrMoveState* = nullptr) const override;
virtual bool GetCrsrOfst(SwPosition* pPos, Point& aPoint,
- SwCrsrMoveState* = 0, bool bTestBackground = false) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false) const override;
- void GetGrfArea( SwRect &rRect, SwRect * = 0, bool bMirror = true ) const;
+ void GetGrfArea( SwRect &rRect, SwRect * = nullptr, bool bMirror = true ) const;
bool IsTransparent() const;
- void StopAnimation( OutputDevice* = 0 ) const;
+ void StopAnimation( OutputDevice* = nullptr ) const;
bool HasAnimation() const;
};
diff --git a/sw/source/core/inc/objectformatter.hxx b/sw/source/core/inc/objectformatter.hxx
index 8fbce7a5b35f..90ec469a073f 100644
--- a/sw/source/core/inc/objectformatter.hxx
+++ b/sw/source/core/inc/objectformatter.hxx
@@ -77,7 +77,7 @@ class SwObjectFormatter
protected:
SwObjectFormatter( const SwPageFrm& _rPageFrm,
- SwLayAction* _pLayAction = 0L,
+ SwLayAction* _pLayAction = nullptr,
const bool _bCollectPgNumOfAnchors = false );
static SwObjectFormatter* CreateObjFormatter( SwFrm& _rAnchorFrm,
@@ -121,7 +121,7 @@ class SwObjectFormatter
@param _pMasterTextFrm
input parameter - pointer to 'master' text frame. default value: NULL
*/
- bool _FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm = 0L );
+ bool _FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm = nullptr );
/** accessor to collected anchored object
*/
@@ -168,14 +168,14 @@ class SwObjectFormatter
*/
static bool FormatObjsAtFrm( SwFrm& _rAnchorFrm,
const SwPageFrm& _rPageFrm,
- SwLayAction* _pLayAction = 0L );
+ SwLayAction* _pLayAction = nullptr );
/** method to format a given floating screen object
*/
static bool FormatObj( SwAnchoredObject& _rAnchoredObj,
- SwFrm* _pAnchorFrm = 0L,
- const SwPageFrm* _pPageFrm = 0L,
- SwLayAction* _pLayAction = 0L );
+ SwFrm* _pAnchorFrm = nullptr,
+ const SwPageFrm* _pPageFrm = nullptr,
+ SwLayAction* _pLayAction = nullptr );
};
#endif
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 2c51f2bdc3a8..ad148519cf00 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -71,7 +71,7 @@ class SwPageFrm: public SwFootnoteBossFrm
static const sal_Int8 mnShadowPxWidth;
void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
+ SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr );
/// Adapt the max. footnote height in each single column
void SetColMaxFootnoteHeight();
@@ -165,12 +165,12 @@ public:
void PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat );
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
/// Get info from Client
virtual bool GetInfo( SfxPoolItem& ) const override;
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
virtual void CheckDirection( bool bVert ) override;
void CheckGrid( bool bInvalidate );
void PaintGrid( OutputDevice* pOut, SwRect &rRect ) const;
@@ -336,12 +336,12 @@ public:
inline SwContentFrm *SwPageFrm::FindFirstBodyContent()
{
SwLayoutFrm *pBody = FindBodyCont();
- return pBody ? pBody->ContainsContent() : 0;
+ return pBody ? pBody->ContainsContent() : nullptr;
}
inline const SwContentFrm *SwPageFrm::FindFirstBodyContent() const
{
const SwLayoutFrm *pBody = FindBodyCont();
- return pBody ? pBody->ContainsContent() : 0;
+ return pBody ? pBody->ContainsContent() : nullptr;
}
inline const SwContentFrm *SwPageFrm::FindLastBodyContent() const
{
diff --git a/sw/source/core/inc/prevwpage.hxx b/sw/source/core/inc/prevwpage.hxx
index 60dc7a650bda..c426327c51e5 100644
--- a/sw/source/core/inc/prevwpage.hxx
+++ b/sw/source/core/inc/prevwpage.hxx
@@ -40,7 +40,7 @@ struct PreviewPage
};
inline PreviewPage::PreviewPage()
- : pPage( 0 ),
+ : pPage( nullptr ),
bVisible( false ),
aPageSize( Size(0,0) ),
aPreviewWinPos( Point(0,0) ),
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 30fb92d92932..562fff67be59 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -197,15 +197,15 @@ public:
void SetDrawPage( SdrPage* pNew ){ mpDrawPage = pNew; }
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override;
#ifdef DBG_UTIL
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
#endif
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
@@ -221,7 +221,7 @@ public:
SwViewShell* pCurrShell = GetCurrShell();
// May be NULL if called from SfxBaseModel::dispose
// (this happens in the build test 'rtfexport').
- if (pCurrShell != NULL)
+ if (pCurrShell != nullptr)
pCurrShell->GetDoc()->getIDocumentTimerAccess().StartBackgroundJobs();
}
bool IsIdleFormat() const { return mbIdleFormat; }
@@ -237,7 +237,7 @@ public:
SwViewShell* pCurrShell = GetCurrShell();
// May be NULL if called from SfxBaseModel::dispose
// (this happens in the build test 'rtfexport').
- if (pCurrShell != NULL)
+ if (pCurrShell != nullptr)
pCurrShell->GetDoc()->getIDocumentTimerAccess().StartBackgroundJobs();
}
}
@@ -289,7 +289,7 @@ public:
* bool bExtend: Extend each page to the left/right/top/botton up to the
* next page margin
*/
- const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
+ const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = nullptr, bool bExtend = false ) const;
/**
* Point rPt: The point to test
@@ -314,14 +314,14 @@ public:
void ResetTurboFlag() const { const_cast<SwRootFrm*>(this)->mbTurboAllowed = true; }
bool IsTurboAllowed() const { return mbTurboAllowed; }
void SetTurbo( const SwContentFrm *pContent ) { mpTurbo = pContent; }
- void ResetTurbo() { mpTurbo = 0; }
+ void ResetTurbo() { mpTurbo = nullptr; }
const SwContentFrm *GetTurbo() { return mpTurbo; }
/// Update the footernumbers of all Pages
void UpdateFootnoteNums(); // Only for page by page numnbering!
/// Remove all footnotes (but no references)
- void RemoveFootnotes( SwPageFrm *pPage = 0, bool bPageOnly = false,
+ void RemoveFootnotes( SwPageFrm *pPage = nullptr, bool bPageOnly = false,
bool bEndNotes = false );
void CheckFootnotePageDescs( bool bEndNote );
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 78f88aaac0f9..fdbfebfa0f7d 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -29,7 +29,7 @@ class SwBorderAttrs;
/// SwRowFrm is one table row in the document layout.
class SwRowFrm: public SwLayoutFrm
{
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
/// Only change the Frame size, not the PrtArea SSize
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override;
@@ -63,7 +63,7 @@ public:
* been created; the same holds true for the Page at which the Flys
* are to be registered at.
*/
- void RegistFlys( SwPageFrm *pPage = 0 );
+ void RegistFlys( SwPageFrm *pPage = nullptr );
const SwTableLine *GetTabLine() const { return m_pTabLine; }
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 2201343dc183..6d3c05cb0bf7 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -185,7 +185,7 @@ public:
// than the level at position nPos is returned. This is required to
// obtain the end of a SwBidiPortion
sal_Int32 NextDirChg( const sal_Int32 nPos,
- const sal_uInt8* pLevel = 0 ) const;
+ const sal_uInt8* pLevel = nullptr ) const;
sal_uInt8 DirType( const sal_Int32 nPos ) const;
// HIDDEN TEXT STUFF START
@@ -216,9 +216,9 @@ public:
*/
static bool GetBoundsOfHiddenRange( const SwTextNode& rNode, sal_Int32 nPos,
sal_Int32& rnStartPos, sal_Int32& rnEndPos,
- PositionList* pList = 0 );
+ PositionList* pList = nullptr );
bool GetBoundsOfHiddenRange( sal_Int32 nPos, sal_Int32& rnStartPos,
- sal_Int32& rnEndPos, PositionList* pList = 0 ) const;
+ sal_Int32& rnEndPos, PositionList* pList = nullptr ) const;
static bool IsInHiddenRange( const SwTextNode& rNode, sal_Int32 nPos );
@@ -256,7 +256,7 @@ public:
long Compress( long* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
const bool bCentered,
- Point* pPoint = NULL ) const;
+ Point* pPoint = nullptr ) const;
/** Performs a kashida justification on the kerning array
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 9f264ebeb55a..3abdd37de9fe 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -44,7 +44,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
bool m_bFootnoteLock; // ftn, don't leave this section bwd
void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
+ SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr );
void _Cut( bool bRemove );
// Is there a FootnoteContainer?
// An empty sectionfrm without FootnoteCont is superfluous
@@ -60,7 +60,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
protected:
virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) override;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
@@ -74,7 +74,7 @@ public:
virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override;
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
inline const SwSectionFrm *GetFollow() const;
inline SwSectionFrm *GetFollow();
@@ -99,7 +99,7 @@ public:
*/
bool SplitSect( SwFrm* pFrm, bool bApres );
void DelEmpty( bool bRemove ); // Like Cut(), except for that Follow chaining is maintained
- SwFootnoteContFrm* ContainsFootnoteCont( const SwFootnoteContFrm* pCont = NULL ) const;
+ SwFootnoteContFrm* ContainsFootnoteCont( const SwFootnoteContFrm* pCont = nullptr ) const;
bool Growable() const;
SwTwips _Shrink( SwTwips, bool bTst );
SwTwips _Grow ( SwTwips, bool bTst );
@@ -132,7 +132,7 @@ public:
void InvalidateFootnotePos();
void CollectEndnotes( SwLayouter* pLayouter );
const SwSectionFormat* GetEndSectFormat() const
- { if( IsEndnAtEnd() ) return _GetEndSectFormat(); return NULL; }
+ { if( IsEndnAtEnd() ) return _GetEndSectFormat(); return nullptr; }
static void MoveContentAndDelete( SwSectionFrm* pDel, bool bSave );
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 4f38ecabb8b4..a905c3247eb4 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -209,7 +209,7 @@ public:
/// Shorthand for those who know that they did not override isAvailable()
/// FIXME: wtf?
- bool IsAvail() const { return pObj != 0; }
+ bool IsAvail() const { return pObj != nullptr; }
};
inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
@@ -238,25 +238,25 @@ inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
if ( pCacheObj )
return pCacheObj->GetNext();
else
- return NULL;
+ return nullptr;
}
inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, bool bSeek ) :
rCache( rC ),
- pObj( 0 ),
+ pObj( nullptr ),
pOwner( pOwn )
{
- if ( bSeek && pOwner && 0 != (pObj = rCache.Get( pOwner )) )
+ if ( bSeek && pOwner && nullptr != (pObj = rCache.Get( pOwner )) )
pObj->Lock();
}
inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn,
const sal_uInt16 nIndex ) :
rCache( rC ),
- pObj( 0 ),
+ pObj( nullptr ),
pOwner( pOwn )
{
- if ( pOwner && 0 != (pObj = rCache.Get( pOwner, nIndex )) )
+ if ( pOwner && nullptr != (pObj = rCache.Get( pOwner, nIndex )) )
pObj->Lock();
}
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 3607fb27e69c..e290153f8c58 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -57,7 +57,7 @@ class SwSubFont : public SvxFont
sal_uInt16 m_nProportionalWidth; // proportional width
bool m_bSmallCapsPercentage66;
inline SwSubFont() : m_aSize(0,0)
- { m_pMagic = NULL; m_nFontIndex = m_nOrgHeight = m_nOrgAscent = 0; m_nProportionalWidth =100; m_bSmallCapsPercentage66 = false; }
+ { m_pMagic = nullptr; m_nFontIndex = m_nOrgHeight = m_nOrgAscent = 0; m_nProportionalWidth =100; m_bSmallCapsPercentage66 = false; }
sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
@@ -112,7 +112,7 @@ class SwSubFont : public SvxFont
inline short CheckKerning()
{ return GetFixKerning() >= 0 ? GetFixKerning() : _CheckKerning( ); }
inline void SetPropWidth( const sal_uInt16 nNew )
- { m_pMagic = 0; m_nProportionalWidth = nNew; }
+ { m_pMagic = nullptr; m_nProportionalWidth = nNew; }
public:
sal_uInt16 GetPropWidth() const { return m_nProportionalWidth; }
};
@@ -399,7 +399,7 @@ public:
const SvxShadowItemSide nShadow, const bool bVertLayout,
const bool bSkipLeft, const bool bSkipRight ) const;
- void dumpAsXml( xmlTextWriterPtr writer = NULL ) const;
+ void dumpAsXml( xmlTextWriterPtr writer = nullptr ) const;
};
inline void SwFont::SetColor( const Color& rColor )
@@ -413,14 +413,14 @@ inline void SwFont::SetColor( const Color& rColor )
// encapsulated SV-Font-method
inline void SwSubFont::SetColor( const Color& rColor )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetColor( rColor );
}
// encapsulated SV-Font-method
inline void SwSubFont::SetFillColor( const Color& rColor )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetFillColor( rColor );
}
@@ -435,7 +435,7 @@ inline void SwFont::SetFillColor( const Color& rColor )
// encapsulated SV-Font-method
inline void SwSubFont::SetFamily( const FontFamily eFamily )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetFamily( eFamily );
}
@@ -448,7 +448,7 @@ inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich
// encapsulated SV-Font-method
inline void SwSubFont::SetName( const OUString& rName )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetName( rName );
}
@@ -461,7 +461,7 @@ inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich )
// encapsulated SV-Font-method
inline void SwSubFont::SetStyleName( const OUString& rStyleName )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetStyleName( rStyleName );
}
@@ -474,7 +474,7 @@ inline void SwFont::SetStyleName( const OUString& rStyle, const sal_uInt8 nWhich
// encapsulated SV-Font-method
inline void SwSubFont::SetCharSet( const rtl_TextEncoding eCharSet )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetCharSet( eCharSet );
}
@@ -487,7 +487,7 @@ inline void SwFont::SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8
// encapsulated SV-Font-method
inline void SwSubFont::SetPitch( const FontPitch ePitch )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetPitch( ePitch );
}
@@ -501,7 +501,7 @@ inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
// encapsulated SV-Font-method
inline void SwSubFont::SetAlign( const FontAlign eAlign )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetAlign( eAlign );
}
@@ -516,7 +516,7 @@ inline void SwFont::SetAlign( const FontAlign eAlign )
// encapsulated SV-Font-method
inline void SwSubFont::SetWeight( const FontWeight eWeight )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetWeight( eWeight );
}
@@ -529,7 +529,7 @@ inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich
// encapsulated SV-Font-method
inline void SwSubFont::SetUnderline( const FontUnderline eUnderline )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetUnderline( eUnderline );
}
@@ -544,7 +544,7 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline )
// encapsulated SV-Font-method
inline void SwSubFont::SetOverline( const FontUnderline eOverline )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetOverline( eOverline );
}
@@ -559,7 +559,7 @@ inline void SwFont::SetOverline( const FontUnderline eOverline )
// encapsulated SV-Font-method
inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetStrikeout( eStrikeout );
}
@@ -574,7 +574,7 @@ inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
// encapsulated SV-Font-method
inline void SwSubFont::SetItalic( const FontItalic eItalic )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetItalic( eItalic );
}
@@ -587,7 +587,7 @@ inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich
// encapsulated SV-Font-method
inline void SwSubFont::SetOutline( const bool bOutline )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetOutline( bOutline );
}
@@ -602,7 +602,7 @@ inline void SwFont::SetOutline( const bool bOutline )
// encapsulated SV-Font-method
inline void SwSubFont::SetShadow( const bool bShadow )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetShadow( bShadow );
}
@@ -617,7 +617,7 @@ inline void SwFont::SetShadow( const bool bShadow )
// encapsulated SV-Font-method
inline void SwSubFont::SetAutoKern( FontKerning nAutoKern )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetKerning( nAutoKern );
}
@@ -655,7 +655,7 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
// encapsulated SV-Font-method
inline void SwSubFont::SetWordLineMode( const bool bWordLineMode )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetWordLineMode( bWordLineMode );
}
@@ -669,7 +669,7 @@ inline void SwFont::SetWordLineMode( const bool bWordLineMode )
// encapsulated SV-Font-method
inline void SwSubFont::SetEmphasisMark( const FontEmphasisMark eValue )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetEmphasisMark( eValue );
}
@@ -695,7 +695,7 @@ inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
// encapsulated SV-Font-method
inline void SwSubFont::SetRelief( const FontRelief eNew )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetRelief( eNew );
}
@@ -722,7 +722,7 @@ inline void SwSubFont::SetSize( const Size& rSize )
(long) m_aSize.Width() * GetPropr() / 100L,
(long) m_aSize.Height() * GetPropr() / 100L ) );
}
- m_pMagic = 0;
+ m_pMagic = nullptr;
}
inline void SwFont::SetSize( const Size& rSize, const sal_uInt8 nWhich )
@@ -747,7 +747,7 @@ inline void SwFont::SetActual( sal_uInt8 nNew )
inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetSize( Size( (long) m_aSize.Width() * nNewPropr / 100L,
(long) m_aSize.Height() * nNewPropr / 100L ) );
SvxFont::SetPropr( nNewPropr );
@@ -768,7 +768,7 @@ inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
inline void SwSubFont::SetEscapement( const short nNewEsc )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
SvxFont::SetEscapement( nNewEsc );
}
@@ -789,7 +789,7 @@ inline void SwFont::SetEscapement( const short nNewEsc )
inline void SwSubFont::SetLanguage( LanguageType eNewLang )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
if( eNewLang == LANGUAGE_SYSTEM )
eNewLang = (LanguageType)GetAppLanguage();
SvxFont::SetLanguage( eNewLang );
@@ -828,7 +828,7 @@ inline void SwFont::SetNoCol( const bool bNew )
inline void SwSubFont::SetVertical( const sal_uInt16 nDir, const bool bVertFormat )
{
- m_pMagic = 0;
+ m_pMagic = nullptr;
Font::SetVertical( bVertFormat );
Font::SetOrientation( nDir );
}
@@ -837,28 +837,28 @@ inline void SwFont::SetTopBorderDist( const sal_uInt16 nTopDist )
{
m_nTopBorderDist = nTopDist;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetBottomBorderDist( const sal_uInt16 nBottomDist )
{
m_nBottomBorderDist = nBottomDist;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetRightBorderDist( const sal_uInt16 nRightDist )
{
m_nRightBorderDist = nRightDist;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetLeftBorderDist( const sal_uInt16 nLeftDist )
{
m_nLeftBorderDist = nLeftDist;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline sal_uInt16 SwFont::GetTopBorderSpace() const
@@ -930,28 +930,28 @@ inline void SwFont::SetShadowColor( const Color& rColor )
{
m_aShadowColor = rColor;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetShadowWidth( const sal_uInt16 nWidth )
{
m_nShadowWidth = nWidth;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetShadowLocation( const SvxShadowLocation aLocation )
{
m_aShadowLocation = aLocation;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
inline void SwFont::SetHighlightColor( const Color& aNewColor )
{
m_aHighlightColor = aNewColor;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
// Used for the "continuous underline" feature.
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index e88bd4d826cc..a9f025983a21 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -96,8 +96,8 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
void _UpdateAttr(
const SfxPoolItem*,
const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0,
- SwAttrSetChg *pb = 0 );
+ SwAttrSetChg *pa = nullptr,
+ SwAttrSetChg *pb = nullptr );
virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) override;
@@ -106,7 +106,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
protected:
virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
// only changes the Framesize, not the PrtArea size
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override;
@@ -126,14 +126,14 @@ public:
virtual bool GetInfo( SfxPoolItem &rHint ) const override;
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual void CheckDirection( bool bVert ) override;
virtual void Cut() override;
- virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) override;
+ virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override;
virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
- const void *pVoid = 0, bool bNotify = true ) override;
+ const void *pVoid = nullptr, bool bNotify = true ) override;
SwContentFrm *FindLastContent();
inline const SwContentFrm *FindLastContent() const;
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 96d064c74d74..7a00950477de 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -52,9 +52,9 @@ void _InsTableBox( SwDoc* pDoc, SwTableNode* pTableNd,
SwTableLine* pLine, SwTableBoxFormat* pBoxFrameFormat,
SwTableBox* pBox, sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
-SW_DLLPUBLIC void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo = 0,
+SW_DLLPUBLIC void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo = nullptr,
bool bCalcNewSize = true, const bool bCorrBorder = true,
- SwShareBoxFormats* pShareFormats = 0 );
+ SwShareBoxFormats* pShareFormats = nullptr );
/**
* Class for SplitTable
@@ -73,7 +73,7 @@ class SwCollectTableLineBoxes
bool bGetValues : 1;
public:
- SwCollectTableLineBoxes( bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 )
+ SwCollectTableLineBoxes( bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=nullptr )
:
pHst( pHist ), nMode( nMd ), nWidth( 0 ),
bGetFromTop( bTop ), bGetValues( true )
@@ -85,7 +85,7 @@ public:
void AddToUndoHistory( const SwContentNode& rNd );
size_t Count() const { return m_Boxes.size(); }
- const SwTableBox& GetBox( std::size_t nPos, sal_uInt16* pWidth = 0 ) const
+ const SwTableBox& GetBox( std::size_t nPos, sal_uInt16* pWidth = nullptr ) const
{
// We need the EndPos of the column here!
if( pWidth )
@@ -126,10 +126,10 @@ struct _SwGCLineBorder
sal_uInt16 nLinePos;
_SwGCLineBorder( const SwTable& rTable )
- : pLines( &rTable.GetTabLines() ), pShareFormats(0), nLinePos( 0 ) {}
+ : pLines( &rTable.GetTabLines() ), pShareFormats(nullptr), nLinePos( 0 ) {}
_SwGCLineBorder( const SwTableBox& rBox )
- : pLines( &rBox.GetTabLines() ), pShareFormats(0), nLinePos( 0 ) {}
+ : pLines( &rBox.GetTabLines() ), pShareFormats(nullptr), nLinePos( 0 ) {}
bool IsLastLine() const { return nLinePos + 1 >= (sal_uInt16)pLines->size(); }
};
@@ -138,7 +138,7 @@ class _SwGCBorder_BoxBrd
const editeng::SvxBorderLine* pBrdLn;
bool bAnyBorderFnd;
public:
- _SwGCBorder_BoxBrd() : pBrdLn( 0 ), bAnyBorderFnd( false ) {}
+ _SwGCBorder_BoxBrd() : pBrdLn( nullptr ), bAnyBorderFnd( false ) {}
void SetBorder( const editeng::SvxBorderLine& rBorderLine )
{ pBrdLn = &rBorderLine; bAnyBorderFnd = false; }
diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx
index 0cab5022dfc8..d5b9ee6ef48e 100644
--- a/sw/source/core/inc/threadmanager.hxx
+++ b/sw/source/core/inc/threadmanager.hxx
@@ -103,7 +103,7 @@ class ThreadManager
tThreadData()
: nThreadID( 0 ),
- pThread( 0 ),
+ pThread( nullptr ),
aJob()
{}
};
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index bcb30b78a82f..10e4d36405e9 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -132,7 +132,7 @@ struct SwTOXSortTabBase
const SwContentNode* pTOXSrc,
const SwTextTOXMark* pTextMark,
const SwTOXInternational* pIntl,
- const css::lang::Locale* pLocale = NULL );
+ const css::lang::Locale* pLocale = nullptr );
virtual ~SwTOXSortTabBase() {}
sal_uInt16 GetType() const { return nType; }
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 286902d638f3..9c565ddc52d9 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -132,7 +132,7 @@ class SwTextFrm: public SwContentFrm
// Changes the Frame or not (cf. FlyCnt)
bool _GetCrsrOfst(SwPosition *pPos, const Point &rPoint,
- const bool bChgFrm, SwCrsrMoveState* = 0 ) const;
+ const bool bChgFrm, SwCrsrMoveState* = nullptr ) const;
void FillCrsrPos( SwFillData &rFill ) const;
// Format exactly one Line
@@ -228,7 +228,7 @@ public:
* Returns false if rPos > number of character is string
*/
virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
- SwCrsrMoveState* pCMS = 0 ) const override;
+ SwCrsrMoveState* pCMS = nullptr ) const override;
/// A slimmer version of GetCharRect for autopositioning Frames
bool GetAutoPos( SwRect &, const SwPosition& ) const;
@@ -267,7 +267,7 @@ public:
* returns true
*/
virtual bool GetCrsrOfst( SwPosition *, Point&,
- SwCrsrMoveState* = 0, bool bTestBackground = false ) const override;
+ SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override;
/**
* Makes sure that the Frame is not switched (e.g. switched for a
@@ -279,7 +279,7 @@ public:
void PaintExtraData( const SwRect & rRect ) const; /// Page number etc.
SwRect Paint();
virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
- SwPrintData const*const pPrintData = NULL ) const override;
+ SwPrintData const*const pPrintData = nullptr ) const override;
virtual bool GetInfo( SfxPoolItem & ) const override;
/**
@@ -338,7 +338,7 @@ public:
* potentially destroyed and replaced by Prepare
*/
virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
- const void *pVoid = 0, bool bNotify = true ) override;
+ const void *pVoid = nullptr, bool bNotify = true ) override;
/**
* nMaxHeight is the required height
@@ -433,7 +433,7 @@ public:
*/
SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
- virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) override;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
virtual void CheckDirection( bool bVert ) override;
/// Returns the sum of line height in pLine
@@ -644,7 +644,7 @@ public:
//SwTextFrm::_AdjustFollow removing the pFrm we're trying to Make
TextFrmLockGuard(SwFrm* pFrm)
{
- m_pTextFrm = pFrm->IsTextFrm() ? static_cast<SwTextFrm*>(pFrm) : 0;
+ m_pTextFrm = pFrm->IsTextFrm() ? static_cast<SwTextFrm*>(pFrm) : nullptr;
if (m_pTextFrm)
{
m_bOldLocked = m_pTextFrm->IsLocked();
diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx
index 01e88465599d..4772fcc8e840 100644
--- a/sw/source/core/inc/unobookmark.hxx
+++ b/sw/source/core/inc/unobookmark.hxx
@@ -220,7 +220,7 @@ private:
protected:
SwXFieldmark(bool isReplacementObject,
- ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0);
+ ::sw::mark::IMark* pBkm = nullptr, SwDoc* pDoc = nullptr);
public:
@@ -257,7 +257,7 @@ public:
class SwXODFCheckboxField : public SwXFieldmark
{
public:
- SwXODFCheckboxField( ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0) : SwXFieldmark(true,
+ SwXODFCheckboxField( ::sw::mark::IMark* pBkm = nullptr, SwDoc* pDoc = nullptr) : SwXFieldmark(true,
pBkm, pDoc) {}
};
#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOBOOKMARK_HXX
diff --git a/sw/source/core/inc/unofield.hxx b/sw/source/core/inc/unofield.hxx
index 549ab3021c22..4b3091411d2a 100644
--- a/sw/source/core/inc/unofield.hxx
+++ b/sw/source/core/inc/unofield.hxx
@@ -162,7 +162,7 @@ private:
SwXTextField(SwFormatField& rFormat, SwDoc & rDoc);
/// descriptor
- SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0);
+ SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=nullptr);
public:
sal_uInt16 GetServiceId() const;
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 2c6f4b2794f4..9acb6a5d9773 100644
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -91,7 +91,7 @@ public:
static css::uno::Reference< css::rdf::XMetadatable >
CreateXMeta(
::sw::Meta & rMeta,
- css::uno::Reference< css::text::XText> const& xParentText = 0,
+ css::uno::Reference< css::text::XText> const& xParentText = nullptr,
::std::unique_ptr<TextRangeList_t const> && pPortions = ::std::unique_ptr<TextRangeList_t const>());
static css::uno::Reference<css::rdf::XMetadatable>
diff --git a/sw/source/core/inc/unosection.hxx b/sw/source/core/inc/unosection.hxx
index 0c6ee44fb8c7..e39e08bd1d4e 100644
--- a/sw/source/core/inc/unosection.hxx
+++ b/sw/source/core/inc/unosection.hxx
@@ -68,7 +68,7 @@ public:
SwSectionFormat* GetFormat() const;
static css::uno::Reference< css::text::XTextSection >
- CreateXTextSection(SwSectionFormat *const pFormat = 0,
+ CreateXTextSection(SwSectionFormat *const pFormat = nullptr,
const bool bIndexHeader = false);
// MetadatableMixin
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 8d21be391506..52c5cf593795 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -155,7 +155,7 @@ public:
void DelRegion();
/// New Interface for StarView Drawing
- bool HasDrawView() const { return 0 != m_pDrawView; }
+ bool HasDrawView() const { return nullptr != m_pDrawView; }
SwDrawView* GetDrawView() { return m_pDrawView; }
const SwDrawView* GetDrawView() const { return m_pDrawView; }
SdrPageView*GetPageView() { return m_pSdrPageView; }
@@ -173,9 +173,9 @@ public:
void PaintLayer( const SdrLayerID _nLayerID,
SwPrintData const*const pPrintData,
const SwRect& _rRect,
- const Color* _pPageBackgrdColor = 0,
+ const Color* _pPageBackgrdColor = nullptr,
const bool _bIsPageRightToLeft = false,
- sdr::contact::ViewObjectContactRedirector* pRedirector = 0 );
+ sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr );
/**
* Is passed to the DrawEngine as a Link and decides what is painted
@@ -187,8 +187,8 @@ public:
void NotifySizeChg( const Size &rNewSz );
/// SS for the Lay-/IdleAction and relatives
- bool IsAction() const { return m_pLayAction != 0; }
- bool IsIdleAction() const { return m_pIdleAct != 0; }
+ bool IsAction() const { return m_pLayAction != nullptr; }
+ bool IsIdleAction() const { return m_pIdleAct != nullptr; }
SwLayAction &GetLayAction() { return *m_pLayAction; }
const SwLayAction &GetLayAction() const { return *m_pLayAction; }
@@ -219,7 +219,7 @@ public:
}
/// Is this view accessible?
- bool IsAccessible() const { return m_pAccessibleMap != 0; }
+ bool IsAccessible() const { return m_pAccessibleMap != nullptr; }
inline SwAccessibleMap& GetAccessibleMap();
@@ -251,7 +251,7 @@ public:
/// Invalidate editable state for all accessible frames
void InvalidateAccessibleEditableState( bool bAllShells = true,
- const SwFrm *pFrm=0 );
+ const SwFrm *pFrm=nullptr );
/// Invalidate frame's relation set (for chained frames)
void InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
@@ -281,30 +281,30 @@ inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap()
inline void SwViewShellImp::DisposeAccessibleFrm( const SwFrm *pFrm,
bool bRecursive )
{
- DisposeAccessible( pFrm, 0, bRecursive );
+ DisposeAccessible( pFrm, nullptr, bRecursive );
}
inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj )
{
- DisposeAccessible( 0, pObj, false );
+ DisposeAccessible( nullptr, pObj, false );
}
inline void SwViewShellImp::MoveAccessibleFrm( const SwFrm *pFrm,
const SwRect& rOldFrm )
{
- MoveAccessible( pFrm, 0, rOldFrm );
+ MoveAccessible( pFrm, nullptr, rOldFrm );
}
inline void SwViewShellImp::AddAccessibleFrm( const SwFrm *pFrm )
{
SwRect aEmptyRect;
- MoveAccessible( pFrm, 0, aEmptyRect );
+ MoveAccessible( pFrm, nullptr, aEmptyRect );
}
inline void SwViewShellImp::AddAccessibleObj( const SdrObject *pObj )
{
SwRect aEmptyRect;
- MoveAccessible( 0, pObj, aEmptyRect );
+ MoveAccessible( nullptr, pObj, aEmptyRect );
}
#endif // INCLUDED_SW_SOURCE_CORE_INC_VIEWIMP_HXX
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 3aefb95c6abc..455ccd6fb33e 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -75,7 +75,7 @@ public:
SwWrongList* pSubList);
private:
- SwWrongArea() : mnPos(0), mnLen(0), mpSubList(NULL), mColor(0,0,0), mLineType(WRONGAREA_WAVE) {}
+ SwWrongArea() : mnPos(0), mnLen(0), mpSubList(nullptr), mColor(0,0,0), mLineType(WRONGAREA_WAVE) {}
static Color getSmartColor ( css::uno::Reference< css::container::XStringKeyMap > xPropertyBag)
{
@@ -259,14 +259,14 @@ public:
inline SwWrongList* SubList( sal_uInt16 nIdx ) const
{
- return nIdx < maList.size() ? maList[nIdx].mpSubList : 0;
+ return nIdx < maList.size() ? maList[nIdx].mpSubList : nullptr;
}
void InsertSubList( sal_Int32 nNewPos, sal_Int32 nNewLen, sal_uInt16 nWhere, SwWrongList* pSubList );
inline const SwWrongArea* GetElement( sal_uInt16 nIdx ) const
{
- return nIdx < maList.size() ? &maList[nIdx] : 0;
+ return nIdx < maList.size() ? &maList[nIdx] : nullptr;
}
void RemoveEntry( sal_Int32 nBegin, sal_Int32 nEnd );
bool LookForEntry( sal_Int32 nBegin, sal_Int32 nEnd );
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 661c17365000..568665073748 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -196,7 +196,7 @@ SwAnchoredDrawObject::SwAnchoredDrawObject() :
SwAnchoredObject(),
mbValidPos( false ),
// --> #i34748#
- mpLastObjRect( 0L ),
+ mpLastObjRect( nullptr ),
mbNotYetAttachedToAnchorFrame( true ),
// --> #i28749#
mbNotYetPositioned( true ),
@@ -834,7 +834,7 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
*/
void SwAnchoredDrawObject::RegisterAtCorrectPage()
{
- SwPageFrm* pPageFrm( 0L );
+ SwPageFrm* pPageFrm( nullptr );
if ( GetVertPosOrientFrm() )
{
pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm());
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index eff7767df79e..b6d6553b02df 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star;
// implementation of helper class <SwObjPositioningInProgress>
SwObjPositioningInProgress::SwObjPositioningInProgress( SdrObject& _rSdrObj ) :
- mpAnchoredObj( 0L ),
+ mpAnchoredObj( nullptr ),
// --> #i52904#
mbOldObjPositioningInProgress( false )
{
@@ -67,14 +67,14 @@ SwObjPositioningInProgress::~SwObjPositioningInProgress()
TYPEINIT0(SwAnchoredObject);
SwAnchoredObject::SwAnchoredObject() :
- mpDrawObj( 0L ),
- mpAnchorFrm( 0L ),
+ mpDrawObj( nullptr ),
+ mpAnchorFrm( nullptr ),
// --> #i28701#
- mpPageFrm( 0L ),
+ mpPageFrm( nullptr ),
maRelPos(),
maLastCharRect(),
mnLastTopOfLine( 0L ),
- mpVertPosOrientFrm( 0L ),
+ mpVertPosOrientFrm( nullptr ),
// --> #i28701#
mbPositioningInProgress( false ),
mbConsiderForTextWrap( false ),
@@ -98,7 +98,7 @@ void SwAnchoredObject::ClearVertPosOrientFrm()
if (mpVertPosOrientFrm)
{
const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->ClearVertPosOrientFrmFor(this);
- mpVertPosOrientFrm = NULL;
+ mpVertPosOrientFrm = nullptr;
}
}
@@ -697,7 +697,7 @@ bool SwAnchoredObject::InvalidationOfPosAllowed() const
*/
SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
{
- SwPageFrm* pRetPageFrm = 0L;
+ SwPageFrm* pRetPageFrm = nullptr;
// --> #i44339# - check, if anchor frame exists.
if ( mpAnchorFrm )
@@ -720,7 +720,7 @@ SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
*/
SwTextFrm* SwAnchoredObject::FindAnchorCharFrm()
{
- SwTextFrm* pAnchorCharFrm( 0L );
+ SwTextFrm* pAnchorCharFrm( nullptr );
// --> #i44339# - check, if anchor frame exists.
if ( mpAnchorFrm )
@@ -852,7 +852,7 @@ Point SwAnchoredObject::GetRelPosToPageFrm( const bool _bFollowTextFlow,
aRelPos = GetObjRect().Pos();
// --> #i33818# - search for cell frame, if object has to
// follow the text flow.
- const SwFrm* pFrm( 0L );
+ const SwFrm* pFrm( nullptr );
if ( _bFollowTextFlow && !GetAnchorFrm()->IsPageFrm() )
{
pFrm = GetAnchorFrm()->GetUpper();
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index fea1265659ae..43e448ed1516 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -132,7 +132,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
SwFormatContent& rCnt = (SwFormatContent&)pFormat->GetContent();
if ( rCnt.GetContentIdx() )
{
- SwNode *pNode = 0;
+ SwNode *pNode = nullptr;
{
// #i92993#
// Begin with start node of page header/footer to assure that
@@ -459,7 +459,7 @@ SwFormatHeader::SwFormatHeader( const SwFormatHeader &rCpy )
SwFormatHeader::SwFormatHeader( bool bOn )
: SfxPoolItem( RES_HEADER ),
- SwClient( 0 ),
+ SwClient( nullptr ),
bActive( bOn )
{
}
@@ -504,7 +504,7 @@ SwFormatFooter::SwFormatFooter( const SwFormatFooter &rCpy )
SwFormatFooter::SwFormatFooter( bool bOn )
: SfxPoolItem( RES_FOOTER ),
- SwClient( 0 ),
+ SwClient( nullptr ),
bActive( bOn )
{
}
@@ -537,13 +537,13 @@ SwFormatContent::SwFormatContent( const SwFormatContent &rCpy )
: SfxPoolItem( RES_CNTNT )
{
pStartNode = rCpy.GetContentIdx() ?
- new SwNodeIndex( *rCpy.GetContentIdx() ) : 0;
+ new SwNodeIndex( *rCpy.GetContentIdx() ) : nullptr;
}
SwFormatContent::SwFormatContent( const SwStartNode *pStartNd )
: SfxPoolItem( RES_CNTNT )
{
- pStartNode = pStartNd ? new SwNodeIndex( *pStartNd ) : 0;
+ pStartNode = pStartNd ? new SwNodeIndex( *pStartNd ) : nullptr;
}
SwFormatContent::~SwFormatContent()
@@ -554,7 +554,7 @@ SwFormatContent::SwFormatContent( const SwStartNode *pStartNd )
void SwFormatContent::SetNewContentIdx( const SwNodeIndex *pIdx )
{
delete pStartNode;
- pStartNode = pIdx ? new SwNodeIndex( *pIdx ) : 0;
+ pStartNode = pIdx ? new SwNodeIndex( *pIdx ) : nullptr;
}
bool SwFormatContent::operator==( const SfxPoolItem& rAttr ) const
@@ -586,7 +586,7 @@ SwFormatPageDesc::SwFormatPageDesc( const SwFormatPageDesc &rCpy )
SwClient( const_cast<SwPageDesc*>(rCpy.GetPageDesc()) ),
oNumOffset( rCpy.oNumOffset ),
nDescNameIdx( rCpy.nDescNameIdx ),
- pDefinedIn( 0 )
+ pDefinedIn( nullptr )
{
}
@@ -594,7 +594,7 @@ SwFormatPageDesc::SwFormatPageDesc( const SwPageDesc *pDesc )
: SfxPoolItem( RES_PAGEDESC ),
SwClient( const_cast<SwPageDesc*>(pDesc) ),
nDescNameIdx( 0xFFFF ), // IDX_NO_VALUE
- pDefinedIn( 0 )
+ pDefinedIn( nullptr )
{
}
@@ -604,7 +604,7 @@ SwFormatPageDesc &SwFormatPageDesc::operator=(const SwFormatPageDesc &rCpy)
RegisterToPageDesc(*const_cast<SwPageDesc*>(rCpy.GetPageDesc()));
oNumOffset = rCpy.oNumOffset;
nDescNameIdx = rCpy.nDescNameIdx;
- pDefinedIn = 0;
+ pDefinedIn = nullptr;
return *this;
}
@@ -613,7 +613,7 @@ SwFormatPageDesc &SwFormatPageDesc::operator=(const SwFormatPageDesc &rCpy)
bool SwFormatPageDesc::KnowsPageDesc() const
{
- return (GetRegisteredIn() != 0);
+ return (GetRegisteredIn() != nullptr);
}
bool SwFormatPageDesc::operator==( const SfxPoolItem& rAttr ) const
@@ -1101,7 +1101,7 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
m_bOrtho = false;
uno::Reference<lang::XUnoTunnel> xNumTunnel(xCols, uno::UNO_QUERY);
- SwXTextColumns* pSwColums = 0;
+ SwXTextColumns* pSwColums = nullptr;
if(xNumTunnel.is())
{
pSwColums = reinterpret_cast< SwXTextColumns * >(
@@ -1536,7 +1536,7 @@ SwFormatAnchor::SwFormatAnchor( RndStdIds nRnd, sal_uInt16 nPage )
SwFormatAnchor::SwFormatAnchor( const SwFormatAnchor &rCpy )
: SfxPoolItem( RES_ANCHOR )
, m_pContentAnchor( (rCpy.GetContentAnchor())
- ? new SwPosition( *rCpy.GetContentAnchor() ) : 0 )
+ ? new SwPosition( *rCpy.GetContentAnchor() ) : nullptr )
, nAnchorId( rCpy.GetAnchorId() )
, nPageNum( rCpy.GetPageNum() )
// OD 2004-05-05 #i28701# - get always new increased order number
@@ -1557,12 +1557,12 @@ void SwFormatAnchor::SetAnchor( const SwPosition *pPos )
dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
|| (FLY_AT_PARA == nAnchorId && dynamic_cast<SwTableNode*>(&pPos->nNode.GetNode()))
|| dynamic_cast<SwTextNode*>(&pPos->nNode.GetNode()));
- m_pContentAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 );
+ m_pContentAnchor .reset( (pPos) ? new SwPosition( *pPos ) : nullptr );
// Flys anchored AT paragraph should not point into the paragraph content
if (m_pContentAnchor &&
((FLY_AT_PARA == nAnchorId) || (FLY_AT_FLY == nAnchorId)))
{
- m_pContentAnchor->nContent.Assign( 0, 0 );
+ m_pContentAnchor->nContent.Assign( nullptr, 0 );
}
}
@@ -1575,7 +1575,7 @@ SwFormatAnchor& SwFormatAnchor::operator=(const SwFormatAnchor& rAnchor)
m_pContentAnchor.reset( (rAnchor.GetContentAnchor())
? new SwPosition(*(rAnchor.GetContentAnchor()))
- : 0 );
+ : nullptr );
return *this;
}
@@ -1752,7 +1752,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
// Partially implemented inline in hxx
SwFormatURL::SwFormatURL() :
SfxPoolItem( RES_URL ),
- pMap( 0 ),
+ pMap( nullptr ),
bIsServerMap( false )
{
}
@@ -1764,7 +1764,7 @@ SwFormatURL::SwFormatURL( const SwFormatURL &rURL) :
sName( rURL.GetName() ),
bIsServerMap( rURL.IsServerMap() )
{
- pMap = rURL.GetMap() ? new ImageMap( *rURL.GetMap() ) : 0;
+ pMap = rURL.GetMap() ? new ImageMap( *rURL.GetMap() ) : nullptr;
}
SwFormatURL::~SwFormatURL()
@@ -1804,7 +1804,7 @@ void SwFormatURL::SetURL(const OUString &rURL, bool bServerMap)
void SwFormatURL::SetMap( const ImageMap *pM )
{
delete pMap;
- pMap = pM ? new ImageMap( *pM ) : 0;
+ pMap = pM ? new ImageMap( *pM ) : nullptr;
}
bool SwFormatURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -2545,8 +2545,8 @@ bool SwFrameFormat::supportsFullDrawingLayerFillAttributeSet() const
void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- SwFormatHeader const *pH = 0;
- SwFormatFooter const *pF = 0;
+ SwFormatHeader const *pH = nullptr;
+ SwFormatFooter const *pF = nullptr;
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
@@ -2589,13 +2589,13 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( pH && pH->IsActive() && !pH->GetHeaderFormat() )
{ //If he doesn't have one, I'll add one
- SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADER, 0 );
+ SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADER, nullptr );
const_cast<SwFormatHeader *>(pH)->RegisterToFormat( *pFormat );
}
if( pF && pF->IsActive() && !pF->GetFooterFormat() )
{ //If he doesn't have one, I'll add one
- SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, 0 );
+ SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, nullptr );
const_cast<SwFormatFooter *>(pF)->RegisterToFormat( *pFormat );
}
@@ -2603,14 +2603,14 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
- SetXObject(uno::Reference<uno::XInterface>(0));
+ SetXObject(uno::Reference<uno::XInterface>(nullptr));
}
- const SwPosition* oldAnchorPosition = NULL;
- const SwPosition* newAnchorPosition = NULL;
+ const SwPosition* oldAnchorPosition = nullptr;
+ const SwPosition* newAnchorPosition = nullptr;
if( pNew && pNew->Which() == RES_ATTRSET_CHG )
{
- const SfxPoolItem* tmp = NULL;
+ const SfxPoolItem* tmp = nullptr;
static_cast< const SwAttrSetChg* >(pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false, &tmp );
if( tmp )
newAnchorPosition = static_cast< const SwFormatAnchor* >( tmp )->GetContentAnchor();
@@ -2619,18 +2619,18 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
newAnchorPosition = static_cast< const SwFormatAnchor* >( pNew )->GetContentAnchor();
if( pOld && pOld->Which() == RES_ATTRSET_CHG )
{
- const SfxPoolItem* tmp = NULL;
+ const SfxPoolItem* tmp = nullptr;
static_cast< const SwAttrSetChg* >(pOld)->GetChgSet()->GetItemState( RES_ANCHOR, false, &tmp );
if( tmp )
oldAnchorPosition = static_cast< const SwFormatAnchor* >( tmp )->GetContentAnchor();
}
if( pOld && pOld->Which() == RES_ANCHOR )
oldAnchorPosition = static_cast< const SwFormatAnchor* >( pOld )->GetContentAnchor();
- if( oldAnchorPosition != NULL && ( newAnchorPosition == NULL || oldAnchorPosition->nNode.GetIndex() != newAnchorPosition->nNode.GetIndex()))
+ if( oldAnchorPosition != nullptr && ( newAnchorPosition == nullptr || oldAnchorPosition->nNode.GetIndex() != newAnchorPosition->nNode.GetIndex()))
{
oldAnchorPosition->nNode.GetNode().RemoveAnchoredFly(this);
}
- if( newAnchorPosition != NULL && ( oldAnchorPosition == NULL || oldAnchorPosition->nNode.GetIndex() != newAnchorPosition->nNode.GetIndex()))
+ if( newAnchorPosition != nullptr && ( oldAnchorPosition == nullptr || oldAnchorPosition->nNode.GetIndex() != newAnchorPosition->nNode.GetIndex()))
{
newAnchorPosition->nNode.GetNode().AddAnchoredFly(this);
}
@@ -2650,7 +2650,7 @@ void SwFrameFormat::DelFrms()
do {
pLast->Cut();
SwFrm::DestroyFrm(pLast);
- } while( 0 != ( pLast = aIter.Next() ));
+ } while( nullptr != ( pLast = aIter.Next() ));
}
void SwFrameFormat::MakeFrms()
@@ -2662,7 +2662,7 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
const bool bCalcFrm ) const
{
SwRect aRet;
- SwFrm *pFrm = 0;
+ SwFrm *pFrm = nullptr;
if( dynamic_cast<const SwSectionFormat*>( this ) != nullptr )
{
// get the Frame using Node2Layout
@@ -2686,15 +2686,15 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
aRet = pFrm->Frm();
--aRet.Pos().Y();
}
- pFrm = 0; // the rect is finished by now
+ pFrm = nullptr; // the rect is finished by now
}
}
}
else
{
const sal_uInt16 nFrmType = RES_FLYFRMFMT == Which() ? FRM_FLY : USHRT_MAX;
- pFrm = ::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrmType, pPoint,
- 0, bCalcFrm );
+ pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrmType, pPoint,
+ nullptr, bCalcFrm );
}
if( pFrm )
@@ -2717,7 +2717,7 @@ SdrObject* SwFrameFormat::FindSdrObject()
// #i30669# - use method <FindContactObj()> instead of
// duplicated code.
SwContact* pFoundContact = FindContactObj();
- return pFoundContact ? pFoundContact->GetMaster() : 0;
+ return pFoundContact ? pFoundContact->GetMaster() : nullptr;
}
SdrObject* SwFrameFormat::FindRealSdrObject()
@@ -2725,9 +2725,9 @@ SdrObject* SwFrameFormat::FindRealSdrObject()
if( RES_FLYFRMFMT == Which() )
{
Point aNullPt;
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(::GetFrmOfModify( 0, *this, FRM_FLY,
+ SwFlyFrm* pFly = static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *this, FRM_FLY,
&aNullPt ));
- return pFly ? pFly->GetVirtDrawObj() : 0;
+ return pFly ? pFly->GetVirtDrawObj() : nullptr;
}
return FindSdrObject();
}
@@ -2819,7 +2819,7 @@ void SwFrameFormat::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetName().toUtf8().getStr()));
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which());
- const char* pWhich = 0;
+ const char* pWhich = nullptr;
switch (Which())
{
case RES_FLYFRMFMT:
@@ -2859,7 +2859,7 @@ SwFlyFrameFormat::~SwFlyFrameFormat()
do
{
SwFrm::DestroyFrm(pLast);
- } while( 0 != ( pLast = aIter.Next() ));
+ } while( nullptr != ( pLast = aIter.Next() ));
SwIterator<SwFlyDrawContact,SwFormat> a2ndIter( *this );
SwFlyDrawContact* pC = a2ndIter.First();
@@ -2867,7 +2867,7 @@ SwFlyFrameFormat::~SwFlyFrameFormat()
do {
delete pC;
- } while( 0 != ( pC = a2ndIter.Next() ));
+ } while( nullptr != ( pC = a2ndIter.Next() ));
}
/// Creates the Frms if the format describes a paragraph-bound frame.
@@ -2878,7 +2878,7 @@ void SwFlyFrameFormat::MakeFrms()
if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
return;
- SwModify *pModify = 0;
+ SwModify *pModify = nullptr;
// OD 24.07.2003 #111032# - create local copy of anchor attribute for possible changes.
SwFormatAnchor aAnchorAttr( GetAnchor() );
switch( aAnchorAttr.GetAnchorId() )
@@ -2903,7 +2903,7 @@ void SwFlyFrameFormat::MakeFrms()
SwNodeIndex aIdx( aAnchorAttr.GetContentAnchor()->nNode );
SwContentNode *pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
// #i105535#
- if ( pCNd == 0 )
+ if ( pCNd == nullptr )
{
pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode();
}
@@ -2915,7 +2915,7 @@ void SwFlyFrameFormat::MakeFrms()
}
}
// #i105535#
- if ( pModify == 0 )
+ if ( pModify == nullptr )
{
const SwNodeIndex &rIdx = aAnchorAttr.GetContentAnchor()->nNode;
SwFrameFormats& rFormats = *GetDoc()->GetSpzFrameFormats();
@@ -2941,14 +2941,14 @@ void SwFlyFrameFormat::MakeFrms()
{
SwContentNode *pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode();
SwIterator<SwFrm,SwContentNode> aIter( *pCNd );
- for ( SwFrm* pFrm = aIter.First(); pFrm != NULL; pFrm = aIter.Next() )
+ for ( SwFrm* pFrm = aIter.First(); pFrm != nullptr; pFrm = aIter.Next() )
{
pPage = pFrm->FindPageFrm();
if( pPage )
{
nPgNum = pPage->GetPhyPageNum();
aAnchorAttr.SetPageNum( nPgNum );
- aAnchorAttr.SetAnchor( 0 );
+ aAnchorAttr.SetAnchor( nullptr );
SetFormatAttr( aAnchorAttr );
break;
}
@@ -2959,7 +2959,7 @@ void SwFlyFrameFormat::MakeFrms()
if ( pPage->GetPhyPageNum() == nPgNum )
{
// #i50432# - adjust synopsis of <PlaceFly(..)>
- pPage->PlaceFly( 0, this );
+ pPage->PlaceFly( nullptr, this );
break;
}
pPage = static_cast<SwPageFrm*>(pPage->GetNext());
@@ -3046,8 +3046,8 @@ void SwFlyFrameFormat::MakeFrms()
SwFlyFrm* SwFlyFrameFormat::GetFrm( const Point* pPoint, const bool bCalcFrm ) const
{
- return static_cast<SwFlyFrm*>(::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY,
- pPoint, 0, bCalcFrm ));
+ return static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY,
+ pPoint, nullptr, bCalcFrm ));
}
SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const bool bCalcFrm ) const
@@ -3059,7 +3059,7 @@ SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const b
}
else
{
- return 0L;
+ return nullptr;
}
}
@@ -3275,7 +3275,7 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat
pFrm->Cut();
SwFrm::DestroyFrm(pFrm);
}
- } while( 0 != ( pFrm = aIter.Next() ));
+ } while( nullptr != ( pFrm = aIter.Next() ));
}
// indicate, that re-creation of fly frames necessary
mbAnchorNodeChanged = true;
@@ -3382,19 +3382,19 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
{
const SwFormatURL &rURL = GetURL();
if( !rURL.GetMap() )
- return 0;
+ return nullptr;
if( !pFly )
{
pFly = SwIterator<SwFlyFrm,SwFormat>( *this ).First();
if( !pFly )
- return 0;
+ return nullptr;
}
//Original size for OLE and graphic is TwipSize, otherwise the size of
//FrameFormat of the Fly.
const SwFrm *pRef;
- const SwNoTextNode *pNd = 0;
+ const SwNoTextNode *pNd = nullptr;
Size aOrigSz;
if( pFly->Lower() && pFly->Lower()->IsNoTextFrm() )
{
@@ -3436,7 +3436,7 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
aActSz, aPos, nFlags );
}
- return 0;
+ return nullptr;
}
//UUUU
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 5b32b56acae8..1ef7373faf68 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -349,18 +349,18 @@ void SwFrm::OptPrepareMake()
{
{
SwFrmDeleteGuard aDeleteGuard(this);
- GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
+ GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
}
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
return;
}
if ( GetPrev() && !GetPrev()->IsValid() )
- PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
+ PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
else
{
StackHack aHack;
- MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut());
+ MakeAll(IsRootFrm() ? nullptr : getRootFrm()->GetCurrShell()->GetOut());
}
}
@@ -370,7 +370,7 @@ void SwFrm::PrepareCrsr()
if( GetUpper() && !GetUpper()->IsSctFrm() )
{
GetUpper()->PrepareCrsr();
- GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
+ GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
@@ -381,7 +381,7 @@ void SwFrm::PrepareCrsr()
bool bNoSect = IsInSct();
bool bOldTabLock = false, bFoll;
- SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : NULL;
+ SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : nullptr;
if ( bTab )
{
@@ -438,7 +438,7 @@ void SwFrm::PrepareCrsr()
if ( bTab && !bOldTabLock )
::PrepareUnlock( static_cast<SwTabFrm*>(this) );
}
- Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
+ Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
}
// Here we return GetPrev(); however we will ignore empty SectionFrms
@@ -482,7 +482,7 @@ void SwFrm::MakePos()
!pPrv->GetAttrSet()->GetKeep().GetValue()
)
{
- pPrv->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0); // This may cause Prev to vanish!
+ pPrv->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish!
}
else if ( pPrv->Frm().Top() == 0 )
{
@@ -640,12 +640,12 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot
void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
const SwRect aOldRect( Frm() ); // Adjust root size
const SwLayNotify aNotify( this ); // takes care of the notification in the dtor
std::unique_ptr<SwBorderAttrAccess> pAccess;
- const SwBorderAttrs*pAttrs = 0;
+ const SwBorderAttrs*pAttrs = nullptr;
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
{
@@ -776,7 +776,7 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
} //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
if ( Frm() != aOldRect && GetUpper() )
- static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( 0, 0 );
+ static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrm.Width(),
"Upper (Root) must be wide enough to contain the widest page");
@@ -784,7 +784,7 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
// takes care of the notification in the dtor
const SwLayNotify aNotify( this );
@@ -793,7 +793,7 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
std::unique_ptr<SwBorderAttrAccess> pAccess;
- const SwBorderAttrs*pAttrs = 0;
+ const SwBorderAttrs*pAttrs = nullptr;
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
{
@@ -869,12 +869,12 @@ bool SwTextNode::IsCollapse() const
const SwEndNode *pNdAfter=GetNodes()[nIdx+1]->GetEndNode();
// The paragraph is collapsed only if the NdAfter is the end of a cell
- bool bInTable = this->FindTableNode( ) != NULL;
+ bool bInTable = this->FindTableNode( ) != nullptr;
SwSortedObjs* pObjs = this->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )->GetDrawObjs( );
- const size_t nObjs = ( pObjs != NULL ) ? pObjs->size( ) : 0;
+ const size_t nObjs = ( pObjs != nullptr ) ? pObjs->size( ) : 0;
- return pNdBefore!=NULL && pNdAfter!=NULL && nObjs == 0 && bInTable;
+ return pNdBefore!=nullptr && pNdAfter!=nullptr && nObjs == 0 && bInTable;
}
return false;
@@ -1056,7 +1056,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
long nFormatCount = 0;
// - loop prevention
int nConsecutiveFormatsWithoutChange = 0;
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
#ifdef DBG_UTIL
const SwDoc *pDoc = GetAttrSet()->GetDoc();
@@ -1112,7 +1112,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const bool bKeep = IsKeep( rAttrs.GetAttrSet() );
- SwSaveFootnoteHeight *pSaveFootnote = 0;
+ SwSaveFootnoteHeight *pSaveFootnote = nullptr;
if ( bFootnote )
{
SwFootnoteFrm *pFootnote = FindFootnoteFrm();
@@ -1179,7 +1179,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( bFootnote && !mbValidPos )
{
SwFootnoteFrm* pFootnote = FindFootnoteFrm();
- SwContentFrm* pRefCnt = pFootnote ? pFootnote->GetRef() : 0;
+ SwContentFrm* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr;
if ( pRefCnt && !pRefCnt->IsValid() )
{
SwFootnoteBossFrm* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrm();
@@ -1309,7 +1309,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( bMoveable && !bFormatted && ( GetFollow() ||
( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, false );
+ Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = bWidow = false;
}
if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos ||
@@ -1320,7 +1320,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
if ( bWidow && GetFollow() )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, false );
+ Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = false;
}
}
@@ -1383,16 +1383,16 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const long nOldW = (Prt().*fnRect->fnGetWidth)();
MakePrtArea( rAttrs );
if( nOldW != (Prt().*fnRect->fnGetWidth)() )
- Prepare( PREP_FIXSIZE_CHG, 0, false );
+ Prepare( PREP_FIXSIZE_CHG, nullptr, false );
}
if( GetFollow() )
- Prepare( PREP_WIDOWS_ORPHANS, 0, false );
+ Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = true;
bFormatted = sal_True;
Format(getRootFrm()->GetCurrShell()->GetOut());
}
}
- SwFrm *pNxt = HasFollow() ? NULL : FindNext();
+ SwFrm *pNxt = HasFollow() ? nullptr : FindNext();
while( pNxt && pNxt->IsSctFrm() )
{ // Leave empty sections out, go into the other ones.
if( static_cast<SwSectionFrm*>(pNxt)->GetSection() )
@@ -1482,7 +1482,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// bMoveFwdInvalid is required for #38407#. This was originally solved
// in flowfrm.cxx rev 1.38, but broke the above schema and
// preferred to play towers of hanoi (#43669#).
- SwFrm *pNxt = HasFollow() ? NULL : FindNext();
+ SwFrm *pNxt = HasFollow() ? nullptr : FindNext();
// For sections we prefer the content, because it can change
// the page if required.
while( pNxt && pNxt->IsSctFrm() )
@@ -1496,7 +1496,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
if ( pNxt )
{
- const bool bMoveFwdInvalid = 0 != GetIndNext();
+ const bool bMoveFwdInvalid = nullptr != GetIndNext();
const bool bNxtNew =
( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) &&
(!pNxt->IsTextFrm() ||!static_cast<SwTextFrm*>(pNxt)->IsHiddenNow());
@@ -1556,7 +1556,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// Finally, we are able to split table rows. Therefore, bDontMoveMe
// can be set to false:
if( bDontMoveMe && IsInTab() &&
- 0 != GetNextCellLeaf( MAKEPAGE_NONE ) )
+ nullptr != GetNextCellLeaf( MAKEPAGE_NONE ) )
bDontMoveMe = false;
if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() >
@@ -1569,7 +1569,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bool bSplit = !IsFwdMoveAllowed();
if ( nTmp > 0 && WouldFit( nTmp, bSplit, false ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, false );
+ Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = false;
bFitPromise = true;
continue;
@@ -1643,7 +1643,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// FME 2007-08-30 #i81146# new loop control
if ( nConsecutiveFormatsWithoutChange <= cnStopFormat )
{
- Prepare( PREP_MUST_FIT, 0, false );
+ Prepare( PREP_MUST_FIT, nullptr, false );
mbValidSize = false;
bMustFit = true;
continue;
@@ -1765,7 +1765,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
// To have the footnote select it's place carefully, it needs
// to be moved in any case if there is at least one page/column
// between the footnote and the new Upper.
- SwFootnoteFrm* pFootnoteFrm = 0;
+ SwFootnoteFrm* pFootnoteFrm = nullptr;
if ( IsInFootnote() )
{
if( !lcl_IsNextFootnoteBoss( pNewUpper, this ) )
@@ -1807,7 +1807,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
SwLayoutFrm *pUp = pTmpFrm->GetUpper();
SwFrm *pOldNext = pTmpFrm->GetNext();
pTmpFrm->RemoveFromLayout();
- pTmpFrm->InsertBefore( pNewUpper, 0 );
+ pTmpFrm->InsertBefore( pNewUpper, nullptr );
if ( pFrm->IsTextFrm() &&
( bTstMove ||
static_cast<SwTextFrm*>(pFrm)->HasFollow() ||
@@ -1843,7 +1843,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
if ( pTmpPrev )
{
- nUpper = CalcUpperSpace( NULL, pTmpPrev );
+ nUpper = CalcUpperSpace( nullptr, pTmpPrev );
// in balanced columned section frames we do not want the
// common border
@@ -1936,7 +1936,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
}
}
SwFrm *pNxt;
- if( 0 != (pNxt = pFrm->FindNext()) && pNxt->IsContentFrm() &&
+ if( nullptr != (pNxt = pFrm->FindNext()) && pNxt->IsContentFrm() &&
( !pFootnoteFrm || ( pNxt->IsInFootnote() &&
pNxt->FindFootnoteFrm()->GetAttr() == pFootnoteFrm->GetAttr() ) ) )
{
@@ -1957,7 +1957,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
// spacing has been calculated already, and we don't need to re-calculate
// it in an expensive way.
if( lcl_NotHiddenPrev( pNxt ) )
- pTmpPrev = 0;
+ pTmpPrev = nullptr;
else
{
if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() )
@@ -1968,10 +1968,10 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
pFrm = static_cast<SwContentFrm*>(pNxt);
}
else
- pFrm = 0;
+ pFrm = nullptr;
}
else
- pFrm = 0;
+ pFrm = nullptr;
} while ( bRet && pFrm );
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index e8d22fb4a65a..9c5b9796c18f 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -37,7 +37,7 @@ SwColumnFrm::SwColumnFrm( SwFrameFormat *pFormat, SwFrm* pSib ):
{
mnFrmType = FRM_COLUMN;
SwBodyFrm* pColBody = new SwBodyFrm( pFormat->GetDoc()->GetDfltFrameFormat(), pSib );
- pColBody->InsertBehind( this, 0 ); // ColumnFrms now with BodyFrm
+ pColBody->InsertBehind( this, nullptr ); // ColumnFrms now with BodyFrm
SetMaxFootnoteHeight( LONG_MAX );
}
@@ -94,9 +94,9 @@ static SwLayoutFrm * lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount )
sal_uInt16 i;
for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i )
/* do nothing */;
- return i == nCount ? static_cast<SwLayoutFrm*>(pCol) : 0;
+ return i == nCount ? static_cast<SwLayoutFrm*>(pCol) : nullptr;
}
- return 0;
+ return nullptr;
}
static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
@@ -111,7 +111,7 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
SwLayoutFrm *pAttrOwner = pCont;
if ( pCont->IsBodyFrm() )
pAttrOwner = pCont->FindPageFrm();
- SwLayoutFrm *pNeighbourCol = 0;
+ SwLayoutFrm *pNeighbourCol = nullptr;
SwIterator<SwLayoutFrm,SwFormat> aIter( *pAttrOwner->GetFormat() );
SwLayoutFrm *pNeighbour = aIter.First();
@@ -122,10 +122,10 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
/* do nothing */;
while ( pNeighbour )
{
- if ( 0 != (pNeighbourCol = lcl_FindColumns( pNeighbour, nCount+nAdd )) &&
+ if ( nullptr != (pNeighbourCol = lcl_FindColumns( pNeighbour, nCount+nAdd )) &&
pNeighbourCol != pCont )
break;
- pNeighbourCol = 0;
+ pNeighbourCol = nullptr;
pNeighbour = aIter.Next();
}
@@ -145,7 +145,7 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
{
SwColumnFrm *pTmpCol = new SwColumnFrm( pNeighbourCol->GetFormat(), pCont );
pTmpCol->SetMaxFootnoteHeight( nMax );
- pTmpCol->InsertBefore( pCont, NULL );
+ pTmpCol->InsertBefore( pCont, nullptr );
pNeighbourCol = static_cast<SwLayoutFrm*>(pNeighbourCol->GetNext());
}
}
@@ -193,7 +193,7 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
if( Lower() && Lower()->IsColumnFrm() )
{
SwFrm* pCol = Lower();
- while( 0 != (pCol=pCol->GetNext()) )
+ while( nullptr != (pCol=pCol->GetNext()) )
++nOldNum;
}
nNewNum = rNew.GetNumCols();
@@ -209,7 +209,7 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
bool bAdjustAttributes = nOldNum != rOld.GetNumCols();
//The content is saved and restored if the column count is different.
- SwFrm *pSave = 0;
+ SwFrm *pSave = nullptr;
if( nOldNum != nNewNum || bChgFootnote )
{
SwDoc *pDoc = GetFormat()->GetDoc();
@@ -229,7 +229,7 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
else
GetFormat()->SetFormatAttr( SwFormatFillOrder() );
if ( pSave )
- ::RestoreContent( pSave, this, 0, true );
+ ::RestoreContent( pSave, this, nullptr, true );
return;
}
if ( nOldNum == 1 )
@@ -282,7 +282,7 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
static_cast<SwLayoutFrm*>(Lower())->Lower() &&
static_cast<SwLayoutFrm*>(Lower())->Lower()->IsLayoutFrm(),
"no column body." ); // ColumnFrms contain BodyFrms
- ::RestoreContent( pSave, static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()), 0, true );
+ ::RestoreContent( pSave, static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()), nullptr, true );
}
}
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 2e82142222c3..07b64636aeb2 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -104,7 +104,7 @@
#include <comphelper/string.hxx>
sal_uLong SwProtocol::nRecord = 0;
-SwImplProtocol* SwProtocol::pImpl = NULL;
+SwImplProtocol* SwProtocol::pImpl = nullptr;
static sal_uLong lcl_GetFrameId( const SwFrm* pFrm )
{
@@ -247,7 +247,7 @@ void SwProtocol::Stop()
if( pImpl )
{
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
if( pFntCache )
pFntCache->Flush();
}
@@ -255,7 +255,7 @@ void SwProtocol::Stop()
}
SwImplProtocol::SwImplProtocol()
- : pStream( NULL ), pFrmIds( NULL ), nTypes( 0xffff ),
+ : pStream( nullptr ), pFrmIds( nullptr ), nTypes( 0xffff ),
nLineCount( 0 ), nMaxLines( USHRT_MAX ), nTestMode( 0 )
{
NewStream();
@@ -269,9 +269,9 @@ bool SwImplProtocol::NewStream()
if( pStream->GetError() )
{
delete pStream;
- pStream = NULL;
+ pStream = nullptr;
}
- return 0 != pStream;
+ return nullptr != pStream;
}
SwImplProtocol::~SwImplProtocol()
@@ -301,7 +301,7 @@ void SwImplProtocol::CheckLine( OString& rLine )
nInitFile = 1;
pFrmIds->clear();
delete pFrmIds;
- pFrmIds = NULL; // default: log all frames
+ pFrmIds = nullptr; // default: log all frames
}
else if (aTmp == "[frmtype")// section types
{
@@ -508,8 +508,8 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
{
case 1: InsertFrm( nId ); break;
case 2: DeleteFrm( nId ); break;
- case 3: pFrmIds->clear(); delete pFrmIds; pFrmIds = NULL; break;
- case 4: delete pStream; pStream = NULL; break;
+ case 3: pFrmIds->clear(); delete pFrmIds; pFrmIds = nullptr; break;
+ case 4: delete pStream; pStream = nullptr; break;
}
return;
}
diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx
index fe315d3bf7a8..be559b4bff35 100644
--- a/sw/source/core/layout/dumpfilter.cxx
+++ b/sw/source/core/layout/dumpfilter.cxx
@@ -104,11 +104,11 @@ namespace sw
// Dump the layout XML into the XOutputStream
xmlOutputBufferPtr outBuffer = xmlOutputBufferCreateIO(
- writeCallback, closeCallback, static_cast<void*>(xOut.get()), NULL );
+ writeCallback, closeCallback, static_cast<void*>(xOut.get()), nullptr );
xmlTextWriterPtr writer = xmlNewTextWriter( outBuffer );
xmlTextWriterSetIndent(writer, 1);
- xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
+ xmlTextWriterStartDocument( writer, nullptr, nullptr, nullptr );
// TODO This doesn't export the whole XML file, whereas dumpAsXML() does it nicely
pLayout->dumpAsXml( writer );
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 8936e25ea4a2..5376296e9801 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -94,9 +94,9 @@ const SwContentFrm *SwLayoutFrm::ContainsContent() const
pLayLeaf = pLayLeaf->GetNextLayoutLeaf();
if( !IsAnLower( pLayLeaf) )
- return 0;
+ return nullptr;
} while( pLayLeaf );
- return 0;
+ return nullptr;
}
/**
@@ -151,19 +151,19 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSectio
} while( pLayLeaf && pLayLeaf->IsInFootnote() );
}
if( !IsAnLower( pLayLeaf) )
- return 0;
+ return nullptr;
} while( pLayLeaf );
- return 0;
+ return nullptr;
}
const SwFrm* SwFrm::GetLower() const
{
- return IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(this)->Lower() : 0;
+ return IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(this)->Lower() : nullptr;
}
SwFrm* SwFrm::GetLower()
{
- return IsLayoutFrm() ? static_cast<SwLayoutFrm*>(this)->Lower() : 0;
+ return IsLayoutFrm() ? static_cast<SwLayoutFrm*>(this)->Lower() : nullptr;
}
SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote )
@@ -264,7 +264,7 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
{
pUpNext = static_cast<const SwLayoutFrm*>(pUpNext->GetNext());
}
- bReturn = pUpNext != 0;
+ bReturn = pUpNext != nullptr;
}
}
@@ -275,7 +275,7 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext )
{
- const SwFrm* pRet = 0;
+ const SwFrm* pRet = nullptr;
if ( pFrm->IsFlyFrm() )
pRet = bNext ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink();
else
@@ -287,7 +287,7 @@ static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext )
static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd )
{
if ( !pFrm->IsLayoutFrm() )
- return 0;
+ return nullptr;
return bFwd ?
static_cast<const SwLayoutFrm*>(pFrm)->Lower() :
@@ -304,29 +304,29 @@ static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd )
const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
{
const SwFrm *pFrm = this;
- const SwLayoutFrm *pLayoutFrm = 0;
- const SwFrm *p = 0;
+ const SwLayoutFrm *pLayoutFrm = nullptr;
+ const SwFrm *p = nullptr;
bool bGoingUp = !bFwd; // false for forward, true for backward
do {
bool bGoingFwdOrBwd = false;
- bool bGoingDown = ( !bGoingUp && ( 0 != (p = lcl_GetLower( pFrm, bFwd ) ) ) );
+ bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrm, bFwd ) ) ) );
if ( !bGoingDown )
{
// I cannot go down, because either I'm currently going up or
// because the is no lower.
// I'll try to go forward:
- bGoingFwdOrBwd = (0 != (p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
+ bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
if ( !bGoingFwdOrBwd )
{
// I cannot go forward, because there is no next frame.
// I'll try to go up:
- bGoingUp = (0 != (p = pFrm->GetUpper() ) );
+ bGoingUp = (nullptr != (p = pFrm->GetUpper() ) );
if ( !bGoingUp )
{
// I cannot go up, because there is no upper frame.
- return 0;
+ return nullptr;
}
}
}
@@ -339,7 +339,7 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
} while( ( p && !p->IsFlowFrm() ) ||
pFrm == this ||
- 0 == ( pLayoutFrm = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm) : 0 ) ||
+ nullptr == ( pLayoutFrm = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm) : nullptr ) ||
pLayoutFrm->IsAnLower( this ) );
return pLayoutFrm;
@@ -358,22 +358,22 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const
{
const SwFrm *pFrm = this;
- const SwContentFrm *pContentFrm = 0;
+ const SwContentFrm *pContentFrm = nullptr;
bool bGoingUp = false;
do {
- const SwFrm *p = 0;
+ const SwFrm *p = nullptr;
bool bGoingFwdOrBwd = false;
- bool bGoingDown = ( !bGoingUp && ( 0 != ( p = lcl_GetLower( pFrm, true ) ) ) );
+ bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrm, true ) ) ) );
if ( !bGoingDown )
{
- bGoingFwdOrBwd = ( 0 != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
+ bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
if ( !bGoingFwdOrBwd )
{
- bGoingUp = ( 0 != ( p = pFrm->GetUpper() ) );
+ bGoingUp = ( nullptr != ( p = pFrm->GetUpper() ) );
if ( !bGoingUp )
{
- return 0;
+ return nullptr;
}
}
}
@@ -388,7 +388,7 @@ const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const
}
pFrm = p;
- } while ( 0 == (pContentFrm = (pFrm->IsContentFrm() ? static_cast<const SwContentFrm*>(pFrm) : 0) ));
+ } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? static_cast<const SwContentFrm*>(pFrm) : nullptr) ));
return pContentFrm;
}
@@ -434,7 +434,7 @@ SwFootnoteBossFrm* SwFrm::FindFootnoteBossFrm( bool bFootnotes )
pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm();
}
else
- return 0;
+ return nullptr;
}
if( bFootnotes && pRet && pRet->IsColumnFrm() &&
!pRet->GetNext() && !pRet->GetPrev() )
@@ -454,7 +454,7 @@ SwTabFrm* SwFrm::ImplFindTabFrm()
{
pRet = pRet->GetUpper();
if ( !pRet )
- return 0;
+ return nullptr;
}
return static_cast<SwTabFrm*>(pRet);
}
@@ -466,7 +466,7 @@ SwSectionFrm* SwFrm::ImplFindSctFrm()
{
pRet = pRet->GetUpper();
if ( !pRet )
- return 0;
+ return nullptr;
}
return static_cast<SwSectionFrm*>(pRet);
}
@@ -478,7 +478,7 @@ SwFootnoteFrm *SwFrm::ImplFindFootnoteFrm()
{
pRet = pRet->GetUpper();
if ( !pRet )
- return 0;
+ return nullptr;
}
return static_cast<SwFootnoteFrm*>(pRet);
}
@@ -493,7 +493,7 @@ SwFlyFrm *SwFrm::ImplFindFlyFrm()
else
pRet = pRet->GetUpper();
} while ( pRet );
- return 0;
+ return nullptr;
}
SwFrm *SwFrm::FindColFrm()
@@ -526,7 +526,7 @@ SwFrm* SwFrm::FindFooterOrHeader()
else if ( pRet->IsFlyFrm() )
pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm();
else
- return 0;
+ return nullptr;
} while ( pRet );
return pRet;
}
@@ -536,12 +536,12 @@ const SwFootnoteFrm* SwFootnoteContFrm::FindFootNote() const
const SwFootnoteFrm* pRet = static_cast<const SwFootnoteFrm*>(Lower());
if( pRet && !pRet->GetAttr()->GetFootnote().IsEndNote() )
return pRet;
- return NULL;
+ return nullptr;
}
const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const
{
- const SwPageFrm* pRet = 0;
+ const SwPageFrm* pRet = nullptr;
SwRect aRect;
if ( pSize )
@@ -555,7 +555,7 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
if ( !bExtend )
{
if( !Frm().IsInside( rPt ) )
- return 0;
+ return nullptr;
// skip pages above point:
while( pPage && rPt.Y() > pPage->Frm().Bottom() )
@@ -674,30 +674,30 @@ bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const
// besides ContentFrames this function also returns TabFrms and SectionFrms.
static SwFrm* lcl_NextFrm( SwFrm* pFrm )
{
- SwFrm *pRet = 0;
+ SwFrm *pRet = nullptr;
bool bGoingUp = false;
do {
- SwFrm *p = 0;
+ SwFrm *p = nullptr;
bool bGoingFwd = false;
- bool bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? static_cast<SwLayoutFrm*>(pFrm)->Lower() : 0)));
+ bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrm->IsLayoutFrm() ? static_cast<SwLayoutFrm*>(pFrm)->Lower() : nullptr)));
if( !bGoingDown )
{
- bGoingFwd = (0 != (p = ( pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->GetNextLink() : pFrm->GetNext())));
+ bGoingFwd = (nullptr != (p = ( pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->GetNextLink() : pFrm->GetNext())));
if ( !bGoingFwd )
{
- bGoingUp = (0 != (p = pFrm->GetUpper()));
+ bGoingUp = (nullptr != (p = pFrm->GetUpper()));
if ( !bGoingUp )
{
- return 0;
+ return nullptr;
}
}
}
bGoingUp = !(bGoingFwd || bGoingDown);
pFrm = p;
- } while ( 0 == (pRet = ( ( pFrm->IsContentFrm() || ( !bGoingUp &&
- ( pFrm->IsTabFrm() || pFrm->IsSctFrm() ) ) )? pFrm : 0 ) ) );
+ } while ( nullptr == (pRet = ( ( pFrm->IsContentFrm() || ( !bGoingUp &&
+ ( pFrm->IsTabFrm() || pFrm->IsSctFrm() ) ) )? pFrm : nullptr ) ) );
return pRet;
}
@@ -739,12 +739,12 @@ SwFrm *SwFrm::_FindNext()
SwFrm* pMyUpper = GetUpper();
if ( pMyUpper->IsTabFrm() && static_cast<SwTabFrm*>(pMyUpper)->GetFollow() )
return static_cast<SwTabFrm*>(pMyUpper)->GetFollow()->GetLower();
- else return NULL;
+ else return nullptr;
}
else
- return NULL;
+ return nullptr;
- SwFrm* pRet = NULL;
+ SwFrm* pRet = nullptr;
const bool bFootnote = pThis->IsInFootnote();
if ( !bIgnoreTab && pThis->IsInTab() )
{
@@ -752,7 +752,7 @@ SwFrm *SwFrm::_FindNext()
while (pUp && !pUp->IsCellFrm())
pUp = pUp->GetUpper();
SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell.");
- SwFrm* pNxt = pUp ? static_cast<SwCellFrm*>(pUp)->GetFollowCell() : NULL;
+ SwFrm* pNxt = pUp ? static_cast<SwCellFrm*>(pUp)->GetFollowCell() : nullptr;
if ( pNxt )
pNxt = static_cast<SwCellFrm*>(pNxt)->ContainsContent();
if ( !pNxt )
@@ -846,7 +846,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
}
pThis = static_cast<SwTabFrm*>(this)->FindLastContent();
if ( !pThis )
- return 0;
+ return nullptr;
}
else if ( IsSctFrm() )
{
@@ -858,7 +858,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
}
pThis = static_cast<SwSectionFrm*>(this)->FindLastContent();
if ( !pThis )
- return 0;
+ return nullptr;
}
else if ( IsContentFrm() && static_cast<SwContentFrm*>(this)->GetFollow() )
return static_cast<SwContentFrm*>(this)->GetFollow();
@@ -901,7 +901,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
// in the follow footnote, which contains a content frame.
SwFootnoteFrm* pFollowFootnoteFrmOfCurr(
const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) );
- pNxtCnt = 0L;
+ pNxtCnt = nullptr;
do {
pFollowFootnoteFrmOfCurr = pFollowFootnoteFrmOfCurr->GetFollow();
pNxtCnt = pFollowFootnoteFrmOfCurr->ContainsContent();
@@ -912,7 +912,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
{
// current content frame is the last content frame in the
// footnote - no next content frame exists.
- return 0L;
+ return nullptr;
}
}
else if ( pThis->IsInFly() )
@@ -935,7 +935,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
}
}
}
- return 0;
+ return nullptr;
}
/** method to determine previous content frame in the same environment
@@ -948,10 +948,10 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
if ( !IsFlowFrm() )
{
// nothing to do, if current frame isn't a flow frame.
- return 0L;
+ return nullptr;
}
- SwContentFrm* pPrevContentFrm( 0L );
+ SwContentFrm* pPrevContentFrm( nullptr );
// Because method <SwContentFrm::GetPrevContentFrm()> is used to travel
// through the layout, a content frame, at which the travel starts, is needed.
@@ -1039,7 +1039,7 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
{
SwFootnoteFrm* pMasterFootnoteFrmOfCurr(
const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) );
- pPrevContentFrm = 0L;
+ pPrevContentFrm = nullptr;
// correct wrong loop-condition
do {
pMasterFootnoteFrmOfCurr = pMasterFootnoteFrmOfCurr->GetMaster();
@@ -1051,7 +1051,7 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
{
// current content frame is the first content in the
// footnote - no previous content exists.
- pPrevContentFrm = 0L;
+ pPrevContentFrm = nullptr;
}
}
}
@@ -1072,7 +1072,7 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
if ( pPrevContentFrm->FindFooterOrHeader() !=
pCurrContentFrm->FindFooterOrHeader() )
{
- pPrevContentFrm = 0L;
+ pPrevContentFrm = nullptr;
}
}
}
@@ -1103,7 +1103,7 @@ SwFrm *SwFrm::_FindPrev()
{
SwContentFrm *pPrvCnt = static_cast<SwContentFrm*>(pThis)->GetPrevContentFrm();
if( !pPrvCnt )
- return 0;
+ return nullptr;
if ( !bIgnoreTab && pThis->IsInTab() )
{
SwLayoutFrm *pUp = pThis->GetUpper();
@@ -1156,13 +1156,13 @@ SwFrm *SwFrm::_FindPrev()
}
}
}
- return 0;
+ return nullptr;
}
void SwFrm::ImplInvalidateNextPos( bool bNoFootnote )
{
SwFrm *pFrm;
- if ( 0 != (pFrm = _FindNext()) )
+ if ( nullptr != (pFrm = _FindNext()) )
{
if( pFrm->IsSctFrm() )
{
@@ -1433,7 +1433,7 @@ SwLayoutFrm* SwFrm::GetNextCellLeaf( MakePageType )
pTmpFrm = pTmpFrm->GetUpper();
SAL_WARN_IF(!pTmpFrm, "sw.core", "SwFrm::GetNextCellLeaf() without cell");
- return pTmpFrm ? static_cast<SwCellFrm*>(pTmpFrm)->GetFollowCell() : NULL;
+ return pTmpFrm ? static_cast<SwCellFrm*>(pTmpFrm)->GetFollowCell() : nullptr;
}
SwLayoutFrm* SwFrm::GetPrevCellLeaf( MakePageType )
@@ -1451,7 +1451,7 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
const SwRowFrm& rCorrRow,
bool bInFollow )
{
- SwCellFrm* pRet = NULL;
+ SwCellFrm* pRet = nullptr;
const SwCellFrm* pCell = static_cast<const SwCellFrm*>(rOrigRow.Lower());
SwCellFrm* pCorrCell = const_cast<SwCellFrm*>(static_cast<const SwCellFrm*>(rCorrRow.Lower()));
@@ -1473,7 +1473,7 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
while ( !pRow->IsAnLower( &rOrigCell ) )
pRow = static_cast<const SwRowFrm*>(pRow->GetNext());
- SwRowFrm* pCorrRow = 0;
+ SwRowFrm* pCorrRow = nullptr;
if ( bInFollow )
pCorrRow = pRow->GetFollowRow();
else
@@ -1496,13 +1496,13 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
// VERSION OF GetFollowCell() that assumes that we always have a follow flow line:
SwCellFrm* SwCellFrm::GetFollowCell() const
{
- SwCellFrm* pRet = NULL;
+ SwCellFrm* pRet = nullptr;
// NEW TABLES
// Covered cells do not have follow cells!
const long nRowSpan = GetLayoutRowSpan();
if ( nRowSpan < 1 )
- return NULL;
+ return nullptr;
// find most upper row frame
const SwFrm* pRow = GetUpper();
@@ -1511,11 +1511,11 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
pRow = pRow->GetUpper();
if (!pRow)
- return NULL;
+ return nullptr;
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper());
if (!pTabFrm || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine())
- return NULL;
+ return nullptr;
const SwCellFrm* pThisCell = this;
@@ -1534,9 +1534,9 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
}
}
- const SwRowFrm* pFollowRow = NULL;
+ const SwRowFrm* pFollowRow = nullptr;
if ( !pRow->GetNext() &&
- NULL != ( pFollowRow = pRow->IsInSplitTableRow() ) &&
+ nullptr != ( pFollowRow = pRow->IsInSplitTableRow() ) &&
( !pFollowRow->IsRowSpanLine() || nRowSpan > 1 ) )
pRet = lcl_FindCorrespondingCellFrm( *static_cast<const SwRowFrm*>(pRow), *pThisCell, *pFollowRow, true );
@@ -1546,12 +1546,12 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
// VERSION OF GetPreviousCell() THAT ASSUMES THAT WE ALWAYS HAVE A FFL
SwCellFrm* SwCellFrm::GetPreviousCell() const
{
- SwCellFrm* pRet = NULL;
+ SwCellFrm* pRet = nullptr;
// NEW TABLES
// Covered cells do not have previous cells!
if ( GetLayoutRowSpan() < 1 )
- return NULL;
+ return nullptr;
// find most upper row frame
const SwFrm* pRow = GetUpper();
@@ -1587,7 +1587,7 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const
// --> NEW TABLES
const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const
{
- const SwCellFrm* pRet = 0;
+ const SwCellFrm* pRet = nullptr;
const SwTabFrm* pTableFrm = dynamic_cast<const SwTabFrm*>(GetUpper()->GetUpper());
@@ -1684,7 +1684,7 @@ const SwRowFrm* SwFrm::IsInSplitTableRow() const
while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) )
pRow = pRow->GetUpper();
- if ( !pRow ) return NULL;
+ if ( !pRow ) return nullptr;
OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
@@ -1697,7 +1697,7 @@ const SwRowFrm* SwFrm::IsInSplitTableRow() const
*(static_cast<const SwRowFrm*>(pRow)->GetTabLine()) ) ||
!pTab->HasFollowFlowLine() ||
!pTab->GetFollow() )
- return NULL;
+ return nullptr;
// skip headline
const SwRowFrm* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow();
@@ -1716,22 +1716,22 @@ const SwRowFrm* SwFrm::IsInFollowFlowRow() const
while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) )
pRow = pRow->GetUpper();
- if ( !pRow ) return NULL;
+ if ( !pRow ) return nullptr;
OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper());
- const SwTabFrm* pMaster = pTab->IsFollow() ? pTab->FindMaster() : 0;
+ const SwTabFrm* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr;
if ( !pMaster || !pMaster->HasFollowFlowLine() )
- return NULL;
+ return nullptr;
const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow();
const bool bIsInFirstLine = ( pTmp == pRow );
if ( !bIsInFirstLine )
- return NULL;
+ return nullptr;
const SwRowFrm* pMasterRow = static_cast<const SwRowFrm*>(pMaster->GetLastLower());
return pMasterRow;
@@ -1754,7 +1754,7 @@ const SwFrm* SwLayoutFrm::GetLastLower() const
{
const SwFrm* pRet = Lower();
if ( !pRet )
- return 0;
+ return nullptr;
while ( pRet->GetNext() )
pRet = pRet->GetNext();
return pRet;
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index e6f224bebbb9..65b9f03923ab 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -61,8 +61,8 @@ bool SwFlowFrm::m_bMoveBwdJump = false;
SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
m_rThis( rFrm ),
- m_pFollow( 0 ),
- m_pPrecede( 0 ),
+ m_pFollow( nullptr ),
+ m_pPrecede( nullptr ),
m_bLockJoin( false ),
m_bUndersized( false ),
m_bFlyLock( false )
@@ -72,11 +72,11 @@ SwFlowFrm::~SwFlowFrm()
{
if (m_pFollow)
{
- m_pFollow->m_pPrecede = 0;
+ m_pFollow->m_pPrecede = nullptr;
}
if (m_pPrecede)
{
- m_pPrecede->m_pFollow = 0;
+ m_pPrecede->m_pFollow = nullptr;
}
}
@@ -85,15 +85,15 @@ void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow)
if (m_pFollow)
{
assert(this == m_pFollow->m_pPrecede);
- m_pFollow->m_pPrecede = 0;
+ m_pFollow->m_pPrecede = nullptr;
}
m_pFollow = pFollow;
- if (m_pFollow != NULL)
+ if (m_pFollow != nullptr)
{
if (m_pFollow->m_pPrecede) // re-chaining pFollow?
{
assert(m_pFollow == m_pFollow->m_pPrecede->m_pFollow);
- m_pFollow->m_pPrecede->m_pFollow = 0;
+ m_pFollow->m_pPrecede->m_pFollow = nullptr;
}
m_pFollow->m_pPrecede = this;
}
@@ -149,7 +149,7 @@ void SwFlowFrm::CheckKeep()
SwFrm* pTmp;
bool bKeep;
while ( (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
- 0 != ( pTmp = pPre->GetIndPrev() ) )
+ nullptr != ( pTmp = pPre->GetIndPrev() ) )
{
if( pTmp->IsSctFrm() )
{
@@ -198,15 +198,15 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
if ( bKeep )
{
SwFrm *pNxt;
- if( 0 != (pNxt = m_rThis.FindNextCnt()) &&
+ if( nullptr != (pNxt = m_rThis.FindNextCnt()) &&
(!m_pFollow || pNxt != &m_pFollow->GetFrm()))
{
// The last row of a table only keeps with the next content
// it they are in the same section:
if ( bCheckIfLastRowShouldKeep )
{
- const SwSection* pThisSection = 0;
- const SwSection* pNextSection = 0;
+ const SwSection* pThisSection = nullptr;
+ const SwSection* pNextSection = nullptr;
const SwSectionFrm* pThisSectionFrm = m_rThis.FindSctFrm();
const SwSectionFrm* pNextSectionFrm = pNxt->FindSctFrm();
@@ -222,7 +222,7 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
if ( bKeep )
{
- const SwAttrSet* pSet = NULL;
+ const SwAttrSet* pSet = nullptr;
if ( pNxt->IsInTab() )
{
@@ -387,8 +387,8 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
pStart->GetUpper()->m_pLower = nullptr;
if ( pStart->GetPrev() )
{
- pStart->GetPrev()->mpNext = 0;
- pStart->mpPrev = 0;
+ pStart->GetPrev()->mpNext = nullptr;
+ pStart->mpPrev = nullptr;
}
if ( pLay->IsFootnoteFrm() )
@@ -421,7 +421,7 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
if( bUnlock )
static_cast<SwFootnoteFrm*>(pLay)->UnlockBackMove();
}
- pLay = 0;
+ pLay = nullptr;
}
return pLay;
}
@@ -442,7 +442,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
// On the way there, we invalidate as required.
if ( pSibling )
{
- if ( 0 != (pStart->mpPrev = pSibling->GetPrev()) )
+ if ( nullptr != (pStart->mpPrev = pSibling->GetPrev()) )
pStart->GetPrev()->mpNext = pStart;
else
pParent->m_pLower = pStart;
@@ -451,7 +451,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
}
else
{
- if ( 0 == (pStart->mpPrev = pParent->Lower()) )
+ if ( nullptr == (pStart->mpPrev = pParent->Lower()) )
pParent->m_pLower = pStart;
else
//Modified for #i100782#,04/03/2009
@@ -489,7 +489,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
}
}
SwFrm *pFloat = pStart;
- SwFrm *pLst = 0;
+ SwFrm *pLst = nullptr;
SWRECTFN( pParent )
SwTwips nGrowVal = 0;
do
@@ -513,7 +513,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
else
{
pLst = pFloat;
- pFloat = 0;
+ pFloat = nullptr;
}
} while ( pFloat );
@@ -548,7 +548,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
// Be economical with notifications if an action is running.
SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
- const SwViewShellImp *pImp = pSh ? pSh->Imp() : 0;
+ const SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
const bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
if ( !bComplete )
@@ -657,7 +657,7 @@ SwTextFrm* SwContentFrm::FindMaster() const
}
OSL_FAIL( "Follow ist lost in Space." );
- return 0;
+ return nullptr;
}
SwSectionFrm* SwSectionFrm::FindMaster() const
@@ -715,7 +715,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
}
OSL_FAIL( "Follow ist lost in Space." );
- return 0;
+ return nullptr;
}
/**
@@ -727,7 +727,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd,
{
// No flow, no joy...
if ( !(IsInDocBody() || IsInFootnote() || IsInFly()) )
- return 0;
+ return nullptr;
const SwFrm *pLeaf = this;
bool bFound = false;
@@ -816,7 +816,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
const SwFormatPageDesc &rFormatDesc = GetAttrSet()->GetPageDesc();
//My Pagedesc doesn't count if I'm a follow!
- SwPageDesc *pDesc = 0;
+ SwPageDesc *pDesc = nullptr;
int nTmp = 0;
SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this );
if ( !pFlow || !pFlow->IsFollow() )
@@ -845,11 +845,11 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
const SwFlowFrm *pNewFlow = pNew->FindFirstBodyContent();
// Did we find ourselves?
if( pNewFlow == pFlow )
- pNewFlow = NULL;
+ pNewFlow = nullptr;
if ( pNewFlow && pNewFlow->GetFrm().IsInTab() )
pNewFlow = pNewFlow->GetFrm().FindTabFrm();
const SwPageDesc *pNewDesc= ( pNewFlow && !pNewFlow->IsFollow() )
- ? pNewFlow->GetFrm().GetAttrSet()->GetPageDesc().GetPageDesc() : 0;
+ ? pNewFlow->GetFrm().GetAttrSet()->GetPageDesc().GetPageDesc() : nullptr;
return (pNew->GetPageDesc() != pDesc) // own desc ?
|| (pNew->GetFormat() !=
@@ -873,7 +873,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
// For tables, we just take the big leap. A simple GetNext would
// iterate through the first cells and, in turn, all other cells.
- SwLayoutFrm *pLayLeaf = 0;
+ SwLayoutFrm *pLayLeaf = nullptr;
if ( IsTabFrm() )
{
SwContentFrm* pTmp = static_cast<SwTabFrm*>(this)->FindLastContent();
@@ -883,7 +883,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
if ( !pLayLeaf )
pLayLeaf = GetNextLayoutLeaf();
- SwLayoutFrm *pOldLayLeaf = 0; // Make sure that we don't have to
+ SwLayoutFrm *pOldLayLeaf = nullptr; // Make sure that we don't have to
// start searching from top when we
// have a freshly created page.
bool bNewPg = false; // Only insert a new page once.
@@ -898,7 +898,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
// (DocBody or Footnote respectively)
if ( pLayLeaf->FindPageFrm()->IsFootnotePage() )
{ // If I ended up at the end note pages, we're done.
- pLayLeaf = 0;
+ pLayLeaf = nullptr;
continue;
}
if ( (bBody && !pLayLeaf->IsInDocBody()) || pLayLeaf->IsInTab()
@@ -950,7 +950,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
bNewPg = true;
SwPageFrm *pPg = pOldLayLeaf ?
- pOldLayLeaf->FindPageFrm() : 0;
+ pOldLayLeaf->FindPageFrm() : nullptr;
if ( pPg && pPg->IsEmptyPage() )
// Don't insert behind. Insert before the EmptyPage.
pPg = static_cast<SwPageFrm*>(pPg->GetPrev());
@@ -960,11 +960,11 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
InsertPage( pPg, false );
pLayLeaf = GetNextLayoutLeaf();
- pOldLayLeaf = 0;
+ pOldLayLeaf = nullptr;
continue;
}
else
- pLayLeaf = 0;
+ pLayLeaf = nullptr;
}
}
break;
@@ -999,7 +999,7 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
const bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
- SwLayoutFrm *pPrevLeaf = 0;
+ SwLayoutFrm *pPrevLeaf = nullptr;
while ( pLayLeaf )
{
@@ -1310,7 +1310,7 @@ const SwFrm* SwFlowFrm::_GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPre
/// Compare styles attached to these text frames.
static bool lcl_IdenticalStyles(const SwFrm* pPrevFrm, const SwFrm* pFrm)
{
- SwTextFormatColl *pPrevFormatColl = 0;
+ SwTextFormatColl *pPrevFormatColl = nullptr;
if (pPrevFrm && pPrevFrm->IsTextFrm())
{
const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pPrevFrm );
@@ -1355,7 +1355,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
SwSectionFrm* pFoll = &static_cast<SwSectionFrm&>(m_rThis);
do
pOwn = pFoll->ContainsAny();
- while( !pOwn && 0 != ( pFoll = pFoll->GetFollow() ) );
+ while( !pOwn && nullptr != ( pFoll = pFoll->GetFollow() ) );
if( !pOwn )
return 0;
}
@@ -1484,7 +1484,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// OD 2004-02-26 #i25029# - pass previous frame <pPrevFrm>
// to method <GetTopLine(..)>, if parameter <pPr> is set.
// Note: parameter <pPr> is set, if method is called from <SwTextFrm::WouldFit(..)>
- nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrm : 0L) );
+ nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrm : nullptr) );
// OD 2004-03-12 #i11860# - consider value of new parameter <_bConsiderGrid>
// and use new method <GetUpperSpaceAmountConsideredForPageGrid(..)>
@@ -1611,7 +1611,7 @@ SwTwips SwFlowFrm::GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const
nUpperSpaceAmountConsideredForPrevFrmAndPageGrid =
_GetUpperSpaceAmountConsideredForPrevFrm() +
( m_rThis.GetUpper()->GetFormat()->GetDoc()->IsSquaredPageMode()
- ? _GetUpperSpaceAmountConsideredForPageGrid( CalcUpperSpace( 0, 0, false ) )
+ ? _GetUpperSpaceAmountConsideredForPageGrid( CalcUpperSpace( nullptr, nullptr, false ) )
: 0 );
}
@@ -1705,17 +1705,17 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
if ( bKeep && //!bMovedBwd &&
( !pNxt || ( pNxt->IsTextFrm() && static_cast<const SwTextFrm*>(pNxt)->IsEmptyMaster() ) ) &&
- ( 0 != (pNxt = m_rThis.FindNext()) ) && IsKeepFwdMoveAllowed() )
+ ( nullptr != (pNxt = m_rThis.FindNext()) ) && IsKeepFwdMoveAllowed() )
{
if( pNxt->IsSctFrm() )
{ // Don't get fooled by empty SectionFrms
- const SwFrm* pTmp = NULL;
+ const SwFrm* pTmp = nullptr;
while( pNxt && pNxt->IsSctFrm() &&
( !static_cast<const SwSectionFrm*>(pNxt)->GetSection() ||
- 0 == ( pTmp = static_cast<const SwSectionFrm*>(pNxt)->ContainsAny() ) ) )
+ nullptr == ( pTmp = static_cast<const SwSectionFrm*>(pNxt)->ContainsAny() ) ) )
{
pNxt = pNxt->FindNext();
- pTmp = NULL;
+ pTmp = nullptr;
}
if( pTmp )
pNxt = pTmp; // the content of the next notempty sectionfrm
@@ -1813,7 +1813,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
( !m_rThis.IsTabFrm() ||
( m_rThis.GetUpper()->IsInTab() &&
m_rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) &&
- 0 != const_cast<SwFrm&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
+ nullptr != const_cast<SwFrm&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
{
bNoFwd = false;
}
@@ -1837,7 +1837,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
if ( pNewUpper )
{
- PROTOCOL_ENTER( &m_rThis, PROT_MOVE_FWD, 0, 0 );
+ PROTOCOL_ENTER( &m_rThis, PROT_MOVE_FWD, 0, nullptr );
SwPageFrm *pOldPage = pOldBoss->FindPageFrm();
// We move ourself and all the direct successors before the
// first ContentFrm below the new Upper.
@@ -1896,7 +1896,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
OSL_ENSURE( pStart || ( m_rThis.IsTabFrm() && !static_cast<SwTabFrm&>(m_rThis).Lower() ),
"MoveFwd: Missing Content" );
SwLayoutFrm* pBody = pStart ? ( pStart->IsTextFrm() ?
- const_cast<SwBodyFrm *>(static_cast<SwTextFrm*>(pStart)->FindBodyFrm()) : 0 ) : 0;
+ const_cast<SwBodyFrm *>(static_cast<SwTextFrm*>(pStart)->FindBodyFrm()) : nullptr ) : nullptr;
if( pBody )
bFootnoteMoved = pBody->MoveLowerFootnotes( pStart, pOldBoss, pNewBoss,
false);
@@ -1908,7 +1908,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
if( pNewUpper != m_rThis.GetUpper() )
{
// #i27145#
- SwSectionFrm* pOldSct = 0;
+ SwSectionFrm* pOldSct = nullptr;
if ( m_rThis.GetUpper()->IsSctFrm() )
{
pOldSct = static_cast<SwSectionFrm*>(m_rThis.GetUpper());
@@ -1945,7 +1945,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
if( bBossChg )
{
- m_rThis.Prepare( PREP_BOSS_CHGD, 0, false );
+ m_rThis.Prepare( PREP_BOSS_CHGD, nullptr, false );
if( !bSamePage )
{
SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
@@ -2011,7 +2011,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
SwFootnoteBossFrm * pOldBoss = m_rThis.FindFootnoteBossFrm();
SwPageFrm * const pOldPage = pOldBoss->FindPageFrm();
- SwLayoutFrm *pNewUpper = 0;
+ SwLayoutFrm *pNewUpper = nullptr;
bool bCheckPageDescs = false;
bool bCheckPageDescOfNextPage = false;
@@ -2022,7 +2022,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// #i37084# FindLastContent does not necessarily
// have to have a result != 0
- SwFrm* pRef = 0;
+ SwFrm* pRef = nullptr;
const bool bEndnote = pFootnote->GetAttr()->GetFootnote().IsEndNote();
if( bEndnote && pFootnote->IsInSct() )
{
@@ -2126,7 +2126,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
!pNewUpper->GetUpper()->GetPrev() ) &&
!pNewUpper->FindSctFrm()->GetPrev() ) ) )
{
- pNewUpper = 0;
+ pNewUpper = nullptr;
}
// #i53139#
// #i69409# - check <pNewUpper>
@@ -2246,7 +2246,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
if ( bMoveFwdByObjPos &&
pNewUpper->FindPageFrm()->GetPhyPageNum() < nToPageNum )
{
- pNewUpper = 0;
+ pNewUpper = nullptr;
}
// #i44049# - check, if one of its anchored objects
// has restarted the layout process.
@@ -2259,7 +2259,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
if ( pAnchoredObj->RestartLayoutProcess() &&
!pAnchoredObj->IsTmpConsiderWrapInfluence() )
{
- pNewUpper = 0;
+ pNewUpper = nullptr;
break;
}
}
@@ -2301,10 +2301,10 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
pFrm = pFrm->GetNext();
pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, true );
if( pNewUpper == m_rThis.GetUpper() ) // Did we end up in the same place?
- pNewUpper = NULL; // If so, moving is not needed.
+ pNewUpper = nullptr; // If so, moving is not needed.
}
else
- pNewUpper = 0;
+ pNewUpper = nullptr;
}
}
if ( pNewUpper && !ShouldBwdMoved( pNewUpper, true, rbReformat ) )
@@ -2330,7 +2330,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
}
}
- pNewUpper = 0;
+ pNewUpper = nullptr;
}
// OD 2004-05-26 #i21478# - don't move backward, if flow frame wants to
@@ -2363,7 +2363,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
if ( pIndNext && pIndNext->IsFlowFrm() &&
SwFlowFrm::CastFlowFrm(pIndNext)->IsJoinLocked() )
{
- pNewUpper = 0L;
+ pNewUpper = nullptr;
}
}
}
@@ -2387,7 +2387,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
( pNextNewUpper == m_rThis.GetUpper() ||
pNextNewUpper->GetType() != m_rThis.GetUpper()->GetType() ) )
{
- pNewUpper = 0L;
+ pNewUpper = nullptr;
OSL_FAIL( "<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" );
}
}
@@ -2396,7 +2396,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
"<SwFlowFrm::MoveBwd(..)> - moving backward to the current upper frame!?" );
if ( pNewUpper )
{
- PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, 0 );
+ PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, nullptr );
if ( pNewUpper->IsFootnoteContFrm() )
{
// I may have gotten a Container
@@ -2427,7 +2427,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
pTmp = pTmp->GetNext();
if( !pTmp->IsSctFrm() ||
static_cast<SwSectionFrm*>(pTmp)->GetFollow() != pSct )
- pTmp = NULL;
+ pTmp = nullptr;
}
if( pTmp )
pNewUpper = static_cast<SwSectionFrm*>(pTmp);
@@ -2507,7 +2507,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
}
}
- return pNewUpper != 0;
+ return pNewUpper != nullptr;
}
SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm )
@@ -2518,7 +2518,7 @@ SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm )
return static_cast<SwTabFrm*>(pFrm);
if ( pFrm->IsSctFrm() )
return static_cast<SwSectionFrm*>(pFrm);
- return 0;
+ return nullptr;
}
const SwFlowFrm *SwFlowFrm::CastFlowFrm( const SwFrm *pFrm )
@@ -2529,7 +2529,7 @@ const SwFlowFrm *SwFlowFrm::CastFlowFrm( const SwFrm *pFrm )
return static_cast<const SwTabFrm*>(pFrm);
if ( pFrm->IsSctFrm() )
return static_cast<const SwSectionFrm*>(pFrm);
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 99a79a07fdc4..5745f83f6820 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -71,8 +71,8 @@ TYPEINIT2(SwFlyFrm,SwLayoutFrm,SwAnchoredObject);
SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
SwLayoutFrm( pFormat, pSib ),
SwAnchoredObject(), // #i26791#
- m_pPrevLink( 0 ),
- m_pNextLink( 0 ),
+ m_pPrevLink( nullptr ),
+ m_pNextLink( nullptr ),
m_bInCnt( false ),
m_bAtCnt( false ),
m_bLayout( false ),
@@ -108,7 +108,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
}
else
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
mbVertLR = false;
@@ -343,7 +343,7 @@ sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact )
// search for another Writer fly frame registered at same frame format
SwIterator<SwFlyFrm,SwFormat> aIter( *pContact->GetFormat() );
- const SwFlyFrm* pFlyFrm( 0L );
+ const SwFlyFrm* pFlyFrm( nullptr );
for ( pFlyFrm = aIter.First(); pFlyFrm; pFlyFrm = aIter.Next() )
{
if ( pFlyFrm != this )
@@ -379,8 +379,8 @@ SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact )
// order to transport the z-order.
// After creating the first Reference the Masters are removed from the
// List and are not important anymore.
- SdrPage* pPg( 0L );
- if ( 0 != ( pPg = pContact->GetMaster()->GetPage() ) )
+ SdrPage* pPg( nullptr );
+ if ( nullptr != ( pPg = pContact->GetMaster()->GetPage() ) )
{
const size_t nOrdNum = pContact->GetMaster()->GetOrdNum();
pPg->ReplaceObject( pDrawObj, nOrdNum );
@@ -450,7 +450,7 @@ void SwFlyFrm::FinitDrawObj()
// Take VirtObject to the grave.
// If the last VirtObject is destroyed, the DrawObject and the DrawContact
// also need to be destroyed.
- SwFlyDrawContact *pMyContact = 0;
+ SwFlyDrawContact *pMyContact = nullptr;
if ( GetFormat() )
{
bool bContinue = true;
@@ -473,9 +473,9 @@ void SwFlyFrm::FinitDrawObj()
// Writer fly frame again.
if ( pMyContact )
{
- pMyContact->GetMaster()->SetUserCall( 0 );
+ pMyContact->GetMaster()->SetUserCall( nullptr );
}
- GetVirtDrawObj()->SetUserCall( 0 ); // Else calls delete of the ContactObj
+ GetVirtDrawObj()->SetUserCall( nullptr ); // Else calls delete of the ContactObj
delete GetVirtDrawObj(); // Deregisters itself at the Master
delete pMyContact; // Destroys the Master itself
}
@@ -504,7 +504,7 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
pInva = pInva->FindPrev();
}
else
- pInva = 0;
+ pInva = nullptr;
}
}
@@ -530,8 +530,8 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
{
- pMaster->m_pNextLink = 0;
- pFollow->m_pPrevLink = 0;
+ pMaster->m_pNextLink = nullptr;
+ pFollow->m_pPrevLink = nullptr;
if ( pFollow->ContainsContent() )
{
@@ -732,7 +732,7 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( ( nInvFlags & 0x40 ) && Lower() && Lower()->IsNoTextFrm() )
ClrContourCache( GetVirtDrawObj() );
SwRootFrm *pRoot;
- if ( nInvFlags & 0x20 && 0 != (pRoot = getRootFrm()) )
+ if ( nInvFlags & 0x20 && nullptr != (pRoot = getRootFrm()) )
pRoot->InvalidateBrowseWidth();
// #i28701#
if ( nInvFlags & 0x80 )
@@ -791,7 +791,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode());
if ( pNd->HasContour() )
- pNd->SetContour( 0 );
+ pNd->SetContour( nullptr );
}
// #i28701# - perform reorder of object lists
// at anchor frame and at page frame.
@@ -864,8 +864,8 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwFormatURL aURL( GetFormat()->GetURL() );
- SwFormatFrmSize *pNewFormatFrmSize = NULL;
- SwFormatChg *pOldFormatChg = NULL;
+ SwFormatFrmSize *pNewFormatFrmSize = nullptr;
+ SwFormatChg *pOldFormatChg = nullptr;
if (nWhich == RES_FRM_SIZE)
pNewFormatFrmSize = const_cast<SwFormatFrmSize*>(static_cast<const SwFormatFrmSize*>(pNew));
else
@@ -909,7 +909,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode());
if ( pNd->HasContour() )
- pNd->SetContour( 0 );
+ pNd->SetContour( nullptr );
}
else if( !Lower()->IsColumnFrm() )
{
@@ -1090,7 +1090,7 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
m_bNotifyBack = m_bInvalid = true;
SwFlyFrm *pFrm;
- if ( GetAnchorFrm() && 0 != (pFrm = AnchorFrm()->FindFlyFrm()) )
+ if ( GetAnchorFrm() && nullptr != (pFrm = AnchorFrm()->FindFlyFrm()) )
{
// Very bad case: If the Fly is bound within another Fly which
// contains columns, the Format should be from that one.
@@ -1106,7 +1106,7 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
if ( GetVertPosOrientFrm() && GetVertPosOrientFrm()->IsLayoutFrm() )
{
const SwSectionFrm* pSectFrm( GetVertPosOrientFrm()->FindSctFrm() );
- if ( pSectFrm && pSectFrm->GetSection() == 0 )
+ if ( pSectFrm && pSectFrm->GetSection() == nullptr )
{
InvalidatePos();
ClearVertPosOrientFrm();
@@ -1132,7 +1132,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
RES_VERT_ORIENT, RES_HORI_ORIENT);
SwFormatVertOrient aVert( pFormat->GetVertOrient() );
- const SwTextFrm *pAutoFrm = NULL;
+ const SwTextFrm *pAutoFrm = nullptr;
// #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
const RndStdIds eAnchorType = GetFrameFormat().GetAnchor().GetAnchorId();
@@ -1255,7 +1255,7 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// Check column width and set it if needed
if ( Lower() && Lower()->IsColumnFrm() )
- AdjustColumns( 0, false );
+ AdjustColumns( nullptr, false );
mbValidSize = true;
@@ -1308,7 +1308,7 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
Size aSize((Frm().*fnRect->fnGetWidth)(), (Frm().*fnRect->fnGetHeight)());
pCustomShape->SuggestTextFrameSize(aSize);
// Do the calculations normally done after touching editeng text of the shape.
- pCustomShape->NbcSetOutlinerParaObjectForText(0, 0);
+ pCustomShape->NbcSetOutlinerParaObjectForText(nullptr, nullptr);
}
}
}
@@ -1393,7 +1393,7 @@ void CalcContent( SwLayoutFrm *pLay,
pSect->CalcFootnoteContent();
}
else
- pSect = NULL;
+ pSect = nullptr;
SwFrm *pFrm = pLay->ContainsAny();
if ( !pFrm )
{
@@ -1426,13 +1426,13 @@ void CalcContent( SwLayoutFrm *pLay,
do
{
// local variables to avoid loops caused by anchored object positioning
- SwAnchoredObject* pAgainObj1 = 0;
- SwAnchoredObject* pAgainObj2 = 0;
+ SwAnchoredObject* pAgainObj1 = nullptr;
+ SwAnchoredObject* pAgainObj2 = nullptr;
// FME 2007-08-30 #i81146# new loop control
int nLoopControlRuns = 0;
const int nLoopControlMax = 20;
- const SwFrm* pLoopControlCond = 0;
+ const SwFrm* pLoopControlCond = nullptr;
SwFrm* pLast;
do
@@ -1483,8 +1483,8 @@ void CalcContent( SwLayoutFrm *pLay,
// #i57765# - do not consider invalid previous
// frame, if current frame has a column/page break before attribute.
SwFrm* pTmpPrev = pFrm->FindPrev();
- SwFlowFrm* pTmpPrevFlowFrm = pTmpPrev && pTmpPrev->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pTmpPrev) : 0;
- SwFlowFrm* pTmpFlowFrm = pFrm->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pFrm) : 0;
+ SwFlowFrm* pTmpPrevFlowFrm = pTmpPrev && pTmpPrev->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pTmpPrev) : nullptr;
+ SwFlowFrm* pTmpFlowFrm = pFrm->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pFrm) : nullptr;
bool bPrevInvalid = pTmpPrevFlowFrm && pTmpFlowFrm &&
!pTmpFlowFrm->IsFollow() &&
@@ -1584,8 +1584,8 @@ void CalcContent( SwLayoutFrm *pLay,
if ( bRestartLayoutProcess )
{
pFrm = pLay->ContainsAny();
- pAgainObj1 = 0L;
- pAgainObj2 = 0L;
+ pAgainObj1 = nullptr;
+ pAgainObj2 = nullptr;
continue;
}
@@ -2035,7 +2035,7 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
// Register at the page
// If there's none present, register via SwPageFrm::PreparePage
SwPageFrm* pPage = FindPageFrm();
- if ( pPage != NULL )
+ if ( pPage != nullptr )
{
pPage->AppendFlyToPage( pNew );
}
@@ -2073,7 +2073,7 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove )
if ( !mpDrawObjs->size() )
DELETEZ( mpDrawObjs );
- pToRemove->ChgAnchorFrm( 0 );
+ pToRemove->ChgAnchorFrm( nullptr );
if ( !pToRemove->IsFlyInCntFrm() && GetUpper() && IsInTab() )//MA_FLY_HEIGHT
GetUpper()->InvalidateSize();
@@ -2176,7 +2176,7 @@ void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
if ( !mpDrawObjs->size() )
DELETEZ( mpDrawObjs );
- _rToRemoveObj.ChgAnchorFrm( 0 );
+ _rToRemoveObj.ChgAnchorFrm( nullptr );
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
}
@@ -2471,7 +2471,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
// OD 16.04.2003 #i13147# - determine <GraphicObject> instead of <Graphic>
// in order to avoid load of graphic, if <SwNoTextNode> contains a graphic
// node and method is called for paint.
- const GraphicObject* pGrfObj = NULL;
+ const GraphicObject* pGrfObj = nullptr;
bool bGrfObjCreated = false;
const SwGrfNode* pGrfNd = pNd->GetGrfNode();
if ( pGrfNd && _bForPaint )
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 8dceb15acff8..f2780c5b2971 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -79,7 +79,7 @@ TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
- const SwFormatAnchor *pAnch = 0;
+ const SwFormatAnchor *pAnch = nullptr;
if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET ==
static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false,
@@ -161,7 +161,7 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( !pContent )
{
SwContentNode *pNode = aNewIdx.GetNode().GetContentNode();
- pContent = pNode->getLayoutFrm( getRootFrm(), &pOldAnchor->Frm().Pos(), 0, false );
+ pContent = pNode->getLayoutFrm( getRootFrm(), &pOldAnchor->Frm().Pos(), nullptr, false );
OSL_ENSURE( pContent, "Neuen Anker nicht gefunden" );
}
//Flys are never attached to a follow, but always on the master which
@@ -212,11 +212,11 @@ public:
static bool IsInProgress( const SwFlyFrm *pFly );
};
-const SwFlyFrm *SwOszControl::pStk1 = 0;
-const SwFlyFrm *SwOszControl::pStk2 = 0;
-const SwFlyFrm *SwOszControl::pStk3 = 0;
-const SwFlyFrm *SwOszControl::pStk4 = 0;
-const SwFlyFrm *SwOszControl::pStk5 = 0;
+const SwFlyFrm *SwOszControl::pStk1 = nullptr;
+const SwFlyFrm *SwOszControl::pStk2 = nullptr;
+const SwFlyFrm *SwOszControl::pStk3 = nullptr;
+const SwFlyFrm *SwOszControl::pStk4 = nullptr;
+const SwFlyFrm *SwOszControl::pStk5 = nullptr;
SwOszControl::SwOszControl( const SwFlyFrm *pFrm )
: pFly( pFrm ),
@@ -238,15 +238,15 @@ SwOszControl::SwOszControl( const SwFlyFrm *pFrm )
SwOszControl::~SwOszControl()
{
if ( SwOszControl::pStk1 == pFly )
- SwOszControl::pStk1 = 0;
+ SwOszControl::pStk1 = nullptr;
else if ( SwOszControl::pStk2 == pFly )
- SwOszControl::pStk2 = 0;
+ SwOszControl::pStk2 = nullptr;
else if ( SwOszControl::pStk3 == pFly )
- SwOszControl::pStk3 = 0;
+ SwOszControl::pStk3 = nullptr;
else if ( SwOszControl::pStk4 == pFly )
- SwOszControl::pStk4 = 0;
+ SwOszControl::pStk4 = nullptr;
else if ( SwOszControl::pStk5 == pFly )
- SwOszControl::pStk5 = 0;
+ SwOszControl::pStk5 = nullptr;
// #i3317#
while ( !maObjPositions.empty() )
{
@@ -334,7 +334,7 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
{
SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
- SwPageFrm *pTmpPage = pFly ? pFly->FindPageFrm() : NULL;
+ SwPageFrm *pTmpPage = pFly ? pFly->FindPageFrm() : nullptr;
if( pTmpPage )
pTmpPage->AppendFlyToPage( this );
}
@@ -372,7 +372,7 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
const SwFrm* pFooter = GetAnchorFrm()->FindFooterOrHeader();
if( pFooter && !pFooter->IsFooterFrm() )
- pFooter = NULL;
+ pFooter = nullptr;
bool bOsz = false;
bool bExtra = Lower() && Lower()->IsColumnFrm();
// #i3317# - boolean, to apply temporarly the
@@ -652,7 +652,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
if( pSect && !pSect->IsAnLower( pLay ) )
{
bSct = false;
- const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0;
+ const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : nullptr;
if (pSect->IsAnFollow(pNxtSect) && pLay)
{
if( pLay->IsVertical() )
@@ -696,7 +696,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
+ pLay->Prt().Height() - pSect->Frm().Top()
- pSect->Frm().Height();
}
- pSect = 0;
+ pSect = nullptr;
}
}
else if( pLay )
@@ -719,7 +719,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
- bSct = 0 != pSect;
+ bSct = nullptr != pSect;
}
while ( pLay && !pLay->Frm().IsInside( rPt ) &&
( pLay->Frm().Top() <= rPt.Y() || pLay->IsInFly() ||
@@ -735,7 +735,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
SwFrm::DestroyFrm(pDel);
return pPre;
}
- return 0;
+ return nullptr;
}
else
{
@@ -749,7 +749,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{ // If we're leaving a SwSectionFrm, the next Leaf-Frm
// is the part of the upper below the SectionFrm.
const SwSectionFrm* pNxtSect = pLay ?
- pLay->FindSctFrm() : NULL;
+ pLay->FindSctFrm() : nullptr;
bSct = false;
if (pLay && pSect->IsAnFollow(pNxtSect))
{
@@ -799,7 +799,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
+ pLay->Prt().Height() - pSect->Frm().Top()
- pSect->Frm().Height();
}
- pSect = 0;
+ pSect = nullptr;
}
}
else if( pLay )
@@ -822,7 +822,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
- bSct = 0 != pSect;
+ bSct = nullptr != pSect;
}
}
}
@@ -842,7 +842,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
SwFrm *pDel = const_cast<SwFrm*>(pLay);
pDel->Cut();
SwFrm::DestroyFrm(pDel);
- return 0;
+ return nullptr;
}
return pLay;
}
@@ -850,7 +850,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
rRet.nMain = LONG_MAX;
}
}
- return 0;
+ return nullptr;
}
static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
@@ -861,16 +861,16 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
//the Contents is always the left upper corner.
//The Cnt should preferably be above the point.
- rpCnt = 0;
+ rpCnt = nullptr;
sal_uInt64 nDistance = SAL_MAX_UINT64;
sal_uInt64 nNearest = SAL_MAX_UINT64;
- const SwContentFrm *pCnt = pLay ? pLay->ContainsContent() : NULL;
+ const SwContentFrm *pCnt = pLay ? pLay->ContainsContent() : nullptr;
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFootnote != pCnt->IsInFootnote()))
{
pCnt = pCnt->GetNextContentFrm();
if ( !pLay->IsAnLower( pCnt ) )
- pCnt = 0;
+ pCnt = nullptr;
}
const SwContentFrm *pNearest = pCnt;
if ( pCnt )
@@ -1179,7 +1179,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if( pCnt->IsProtected() )
pCnt = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetAnchorFrm()));
- SwPageFrm *pTmpPage = 0;
+ SwPageFrm *pTmpPage = nullptr;
const bool bVert = pCnt->IsVertical();
const bool bVertL2R = pCnt->IsVertLR();
@@ -1208,7 +1208,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
//rNew is an absolute position. We need to calculate the distance from rNew
//to the anchor inside the text flow to correctly set RelPos.
//!!!!!We can optimize here: FindAnchor could also return RelPos!
- const SwFrm *pFrm = 0;
+ const SwFrm *pFrm = nullptr;
SwTwips nY;
if ( pCnt->Frm().IsInside( aNew ) )
{
@@ -1318,7 +1318,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
nX = rNew.X() - pFrm->Frm().Left();
}
}
- GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTextFrm() &&
GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE)) )
@@ -1333,11 +1333,11 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if( pCnt->GetCrsrOfst( &pos, aPt, &eTmpState )
&& pos.nNode == *pCnt->GetNode() )
{
- if ( pCnt->GetNode()->GetTextNode() != NULL )
+ if ( pCnt->GetNode()->GetTextNode() != nullptr )
{
const SwTextAttr* pTextInputField =
pCnt->GetNode()->GetTextNode()->GetTextAttrAt( pos.nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT );
- if ( pTextInputField != NULL )
+ if ( pTextInputField != nullptr )
{
pos.nContent = pTextInputField->GetStart();
}
@@ -1377,7 +1377,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
ChgRelPos( aRelPos );
- GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, false );
@@ -1391,7 +1391,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
*/
void SwFlyAtCntFrm::RegisterAtCorrectPage()
{
- SwPageFrm* pPageFrm( 0L );
+ SwPageFrm* pPageFrm( nullptr );
if ( GetVertPosOrientFrm() )
{
pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm());
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 832e465ab3e6..21c599fe6c09 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -66,7 +66,7 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
{
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
OSL_ENSURE( rPoint != aRef || rRelAttr != GetCurrRelPos(), "SetRefPoint: no change" );
- SwFlyNotify *pNotify = NULL;
+ SwFlyNotify *pNotify = nullptr;
// No notify at a locked fly frame, if a fly frame is locked, there's
// already a SwFlyNotify object on the stack (MakeAll).
if( !IsLocked() )
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 1c96097a42d8..767a93e9b075 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -45,7 +45,7 @@ using namespace ::com::sun::star;
SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
SwFlyFrm( pFormat, pSib, pAnch ),
- pPage( 0 ),
+ pPage( nullptr ),
// #i34753#
mbNoMakePos( false ),
// #i37068#
@@ -113,7 +113,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
{
SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
- SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : NULL;
+ SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : nullptr;
if( pPageFrm )
pPageFrm->AppendFlyToPage( this );
}
@@ -480,7 +480,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
- const SwFormatAnchor *pAnch = 0;
+ const SwFormatAnchor *pAnch = nullptr;
if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET ==
static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false,
reinterpret_cast<const SfxPoolItem**>(&pAnch) ))
@@ -517,7 +517,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( i == nPgNum )
{
// #i50432# - adjust synopsis of <PlaceFly(..)>
- pTmpPage->PlaceFly( this, 0 );
+ pTmpPage->PlaceFly( this, nullptr );
}
}
if( !pTmpPage )
@@ -530,7 +530,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode );
SwContentFrm *pContent = GetFormat()->GetDoc()->GetNodes().GoNext( &aIdx )->
- GetContentNode()->getLayoutFrm( getRootFrm(), 0, 0, false );
+ GetContentNode()->getLayoutFrm( getRootFrm(), nullptr, nullptr, false );
if( pContent )
{
SwFlyFrm *pTmp = pContent->FindFlyFrm();
@@ -595,7 +595,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
(void) bSucessInserted;
// #i87493#
- OSL_ENSURE( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this,
+ OSL_ENSURE( pNew->GetPageFrm() == nullptr || pNew->GetPageFrm() == this,
"<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect." );
// #i28701# - use new method <SetPageFrm(..)>
pNew->SetPageFrm( this );
@@ -634,7 +634,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
// #i87493#
if ( pTmpObj->GetPageFrm() != this )
{
- if ( pTmpObj->GetPageFrm() != 0 )
+ if ( pTmpObj->GetPageFrm() != nullptr )
{
pTmpObj->GetPageFrm()->RemoveDrawObjFromPage( *pTmpObj );
}
@@ -675,7 +675,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
if (!m_pSortedObjs->size())
{
delete m_pSortedObjs;
- m_pSortedObjs = 0;
+ m_pSortedObjs = nullptr;
}
}
@@ -691,7 +691,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
}
// #i28701# - use new method <SetPageFrm(..)>
- pToRemove->SetPageFrm( 0L );
+ pToRemove->SetPageFrm( nullptr );
}
void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
@@ -833,7 +833,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
"Drawing object not appended into list <pSortedObjs>." );
}
// #i87493#
- OSL_ENSURE( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this,
+ OSL_ENSURE( _rNewObj.GetPageFrm() == nullptr || _rNewObj.GetPageFrm() == this,
"<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect." );
_rNewObj.SetPageFrm( this );
@@ -867,7 +867,7 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth();
}
}
- _rToRemoveObj.SetPageFrm( 0 );
+ _rToRemoveObj.SetPageFrm( nullptr );
}
// #i50432# - adjust method description and synopsis.
@@ -1034,7 +1034,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos();
SWRECTFN( pClip )
const SwLayoutFrm *pUp = pClip->GetUpper();
- const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
+ const SwFrm *pCell = pUp->IsCellFrm() ? pUp : nullptr;
const sal_uInt16 nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_FTN
: FRM_BODY | FRM_FLY | FRM_HEADER |
@@ -1052,7 +1052,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
rRect = pUp->Prt();
rRect += pUp->Frm().Pos();
- pUp = 0;
+ pUp = nullptr;
}
}
if ( pUp )
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index eb107c1ce5e0..5a679157a9c7 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -254,7 +254,7 @@ SwFrmNotify::~SwFrmNotify()
if ( mpFrm->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *mpFrm->GetDrawObjs();
- SwPageFrm* pPageFrm = 0;
+ SwPageFrm* pPageFrm = nullptr;
for ( size_t i = 0; i < rObjs.size(); ++i )
{
// OD 2004-03-31 #i26791# - no general distinction between
@@ -381,10 +381,10 @@ SwFrmNotify::~SwFrmNotify()
}
// #i9046# Automatic frame width
- SwFlyFrm* pFly = 0;
+ SwFlyFrm* pFly = nullptr;
// #i35879# Do not trust the inf flags. pFrm does not
// necessarily have to have an upper!
- if ( !mpFrm->IsFlyFrm() && 0 != ( pFly = mpFrm->ImplFindFlyFrm() ) )
+ if ( !mpFrm->IsFlyFrm() && nullptr != ( pFly = mpFrm->ImplFindFlyFrm() ) )
{
// #i61999#
// no invalidation of columned Writer fly frames, because automatic
@@ -647,7 +647,7 @@ SwFlyNotify::~SwFlyNotify()
if ( pFly->IsNotifyBack() )
{
SwViewShell *pSh = pFly->getRootFrm()->GetCurrShell();
- SwViewShellImp *pImp = pSh ? pSh->Imp() : 0;
+ SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( !pImp || !pImp->IsAction() || !pImp->GetLayAction().IsAgain() )
{
//If in the LayAction the IsAgain is set it can be
@@ -849,7 +849,7 @@ SwContentNotify::~SwContentNotify()
if ( pSh )
{
SwOLENode *pNd;
- if ( 0 != (pNd = pCnt->GetNode()->GetOLENode()) &&
+ if ( nullptr != (pNd = pCnt->GetNode()->GetOLENode()) &&
(pNd->GetOLEObj().IsOleRef() ||
pNd->IsOLESizeInvalid()) )
{
@@ -860,7 +860,7 @@ SwContentNotify::~SwContentNotify()
OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrm" );
SwFlyFrm *pFly = pCnt->FindFlyFrm();
svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
- SwFEShell *pFESh = 0;
+ SwFEShell *pFESh = nullptr;
for(SwViewShell& rCurrentShell : pSh->GetRingContainer())
{ if ( dynamic_cast<const SwCrsrShell*>( &rCurrentShell) != nullptr )
{
@@ -919,8 +919,8 @@ SwContentNotify::~SwContentNotify()
// When this content is formatted it is the time at which
// the page is known. Thus, this data can be corrected now.
- const SwPageFrm *pPage = 0;
- SwNodeIndex *pIdx = 0;
+ const SwPageFrm *pPage = nullptr;
+ SwNodeIndex *pIdx = nullptr;
SwFrameFormats *pTable = pDoc->GetSpzFrameFormats();
for ( size_t i = 0; i < pTable->size(); ++i )
@@ -928,7 +928,7 @@ SwContentNotify::~SwContentNotify()
SwFrameFormat *pFormat = (*pTable)[i];
const SwFormatAnchor &rAnch = pFormat->GetAnchor();
if ( FLY_AT_PAGE != rAnch.GetAnchorId() ||
- rAnch.GetContentAnchor() == 0 )
+ rAnch.GetContentAnchor() == nullptr )
{
continue;
}
@@ -945,7 +945,7 @@ SwContentNotify::~SwContentNotify()
pPage = pCnt->FindPageFrm();
}
SwFormatAnchor aAnch( rAnch );
- aAnch.SetAnchor( 0 );
+ aAnch.SetAnchor( nullptr );
aAnch.SetPageNum( pPage->GetPhyPageNum() );
pFormat->SetFormatAttr( aAnch );
if ( RES_DRAWFRMFMT != pFormat->Which() )
@@ -1045,8 +1045,8 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
(rAnch.GetAnchorId() == FLY_AT_CHAR) ||
bDrawObjInContent )
{
- SdrObject* pSdrObj = 0;
- if ( bSdrObj && 0 == (pSdrObj = pFormat->FindSdrObject()) )
+ SdrObject* pSdrObj = nullptr;
+ if ( bSdrObj && nullptr == (pSdrObj = pFormat->FindSdrObject()) )
{
OSL_ENSURE( !bSdrObj, "DrawObject not found." );
++it;
@@ -1065,7 +1065,7 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
static_cast<SwDrawContact*>(GetUserCall( pSdrObj ));
if ( !pNew->GetAnchorFrm() )
{
- pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( 0L )) );
+ pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( nullptr )) );
}
// OD 19.06.2003 #108784# - add 'virtual' drawing object,
// if necessary. But control objects have to be excluded.
@@ -1107,7 +1107,7 @@ static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib )
if ( RES_FLYFRMFMT == pFormat->Which() )
{
SwIterator<SwFlyFrm,SwFormat> aIter( *pFormat );
- const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
+ const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : nullptr;
const SwFlyFrm* pTmpFrm;
for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
{
@@ -1119,7 +1119,7 @@ static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib )
{
SwDrawContact *pContact = SwIterator<SwDrawContact,SwFormat>(*pFormat).First();
if ( pContact )
- return pContact->GetAnchorFrm() != 0;
+ return pContact->GetAnchorFrm() != nullptr;
}
return false;
}
@@ -1247,8 +1247,8 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
SwPageFrm *pPage = pLay->FindPageFrm();
const SwFrameFormats *pTable = pDoc->GetSpzFrameFormats();
- SwFrm *pFrm = 0;
- SwActualSection *pActualSection = 0;
+ SwFrm *pFrm = nullptr;
+ SwActualSection *pActualSection = nullptr;
SwLayHelper *pPageMaker;
//If the layout will be created (bPages == true) we do head on the progress
@@ -1269,7 +1269,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
}
}
else
- pPageMaker = NULL;
+ pPageMaker = nullptr;
if( pLay->IsInSct() &&
( pLay->IsSctFrm() || pLay->GetUpper() ) ) // Hereby will newbies
@@ -1287,7 +1287,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if( ( !pLay->IsInFootnote() || pSct->IsInFootnote() ) &&
( !pLay->IsInTab() || pSct->IsInTab() ) )
{
- pActualSection = new SwActualSection( 0, pSct, 0 );
+ pActualSection = new SwActualSection( nullptr, pSct, nullptr );
OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(),
"_InsertCnt: Wrong Call" );
}
@@ -1392,7 +1392,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
while ( pTmpFrm )
{
pTmpFrm->CheckDirChange();
- pTmpFrm = pTmpFrm->IsFollow() ? pTmpFrm->FindMaster() : NULL;
+ pTmpFrm = pTmpFrm->IsFollow() ? pTmpFrm->FindMaster() : nullptr;
}
}
@@ -1428,12 +1428,12 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
// Do not trust the IsInFootnote flag. If we are currently
// building up a table, the upper of pPrv may be a cell
// frame, but the cell frame does not have an upper yet.
- if( pPrv && 0 != pPrv->ImplFindFootnoteFrm() )
+ if( pPrv && nullptr != pPrv->ImplFindFootnoteFrm() )
{
if( pPrv->IsSctFrm() )
pPrv = static_cast<SwSectionFrm*>(pPrv)->ContainsContent();
if( pPrv && pPrv->IsTextFrm() )
- static_cast<SwTextFrm*>(pPrv)->Prepare( PREP_QUOVADIS, 0, false );
+ static_cast<SwTextFrm*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false );
}
}
// #i27138#
@@ -1480,7 +1480,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pLay = static_cast<SwLayoutFrm*>(pFrm);
if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
pLay = pLay->GetNextLayoutLeaf();
- pPrv = 0;
+ pPrv = nullptr;
}
}
else if ( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() )
@@ -1491,10 +1491,10 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//Close the section, where appropriate activate the surrounding
//section again.
- SwActualSection *pTmp = pActualSection ? pActualSection->GetUpper() : NULL;
+ SwActualSection *pTmp = pActualSection ? pActualSection->GetUpper() : nullptr;
delete pActualSection;
pLay = pLay->FindSctFrm();
- if ( 0 != (pActualSection = pTmp) )
+ if ( nullptr != (pActualSection = pTmp) )
{
//Could be, that the last SectionFrm remains empty.
//Then now is the time to remove them.
@@ -1527,7 +1527,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
SwSectionFrm* pFollow = pOuterSectionFrm->GetFollow();
if ( pFollow )
{
- pOuterSectionFrm->SetFollow( NULL );
+ pOuterSectionFrm->SetFollow( nullptr );
pOuterSectionFrm->InvalidateSize();
static_cast<SwSectionFrm*>(pFrm)->SetFollow( pFollow );
}
@@ -1544,7 +1544,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pLay = static_cast<SwLayoutFrm*>(pFrm);
if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
pLay = pLay->GetNextLayoutLeaf();
- pPrv = 0;
+ pPrv = nullptr;
}
else
{
@@ -1626,7 +1626,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
bool bApres = aTmp < rSttIdx;
SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() );
SwFrm* pFrm;
- while( 0 != (pFrm = aNode2Layout.NextFrm()) )
+ while( nullptr != (pFrm = aNode2Layout.NextFrm()) )
{
SwLayoutFrm *pUpper = pFrm->GetUpper();
SwFootnoteFrm* pFootnoteFrm = pUpper->FindFootnoteFrm();
@@ -1643,7 +1643,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// not the ones (e.g. column areas) in which are the footnote containers positioned.
// #109767# Table frame is in section, insert section in cell frame.
if( pSct && ((pFootnoteFrm && !pSct->IsInFootnote()) || pUpper->IsCellFrm()) )
- pSct = NULL;
+ pSct = nullptr;
if( pSct )
{ // to prevent pTmp->MoveFwd from destroying the SectionFrm
bOldLock = pSct->IsColLocked();
@@ -1692,7 +1692,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
}
else
- pCol = NULL;
+ pCol = nullptr;
}
// skip invalid SectionFrms
while( pMove && pMove->IsSctFrm() &&
@@ -1712,11 +1712,11 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pMove )
pTmp = SwFlowFrm::CastFlowFrm( pMove );
else
- pTmp = NULL;
+ pTmp = nullptr;
}
}
else
- pTmp = 0;
+ pTmp = nullptr;
}
else
{
@@ -1732,7 +1732,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pMove )
pTmp = SwFlowFrm::CastFlowFrm( pMove );
else
- pTmp = NULL;
+ pTmp = nullptr;
}
}
@@ -2227,14 +2227,14 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
SwOrderIter::SwOrderIter( const SwPageFrm *pPg, bool bFlys ) :
m_pPage( pPg ),
- m_pCurrent( 0 ),
+ m_pCurrent( nullptr ),
m_bFlysOnly( bFlys )
{
}
const SdrObject *SwOrderIter::Top()
{
- m_pCurrent = 0;
+ m_pCurrent = nullptr;
if ( m_pPage->GetSortedObjs() )
{
const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
@@ -2261,7 +2261,7 @@ const SdrObject *SwOrderIter::Top()
const SdrObject *SwOrderIter::Bottom()
{
- m_pCurrent = 0;
+ m_pCurrent = nullptr;
if ( m_pPage->GetSortedObjs() )
{
sal_uInt32 nBotOrd = USHRT_MAX;
@@ -2289,7 +2289,7 @@ const SdrObject *SwOrderIter::Bottom()
const SdrObject *SwOrderIter::Next()
{
const sal_uInt32 nCurOrd = m_pCurrent ? m_pCurrent->GetOrdNumDirect() : 0;
- m_pCurrent = 0;
+ m_pCurrent = nullptr;
if ( m_pPage->GetSortedObjs() )
{
sal_uInt32 nOrd = USHRT_MAX;
@@ -2317,7 +2317,7 @@ const SdrObject *SwOrderIter::Next()
const SdrObject *SwOrderIter::Prev()
{
const sal_uInt32 nCurOrd = m_pCurrent ? m_pCurrent->GetOrdNumDirect() : 0;
- m_pCurrent = 0;
+ m_pCurrent = nullptr;
if ( m_pPage->GetSortedObjs() )
{
const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
@@ -2408,8 +2408,8 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
sw_RemoveFootnotes( static_cast<SwColumnFrm*>(pLay->Lower()), true, true );
SwFrm *pSav;
- if ( 0 == (pSav = pLay->ContainsAny()) )
- return 0;
+ if ( nullptr == (pSav = pLay->ContainsAny()) )
+ return nullptr;
if( pSav->IsInFootnote() && !pLay->IsInFootnote() )
{
@@ -2417,7 +2417,7 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
pSav = pSav->FindNext();
while( pSav && pSav->IsInFootnote() );
if( !pSav || !pLay->IsAnLower( pSav ) )
- return NULL;
+ return nullptr;
}
// Tables should be saved as a whole, expection:
@@ -2433,7 +2433,7 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
do
{
pSav = pTmp;
- pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrm() : NULL;
+ pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrm() : nullptr;
} while ( pTmp != pSect );
}
@@ -2475,13 +2475,13 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
if ( pFloat->GetNext() )
{
if( bGo )
- pFloat->mpUpper = NULL;
+ pFloat->mpUpper = nullptr;
pFloat = pFloat->GetNext();
if( !bGo && pFloat == pStart )
{
bGo = true;
- pFloat->mpPrev->mpNext = NULL;
- pFloat->mpPrev = NULL;
+ pFloat->mpPrev->mpNext = nullptr;
+ pFloat->mpPrev = nullptr;
}
}
else
@@ -2492,14 +2492,14 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
// search next chain part and connect both chains
SwFrm *pTmp = pFloat->FindNext();
if( bGo )
- pFloat->mpUpper = NULL;
+ pFloat->mpUpper = nullptr;
if( !pLay->IsInFootnote() )
while( pTmp && pTmp->IsInFootnote() )
pTmp = pTmp->FindNext();
if ( !pLay->IsAnLower( pTmp ) )
- pTmp = 0;
+ pTmp = nullptr;
if ( pTmp && bGo )
{
@@ -2510,7 +2510,7 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
bGo = bGo || ( pStart == pFloat );
} while ( pFloat );
- return bGo ? pStart : NULL;
+ return bGo ? pStart : nullptr;
}
// #115759# - add also drawing objects to page and at-fly
@@ -2592,7 +2592,7 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG
pSibling->InvalidatePage( pPage );
SwFlowFrm *pFlowFrm = dynamic_cast<SwFlowFrm*>(pSibling);
if (pFlowFrm && pFlowFrm->GetFollow())
- pSibling->Prepare( PREP_CLEAR, 0, false );
+ pSibling->Prepare( PREP_CLEAR, nullptr, false );
}
else
{ pNxt = pParent->m_pLower;
@@ -2920,7 +2920,7 @@ void Notify_Background( const SdrObject* pObj,
return;
SwLayoutFrm* pArea;
- SwFlyFrm *pFlyFrm = 0;
+ SwFlyFrm *pFlyFrm = nullptr;
SwFrm* pAnchor;
if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
@@ -2929,7 +2929,7 @@ void Notify_Background( const SdrObject* pObj,
}
else
{
- pFlyFrm = NULL;
+ pFlyFrm = nullptr;
pAnchor = const_cast<SwFrm*>(
GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrm() );
}
@@ -2937,7 +2937,7 @@ void Notify_Background( const SdrObject* pObj,
pArea = pAnchor->FindFlyFrm();
else
pArea = pPage;
- SwContentFrm *pCnt = 0;
+ SwContentFrm *pCnt = nullptr;
if ( pArea )
{
if( PREP_FLY_ARRIVE != eHint )
@@ -2958,7 +2958,7 @@ void Notify_Background( const SdrObject* pObj,
pCnt = pArea->ContainsContent();
}
}
- SwFrm *pLastTab = 0;
+ SwFrm *pLastTab = nullptr;
while ( pCnt && pArea && pArea->IsAnLower( pCnt ) )
{
@@ -3055,9 +3055,9 @@ void Notify_Background( const SdrObject* pObj,
pAnchor->GetUpper()->InvalidateSize();
// #i82258# - make code robust
- SwViewShell* pSh = 0;
+ SwViewShell* pSh = nullptr;
if ( bInva && pPage &&
- 0 != (pSh = pPage->getRootFrm()->GetCurrShell()) )
+ nullptr != (pSh = pPage->getRootFrm()->GetCurrShell()) )
{
pSh->InvalidateWindows( rRect );
}
@@ -3228,7 +3228,7 @@ const SwFrm* FindPage( const SwRect &rRect, const SwFrm *pPage )
if ( !rRect.IsOver( pPage->Frm() ) )
{
const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(pPage->GetUpper());
- const SwFrm* pTmpPage = pRootFrm ? pRootFrm->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : 0;
+ const SwFrm* pTmpPage = pRootFrm ? pRootFrm->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr;
if ( pTmpPage )
pPage = pTmpPage;
}
@@ -3242,7 +3242,7 @@ class SwFrmHolder : private SfxListener
bool bSet;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public:
- SwFrmHolder() : pFrm(0), bSet(false) {}
+ SwFrmHolder() : pFrm(nullptr), bSet(false) {}
void SetFrm( SwFrm* pHold );
SwFrm* GetFrm() { return pFrm; }
void Reset();
@@ -3261,7 +3261,7 @@ void SwFrmHolder::Reset()
if (pFrm)
EndListening(*pFrm);
bSet = false;
- pFrm = 0;
+ pFrm = nullptr;
}
void SwFrmHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
@@ -3269,21 +3269,21 @@ void SwFrmHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rBC == pFrm )
{
- pFrm = 0;
+ pFrm = nullptr;
}
}
SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt16 const nFrmType,
const Point* pPoint, const SwPosition *pPos, const bool bCalcFrm )
{
- SwFrm *pMinFrm = 0, *pTmpFrm;
+ SwFrm *pMinFrm = nullptr, *pTmpFrm;
SwFrmHolder aHolder;
SwRect aCalcRect;
bool bClientIterChanged = false;
SwIterator<SwFrm,SwModify> aIter( rMod );
do {
- pMinFrm = 0;
+ pMinFrm = nullptr;
aHolder.Reset();
sal_uInt64 nMinDist = 0;
bClientIterChanged = false;
@@ -3315,7 +3315,7 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
{
SwObjectFormatter::FormatObj( *pFlyFrm );
}
- pTmpFrm->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : 0);
+ pTmpFrm->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : nullptr);
}
// aIter.IsChanged checks if the current pTmpFrm has been deleted while
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index ad334db9158f..9e9b019ba632 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -96,8 +96,8 @@ static bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* &rpBoss, SwPageFrm* &rpPage
}
else if( bDontLeave )
{
- rpPage = NULL;
- rpBoss = NULL;
+ rpPage = nullptr;
+ rpBoss = nullptr;
return false;
}
}
@@ -203,7 +203,7 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
bool bGrow = pPage->IsFootnotePage();
if( bGrow )
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
bGrow = false;
}
@@ -286,7 +286,7 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
return 0;
}
}
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
SwPageFrm *pPage = pBoss->FindPageFrm();
if ( bBrowseMode || !pPage->IsFootnotePage() )
@@ -419,8 +419,8 @@ SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo )
SwFootnoteFrm::SwFootnoteFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwContentFrm *pCnt, SwTextFootnote *pAt ):
SwLayoutFrm( pFormat, pSib ),
- pFollow( 0 ),
- pMaster( 0 ),
+ pFollow( nullptr ),
+ pMaster( nullptr ),
pRef( pCnt ),
pAttr( pAt ),
bBackMoveLocked( false ),
@@ -500,8 +500,8 @@ void SwFootnoteFrm::Cut()
pFootnote->GetFollow()->SetMaster( pFootnote->GetMaster() );
if ( pFootnote->GetMaster() )
pFootnote->GetMaster()->SetFollow( pFootnote->GetFollow() );
- pFootnote->SetFollow( 0 );
- pFootnote->SetMaster( 0 );
+ pFootnote->SetFollow( nullptr );
+ pFootnote->SetMaster( nullptr );
// cut all connections
RemoveFromLayout();
@@ -602,9 +602,9 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
SwPageFrm* pOldPage = pOldBoss->FindPageFrm();
SwPageFrm* pPage;
SwFootnoteBossFrm *pBoss = pOldBoss->IsColumnFrm() ?
- static_cast<SwFootnoteBossFrm*>(pOldBoss->GetNext()) : 0; // next column, if existing
+ static_cast<SwFootnoteBossFrm*>(pOldBoss->GetNext()) : nullptr; // next column, if existing
if( pBoss )
- pPage = NULL;
+ pPage = nullptr;
else
{
if( pOldBoss->GetUpper()->IsSctFrm() )
@@ -617,7 +617,7 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
pPage = pBoss->FindPageFrm();
}
else
- return 0;
+ return nullptr;
}
else
{
@@ -660,7 +660,7 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
static_cast<SwPageFrm*>(pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() );
}
else
- return 0;
+ return nullptr;
}
if( pBoss->IsPageFrm() )
{
@@ -694,7 +694,7 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
if ( !pRet )
{
bool bEndn = pFootnote->GetAttr()->GetFootnote().IsEndNote();
- SwFrm* pTmpRef = NULL;
+ SwFrm* pTmpRef = nullptr;
if( bEndn && pFootnote->IsInSct() )
{
SwSectionFrm* pSect = pFootnote->FindSctFrm();
@@ -713,7 +713,7 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
const bool bFootnoteEndDoc = pOldPage->IsFootnotePage();
SwFootnoteBossFrm* pNxtBoss = pOldBoss;
SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ?
- static_cast<SwSectionFrm*>(pNxtBoss->GetUpper()) : 0;
+ static_cast<SwSectionFrm*>(pNxtBoss->GetUpper()) : nullptr;
do
{
@@ -721,20 +721,20 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
pNxtBoss = static_cast<SwFootnoteBossFrm*>(pNxtBoss->GetPrev()); // one column backwards
else // one page backwards
{
- SwLayoutFrm* pBody = 0;
+ SwLayoutFrm* pBody = nullptr;
if( pSect )
{
if( pSect->IsFootnoteLock() )
{
if( pNxtBoss == pOldBoss )
- return 0;
+ return nullptr;
pStop = pNxtBoss;
}
else
{
pSect = pSect->FindMaster();
if( !pSect || !pSect->Lower() )
- return 0;
+ return nullptr;
OSL_ENSURE( pSect->Lower()->IsColumnFrm(),
"GetPrevFootnoteLeaf: Where's the column?" );
pNxtBoss = static_cast<SwFootnoteBossFrm*>(pSect->Lower());
@@ -746,7 +746,7 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
SwPageFrm* pPage = static_cast<SwPageFrm*>(pNxtBoss->FindPageFrm()->GetPrev());
if( !pPage || pPage->GetPhyPageNum() < nNum ||
bEndNote != pPage->IsEndNotePage() || bFootnoteEndDoc != pPage->IsFootnotePage() )
- return NULL; // no further pages found
+ return nullptr; // no further pages found
pNxtBoss = pPage;
pBody = pPage->FindBodyCont();
}
@@ -878,7 +878,7 @@ void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNote
}
}
// is there another column?
- pBoss = pBoss->IsColumnFrm() ? static_cast<SwColumnFrm*>(pBoss->GetNext()) : NULL;
+ pBoss = pBoss->IsColumnFrm() ? static_cast<SwColumnFrm*>(pBoss->GetNext()) : nullptr;
} while( pBoss );
}
@@ -971,7 +971,7 @@ SwFootnoteContFrm *SwFootnoteBossFrm::FindFootnoteCont()
/// Search the next available footnote container.
SwFootnoteContFrm *SwFootnoteBossFrm::FindNearestFootnoteCont( bool bDontLeave )
{
- SwFootnoteContFrm *pCont = 0;
+ SwFootnoteContFrm *pCont = nullptr;
if ( !GetFormat()->GetDoc()->GetFootnoteIdxs().empty() )
{
pCont = FindFootnoteCont();
@@ -997,7 +997,7 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
// search for the nearest footnote container
SwFootnoteContFrm *pCont = FindNearestFootnoteCont();
if ( !pCont )
- return 0;
+ return nullptr;
// Starting from the first footnote, search the first
// footnote that is referenced by the current column/page
@@ -1013,7 +1013,7 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
pBoss = pRet->GetRef()->FindFootnoteBossFrm();
OSL_ENSURE( pBoss, "FindFirstFootnote: No boss found" );
if( !pBoss )
- return NULL; // ?There must be a bug, but no GPF
+ return nullptr; // ?There must be a bug, but no GPF
pPage = pBoss->FindPageFrm();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
@@ -1022,13 +1022,13 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
if( nColNum == nRefCol )
return pRet; // found
else if( nColNum > nRefCol )
- return NULL; // at least one column too far
+ return nullptr; // at least one column too far
}
else if ( nPgNum > nRefNum )
- return NULL; // at least one column too far
+ return nullptr; // at least one column too far
}
else
- return NULL;
+ return nullptr;
// Done if Ref is on a subsequent page or on the same page in a subsequent column
do
@@ -1042,7 +1042,7 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
pBoss = pRet->FindFootnoteBossFrm();
pPage = pBoss->FindPageFrm();
lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss
- pCont = pBoss ? pBoss->FindNearestFootnoteCont() : 0;
+ pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr;
if ( pCont )
pNxt = static_cast<SwFootnoteFrm*>(pCont->Lower());
}
@@ -1058,13 +1058,13 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
if( nColNum == nRefCol )
break; // found
else if( nColNum > nRefCol )
- pRet = 0; // at least one column too far
+ pRet = nullptr; // at least one column too far
}
else if ( nPgNum > nRefNum )
- pRet = 0; // at least a page too far
+ pRet = nullptr; // at least a page too far
}
else
- pRet = 0; // there is none
+ pRet = nullptr; // there is none
} while( pRet );
return pRet;
}
@@ -1088,15 +1088,15 @@ const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt )
{ SwFootnoteBossFrm *pBoss = const_cast<SwFootnoteBossFrm*>(pRet->FindFootnoteBossFrm());
SwPageFrm *pPage = pBoss->FindPageFrm();
lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss
- SwFootnoteContFrm *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : 0;
- pRet = pCont ? static_cast<SwFootnoteFrm*>(pCont->Lower()) : 0;
+ SwFootnoteContFrm *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr;
+ pRet = pCont ? static_cast<SwFootnoteFrm*>(pCont->Lower()) : nullptr;
}
if ( pRet )
{
const SwFootnoteBossFrm* pBoss = pRet->GetRef()->FindFootnoteBossFrm();
if( pBoss->GetPhyPageNum() != nPageNum ||
nColNum != lcl_ColumnNum( pBoss ) )
- pRet = 0;
+ pRet = nullptr;
}
}
}
@@ -1164,17 +1164,17 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
if( bEndnt )
{
const SwSectionFormat* pEndFormat = pMySect->GetEndSectFormat();
- bDontLeave = 0 != pEndFormat;
+ bDontLeave = nullptr != pEndFormat;
if( pSibling )
{
if( pEndFormat )
{
if( !pSibling->IsInSct() ||
!pSibling->ImplFindSctFrm()->IsDescendantFrom( pEndFormat ) )
- pSibling = NULL;
+ pSibling = nullptr;
}
else if( pSibling->IsInSct() )
- pSibling = NULL;
+ pSibling = nullptr;
}
}
else
@@ -1186,17 +1186,17 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
{
if( !pSibling->IsInSct() ||
!pMySect->IsAnFollow( pSibling->ImplFindSctFrm() ) )
- pSibling = NULL;
+ pSibling = nullptr;
}
else if( pSibling->IsInSct() )
- pSibling = NULL;
+ pSibling = nullptr;
}
}
}
if( pSibling && pSibling->FindPageFrm()->IsEndNotePage() !=
FindPageFrm()->IsEndNotePage() )
- pSibling = NULL;
+ pSibling = nullptr;
// use the Doc to find out the position
SwDoc *pDoc = GetFormat()->GetDoc();
@@ -1204,12 +1204,12 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
sal_uLong nCmpPos = 0;
sal_uLong nLastPos = 0;
- SwFootnoteContFrm *pParent = 0;
+ SwFootnoteContFrm *pParent = nullptr;
if( pSibling )
{
nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() );
if( nCmpPos > nStPos )
- pSibling = NULL;
+ pSibling = nullptr;
}
if ( !pSibling )
@@ -1228,10 +1228,10 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
nCmpPos = ::lcl_FindFootnotePos( pDoc, pFootnote->GetAttr() );
if ( nCmpPos > nStPos )
- pParent = 0;
+ pParent = nullptr;
}
else
- pParent = 0;
+ pParent = nullptr;
}
}
if ( !pParent )
@@ -1249,7 +1249,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() );
SwFootnoteBossFrm *pNxtB; // remember the last one to not
- SwFootnoteFrm *pLastSib = 0; // go too far.
+ SwFootnoteFrm *pLastSib = nullptr; // go too far.
while ( pSibling && nCmpPos <= nStPos )
{
@@ -1275,7 +1275,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
// When changing pages, also the endnote flag must match.
SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
- ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : 0;
+ ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr;
if( pCont )
pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower());
else // no further FootnoteContainer, insert after pSibling
@@ -1316,7 +1316,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // page number of the new footnote
sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // column number of the new footnote
bool bEnd = false;
- SwFootnoteFrm *pLastSib = 0;
+ SwFootnoteFrm *pLastSib = nullptr;
while ( pSibling && !bEnd && (nCmpPos <= nStPos) )
{
pLastSib = pSibling;
@@ -1347,7 +1347,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
// When changing pages, also the endnote flag must match.
SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
- ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : 0;
+ ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr;
if ( pCont )
pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower());
else
@@ -1437,7 +1437,7 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
{
SwPageDesc *pDesc = pDoc->GetEndNoteInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
- !pPage->OnRightPage(), false, false, true, 0 );
+ !pPage->OnRightPage(), false, false, true, nullptr );
pPage->SetEndNotePage( true );
bChgPage = true;
}
@@ -1621,7 +1621,7 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const
pNd = pRef->GetAttrSet()->GetDoc()->
GetNodes().GoNextSection( &aIdx, true, false );
if ( !pNd )
- return 0;
+ return nullptr;
SwIterator<SwFrm,SwContentNode> aIter( *pNd );
SwFrm* pFrm = aIter.First();
if( pFrm )
@@ -1640,15 +1640,15 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const
// the HiddenFlag of the section is set, this causes
// the GoNextSection-function leaves the footnote.
if( pFootnote->GetAttr() != pAttr )
- return 0;
+ return nullptr;
while ( pFootnote && pFootnote->GetMaster() )
pFootnote = pFootnote->GetMaster();
return pFootnote;
}
- } while ( 0 != (pFrm = aIter.Next()) );
+ } while ( nullptr != (pFrm = aIter.Next()) );
- return 0;
+ return nullptr;
}
void SwFootnoteBossFrm::RemoveFootnote( const SwContentFrm *pRef, const SwTextFootnote *pAttr,
@@ -1713,7 +1713,7 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef,
// previous page
SwPageFrm* pPg;
for ( SwFrm* pTmp = _pOld;
- 0 != ( pPg = static_cast<SwPageFrm*>(pTmp->FindPageFrm()->GetPrev()))
+ nullptr != ( pPg = static_cast<SwPageFrm*>(pTmp->FindPageFrm()->GetPrev()))
&& pPg->IsEmptyPage() ;
)
{
@@ -1734,7 +1734,7 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef,
}
}
// OD 03.04.2003 #108446# - consider new parameter <_bCollectOnlyPreviousFootnotes>
- SwFootnoteBossFrm* pRefBossFrm = NULL;
+ SwFootnoteBossFrm* pRefBossFrm = nullptr;
if ( _bCollectOnlyPreviousFootnotes )
{
pRefBossFrm = this;
@@ -1808,7 +1808,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
while( pNxtFootnote->GetMaster() )
pNxtFootnote = pNxtFootnote->GetMaster();
if( pNxtFootnote == _pFootnote )
- pNxtFootnote = NULL;
+ pNxtFootnote = nullptr;
}
}
}
@@ -1822,7 +1822,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
if ( pNxtFootnote == _pFootnote )
{
OSL_FAIL( "_CollectFootnote: Vicious circle" );
- pNxtFootnote = 0;
+ pNxtFootnote = nullptr;
}
// OD 03.04.2003 #108446# - determine, if found footnote has to be collected.
@@ -1902,7 +1902,7 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
// #i21478# - keep last inserted footnote in order to
// format the content of the following one.
- SwFootnoteFrm* pLastInsertedFootnote = 0L;
+ SwFootnoteFrm* pLastInsertedFootnote = nullptr;
for ( size_t i = 0; i < rFootnoteArr.size(); ++i )
{
SwFootnoteFrm *pFootnote = rFootnoteArr[i];
@@ -1994,7 +1994,7 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
pFootnote->Cut();
SwFrm::DestroyFrm(pFootnote);
// #i21478#
- pFootnote = 0L;
+ pFootnote = nullptr;
}
}
// #i49383#
@@ -2012,7 +2012,7 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
"DelFootnote and Master/Follow?" );
SwFrm::DestroyFrm(pFootnote);
// #i21478#
- pFootnote = 0L;
+ pFootnote = nullptr;
}
// #i21478#
@@ -2147,14 +2147,14 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
SwDoc *pDoc = GetFormat()->GetDoc();
const sal_uLong nFootnotePos = pAttr ? ::lcl_FindFootnotePos( pDoc, pAttr ) : 0;
- SwFrm *pCnt = pFootnote ? pFootnote->ContainsAny() : 0;
+ SwFrm *pCnt = pFootnote ? pFootnote->ContainsAny() : nullptr;
if ( pCnt )
{
bool bMore = true;
- bool bStart = pAttr == 0; // If no attribute is given, process all
+ bool bStart = pAttr == nullptr; // If no attribute is given, process all
// #i49383# - disable unlock of position of
// lower objects during format of footnote and footnote content.
- SwFootnoteFrm* pLastFootnoteFrm( 0L );
+ SwFootnoteFrm* pLastFootnoteFrm( nullptr );
// footnote frame needs to be locked, if <bLock> isn't set.
bool bUnlockLastFootnoteFrm( false );
do
@@ -2188,7 +2188,7 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
{
pLastFootnoteFrm->Cut();
SwFrm::DestroyFrm(pLastFootnoteFrm);
- pLastFootnoteFrm = 0L;
+ pLastFootnoteFrm = nullptr;
}
}
if ( !bLock )
@@ -2237,7 +2237,7 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
// #i49383#
OSL_ENSURE( pLastFootnoteFrm == pFootnoteFrm,
"<SwFootnoteBossFrm::RearrangeFootnotes(..)> - <pLastFootnoteFrm> != <pFootnoteFrm>" );
- pLastFootnoteFrm = 0L;
+ pLastFootnoteFrm = nullptr;
pFootnoteFrm->Cut();
SwFrm::DestroyFrm(pFootnoteFrm);
}
@@ -2260,7 +2260,7 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
}
}
- SwSectionFrm *pDel = NULL;
+ SwSectionFrm *pDel = nullptr;
if( pCnt->IsSctFrm() )
{
SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny();
@@ -2370,15 +2370,15 @@ void SwPageFrm::UpdateFootnoteNum()
if( pTmpBoss )
{
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
- pFootnote = NULL;
+ pFootnote = nullptr;
lcl_NextFootnoteBoss( pTmpBoss, pPage, false );
- SwFootnoteContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : NULL;
+ SwFootnoteContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : nullptr;
if ( pCont )
pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
}
}
if( pFootnote && pFootnote->GetRef() != pContent )
- pFootnote = NULL;
+ pFootnote = nullptr;
}
}
}
@@ -2402,7 +2402,7 @@ void SwFootnoteBossFrm::SetFootnoteDeadLine( const SwTwips nDeadLine )
else
nMaxFootnoteHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine );
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
nMaxFootnoteHeight += pBody->Grow( LONG_MAX, true );
if ( IsInSct() )
@@ -2440,7 +2440,7 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const
OSL_ENSURE( !Lower() || !Lower()->GetNext() || Lower()->GetNext()->
IsFootnoteContFrm(), "FootnoteContainer expected" );
const SwFootnoteContFrm* pCont = Lower() ?
- static_cast<const SwFootnoteContFrm*>(Lower()->GetNext()) : 0;
+ static_cast<const SwFootnoteContFrm*>(Lower()->GetNext()) : nullptr;
if( pCont )
{
const SwFootnoteFrm* pFootnote = static_cast<const SwFootnoteFrm*>(pCont->Lower());
@@ -2476,7 +2476,7 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const
nRet = 0;
if ( IsPageFrm() )
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
nRet += BROWSE_HEIGHT - Frm().Height();
}
@@ -2576,8 +2576,8 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
OSL_ENSURE( pOldBoss->IsInSct() == pNewBoss->IsInSct(),
"MoveLowerFootnotes: Section confusion" );
SwFootnoteFrms *pFootnoteArr;
- SwLayoutFrm* pNewChief = 0;
- SwLayoutFrm* pOldChief = 0;
+ SwLayoutFrm* pNewChief = nullptr;
+ SwLayoutFrm* pOldChief = nullptr;
bool bFoundCandidate = false;
if (pStart && pOldBoss->IsInSct())
@@ -2602,11 +2602,11 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
if( pFootnoteArr->empty() )
{
delete pFootnoteArr;
- pFootnoteArr = NULL;
+ pFootnoteArr = nullptr;
}
}
else
- pFootnoteArr = NULL;
+ pFootnoteArr = nullptr;
if ( !aFootnoteArr.empty() || pFootnoteArr )
{
@@ -2652,13 +2652,13 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
//fix(9538): if the footnote has neighbors behind itself, remove them temporarily
SwLayoutFrm *pNxt = static_cast<SwLayoutFrm*>(pFootnote->GetNext());
- SwLayoutFrm *pLst = 0;
+ SwLayoutFrm *pLst = nullptr;
while ( pNxt )
{
while ( pNxt->GetNext() )
pNxt = static_cast<SwLayoutFrm*>(pNxt->GetNext());
if ( pNxt == pLst )
- pNxt = 0;
+ pNxt = nullptr;
else
{ pLst = pNxt;
SwContentFrm *pCnt = pNxt->ContainsContent();
@@ -2689,7 +2689,7 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
// If it is a container or the reference differs, create a new footnote and add
// it into the container.
// Create also a SectionFrame if currently in a area inside a footnote.
- SwFootnoteFrm* pTmpFootnote = pNewUpper->IsFootnoteFrm() ? static_cast<SwFootnoteFrm*>(pNewUpper) : 0;
+ SwFootnoteFrm* pTmpFootnote = pNewUpper->IsFootnoteFrm() ? static_cast<SwFootnoteFrm*>(pNewUpper) : nullptr;
if( !pTmpFootnote )
{
OSL_ENSURE( pNewUpper->IsFootnoteContFrm(), "New Upper not a FootnoteCont.");
@@ -2817,7 +2817,7 @@ SwContentFrm* SwFootnoteFrm::GetRefFromAttr()
assert(pAttr && "invalid Attribute");
SwTextNode& rTNd = (SwTextNode&)pAttr->GetTextNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, pAttr->GetStart() ));
- SwContentFrm* pCFrm = rTNd.getLayoutFrm( getRootFrm(), 0, &aPos, false );
+ SwContentFrm* pCFrm = rTNd.getLayoutFrm( getRootFrm(), nullptr, &aPos, false );
return pCFrm;
}
@@ -2827,7 +2827,7 @@ SwContentFrm* SwFootnoteFrm::GetRefFromAttr()
*/
SwContentFrm* SwFootnoteFrm::FindLastContent()
{
- SwContentFrm* pLastContentFrm( 0L );
+ SwContentFrm* pLastContentFrm( nullptr );
// find last lower, which is a content frame or contains content.
// hidden text frames, empty sections and empty tables have to be skipped.
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 626c8f35e474..fc2fd26b2419 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -741,7 +741,7 @@ void SwPageFrm::PrepareFooter()
{ // Remove footer if already present
::DelFlys( pLay, this );
SwViewShell *pShell;
- if ( pLay->GetPrev() && 0 != (pShell = getRootFrm()->GetCurrShell()) &&
+ if ( pLay->GetPrev() && nullptr != (pShell = getRootFrm()->GetCurrShell()) &&
pShell->VisArea().HasArea() )
pShell->InvalidateWindows( pShell->VisArea() );
pLay->Cut();
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index e9bedbafa2af..842a6992a30b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -261,8 +261,8 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt,
SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) :
pRoot( pRt ),
pImp( pI ),
- pOptTab( 0 ),
- pWait( 0 ),
+ pOptTab( nullptr ),
+ pWait( nullptr ),
nPreInvaPage( USHRT_MAX ),
nStartTicks( std::clock() ),
nInputType( VclInputFlags::NONE ),
@@ -283,12 +283,12 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) :
SwLayAction::~SwLayAction()
{
OSL_ENSURE( !pWait, "Wait object not destroyed" );
- pImp->m_pLayAction = 0; // unregister
+ pImp->m_pLayAction = nullptr; // unregister
}
void SwLayAction::Reset()
{
- pOptTab = 0;
+ pOptTab = nullptr;
nStartTicks = std::clock();
nInputType = VclInputFlags::NONE;
nEndPage = nPreInvaPage = nCheckPageNum = USHRT_MAX;
@@ -331,7 +331,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
//TurboMode? Hands-off during idle-format
if ( IsPaint() && !IsIdle() && TurboAction() )
{
- delete pWait, pWait = 0;
+ delete pWait, pWait = nullptr;
pRoot->ResetTurboFlag();
bActionInProgress = false;
pRoot->DeleteEmptySct();
@@ -359,7 +359,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
}
pRoot->DeleteEmptySct();
- delete pWait, pWait = 0;
+ delete pWait, pWait = nullptr;
//Turbo-Action permitted again for all cases.
pRoot->ResetTurboFlag();
@@ -482,7 +482,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
nPercentPageNum = pPage->GetPhyPageNum();
::SetProgressState( nPercentPageNum, pImp->GetShell()->GetDoc()->GetDocShell());
}
- pOptTab = 0;
+ pOptTab = nullptr;
// No Shortcut for Idle or CalcLayout
if ( !IsIdle() && !IsComplete() && IsShortCut( pPage ) )
@@ -539,7 +539,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
( pPage->IsInvalid() ||
(IS_FLYS && IS_INVAFLY) ) )
{
- PROTOCOL( pPage, PROT_FILE_INIT, 0, 0)
+ PROTOCOL( pPage, PROT_FILE_INIT, 0, nullptr)
XCHECKPAGE;
// #i81146# new loop control
@@ -783,7 +783,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// reset flag for special interrupt content formatting.
mbFormatContentOnInterrupt = false;
}
- pOptTab = 0;
+ pOptTab = nullptr;
if( bNoLoop )
rLayoutAccess.GetLayouter()->EndLoopControl();
}
@@ -791,7 +791,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
bool SwLayAction::_TurboAction( const SwContentFrm *pCnt )
{
- const SwPageFrm *pPage = 0;
+ const SwPageFrm *pPage = nullptr;
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
const SwRect aOldRect( pCnt->UnionFrm( true ) );
@@ -888,12 +888,12 @@ static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
const SwFrm *pTmp;
- if ( 0 != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) )
+ if ( nullptr != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) )
return pTmp;
}
pFrm = pFrm->GetNext();
}
- return 0;
+ return nullptr;
}
static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBottom,
@@ -926,7 +926,7 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot
if ( pFly->Frm().Top() <= nBottom )
return pFly;
}
- const SwFrm *pFrm = lcl_FindFirstInvaContent( pFly, nBottom, 0 );
+ const SwFrm *pFrm = lcl_FindFirstInvaContent( pFly, nBottom, nullptr );
if ( pFrm && pFrm->Frm().Bottom() <= nBottom )
return pFrm;
}
@@ -934,12 +934,12 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot
}
}
if ( pCnt->Frm().Top() > nBottom && !pCnt->IsInTab() )
- return 0;
+ return nullptr;
pCnt = pCnt->GetNextContentFrm();
if ( !pLay->IsAnLower( pCnt ) )
break;
}
- return 0;
+ return nullptr;
}
// #i37877# - consider drawing objects
@@ -960,7 +960,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
return pFly;
const SwFrm* pTmp;
- if ( 0 != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, 0 )) &&
+ if ( nullptr != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, nullptr )) &&
pTmp->Frm().Top() <= _nBottom )
return pFly;
}
@@ -973,7 +973,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
}
}
}
- return 0;
+ return nullptr;
}
/* Returns True if the page lies directly below or right of the visible area.
@@ -1011,7 +1011,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
}
}
else
- FormatLayout( pSh ? pSh->GetOut() : 0, prPage );
+ FormatLayout( pSh ? pSh->GetOut() : nullptr, prPage );
if ( IsAgain() )
return false;
}
@@ -1038,7 +1038,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
const SwLayoutFrm* pBody = p2ndPage->FindBodyCont();
if( p2ndPage->IsFootnotePage() && pBody )
pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext());
- pContent = pBody ? pBody->ContainsContent() : 0;
+ pContent = pBody ? pBody->ContainsContent() : nullptr;
while ( p2ndPage && !pContent )
{
p2ndPage = static_cast<const SwPageFrm*>(p2ndPage->GetNext());
@@ -1047,7 +1047,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
pBody = p2ndPage->FindBodyCont();
if( p2ndPage->IsFootnotePage() && pBody )
pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext());
- pContent = pBody ? pBody->ContainsContent() : 0;
+ pContent = pBody ? pBody->ContainsContent() : nullptr;
}
}
if ( pContent )
@@ -1174,23 +1174,23 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( !bRet && bBrowse )
{
const long nBottom = rVis.Bottom();
- const SwAnchoredObject* pObj( 0L );
+ const SwAnchoredObject* pObj( nullptr );
if ( prPage->GetSortedObjs() &&
(prPage->IsInvalidFlyLayout() || prPage->IsInvalidFlyContent()) &&
- 0 != (pObj = lcl_FindFirstInvaObj( prPage, nBottom )) &&
+ nullptr != (pObj = lcl_FindFirstInvaObj( prPage, nBottom )) &&
pObj->GetObjRect().Top() <= nBottom )
{
return false;
}
- const SwFrm* pFrm( 0L );
+ const SwFrm* pFrm( nullptr );
if ( prPage->IsInvalidLayout() &&
- 0 != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) &&
+ nullptr != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) &&
pFrm->Frm().Top() <= nBottom )
{
return false;
}
if ( (prPage->IsInvalidContent() || prPage->IsInvalidFlyInCnt()) &&
- 0 != (pFrm = lcl_FindFirstInvaContent( prPage, nBottom, 0 )) &&
+ nullptr != (pFrm = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) &&
pFrm->Frm().Top() <= nBottom )
{
return false;
@@ -1627,8 +1627,8 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
{
// We do this so we don't have to search later on.
const bool bNxtCnt = IsCalcLayout() && !pContent->GetFollow();
- const SwContentFrm *pContentNext = bNxtCnt ? pContent->GetNextContentFrm() : 0;
- const SwContentFrm *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrm() : 0;
+ const SwContentFrm *pContentNext = bNxtCnt ? pContent->GetNextContentFrm() : nullptr;
+ const SwContentFrm *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrm() : nullptr;
const SwLayoutFrm*pOldUpper = pContent->GetUpper();
const SwTabFrm *pTab = pContent->FindTabFrm();
@@ -2032,7 +2032,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
else
pPage = static_cast<SwPageFrm*>(pRoot->Lower());
- pContentNode = NULL;
+ pContentNode = nullptr;
nTextPos = COMPLETE_STRING;
while ( pPage )
@@ -2308,7 +2308,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
SwLayIdle::~SwLayIdle()
{
- pImp->m_pIdleAct = 0;
+ pImp->m_pIdleAct = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index acfdc0e475b7..9cdba42517db 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -65,7 +65,7 @@ void SwLayoutCache::Read( SvStream &rStream )
if( !pImpl->Read( rStream ) )
{
delete pImpl;
- pImpl = 0;
+ pImpl = nullptr;
}
}
}
@@ -173,7 +173,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
if( pPage->GetPrev() )
{
SwLayoutFrm* pLay = pPage->FindBodyCont();
- SwFrm* pTmp = pLay ? pLay->ContainsAny() : NULL;
+ SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr;
// We are only interested in paragraph or table frames,
// a section frames contains paragraphs/tables.
if( pTmp && pTmp->IsSctFrm() )
@@ -334,7 +334,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
return false;
const SwLayoutFrm* pLay = pPage->FindBodyCont();
- const SwFrm* pTmp = pLay ? pLay->ContainsAny() : NULL;
+ const SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr;
if( pTmp && pTmp->IsSctFrm() )
pTmp = static_cast<const SwSectionFrm*>(pTmp)->ContainsAny();
if( pTmp )
@@ -431,7 +431,7 @@ void SwLayoutCache::ClearImpl()
if( !IsLocked() )
{
delete pImpl;
- pImpl = 0;
+ pImpl = nullptr;
}
}
@@ -477,7 +477,7 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
, nFlyIdx( 0 )
, bFirst( bCache )
{
- pImpl = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : NULL;
+ pImpl = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : nullptr;
if( pImpl )
{
nMaxParaPerPage = 1000;
@@ -492,7 +492,7 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
if( nIndex >= pImpl->size() )
{
pDoc->GetLayoutCache()->UnlockImpl();
- pImpl = NULL;
+ pImpl = nullptr;
}
}
else
@@ -519,7 +519,7 @@ sal_uLong SwLayHelper::CalcPageCount()
{
sal_uLong nPgCount;
SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ?
- pDoc->GetLayoutCache()->LockImpl() : NULL;
+ pDoc->GetLayoutCache()->LockImpl() : nullptr;
if( pCache )
{
nPgCount = pCache->size() + 1;
@@ -558,7 +558,7 @@ sal_uLong SwLayHelper::CalcPageCount()
}
if ( nNdCount < 1000 )
nPgCount = 0;// no progress bar for small documents
- SwViewShell *pSh = 0;
+ SwViewShell *pSh = nullptr;
if( rpLay && rpLay->getRootFrm() )
pSh = rpLay->getRootFrm()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
@@ -579,7 +579,7 @@ sal_uLong SwLayHelper::CalcPageCount()
*/
bool SwLayHelper::CheckInsertPage()
{
- bool bEnd = 0 == rpPage->GetNext();
+ bool bEnd = nullptr == rpPage->GetNext();
const SwAttrSet* pAttr = rpFrm->GetAttrSet();
const SvxFormatBreakItem& rBrk = pAttr->GetBreak();
const SwFormatPageDesc& rDesc = pAttr->GetPageDesc();
@@ -587,7 +587,7 @@ bool SwLayHelper::CheckInsertPage()
// is a follow frame!
const SwPageDesc* pDesc = rpFrm->IsFlowFrm() &&
SwFlowFrm::CastFlowFrm( rpFrm )->IsFollow() ?
- 0 :
+ nullptr :
rDesc.GetPageDesc();
bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
@@ -790,14 +790,14 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
// Insert new headlines:
sal_uInt16 nRowIdx = 0;
- SwRowFrm* pHeadline = 0;
+ SwRowFrm* pHeadline = nullptr;
while( nRowIdx < nRepeat )
{
OSL_ENSURE( pTab->GetTable()->GetTabLines()[ nRowIdx ], "Table ohne Zeilen?" );
pHeadline =
new SwRowFrm( *pTab->GetTable()->GetTabLines()[ nRowIdx ], pTab );
pHeadline->SetRepeatedHeadline( true );
- pHeadline->InsertBefore( pFoll, 0 );
+ pHeadline->InsertBefore( pFoll, nullptr );
pHeadline->RegistFlys();
++nRowIdx;
@@ -808,7 +808,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
nRows = nRows + nRepeat;
}
else
- pPrv = 0;
+ pPrv = nullptr;
while( pRow && nRowCount < nOfst )
{
pRow = pRow->GetNext();
@@ -846,7 +846,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() );
bRet = true;
- rpPrv = 0;
+ rpPrv = nullptr;
nParagraphCnt = 0;
if ( rpActualSection )
@@ -868,7 +868,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
bInit = true;
}
rpActualSection->SetSectionFrm( pSct );
- pSct->InsertBehind( rpLay, 0 );
+ pSct->InsertBehind( rpLay, nullptr );
if( bInit )
pSct->Init();
pSct->Frm().Pos() = rpLay->Frm().Pos();
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index b710bf8b7ad8..70e2fc8c0920 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -50,7 +50,7 @@ class SwEndnoter
SwFootnoteFrms* pEndArr;
public:
explicit SwEndnoter( SwLayouter* pLay )
- : pMaster( pLay ), pSect( NULL ), pEndArr( NULL ) {}
+ : pMaster( pLay ), pSect( nullptr ), pEndArr( nullptr ) {}
~SwEndnoter() { delete pEndArr; }
void CollectEndnotes( SwSectionFrm* pSct );
void CollectEndnote( SwFootnoteFrm* pFootnote );
@@ -125,7 +125,7 @@ void SwEndnoter::InsertEndnotes()
return;
if( !pEndArr || pEndArr->empty() )
{
- pSect = NULL;
+ pSect = nullptr;
return;
}
OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFootnoteBossFrm(),
@@ -135,8 +135,8 @@ void SwEndnoter::InsertEndnotes()
: static_cast<SwFootnoteBossFrm*>(pSect->Lower());
pBoss->_MoveFootnotes( *pEndArr );
delete pEndArr;
- pEndArr = NULL;
- pSect = NULL;
+ pEndArr = nullptr;
+ pSect = nullptr;
}
SwLooping::SwLooping( SwPageFrm* pPage )
@@ -203,12 +203,12 @@ void SwLooping::Control( SwPageFrm* pPage )
}
SwLayouter::SwLayouter()
- : mpEndnoter( NULL ),
- mpLooping( NULL ),
+ : mpEndnoter( nullptr ),
+ mpLooping( nullptr ),
// #i28701#
- mpMovedFwdFrms( 0L ),
+ mpMovedFwdFrms( nullptr ),
// #i35911#
- mpObjsTmpConsiderWrapInfl( 0L )
+ mpObjsTmpConsiderWrapInfl( nullptr )
{
}
@@ -218,10 +218,10 @@ SwLayouter::~SwLayouter()
delete mpLooping;
// #i28701#
delete mpMovedFwdFrms;
- mpMovedFwdFrms = 0L;
+ mpMovedFwdFrms = nullptr;
// #i35911#
delete mpObjsTmpConsiderWrapInfl;
- mpObjsTmpConsiderWrapInfl = 0L;
+ mpObjsTmpConsiderWrapInfl = nullptr;
}
void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect )
@@ -276,7 +276,7 @@ bool SwLayouter::StartLooping( SwPageFrm* pPage )
void SwLayouter::EndLoopControl()
{
delete mpLooping;
- mpLooping = NULL;
+ mpLooping = nullptr;
}
void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 67ccf0243fc7..b579454fe4f6 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -39,11 +39,11 @@
#include <IDocumentFieldsAccess.hxx>
#include <DocumentLayoutManager.hxx>
-SwLayVout *SwRootFrm::mpVout = 0;
+SwLayVout *SwRootFrm::mpVout = nullptr;
bool SwRootFrm::mbInPaint = false;
bool SwRootFrm::mbNoVirDev = false;
-SwCache *SwFrm::mpCache = 0;
+SwCache *SwFrm::mpCache = nullptr;
long FirstMinusSecond( long nFirst, long nSecond )
{ return nFirst - nSecond; }
@@ -384,7 +384,7 @@ CurrShell::CurrShell( SwViewShell *pNew )
pRoot->mpCurrShells->insert( this );
}
else
- pPrev = 0;
+ pPrev = nullptr;
}
CurrShell::~CurrShell()
@@ -397,7 +397,7 @@ CurrShell::~CurrShell()
if ( pRoot->mpCurrShells->empty() && pRoot->mpWaitingCurrShell )
{
pRoot->mpCurrShell = pRoot->mpWaitingCurrShell;
- pRoot->mpWaitingCurrShell = 0;
+ pRoot->mpWaitingCurrShell = nullptr;
}
}
}
@@ -429,14 +429,14 @@ void SwRootFrm::DeRegisterShell( SwViewShell *pSh )
// Doesn't matter anymore
if ( mpWaitingCurrShell == pSh )
- mpWaitingCurrShell = 0;
+ mpWaitingCurrShell = nullptr;
// Remove references
for ( SwCurrShells::iterator it = mpCurrShells->begin(); it != mpCurrShells->end(); ++it )
{
CurrShell *pC = *it;
if (pC->pPrev == pSh)
- pC->pPrev = 0;
+ pC->pPrev = nullptr;
}
}
@@ -452,7 +452,7 @@ void InitCurrShells( SwRootFrm *pRoot )
|*/
SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) :
SwLayoutFrm( pFormat->GetDoc()->MakeFrameFormat(
- "Root", pFormat ), 0 ),
+ "Root", pFormat ), nullptr ),
maPagesArea(),
mnViewWidth( -1 ),
mnColumns( 0 ),
@@ -469,13 +469,13 @@ SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) :
mbCallbackActionEnabled ( false ),
mbLayoutFreezed ( false ),
mnBrowseWidth( MM50*4 ), //2cm minimum
- mpTurbo( 0 ),
- mpLastPage( 0 ),
+ mpTurbo( nullptr ),
+ mpLastPage( nullptr ),
mpCurrShell( pSh ),
- mpWaitingCurrShell( 0 ),
- mpCurrShells(NULL),
- mpDrawPage( 0 ),
- mpDestroy( 0 ),
+ mpWaitingCurrShell( nullptr ),
+ mpCurrShells(nullptr),
+ mpDrawPage( nullptr ),
+ mpDestroy( nullptr ),
mnPhyPageNums( 0 ),
mnAccessibleShells( 0 )
{
@@ -513,10 +513,10 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
SwNodeIndex aIndex( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
SwContentNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, true, false );
// #123067# pNode = 0 can really happen
- SwTableNode *pTableNd= pNode ? pNode->FindTableNode() : 0;
+ SwTableNode *pTableNd= pNode ? pNode->FindTableNode() : nullptr;
// Get hold of PageDesc (either via FrameFormat of the first node or the initial one).
- SwPageDesc *pDesc = 0;
+ SwPageDesc *pDesc = nullptr;
::boost::optional<sal_uInt16> oPgNum;
if ( pTableNd )
@@ -545,7 +545,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
bool bFirst = !oPgNum || 1 == oPgNum.get();
// Create a page and put it in the layout
- SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, 0 );
+ SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, nullptr );
// Find the first page in the Bodytext section.
SwLayoutFrm *pLay = pPage->FindBodyCont();
@@ -557,7 +557,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
//Remove masters that haven't been replaced yet from the list.
RemoveMasterObjs( mpDrawPage );
if( rSettingAccess.get(DocumentSettingId::GLOBAL_DOCUMENT) )
- rFieldsAccess.UpdateRefFields( NULL );
+ rFieldsAccess.UpdateRefFields( nullptr );
//b6433357: Update page fields after loading
if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() )
{
@@ -576,7 +576,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
void SwRootFrm::DestroyImpl()
{
mbTurboAllowed = false;
- mpTurbo = 0;
+ mpTurbo = nullptr;
// fdo#39510 crash on document close with footnotes
// Object ownership in writer and esp. in layout are a mess: Before the
// document/layout split SwDoc and SwRootFrm were essentially one object
@@ -586,7 +586,7 @@ void SwRootFrm::DestroyImpl()
// also searches backwards to find the master of footnotes, they must be
// considered to be owned by the SwRootFrm and also be destroyed here,
// before tearing down the (now footnote free) rest of the layout.
- RemoveFootnotes(0, false, true);
+ RemoveFootnotes(nullptr, false, true);
if(pBlink)
pBlink->FrmDelete( this );
@@ -598,14 +598,14 @@ void SwRootFrm::DestroyImpl()
pDoc->GetDocumentLayoutManager().ClearSwLayouterEntries();
}
delete mpDestroy;
- mpDestroy = 0;
+ mpDestroy = nullptr;
// Remove references
for ( SwCurrShells::iterator it = mpCurrShells->begin(); it != mpCurrShells->end(); ++it )
- (*it)->pRoot = 0;
+ (*it)->pRoot = nullptr;
delete mpCurrShells;
- mpCurrShells = 0;
+ mpCurrShells = nullptr;
// Some accessible shells are left => problems on second SwFrm::Destroy call
assert(0 == mnAccessibleShells);
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 4419d40e031c..1f292a551487 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -91,7 +91,7 @@ class SwPageNumAndTypeOfAnchors
inline SwAnchoredObject* operator[]( sal_uInt32 _nIndex )
{
- SwAnchoredObject* bRetObj = 0L;
+ SwAnchoredObject* bRetObj = nullptr;
if ( _nIndex < Count())
{
@@ -140,7 +140,7 @@ SwObjectFormatter::SwObjectFormatter( const SwPageFrm& _rPageFrm,
mbConsiderWrapOnObjPos( _rPageFrm.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ),
mpLayAction( _pLayAction ),
// --> #i26945#
- mpPgNumAndTypeOfAnchors( _bCollectPgNumOfAnchors ? new SwPageNumAndTypeOfAnchors() : 0L )
+ mpPgNumAndTypeOfAnchors( _bCollectPgNumOfAnchors ? new SwPageNumAndTypeOfAnchors() : nullptr )
{
}
@@ -154,7 +154,7 @@ SwObjectFormatter* SwObjectFormatter::CreateObjFormatter(
const SwPageFrm& _rPageFrm,
SwLayAction* _pLayAction )
{
- SwObjectFormatter* pObjFormatter = 0L;
+ SwObjectFormatter* pObjFormatter = nullptr;
if ( _rAnchorFrm.IsTextFrm() )
{
pObjFormatter = SwObjectFormatterTextFrm::CreateObjFormatter(
@@ -397,7 +397,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
{
// --> #i26945#
- SwFrm* pAnchorFrm( 0L );
+ SwFrm* pAnchorFrm( nullptr );
if ( GetAnchorFrm().IsTextFrm() &&
static_cast<SwTextFrm&>(GetAnchorFrm()).IsFollow() &&
_pMasterTextFrm )
@@ -489,7 +489,7 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
*/
SwAnchoredObject* SwObjectFormatter::GetCollectedObj( const sal_uInt32 _nIndex )
{
- return mpPgNumAndTypeOfAnchors ? (*mpPgNumAndTypeOfAnchors)[_nIndex] : 0L;
+ return mpPgNumAndTypeOfAnchors ? (*mpPgNumAndTypeOfAnchors)[_nIndex] : nullptr;
}
/** accessor to 'anchor' page number of collected anchored object
diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx
index 306ccf572cd8..10aca0df807f 100644
--- a/sw/source/core/layout/objectformatterlayfrm.cxx
+++ b/sw/source/core/layout/objectformatterlayfrm.cxx
@@ -45,10 +45,10 @@ SwObjectFormatterLayFrm* SwObjectFormatterLayFrm::CreateObjFormatter(
!_rAnchorLayFrm.IsFlyFrm() )
{
OSL_FAIL( "<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexpected type of anchor frame " );
- return 0L;
+ return nullptr;
}
- SwObjectFormatterLayFrm* pObjFormatter = 0L;
+ SwObjectFormatterLayFrm* pObjFormatter = nullptr;
// create object formatter, if floating screen objects are registered at
// given anchor layout frame.
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 6cd72b03015f..436cfcbc7bc8 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -75,10 +75,10 @@ SwObjectFormatterTextFrm* SwObjectFormatterTextFrm::CreateObjFormatter(
const SwPageFrm& _rPageFrm,
SwLayAction* _pLayAction )
{
- SwObjectFormatterTextFrm* pObjFormatter = 0L;
+ SwObjectFormatterTextFrm* pObjFormatter = nullptr;
// determine 'master' of <_rAnchorTextFrm>, if anchor frame is a follow text frame.
- SwTextFrm* pMasterOfAnchorFrm = 0L;
+ SwTextFrm* pMasterOfAnchorFrm = nullptr;
if ( _rAnchorTextFrm.IsFollow() )
{
pMasterOfAnchorFrm = _rAnchorTextFrm.FindMaster();
@@ -178,7 +178,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// #i26945# - check conditions for move forward of
// anchor text frame
// determine, if anchor text frame has previous frame
- const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != 0 );
+ const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr );
// #i40141# - use new method - it also formats the
// section the anchor frame is in.
@@ -343,7 +343,7 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
( !mrAnchorTextFrm.IsFollow() &&
_AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) )
{
- const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != 0 );
+ const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr );
// Format anchor text frame after its objects are formatted.
// Note: The format of the anchor frame also formats the invalid
@@ -357,7 +357,7 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
sal_uInt32 nToPageNum( 0L );
// #i43913#
bool bInFollow( false );
- SwAnchoredObject* pObj = 0L;
+ SwAnchoredObject* pObj = nullptr;
if ( !mrAnchorTextFrm.IsFollow() )
{
pObj = _GetFirstObjWithMovedFwdAnchor(
@@ -521,7 +521,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(
_nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT,
"<SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" );
- SwAnchoredObject* pRetAnchoredObj = 0L;
+ SwAnchoredObject* pRetAnchoredObj = nullptr;
sal_uInt32 i = 0L;
for ( ; i < CountOfCollected(); ++i )
@@ -639,7 +639,7 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
// method <SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd()>
// #i44049# - format till a certain lower frame, if provided.
static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm,
- SwFrm* pLastLowerFrm = 0L )
+ SwFrm* pLastLowerFrm = nullptr )
{
SwFrm* pLowerFrm = pLayFrm->GetLower();
while ( pLowerFrm )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 6d698bdff1b2..4a43457cceec 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -155,7 +155,7 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) :
SwFootnoteBossFrm( pFormat, pSib ),
- m_pSortedObjs( 0 ),
+ m_pSortedObjs( nullptr ),
m_pDesc( pPgDsc ),
m_nPhyPageNum( 0 )
{
@@ -178,7 +178,7 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc )
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
- vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : 0;
+ vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
if ( bBrowseMode )
{
Frm().Height( 0 );
@@ -239,16 +239,16 @@ void SwPageFrm::DestroyImpl()
for ( size_t i = 0; i < m_pSortedObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*m_pSortedObjs)[i];
- pAnchoredObj->SetPageFrm( 0L );
+ pAnchoredObj->SetPageFrm( nullptr );
}
delete m_pSortedObjs;
- m_pSortedObjs = 0; // reset to zero to prevent problems when detaching the Flys
+ m_pSortedObjs = nullptr; // reset to zero to prevent problems when detaching the Flys
}
if ( !IsEmptyPage() ) //#59184# unnessesary for empty pages
{
// prevent access to destroyed pages
- SwDoc *pDoc = GetFormat() ? GetFormat()->GetDoc() : NULL;
+ SwDoc *pDoc = GetFormat() ? GetFormat()->GetDoc() : nullptr;
if( pDoc && !pDoc->IsInDtor() )
{
if ( pSh )
@@ -279,7 +279,7 @@ void SwPageFrm::CheckGrid( bool bInvalidate )
bool bOld = m_bHasGrid;
m_bHasGrid = true;
SwTextGridItem const*const pGrid(GetGridItem(this));
- m_bHasGrid = 0 != pGrid;
+ m_bHasGrid = nullptr != pGrid;
if( bInvalidate || bOld != m_bHasGrid )
{
SwLayoutFrm* pBody = FindBodyCont();
@@ -373,7 +373,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
if (FLY_AT_PAGE == rAnch.GetAnchorId())
{
SwFormatAnchor aAnch( rAnch );
- aAnch.SetAnchor( 0 );
+ aAnch.SetAnchor( nullptr );
pFormat->SetFormatAttr( aAnch );
}
else
@@ -382,8 +382,8 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
// is it a border or a SdrObject?
bool bSdrObj = RES_DRAWFRMFMT == pFormat->Which();
- SdrObject *pSdrObj = 0;
- if ( bSdrObj && 0 == (pSdrObj = pFormat->FindSdrObject()) )
+ SdrObject *pSdrObj = nullptr;
+ if ( bSdrObj && nullptr == (pSdrObj = pFormat->FindSdrObject()) )
{
OSL_FAIL( "DrawObject not found." );
pFormat->GetDoc()->DelFrameFormat( pFormat );
@@ -543,7 +543,7 @@ void SwPageFrm::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
SetMaxFootnoteHeight(LONG_MAX);
SetColMaxFootnoteHeight();
// here, the page might be destroyed:
- static_cast<SwRootFrm*>(GetUpper())->RemoveFootnotes(0, false, true);
+ static_cast<SwRootFrm*>(GetUpper())->RemoveFootnotes(nullptr, false, true);
}
else
SwClient::SwClientNotify(rModify, rHint);
@@ -616,7 +616,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
Frm().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
if ( GetUpper() )
- static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( 0, 0 );
+ static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
}
// cleanup Window
if( pSh && pSh->GetWin() && aOldPageFrmRect.HasArea() )
@@ -716,7 +716,7 @@ SwPageDesc *SwPageFrm::FindPageDesc()
return pDoc->GetFootnoteInfo().GetPageDesc( *pDoc );
}
- SwPageDesc *pRet = 0;
+ SwPageDesc *pRet = nullptr;
//5.
const SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -755,12 +755,12 @@ SwPageDesc *SwPageFrm::FindPageDesc()
// the same page description as its prev, just like after construction
// of the empty page.
pRet = GetPrev() ? static_cast<SwPageFrm*>(GetPrev())->GetPageDesc() :
- GetNext() ? static_cast<SwPageFrm*>(GetNext())->GetPageDesc() : 0;
+ GetNext() ? static_cast<SwPageFrm*>(GetNext())->GetPageDesc() : nullptr;
//2.
if ( !pRet )
pRet = GetPrev() ?
- static_cast<SwPageFrm*>(GetPrev())->GetPageDesc()->GetFollow() : 0;
+ static_cast<SwPageFrm*>(GetPrev())->GetPageDesc()->GetFollow() : nullptr;
//4.
if ( !pRet )
@@ -816,7 +816,7 @@ void SwPageFrm::Cut()
{
SwFlyFrm* pFly = static_cast<SwFlyAtCntFrm*>(pAnchoredObj);
SwPageFrm *pAnchPage = pFly->GetAnchorFrm() ?
- pFly->AnchorFrm()->FindPageFrm() : 0;
+ pFly->AnchorFrm()->FindPageFrm() : nullptr;
if ( pAnchPage && (pAnchPage != this) )
{
MoveFly( pFly, pAnchPage );
@@ -854,7 +854,7 @@ void SwPageFrm::Cut()
RemoveFromLayout();
if ( pRootFrm )
- static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( 0, 0 );
+ static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( nullptr, nullptr );
}
void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
@@ -898,7 +898,7 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
if ( pSh )
pSh->SetFirstVisPageInvalid();
- getRootFrm()->CheckViewLayout( 0, 0 );
+ getRootFrm()->CheckViewLayout( nullptr, nullptr );
}
static void lcl_PrepFlyInCntRegister( SwContentFrm *pFrm )
@@ -968,7 +968,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
assert(pStart && "no starting page.");
SwViewShell *pSh = pStart->getRootFrm()->GetCurrShell();
- SwViewShellImp *pImp = pSh ? pSh->Imp() : 0;
+ SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
{
@@ -1042,7 +1042,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
else if ( pPage->IsEmptyPage() && !pFormatWish && //2.
pDesc != pPage->GetPageDesc() )
{
- pPage->SetPageDesc( pDesc, 0 );
+ pPage->SetPageDesc( pDesc, nullptr );
}
else if ( !pPage->IsEmptyPage() && //3.
bActOdd != bOdd &&
@@ -1156,7 +1156,7 @@ namespace
bool isDeleteForbidden(const SwPageFrm *pDel)
{
const SwLayoutFrm* pBody = pDel->FindBodyCont();
- const SwFrm* pBodyContent = pBody ? pBody->Lower() : NULL;
+ const SwFrm* pBodyContent = pBody ? pBody->Lower() : nullptr;
return pBodyContent && pBodyContent->IsDeleteForbidden();
}
}
@@ -1165,7 +1165,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
{
SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPrevPage->GetUpper());
SwPageFrm *pSibling = static_cast<SwPageFrm*>(pPrevPage->GetNext());
- SwPageDesc *pDesc = 0;
+ SwPageDesc *pDesc = nullptr;
// insert right (odd) or left (even) page?
bool bNextOdd = !pPrevPage->OnRightPage();
@@ -1244,7 +1244,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
{
CheckPageDescs( pSibling, false );
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- SwViewShellImp *pImp = pSh ? pSh->Imp() : 0;
+ SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
{
const sal_uInt16 nNum = pImp->GetLayAction().GetCheckPageNum();
@@ -1322,7 +1322,7 @@ void SwRootFrm::RemoveSuperfluous()
// Check the corresponding last page if it is empty and stop loop at the last non-empty page.
do
{
- bool bExistEssentialObjs = ( 0 != pPage->GetSortedObjs() );
+ bool bExistEssentialObjs = ( nullptr != pPage->GetSortedObjs() );
if ( bExistEssentialObjs )
{
// Only because the page has Flys does not mean that it is needed. If all Flys are
@@ -1348,10 +1348,10 @@ void SwRootFrm::RemoveSuperfluous()
// OD 19.06.2003 #108784# - optimization: check first, if essential objects
// exists.
- const SwLayoutFrm* pBody = 0;
+ const SwLayoutFrm* pBody = nullptr;
if ( bExistEssentialObjs ||
pPage->FindFootnoteCont() ||
- ( 0 != ( pBody = pPage->FindBodyCont() ) &&
+ ( nullptr != ( pBody = pPage->FindBodyCont() ) &&
( pBody->ContainsContent() ||
// #i47580#
// Do not delete page if there's an empty tabframe
@@ -1371,7 +1371,7 @@ void SwRootFrm::RemoveSuperfluous()
continue;
}
else
- pPage = 0;
+ pPage = nullptr;
}
if ( pPage )
@@ -1495,7 +1495,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
nCnt != pPage->GetSortedObjs()->size(),
"Object couldn't be reattached!" );
#else
- rFormat.NotifyClients( 0, &rAnch );
+ rFormat.NotifyClients( nullptr, &rAnch );
#endif
// Do not increment index, in this case
continue;
@@ -2223,7 +2223,7 @@ const SwPageFrm& SwPageFrm::GetFormatPage() const
// e.g. during insertion of a left page at the end of the document right
// after a left page in an intermediate state a right empty page does not
// have a next page frame.
- if ( pRet == 0 )
+ if ( pRet == nullptr )
{
if ( OnRightPage() )
{
@@ -2296,7 +2296,7 @@ SwTextGridItem const* GetGridItem(SwPageFrm const*const pPage)
return &rGridItem;
}
}
- return 0;
+ return nullptr;
}
sal_uInt16 GetGridWidth(SwTextGridItem const& rG, SwDoc const& rDoc)
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 666161e1b86e..cbac1bccf9b5 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -43,7 +43,7 @@ SwPageDesc::SwPageDesc(const OUString& rName, SwFrameFormat *pFormat, SwDoc *con
, m_Left( pDoc->GetAttrPool(), rName, pFormat )
, m_FirstMaster( pDoc->GetAttrPool(), rName, pFormat )
, m_FirstLeft( pDoc->GetAttrPool(), rName, pFormat )
- , m_Depend( this, 0 )
+ , m_Depend( this, nullptr )
, m_pFollow( this )
, m_nRegHeight( 0 )
, m_nRegAscent( 0 )
@@ -246,18 +246,18 @@ static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
nFrmType = FRM_TAB;
}
else
- pMod = 0;
+ pMod = nullptr;
Point aNullPt;
- return pMod ? ::GetFrmOfModify( 0, *pMod, nFrmType, &aNullPt )
- : 0;
+ return pMod ? ::GetFrmOfModify( nullptr, *pMod, nFrmType, &aNullPt )
+ : nullptr;
}
const SwPageDesc* SwPageDesc::GetPageDescOfNode(const SwNode& rNd)
{
- const SwPageDesc* pRet = 0;
+ const SwPageDesc* pRet = nullptr;
const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
- if (pChkFrm && 0 != (pChkFrm = pChkFrm->FindPageFrm()))
+ if (pChkFrm && nullptr != (pChkFrm = pChkFrm->FindPageFrm()))
pRet = static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc();
return pRet;
}
@@ -269,7 +269,7 @@ const SwFrameFormat* SwPageDesc::GetPageFormatOfNode( const SwNode& rNd,
const SwFrameFormat* pRet;
const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
- if( pChkFrm && 0 != ( pChkFrm = pChkFrm->FindPageFrm() ))
+ if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() ))
{
const SwPageDesc* pPd = bCheckForThisPgDc ? this :
static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc();
@@ -293,7 +293,7 @@ bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
if( GetFollow() && this != GetFollow() )
{
const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
- if( pChkFrm && 0 != ( pChkFrm = pChkFrm->FindPageFrm() ) &&
+ if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() ) &&
pChkFrm->IsPageFrm() &&
( !pChkFrm->GetNext() || GetFollow() ==
static_cast<const SwPageFrm*>(pChkFrm->GetNext())->GetPageDesc() ))
@@ -307,14 +307,14 @@ SwFrameFormat *SwPageDesc::GetLeftFormat(bool const bFirst)
{
return (nsUseOnPage::PD_LEFT & m_eUse)
? ((bFirst) ? &m_FirstLeft : &m_Left)
- : 0;
+ : nullptr;
}
SwFrameFormat *SwPageDesc::GetRightFormat(bool const bFirst)
{
return (nsUseOnPage::PD_RIGHT & m_eUse)
? ((bFirst) ? &m_FirstMaster : &m_Master)
- : 0;
+ : nullptr;
}
bool SwPageDesc::IsFirstShared() const
@@ -352,7 +352,7 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName)
}
}
- return 0;
+ return nullptr;
}
SwPageFootnoteInfo::SwPageFootnoteInfo()
@@ -456,7 +456,7 @@ SwPageDescExt::operator SwPageDesc() const
SwPageDesc * pPageDesc = m_pDoc->FindPageDesc(m_sFollow);
- if ( 0 != pPageDesc )
+ if ( nullptr != pPageDesc )
aResult.SetFollow(pPageDesc);
return aResult;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b92c6e884839..15a04afdfb02 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -291,16 +291,16 @@ struct SwPaintProperties {
SwPaintProperties()
: bSFlyMetafile(false)
- , pSFlyMetafileOut(0)
- , pSGlobalShell(0)
- , pSRetoucheFly(0)
- , pSRetoucheFly2(0)
- , pSFlyOnlyDraw(0)
- , pBLines(0)
- , pSLines(0)
- , pSSubsLines(0)
- , pSSpecSubsLines(0)
- , pSProgress(0)
+ , pSFlyMetafileOut(nullptr)
+ , pSGlobalShell(nullptr)
+ , pSRetoucheFly(nullptr)
+ , pSRetoucheFly2(nullptr)
+ , pSFlyOnlyDraw(nullptr)
+ , pBLines(nullptr)
+ , pSLines(nullptr)
+ , pSSubsLines(nullptr)
+ , pSSpecSubsLines(nullptr)
+ , pSProgress(nullptr)
, nSPixelSzW(0)
, nSPixelSzH(0)
, nSHalfPixelSzW(0)
@@ -432,18 +432,18 @@ SwSavePaintStatics::SwSavePaintStatics()
// Restoring globales to default
gProp.bSFlyMetafile = false;
- gProp.pSFlyMetafileOut = 0;
- gProp.pSRetoucheFly = 0;
- gProp.pSRetoucheFly2 = 0;
+ gProp.pSFlyMetafileOut = nullptr;
+ gProp.pSRetoucheFly = nullptr;
+ gProp.pSRetoucheFly2 = nullptr;
gProp.nSPixelSzW = gProp.nSPixelSzH =
gProp.nSHalfPixelSzW = gProp.nSHalfPixelSzH =
gProp.nSMinDistPixelW = gProp.nSMinDistPixelH = 0;
gProp.aSScaleX = gProp.aSScaleY = 1.0;
- gProp.pBLines = 0;
- gProp.pSLines = 0;
- gProp.pSSubsLines = 0;
- gProp.pSSpecSubsLines = 0L;
- gProp.pSProgress = 0;
+ gProp.pBLines = nullptr;
+ gProp.pSLines = nullptr;
+ gProp.pSSubsLines = nullptr;
+ gProp.pSSpecSubsLines = nullptr;
+ gProp.pSProgress = nullptr;
}
SwSavePaintStatics::~SwSavePaintStatics()
@@ -606,7 +606,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis,
return lcl_MergeBorderLines(rOther, rThis, start, end);
}
}
- return 0;
+ return nullptr;
}
void BorderLines::AddBorderLine(
@@ -635,7 +635,7 @@ SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderS
bPainted( false ),
nLock( 0 )
{
- if ( pCol != NULL )
+ if ( pCol != nullptr )
aColor = *pCol;
}
@@ -778,8 +778,8 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
SwLineRect &rR2 = *aCheck[k2];
if ( bVert )
{
- SwLineRect *pLA = 0;
- SwLineRect *pLB = 0;
+ SwLineRect *pLA = nullptr;
+ SwLineRect *pLB = nullptr;
if ( rR1.Top() < rR2.Top() )
{
pLA = &rR1; pLB = &rR2;
@@ -819,8 +819,8 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
}
else
{
- SwLineRect *pLA = 0;
- SwLineRect *pLB = 0;
+ SwLineRect *pLA = nullptr;
+ SwLineRect *pLB = nullptr;
if ( rR1.Left() < rR2.Left() )
{
pLA = &rR1; pLB = &rR2;
@@ -918,7 +918,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Bottom( nTmp );
- aLineRects.push_back( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
+ aLineRects.push_back( SwLineRect( aNewSubsRect, nullptr, aSubsLineRect.GetStyle(), nullptr,
aSubsLineRect.GetSubColor() ) );
}
nTmp = rLine.Bottom()+properties.nSPixelSzH+1;
@@ -926,7 +926,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Top( nTmp );
- aLineRects.push_back( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
+ aLineRects.push_back( SwLineRect( aNewSubsRect, nullptr, aSubsLineRect.GetStyle(), nullptr,
aSubsLineRect.GetSubColor() ) );
}
aLineRects.erase(aLineRects.begin() + i);
@@ -944,7 +944,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Right( nTmp );
- aLineRects.push_back( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
+ aLineRects.push_back( SwLineRect( aNewSubsRect, nullptr, aSubsLineRect.GetStyle(), nullptr,
aSubsLineRect.GetSubColor() ) );
}
nTmp = rLine.Right()+properties.nSPixelSzW+1;
@@ -952,7 +952,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Left( nTmp );
- aLineRects.push_back( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
+ aLineRects.push_back( SwLineRect( aNewSubsRect, nullptr, aSubsLineRect.GetStyle(), nullptr,
aSubsLineRect.GetSubColor() ) );
}
aLineRects.erase(aLineRects.begin() + i);
@@ -1016,13 +1016,13 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
if ( aLineRects.size() != nLastCount )
{
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pOut );
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetFillColor();
pOut->SetLineColor();
ConnectEdges( pOut, properties );
- const Color *pLast = 0;
+ const Color *pLast = nullptr;
bool bPaint2nd = false;
size_t nMinCount = aLineRects.size();
@@ -1135,7 +1135,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
if ( !aLineRects.empty() )
{
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pOut );
// Remove all help line that are almost covered (tables)
for (size_type i = 0; i != aLineRects.size(); ++i)
@@ -1211,7 +1211,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
if ( !rLRect.IsPainted() &&
!rLRect.IsLocked() )
{
- const Color *pCol = 0;
+ const Color *pCol = nullptr;
switch ( rLRect.GetSubColor() )
{
case SUBCOL_PAGE: pCol = &SwViewOption::GetDocBoundariesColor(); break;
@@ -1519,7 +1519,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
}
}
- ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell ? properties.pSGlobalShell->GetOut() : 0 );
+ ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell ? properties.pSGlobalShell->GetOut() : nullptr );
}
/**
@@ -1703,7 +1703,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
}
}
if (gProp.pSRetoucheFly == gProp.pSRetoucheFly2)
- gProp.pSRetoucheFly = 0;
+ gProp.pSRetoucheFly = nullptr;
}
static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
@@ -1945,7 +1945,7 @@ bool DrawFillAttributes(
basegfx::B2DHomMatrix(),
rOut.GetViewTransformation(),
aPaintRange,
- 0,
+ nullptr,
0.0,
uno::Sequence< beans::PropertyValue >());
drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
@@ -1995,7 +1995,7 @@ void DrawGraphic(
}
OUString referer;
SfxObjectShell * sh = rSh.GetDoc()->GetPersist();
- if (sh != 0 && sh->HasName()) {
+ if (sh != nullptr && sh->HasName()) {
referer = sh->GetMedium()->GetName();
}
const Graphic* pGrf = pBrush->GetGraphic(referer);
@@ -2004,7 +2004,7 @@ void DrawGraphic(
ePos = pBrush->GetGraphicPos();
if( pGrf->IsSupportedGraphic() )
// don't the use the specific output device! Bug 94802
- aGrfSize = ::GetGraphicSizeTwip( *pGrf, 0 );
+ aGrfSize = ::GetGraphicSizeTwip( *pGrf, nullptr );
}
}
else
@@ -2123,7 +2123,7 @@ void DrawGraphic(
aAlignedPaintRect.SVRect(),
aGrf.SSize(),
Size( aPaintOffset.X(), aPaintOffset.Y() ),
- NULL, GraphicManagerDrawFlags::STANDARD,
+ nullptr, GraphicManagerDrawFlags::STANDARD,
::std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
}
// reset clipping at output device
@@ -2563,7 +2563,7 @@ void SwTabFrmPainter::HandleFrame( const SwLayoutFrm& rLayoutFrm )
void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
{
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, rDev );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, rDev );
SwLineEntryMap::const_iterator aIter = maHoriLines.begin();
bool bHori = true;
@@ -2573,7 +2573,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
// high contrast mode:
// overrides the color of non-subsidiary lines.
- const Color* pHCColor = 0;
+ const Color* pHCColor = nullptr;
DrawModeFlags nOldDrawMode = rDev.GetDrawMode();
if( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
@@ -2682,7 +2682,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
}
// subsidiary lines
- const Color* pTmpColor = 0;
+ const Color* pTmpColor = nullptr;
if (0 == aStyles[ 0 ].GetWidth())
{
if (isTableBoundariesEnabled() && gProp.pSGlobalShell->GetWin())
@@ -3029,7 +3029,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
const SwTwips nKey = rNew.mnKey;
SwLineEntryMap::iterator aMapIter = pLine2->find( nKey );
- SwLineEntrySet* pLineSet = aMapIter != pLine2->end() ? &((*aMapIter).second) : 0;
+ SwLineEntrySet* pLineSet = aMapIter != pLine2->end() ? &((*aMapIter).second) : nullptr;
if ( !pLineSet )
{
SwLineEntrySet aNewSet;
@@ -3176,7 +3176,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
{
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower of root is no page." );
- PROTOCOL( this, PROT_FILE_INIT, 0, 0)
+ PROTOCOL( this, PROT_FILE_INIT, 0, nullptr)
bool bResetRootPaint = false;
SwViewShell *pSh = mpCurrShell;
@@ -3196,7 +3196,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
else
SwRootFrm::mbInPaint = bResetRootPaint = true;
- SwSavePaintStatics *pStatics = 0;
+ SwSavePaintStatics *pStatics = nullptr;
if ( gProp.pSGlobalShell )
pStatics = new SwSavePaintStatics();
gProp.pSGlobalShell = pSh;
@@ -3272,7 +3272,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
const SwPageFrm* pHiddenPage = pPage;
- while ( pHiddenPage->GetPrev() != NULL )
+ while ( pHiddenPage->GetPrev() != nullptr )
{
pHiddenPage = static_cast< const SwPageFrm* >( pHiddenPage->GetPrev() );
SwFrameControlPtr pControl = rMngr.GetControl( PageBreak, pHiddenPage );
@@ -3384,7 +3384,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
// collect sub-lines
pPage->RefreshSubsidiary( aPaintRect );
// paint special sub-lines
- gProp.pSSpecSubsLines->PaintSubsidiary( pSh->GetOut(), NULL, gProp );
+ gProp.pSSpecSubsLines->PaintSubsidiary( pSh->GetOut(), nullptr, gProp );
}
pPage->Paint( rRenderContext, aPaintRect );
@@ -3519,8 +3519,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
delete pStatics;
else
{
- gProp.pSProgress = 0;
- gProp.pSGlobalShell = 0;
+ gProp.pSProgress = nullptr;
+ gProp.pSGlobalShell = nullptr;
}
const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction );
@@ -3590,7 +3590,7 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
{
// #i16816# tagged pdf support
Frm_Info aFrmInfo( *this );
- SwTaggedPDFHelper aTaggedPDFHelper( 0, &aFrmInfo, 0, rRenderContext );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrmInfo, nullptr, rRenderContext );
const SwFrm *pFrm = Lower();
if ( !pFrm )
@@ -3607,7 +3607,7 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
pFrm = Lower();
}
- const SwPageFrm *pPage = 0;
+ const SwPageFrm *pPage = nullptr;
const bool bWin = gProp.pSGlobalShell->GetWin() != nullptr;
while ( IsAnLower( pFrm ) )
@@ -3917,7 +3917,7 @@ void SwPageFrm::PaintDecorators( ) const
{
const SwFrm* pHeaderFrm = Lower();
if ( !pHeaderFrm->IsHeaderFrm() )
- pHeaderFrm = NULL;
+ pHeaderFrm = nullptr;
long nHeaderYOff = aBodyRect.Top();
Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff ) );
@@ -3963,8 +3963,8 @@ bool SwFlyFrm::IsBackgroundTransparent() const
if ( !bBackgroundTransparent &&
static_cast<const SwFlyFrameFormat*>(GetFormat())->IsBackgroundBrushInherited() )
{
- const SvxBrushItem* pBackgrdBrush = 0;
- const Color* pSectionTOXColor = 0;
+ const SvxBrushItem* pBackgrdBrush = nullptr;
+ const Color* pSectionTOXColor = nullptr;
SwRect aDummyRect;
//UUUU
drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes;
@@ -4010,7 +4010,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
{
SdrObjUserCall *pUserCall;
- if ( 0 == ( pUserCall = GetUserCall(pObj) ) )
+ if ( nullptr == ( pUserCall = GetUserCall(pObj) ) )
return true;
//Attribute dependent, don't paint for printer or Preview
@@ -4022,7 +4022,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
if ( bPaint )
{
//The paint may be prevented by the superior Flys.
- SwFrm *pAnch = 0;
+ SwFrm *pAnch = nullptr;
if ( dynamic_cast< const SwFlyDrawObj *>( pObj ) != nullptr ) // i#117962#
{
bPaint = false;
@@ -4050,11 +4050,11 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
// OD 13.10.2003 #i19919# - consider 'virtual' drawing objects
// OD 2004-03-29 #i26791#
SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall);
- pAnch = pDrawContact ? pDrawContact->GetAnchorFrm(pObj) : NULL;
+ pAnch = pDrawContact ? pDrawContact->GetAnchorFrm(pObj) : nullptr;
if ( pAnch )
{
if ( !pAnch->GetValidPosFlag() )
- pAnch = 0;
+ pAnch = nullptr;
else if ( sal_IntPtr(pSh->GetOut()) == sal_IntPtr(pSh->getIDocumentDeviceAccess().getPrinter( false )))
{
//HACK: we have to omit some of the objects for printing,
@@ -4064,7 +4064,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
//page over which they float position wise gets printed.
const SwPageFrm *pPage = pAnch->FindPageFrm();
if ( !pPage->Frm().IsOver( pObj->GetCurrentBoundRect() ) )
- pAnch = 0;
+ pAnch = nullptr;
}
}
else
@@ -4140,7 +4140,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
const SwPageFrm* pPage = FindPageFrm();
const SwNoTextFrm *pNoText = Lower() && Lower()->IsNoTextFrm()
- ? static_cast<const SwNoTextFrm*>(Lower()) : 0;
+ ? static_cast<const SwNoTextFrm*>(Lower()) : nullptr;
bool bIsChart = false; //#i102950# don't paint additional borders for charts
//check whether we have a chart
@@ -4330,7 +4330,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
// Add subsidiary lines of fly frame and its lowers
RefreshLaySubsidiary( pPage, aRect );
// paint subsidiary lines of fly frame and its lowers
- gProp.pSSpecSubsLines->PaintSubsidiary( &rRenderContext, NULL, gProp );
+ gProp.pSSpecSubsLines->PaintSubsidiary( &rRenderContext, nullptr, gProp );
gProp.pSSubsLines->PaintSubsidiary( &rRenderContext, gProp.pSLines, gProp );
if ( !bSubsLineRectsCreated )
// unlock subsidiary lines
@@ -4677,7 +4677,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
SwRect aOut( rOutRect );
aOut._Intersection( rRect );
- const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : 0;
+ const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : nullptr;
sal_uInt8 nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
@@ -4821,7 +4821,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect,
static sal_uInt16 lcl_GetLineWidth( const SvxBorderLine* pLine )
{
- if ( pLine != NULL )
+ if ( pLine != nullptr )
return pLine->GetScaledWidth();
return 0;
@@ -4895,17 +4895,17 @@ static void lcl_MakeBorderLine(SwRect const& rRect,
return;
double const nExtentLeftStart = (isLeftOrTopBorder == isVertical)
- ? lcl_GetExtent(pStartNeighbour, 0)
- : lcl_GetExtent(0, pStartNeighbour);
+ ? lcl_GetExtent(pStartNeighbour, nullptr)
+ : lcl_GetExtent(nullptr, pStartNeighbour);
double const nExtentLeftEnd = (isLeftOrTopBorder == isVertical)
- ? lcl_GetExtent(pEndNeighbour, 0)
- : lcl_GetExtent(0, pEndNeighbour);
+ ? lcl_GetExtent(pEndNeighbour, nullptr)
+ : lcl_GetExtent(nullptr, pEndNeighbour);
double const nExtentRightStart = (isLeftOrTopBorder == isVertical)
- ? lcl_GetExtent(0, pStartNeighbour)
- : lcl_GetExtent(pStartNeighbour, 0);
+ ? lcl_GetExtent(nullptr, pStartNeighbour)
+ : lcl_GetExtent(pStartNeighbour, nullptr);
double const nExtentRightEnd = (isLeftOrTopBorder == isVertical)
- ? lcl_GetExtent(0, pEndNeighbour)
- : lcl_GetExtent(pEndNeighbour, 0);
+ ? lcl_GetExtent(nullptr, pEndNeighbour)
+ : lcl_GetExtent(pEndNeighbour, nullptr);
double const nLeftWidth = rBorder.GetOutWidth();
double const nRightWidth = rBorder.GetInWidth();
@@ -4938,7 +4938,7 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
{
const SvxBoxItem& rBox = _rAttrs.GetBox();
const bool bR2L = _rFrm.IsCellFrm() && _rFrm.IsRightToLeft();
- const SvxBorderLine* pLeftRightBorder = 0;
+ const SvxBorderLine* pLeftRightBorder = nullptr;
const SvxBorderLine* pTopBorder = rBox.GetTop();
const SvxBorderLine* pBottomBorder = rBox.GetBottom();
@@ -4983,8 +4983,8 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
::lcl_ExtendLeftAndRight( aRect, _rFrm, _rAttrs, _rRectFn );
// No Top / bottom borders for joint borders
- if ( _rAttrs.JoinedWithPrev( _rFrm ) ) pTopBorder = NULL;
- if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = NULL;
+ if ( _rAttrs.JoinedWithPrev( _rFrm ) ) pTopBorder = nullptr;
+ if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = nullptr;
}
if ( !pLeftRightBorder->GetInWidth() )
@@ -5019,7 +5019,7 @@ static void lcl_PaintTopBottomLine( const bool _bTop,
SwPaintProperties& properties)
{
const SvxBoxItem& rBox = _rAttrs.GetBox();
- const SvxBorderLine* pTopBottomBorder = 0;
+ const SvxBorderLine* pTopBottomBorder = nullptr;
if ( _bTop )
{
@@ -5223,7 +5223,7 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
}
while ( pTmpFrm->IsCellFrm() );
- return 0;
+ return nullptr;
}
/**
@@ -5301,10 +5301,10 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm
if ( bCellNeedsAttribute )
{
// determine, if cell frame has no borders inside the table.
- const SwFrm* pNextCell = 0;
+ const SwFrm* pNextCell = nullptr;
bool bNoBordersInside = false;
- if ( bCellAtLeftBorder && ( 0 != ( pNextCell = lcl_HasNextCell( *_pCellFrm ) ) ) )
+ if ( bCellAtLeftBorder && ( nullptr != ( pNextCell = lcl_HasNextCell( *_pCellFrm ) ) ) )
{
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNextCell );
const SwBorderAttrs &rBorderAttrs = *aAccess.Get();
@@ -5445,8 +5445,8 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
//-hack has to be used.
const bool bb4779636HackActive = true;
- const SwFrm* pCellFrmForBottomBorderAttrs = 0;
- const SwFrm* pCellFrmForTopBorderAttrs = 0;
+ const SwFrm* pCellFrmForBottomBorderAttrs = nullptr;
+ const SwFrm* pCellFrmForTopBorderAttrs = nullptr;
bool bFoundCellForTopOrBorderAttrs = false;
if ( bb4779636HackActive && IsCellFrm() )
{
@@ -6102,7 +6102,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
return;
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *_pViewShell->GetOut() );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *_pViewShell->GetOut() );
static vcl::DeleteOnDeinit< drawinglayer::primitive2d::DiscreteShadow > shadowMaskObj
( new drawinglayer::primitive2d::DiscreteShadow( SW_RES( BMP_PAGE_SHADOW_MASK ) ));
@@ -6425,7 +6425,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
OutputDevice *pOut = gProp.pSGlobalShell->GetOut();
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pOut );
// OD 2004-04-23 #116347#
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
@@ -6493,12 +6493,12 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SwViewShell *pSh = gProp.pSGlobalShell;
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() );
const SvxBrushItem* pItem;
// OD 05.09.2002 #102912#
// temporary background brush for a fly frame without a background brush
- SvxBrushItem* pTmpBackBrush = 0;
+ SvxBrushItem* pTmpBackBrush = nullptr;
const Color* pCol;
SwRect aOrigBackRect;
const bool bPageFrm = IsPageFrm();
@@ -6586,7 +6586,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
if ( aRect.HasArea() )
{
- SvxBrushItem* pNewItem = 0;
+ SvxBrushItem* pNewItem = nullptr;
if( pCol )
{
@@ -6730,7 +6730,7 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
{
// OD 20.12.2002 #106318# - paint special subsidiary lines
// and delete its container
- gProp.pSSpecSubsLines->PaintSubsidiary( gProp.pSGlobalShell->GetOut(), NULL, gProp );
+ gProp.pSSpecSubsLines->PaintSubsidiary( gProp.pSGlobalShell->GetOut(), nullptr, gProp );
DELETEZ( gProp.pSSpecSubsLines );
gProp.pSSubsLines->PaintSubsidiary( gProp.pSGlobalShell->GetOut(), gProp.pSLines, gProp );
@@ -6827,7 +6827,7 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
if ( pMyFly )
{
aIter.Current( pMyFly->GetVirtDrawObj() );
- while ( 0 != (pMyFly = pMyFly->GetAnchorFrm()->FindFlyFrm()) )
+ while ( nullptr != (pMyFly = pMyFly->GetAnchorFrm()->FindFlyFrm()) )
{
if ( aIter()->GetOrdNum() > pMyFly->GetVirtDrawObj()->GetOrdNum() )
aIter.Current( pMyFly->GetVirtDrawObj() );
@@ -6839,7 +6839,7 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
while ( aIter() )
{
const SwVirtFlyDrawObj *pObj = static_cast<const SwVirtFlyDrawObj*>(aIter());
- const SwFlyFrm *pFly = pObj ? pObj->GetFlyFrm() : 0;
+ const SwFlyFrm *pFly = pObj ? pObj->GetFlyFrm() : nullptr;
//I certainly won't avoid myself, even if I'm placed _inside_ the
//fly I won't avoid it.
@@ -6887,8 +6887,8 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
SwRect aRect( aP1, aP2 );
// OD 18.11.2002 #99672# - use parameter <pSubsLines> instead of
// global variable <gProp.pSSubsLines>.
- pSubsLines->AddLineRect( aRect, 0, table::BorderLineStyle::SOLID,
- 0, nSubColor, gProp );
+ pSubsLines->AddLineRect( aRect, nullptr, table::BorderLineStyle::SOLID,
+ nullptr, nSubColor, gProp );
}
aP1 = aP2;
(aP1.*pDirPt)() += 1;
@@ -6991,8 +6991,8 @@ void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *,
if ( !gProp.pSGlobalShell->IsHeaderFooterEdit() )
{
const SwFrm* pLay = Lower();
- const SwFrm* pFootnoteCont = NULL;
- const SwFrm* pPageBody = NULL;
+ const SwFrm* pFootnoteCont = nullptr;
+ const SwFrm* pPageBody = nullptr;
while ( pLay && !( pFootnoteCont && pPageBody ) )
{
if ( pLay->IsFootnoteContFrm( ) )
@@ -7017,8 +7017,8 @@ void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *,
const SwRect & ) const
{
const SwFrm* pLay = Lower();
- const SwFrm* pFootnoteCont = NULL;
- const SwFrm* pColBody = NULL;
+ const SwFrm* pFootnoteCont = nullptr;
+ const SwFrm* pColBody = nullptr;
while ( pLay && !( pFootnoteCont && pColBody ) )
{
if ( pLay->IsFootnoteContFrm( ) )
@@ -7194,15 +7194,15 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
if ( aOriginal.Left() == aOut.Left() )
{
const SwRect aRect( aOut.Pos(), aLB );
- pUsedSubsLines->AddLineRect( aRect, 0,
- table::BorderLineStyle::SOLID, 0, nSubColor, gProp );
+ pUsedSubsLines->AddLineRect( aRect, nullptr,
+ table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight )
{
const SwRect aRect( aRT, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0,
- table::BorderLineStyle::SOLID, 0, nSubColor, gProp );
+ pUsedSubsLines->AddLineRect( aRect, nullptr,
+ table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
}
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines
@@ -7212,14 +7212,14 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
{
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
const SwRect aRect( aOut.Pos(), aRT );
- pUsedSubsLines->AddLineRect( aRect, 0,
- table::BorderLineStyle::SOLID, 0, nSubColor, gProp );
+ pUsedSubsLines->AddLineRect( aRect, nullptr,
+ table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
if ( aOriginal.Bottom() == nBottom )
{
const SwRect aRect( aLB, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0,
- table::BorderLineStyle::SOLID, 0, nSubColor, gProp );
+ pUsedSubsLines->AddLineRect( aRect, nullptr,
+ table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
}
}
@@ -7323,9 +7323,9 @@ const Color SwPageFrm::GetDrawBackgrdColor() const
{
OUString referer;
SwViewShell * sh1 = getRootFrm()->GetCurrShell();
- if (sh1 != 0) {
+ if (sh1 != nullptr) {
SfxObjectShell * sh2 = sh1->GetDoc()->GetPersist();
- if (sh2 != 0 && sh2->HasName()) {
+ if (sh2 != nullptr && sh2->HasName()) {
referer = sh2->GetMedium()->GetName();
}
}
@@ -7353,8 +7353,8 @@ const Color SwPageFrm::GetDrawBackgrdColor() const
/// create/return font used to paint the "empty page" string
const vcl::Font& SwPageFrm::GetEmptyPageFont()
{
- static vcl::Font* pEmptyPgFont = 0;
- if ( 0 == pEmptyPgFont )
+ static vcl::Font* pEmptyPgFont = nullptr;
+ if ( nullptr == pEmptyPgFont )
{
pEmptyPgFont = new vcl::Font;
pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt
@@ -7397,7 +7397,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
SwViewShell *pSh = getRootFrm()->GetCurrShell();
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() );
for ( size_t i = 0; i < aRegion.size(); ++i )
{
@@ -7417,11 +7417,11 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
SwViewObjectContactRedirector aSwRedirector( *pSh );
// <--
- pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), 0,
+ pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), nullptr,
aRetouchePart, &aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
- pSh->Imp()->PaintLayer( rIDDMA.GetHeavenId(), 0,
+ pSh->Imp()->PaintLayer( rIDDMA.GetHeavenId(), nullptr,
aRetouchePart, &aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
@@ -7489,8 +7489,8 @@ bool SwFrm::GetBackgroundBrush(
const SwFrm *pFrm = this;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const SwViewOption *pOpt = pSh->GetViewOptions();
- rpBrush = 0;
- rpCol = NULL;
+ rpBrush = nullptr;
+ rpCol = nullptr;
do
{ if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() )
return false;
@@ -7644,7 +7644,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
SwIterator<SwFrm,SwFormat> aIter( *this );
SwFrm *pFirst = aIter.First();
SwViewShell *pSh;
- if ( pFirst && 0 != ( pSh = pFirst->getRootFrm()->GetCurrShell()) )
+ if ( pFirst && nullptr != ( pSh = pFirst->getRootFrm()->GetCurrShell()) )
{
SwViewShell *pOldGlobal = gProp.pSGlobalShell;
gProp.pSGlobalShell = pSh;
@@ -7690,7 +7690,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
vcl::Window *pWin = pSh->GetWin();
sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom();
- ::SetOutDevAndWin( pSh, pDev, 0, 100 );
+ ::SetOutDevAndWin( pSh, pDev, nullptr, 100 );
gProp.bSFlyMetafile = true;
gProp.pSFlyMetafileOut = pWin;
@@ -7705,7 +7705,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
// --> OD #i76669#
SwViewObjectContactRedirector aSwRedirector( *pSh );
// <--
- pImp->PaintLayer( rIDDMA.GetHellId(), 0, aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( rIDDMA.GetHellId(), nullptr, aOut, &aPageBackgrdColor,
pFlyPage->IsRightToLeft(),
&aSwRedirector );
gProp.pSLines->PaintLines( pDev, gProp );
@@ -7713,14 +7713,14 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pFly->Paint( *pDev, aOut );
gProp.pSLines->PaintLines( pDev, gProp );
// OD 30.08.2002 #102450# - add 3rd parameter
- pImp->PaintLayer( rIDDMA.GetHeavenId(), 0, aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( rIDDMA.GetHeavenId(), nullptr, aOut, &aPageBackgrdColor,
pFlyPage->IsRightToLeft(),
&aSwRedirector );
gProp.pSLines->PaintLines( pDev, gProp );
DELETEZ( gProp.pSLines );
- gProp.pSFlyOnlyDraw = 0;
+ gProp.pSFlyOnlyDraw = nullptr;
- gProp.pSFlyMetafileOut = 0;
+ gProp.pSFlyMetafileOut = nullptr;
gProp.bSFlyMetafile = false;
::SetOutDevAndWin( pSh, pOld, pWin, nZoom );
@@ -7736,7 +7736,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
pNoteURL->FillImageMap( pMap, pFly->Frm().Pos(), aMap );
delete pNoteURL;
- pNoteURL = NULL;
+ pNoteURL = nullptr;
}
gProp.pSGlobalShell = pOldGlobal;
}
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 898b85bcc6b4..f32e2b263218 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -190,7 +190,7 @@ void SwSectionFrm::DelEmpty( bool bRemove )
if( !GetFollow() && !pMaster->IsColLocked() )
pMaster->InvalidateSize();
}
- SetFollow(0);
+ SetFollow(nullptr);
if( pUp )
{
Frm().Height( 0 );
@@ -205,7 +205,7 @@ void SwSectionFrm::DelEmpty( bool bRemove )
}
else if( getRootFrm() )
getRootFrm()->InsertEmptySct( this );
- m_pSection = NULL; // like this a reanimation is virtually impossible though
+ m_pSection = nullptr; // like this a reanimation is virtually impossible though
}
}
@@ -223,7 +223,7 @@ void SwSectionFrm::_Cut( bool bRemove )
SwPageFrm *pPage = FindPageFrm();
InvalidatePage( pPage );
SwFrm *pFrm = GetNext();
- SwFrm* pPrepFrm = NULL;
+ SwFrm* pPrepFrm = nullptr;
while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() )
pFrm = pFrm->GetNext();
if( pFrm )
@@ -244,7 +244,7 @@ void SwSectionFrm::_Cut( bool bRemove )
{
InvalidateNextPos();
// Someone has to take over the retouching: predecessor or Upper
- if ( 0 != (pFrm = GetPrev()) )
+ if ( nullptr != (pFrm = GetPrev()) )
{ pFrm->SetRetouche();
pFrm->Prepare( PREP_WIDOWS_ORPHANS );
if ( pFrm->IsContentFrm() )
@@ -269,7 +269,7 @@ void SwSectionFrm::_Cut( bool bRemove )
{
pUp->Cut();
SwFrm::DestroyFrm(pUp);
- pUp = NULL;
+ pUp = nullptr;
}
}
if( pPrepFrm )
@@ -310,7 +310,7 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
if ( pTableFrm &&
pSect->IsAnLower( pTableFrm ) )
{
- pSect = 0;
+ pSect = nullptr;
}
}
@@ -324,7 +324,7 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
// for the content of the next column to be moved correctly to the
// newly created pSect by the InsertGroup
SwColumnFrm *pCol = static_cast<SwColumnFrm*>(pParent->GetUpper());
- while( !pSibling && 0 != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
+ while( !pSibling && nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
pSibling = static_cast<SwLayoutFrm*>(static_cast<SwColumnFrm*>(pCol)->Lower())->Lower();
if( pSibling )
{
@@ -332,7 +332,7 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
// be attached to the pSibling-chain in order to be
// taken along
SwFrm *pTmp = pSibling;
- while ( 0 != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
+ while ( nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
{
while ( pTmp->GetNext() )
pTmp = pTmp->GetNext();
@@ -347,7 +347,7 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
// if pParent is decomposed into two parts, its Follow has to be attached
// to the new second part
pSect->SetFollow( static_cast<SwSectionFrm*>(pParent)->GetFollow() );
- static_cast<SwSectionFrm*>(pParent)->SetFollow( NULL );
+ static_cast<SwSectionFrm*>(pParent)->SetFollow( nullptr );
if( pSect->GetFollow() )
pParent->_InvalidateSize();
@@ -364,7 +364,7 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
}
}
else
- InsertGroupBefore( pParent, pSibling, NULL );
+ InsertGroupBefore( pParent, pSibling, nullptr );
_InvalidateAll();
SwPageFrm *pPage = FindPageFrm();
@@ -452,7 +452,7 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
::RestoreContent( pTmp, pLay, pLast, true );
}
SetFollow( pNxt->GetFollow() );
- pNxt->SetFollow( NULL );
+ pNxt->SetFollow( nullptr );
pNxt->Cut();
SwFrm::DestroyFrm(pNxt);
InvalidateSize();
@@ -483,7 +483,7 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres )
pNew->InsertBehind( pSect->GetUpper(), pSect );
pNew->Init();
SWRECTFN( this )
- (pNew->*fnRect->fnMakePos)( NULL, pSect, true );
+ (pNew->*fnRect->fnMakePos)( nullptr, pSect, true );
// OD 25.03.2003 #108339# - restore content:
// determine layout frame for restoring content after the initialization
// of the section frame. In the section initialization the columns are
@@ -493,13 +493,13 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres )
// Search for last layout frame, e.g. for columned sections.
while( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
pLay = static_cast<SwLayoutFrm*>(pLay->Lower());
- ::RestoreContent( pSav, pLay, NULL, true );
+ ::RestoreContent( pSav, pLay, nullptr, true );
}
_InvalidateSize();
if( HasFollow() )
{
pNew->SetFollow( GetFollow() );
- SetFollow( NULL );
+ SetFollow( nullptr );
}
return true;
}
@@ -547,23 +547,23 @@ static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd )
}
const SwFrm* pFrm = pLay;
- SwContentFrm *pContentFrm = 0;
+ SwContentFrm *pContentFrm = nullptr;
bool bGoingUp = true;
do {
- const SwFrm *p = 0;
+ const SwFrm *p = nullptr;
bool bGoingFwdOrBwd = false;
- bool bGoingDown = !bGoingUp && ( 0 != ( p = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm)->Lower() : 0 ) );
+ bool bGoingDown = !bGoingUp && ( nullptr != ( p = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm)->Lower() : nullptr ) );
if ( !bGoingDown )
{
- bGoingFwdOrBwd = ( 0 != ( p = pFrm->IsFlyFrm() ?
+ bGoingFwdOrBwd = ( nullptr != ( p = pFrm->IsFlyFrm() ?
( bFwd ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink() ) :
( bFwd ? pFrm->GetNext() :pFrm->GetPrev() ) ) );
if ( !bGoingFwdOrBwd )
{
- bGoingUp = (0 != (p = pFrm->GetUpper() ) );
+ bGoingUp = (nullptr != (p = pFrm->GetUpper() ) );
if ( !bGoingUp )
- return 0;
+ return nullptr;
}
}
@@ -574,7 +574,7 @@ static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd )
p = p->GetNext();
pFrm = p;
- } while ( 0 == (pContentFrm = (pFrm->IsContentFrm() ? const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pFrm)) : 0) ));
+ } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pFrm)) : nullptr) ));
return pContentFrm;
}
@@ -589,8 +589,8 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
SwFrm* pPrv = pDel->GetPrev();
SwLayoutFrm* pUp = pDel->GetUpper();
// OD 27.03.2003 #i12711# - initialize local pointer variables.
- SwSectionFrm* pPrvSct = NULL;
- SwSectionFrm* pNxtSct = NULL;
+ SwSectionFrm* pPrvSct = nullptr;
+ SwSectionFrm* pNxtSct = nullptr;
SwSectionFormat* pParent = static_cast<SwSectionFormat*>(pDel->GetFormat())->GetParent();
if( pDel->IsInTab() && pParent )
{
@@ -598,7 +598,7 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
// If we are within a table, we can only have broken up sections that
// are inside as well, but not a section that contains the whole table.
if( pTab->IsInSct() && pParent == pTab->FindSctFrm()->GetFormat() )
- pParent = NULL;
+ pParent = nullptr;
}
// If our Format has a parent, we have probably broken up another
// SectionFrm, which has to be checked. To do so we first acquire the
@@ -609,18 +609,18 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
if ( pParent )
{
SwFrm* pPrvContent = lcl_GetNextContentFrm( pDel, false );
- pPrvSct = pPrvContent ? pPrvContent->FindSctFrm() : NULL;
+ pPrvSct = pPrvContent ? pPrvContent->FindSctFrm() : nullptr;
SwFrm* pNxtContent = lcl_GetNextContentFrm( pDel, true );
- pNxtSct = pNxtContent ? pNxtContent->FindSctFrm() : NULL;
+ pNxtSct = pNxtContent ? pNxtContent->FindSctFrm() : nullptr;
}
else
{
- pParent = NULL;
- pPrvSct = pNxtSct = NULL;
+ pParent = nullptr;
+ pPrvSct = pNxtSct = nullptr;
}
// Now the content is put aside and the frame is destroyed
- SwFrm *pSave = bSave ? ::SaveContent( pDel ) : NULL;
+ SwFrm *pSave = bSave ? ::SaveContent( pDel ) : nullptr;
bool bOldFootnote = true;
if( pSave && pUp->IsFootnoteFrm() )
{
@@ -634,9 +634,9 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
if( pNxtSct && pNxtSct->GetFormat() == pParent )
{ // Here we can insert outselves at the beginning
pUp = FIRSTLEAF( pNxtSct );
- pPrv = NULL;
+ pPrv = nullptr;
if( pPrvSct && !( pPrvSct->GetFormat() == pParent ) )
- pPrvSct = NULL; // In order that nothing is merged
+ pPrvSct = nullptr; // In order that nothing is merged
}
else if( pPrvSct && pPrvSct->GetFormat() == pParent )
{ // Wonderful, here we can insert ourselves at the end
@@ -649,7 +649,7 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
}
// In order to perform the insertion after the last one
pPrv = pUp->GetLastLower();
- pPrvSct = NULL; // Such that nothing is merged
+ pPrvSct = nullptr; // Such that nothing is merged
}
else
{
@@ -666,9 +666,9 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
SWRECTFN( pUp )
(pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, true );
pUp = FIRSTLEAF( pPrvSct );
- pPrv = NULL;
+ pPrv = nullptr;
}
- pPrvSct = NULL; // Such that nothing will be merged
+ pPrvSct = nullptr; // Such that nothing will be merged
}
}
// The content is going to be inserted..
@@ -762,7 +762,7 @@ const SwSectionFormat* SwSectionFrm::_GetEndSectFormat() const
if( dynamic_cast< const SwSectionFormat *>( pFormat->GetRegisteredIn()) != nullptr )
pFormat = static_cast<const SwSectionFormat*>(pFormat->GetRegisteredIn());
else
- return NULL;
+ return nullptr;
}
return pFormat;
}
@@ -799,8 +799,8 @@ static void lcl_FindContentFrm( SwContentFrm* &rpContentFrm, SwFootnoteFrm* &rpF
SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode )
{
- SwContentFrm *pRet = NULL;
- SwFootnoteFrm *pFootnoteFrm = NULL;
+ SwContentFrm *pRet = nullptr;
+ SwFootnoteFrm *pFootnoteFrm = nullptr;
SwSectionFrm *pSect = this;
if( nMode )
{
@@ -863,7 +863,7 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
"InsertEndnotes: Where's my column?" );
// i73332: Columned section in endnote
- SwColumnFrm* pCol = 0;
+ SwColumnFrm* pCol = nullptr;
if(pSect->Lower() && pSect->Lower()->IsColumnFrm())
pCol = static_cast<SwColumnFrm*>(pSect->Lower());
@@ -886,7 +886,7 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
if( pLayouter )
pLayouter->CollectEndnote( pRet );
else
- return 0;
+ return nullptr;
}
else
return pRet; // Found
@@ -897,10 +897,10 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
}
rpSect = pSect;
- pSect = pLayouter ? pSect->GetFollow() : NULL;
+ pSect = pLayouter ? pSect->GetFollow() : nullptr;
rbEmpty = true;
}
- return NULL;
+ return nullptr;
}
static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow )
@@ -927,7 +927,7 @@ static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow )
if( bFollow )
pSect = pSect->GetFollow();
else
- pSect = NULL;
+ pSect = nullptr;
}
}
@@ -943,7 +943,7 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
// pSect is the last sectionfrm without endnotes or the this-pointer
// the first sectionfrm with endnotes may be destroyed, when the endnotes
// is cutted
- while( 0 != (pFootnote = lcl_FindEndnote( pSect, bEmpty, pLayouter )) )
+ while( nullptr != (pFootnote = lcl_FindEndnote( pSect, bEmpty, pLayouter )) )
pLayouter->CollectEndnote( pFootnote );
if( pLayouter->HasEndnotes() )
lcl_ColumnRefresh( this, true );
@@ -992,7 +992,7 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
SwSectionFrm *pSect = this;
bool bEmpty = false;
SwLayoutFrm* pFootnote = IsEndnAtEnd() ?
- lcl_FindEndnote( pSect, bEmpty, NULL ) : NULL;
+ lcl_FindEndnote( pSect, bEmpty, nullptr ) : nullptr;
if( pFootnote )
{
pFootnote = pFootnote->FindFootnoteBossFrm();
@@ -1096,7 +1096,7 @@ class ExtraFormatToPositionObjs
{
// release keep locked position of lower floating screen objects
SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : 0L;
+ SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -1127,10 +1127,10 @@ class ExtraFormatToPositionObjs
}
}
SwLayoutFrm* pLayoutFrm = dynamic_cast<SwLayoutFrm*>(&rFrm);
- if ( pLayoutFrm != 0 )
+ if ( pLayoutFrm != nullptr )
{
SwFrm* pLowerFrm = pLayoutFrm->GetLower();
- while ( pLowerFrm != 0 )
+ while ( pLowerFrm != nullptr )
{
InitObjs( *pLowerFrm );
@@ -1190,7 +1190,7 @@ class ExtraFormatToPositionObjs
// keep locked position of lower floating screen objects
SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : 0L;
+ SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -1223,7 +1223,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
SWRECTFN( this )
if ( !mbValidPrtArea )
{
- PROTOCOL( this, PROT_PRTAREA, 0, 0 )
+ PROTOCOL( this, PROT_PRTAREA, 0, nullptr )
mbValidPrtArea = true;
SwTwips nUpper = CalcUpperSpace();
@@ -1243,7 +1243,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
if ( !mbValidSize )
{
- PROTOCOL_ENTER( this, PROT_SIZE, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_SIZE, 0, nullptr )
const long nOldHeight = (Frm().*fnRect->fnGetHeight)();
bool bOldLock = IsColLocked();
ColLock();
@@ -1275,7 +1275,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
// which still have a width of 0.
const bool bHasColumns = Lower() && Lower()->IsColumnFrm();
if ( bHasColumns && Lower()->GetNext() )
- AdjustColumns( 0, false );
+ AdjustColumns( nullptr, false );
if( GetUpper() )
{
@@ -1442,7 +1442,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
// Inside a section, in tables, or sections of headers/footers, there can be only
// one column shift be made, one of the above shortcuts should have applied!
if( GetUpper()->IsInTab() || FindFooterOrHeader() )
- return 0;
+ return nullptr;
SwSectionFrm *pSect = FindSctFrm();
bool bWrongPage = false;
@@ -1466,7 +1466,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
{
SwFrm* pTmp;
if( !pSect->GetUpper()->IsColBodyFrm() ||
- 0 == ( pTmp = pSect->GetUpper()->GetUpper()->GetNext() ) )
+ nullptr == ( pTmp = pSect->GetUpper()->GetUpper()->GetNext() ) )
pTmp = pSect->FindPageFrm()->GetNext();
if( pTmp ) // is now the next column or page
{
@@ -1501,11 +1501,11 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
SwLayoutFrm *pLayLeaf;
// A shortcut for TabFrms such that not all cells need to be visited
if( bWrongPage )
- pLayLeaf = 0;
+ pLayLeaf = nullptr;
else if( IsTabFrm() )
{
SwContentFrm* pTmpCnt = static_cast<SwTabFrm*>(this)->FindLastContent();
- pLayLeaf = pTmpCnt ? pTmpCnt->GetUpper() : 0;
+ pLayLeaf = pTmpCnt ? pTmpCnt->GetUpper() : nullptr;
}
else
{
@@ -1517,7 +1517,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
}
- SwLayoutFrm *pOldLayLeaf = 0; // Such that in case of newly
+ SwLayoutFrm *pOldLayLeaf = nullptr; // Such that in case of newly
// created pages, the search is
// not started over at the beginning
@@ -1531,7 +1531,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
SwPageFrm* pNxtPg = pLayLeaf->FindPageFrm();
if ( !bFootnotePage && pNxtPg->IsFootnotePage() )
{ // If I reached the end note pages it's over
- pLayLeaf = 0;
+ pLayLeaf = nullptr;
continue;
}
// Once inBody always inBody, don't step into tables and not into other sections
@@ -1550,9 +1550,9 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
{
if( bWrongPage )
break; // there's a column between me and my right page
- pLayLeaf = 0;
+ pLayLeaf = nullptr;
bWrongPage = true;
- pOldLayLeaf = 0;
+ pOldLayLeaf = nullptr;
continue;
}
}
@@ -1592,7 +1592,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() );
pNew->Init();
SWRECTFN( pNew )
- (pNew->*fnRect->fnMakePos)( pLayLeaf, NULL, true );
+ (pNew->*fnRect->fnMakePos)( pLayLeaf, nullptr, true );
// If our section frame has a successor then that has to be
// moved behind the new Follow of the section frames
@@ -1600,7 +1600,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
if( pTmp && pTmp != pSect->GetFollow() )
{
SwFlowFrm* pNxt;
- SwContentFrm* pNxtContent = NULL;
+ SwContentFrm* pNxtContent = nullptr;
if( pTmp->IsContentFrm() )
{
pNxt = static_cast<SwContentFrm*>(pTmp);
@@ -1616,7 +1616,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
pNxt = static_cast<SwTabFrm*>(pTmp);
}
- while( !pNxtContent && 0 != ( pTmp = pTmp->GetNext() ) )
+ while( !pNxtContent && nullptr != ( pTmp = pTmp->GetNext() ) )
{
if( pTmp->IsContentFrm() )
pNxtContent = static_cast<SwContentFrm*>(pTmp);
@@ -1658,7 +1658,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
else if( GetUpper()->IsColBodyFrm() )
pCol = GetUpper()->GetUpper();
else
- pCol = NULL;
+ pCol = nullptr;
bool bJump = false;
if( pCol )
{
@@ -1682,7 +1682,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pCol = static_cast<SwLayoutFrm*>(pCol->Lower());
}
else
- pCol = NULL;
+ pCol = nullptr;
}
if( bJump ) // Did we skip a blank page?
@@ -1714,7 +1714,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
{
SwFrm *pPrv;
- if( 0 != ( pPrv = pSect->GetIndPrev() ) )
+ if( nullptr != ( pPrv = pSect->GetIndPrev() ) )
{
// Mooching, half dead SectionFrms shouldn't confuse us
while( pPrv && pPrv->IsSctFrm() && !static_cast<SwSectionFrm*>(pPrv)->GetSection() )
@@ -1728,7 +1728,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
const bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
- SwLayoutFrm *pPrevLeaf = 0;
+ SwLayoutFrm *pPrevLeaf = nullptr;
while ( pLayLeaf )
{
@@ -1777,7 +1777,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pLayLeaf = pPrevLeaf;
}
- SwSectionFrm* pNew = NULL;
+ SwSectionFrm* pNew = nullptr;
// At first go to the end of the layout sheet
SwFrm *pTmp = pLayLeaf->Lower();
if( pTmp )
@@ -1797,7 +1797,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( !pNew )
{
pNew = new SwSectionFrm( *pSect, true );
- pNew->InsertBefore( pLayLeaf, NULL );
+ pNew->InsertBefore( pLayLeaf, nullptr );
pNew->Init();
SWRECTFN( pNew )
(pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), true );
@@ -2127,7 +2127,7 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
if( IsInTab() || ( !IsInDocBody() && FindFooterOrHeader() ) )
return false; // It doesn't work in tables/headers/footers
if( IsInFly() ) // In column based or chained frames
- return 0 != const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE );
+ return nullptr != const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE );
return true;
}
@@ -2140,7 +2140,7 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
*/
SwFrm* SwFrm::_GetIndPrev() const
{
- SwFrm *pRet = NULL;
+ SwFrm *pRet = nullptr;
// #i79774#
// Do not assert, if the frame has a direct previous frame, because it
// could be an empty section frame. The caller has to assure, that the
@@ -2149,7 +2149,7 @@ SwFrm* SwFrm::_GetIndPrev() const
OSL_ENSURE( /*!pPrev &&*/ IsInSct(), "Why?" );
const SwFrm* pSct = GetUpper();
if( !pSct )
- return NULL;
+ return nullptr;
if( pSct->IsSctFrm() )
pRet = pSct->GetIndPrev();
else if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() )
@@ -2163,7 +2163,7 @@ SwFrm* SwFrm::_GetIndPrev() const
OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
"GetIndPrev(): Where's the body?");
if( static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)->Lower())->Lower() )
- return NULL;
+ return nullptr;
pCol = pCol->GetPrev();
}
pRet = pSct->GetIndPrev();
@@ -2180,7 +2180,7 @@ SwFrm* SwFrm::_GetIndNext()
OSL_ENSURE( !mpNext && IsInSct(), "Why?" );
SwFrm* pSct = GetUpper();
if( !pSct )
- return NULL;
+ return nullptr;
if( pSct->IsSctFrm() )
return pSct->GetIndNext();
if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() )
@@ -2193,12 +2193,12 @@ SwFrm* SwFrm::_GetIndNext()
OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
"GetIndNext(): Where's the body?");
if( static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pCol)->Lower())->Lower() )
- return NULL;
+ return nullptr;
pCol = pCol->GetNext();
}
return pSct->GetIndNext();
}
- return NULL;
+ return nullptr;
}
bool SwSectionFrm::IsDescendantFrom( const SwSectionFormat* pFormat ) const
@@ -2439,7 +2439,7 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const
return false;
const SwFootnoteContFrm* pCont = ContainsFootnoteCont();
if( !IsEndnAtEnd() )
- return 0 != pCont;
+ return nullptr != pCont;
bool bRet = false;
while( pCont && !bRet )
{
@@ -2454,7 +2454,7 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const
/// Check every Column for FootnoteContFrms.
SwFootnoteContFrm* SwSectionFrm::ContainsFootnoteCont( const SwFootnoteContFrm* pCont ) const
{
- SwFootnoteContFrm* pRet = NULL;
+ SwFootnoteContFrm* pRet = nullptr;
const SwLayoutFrm* pLay;
if( pCont )
{
@@ -2465,7 +2465,7 @@ SwFootnoteContFrm* SwSectionFrm::ContainsFootnoteCont( const SwFootnoteContFrm*
else if( Lower() && Lower()->IsColumnFrm() )
pLay = static_cast<const SwLayoutFrm*>(Lower());
else
- pLay = NULL;
+ pLay = nullptr;
while ( !pRet && pLay )
{
if( pLay->Lower() && pLay->Lower()->GetNext() )
diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx
index ae8cd8235eba..ca1ad036e209 100644
--- a/sw/source/core/layout/softpagebreak.cxx
+++ b/sw/source/core/layout/softpagebreak.cxx
@@ -118,7 +118,7 @@ bool SwTableLine::hasSoftPageBreak() const
// No soft page break at the first page of the document
if( pPage && !pPage->GetPrev() )
return false;
- const SwContentFrm* pFirst = pPage ? pPage->FindFirstBodyContent() : NULL;
+ const SwContentFrm* pFirst = pPage ? pPage->FindFirstBodyContent() : nullptr;
// No soft page break for
// tables which does not contain the first body content of the page
if( !pFirst || !pTab->IsAnLower( pFirst->FindTabFrm() ) )
diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx
index 2a6dfb1180f9..d01f6d583af7 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -46,7 +46,7 @@ size_t SwSortedObjs::size() const
SwAnchoredObject* SwSortedObjs::operator[]( size_t _nIndex ) const
{
- SwAnchoredObject* pAnchoredObj = 0L;
+ SwAnchoredObject* pAnchoredObj = nullptr;
if ( _nIndex >= size() )
{
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 462aef106c8c..1e1db225397d 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -226,8 +226,8 @@ void SwFrm::CheckDirChange()
}
SwFrm* pFrm = static_cast<SwLayoutFrm*>(this)->Lower();
- const SwFormatCol* pCol = NULL;
- SwLayoutFrm* pBody = 0;
+ const SwFormatCol* pCol = nullptr;
+ SwLayoutFrm* pBody = nullptr;
if( pFrm )
{
if( IsPageFrm() )
@@ -367,7 +367,7 @@ void SwFrm::DestroyImpl()
}
}
delete mpDrawObjs;
- mpDrawObjs = 0;
+ mpDrawObjs = nullptr;
}
}
@@ -422,7 +422,7 @@ SwContentFrm::SwContentFrm( SwContentNode * const pContent, SwFrm* pSib ) :
void SwContentFrm::DestroyImpl()
{
const SwContentNode* pCNd;
- if( 0 != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) &&
+ if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) &&
!pCNd->GetDoc()->IsInDtor() )
{
//Unregister from root if I'm still in turbo there.
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 8378ab0b7323..06cc87d79f9e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -82,7 +82,7 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib )
//Create the lines and insert them.
const SwTableLines &rLines = rTab.GetTabLines();
- SwFrm *pTmpPrev = 0;
+ SwFrm *pTmpPrev = nullptr;
for ( size_t i = 0; i < rLines.size(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i], this );
@@ -140,7 +140,7 @@ SwTabFrm* SwTabFrm::GetFollowFlowLineFor()
if (pPrevTabFrm->HasFollowFlowLine() && pPrevTabFrm->GetFollow() == this)
return pPrevTabFrm;
}
- return NULL;
+ return nullptr;
}
void SwTabFrm::DestroyImpl()
@@ -157,12 +157,12 @@ void SwTabFrm::DestroyImpl()
// deleted.
if ( this == pColumnCacheLastTabFrm )
{
- pColumnCacheLastTable = NULL;
- pColumnCacheLastTabFrm = NULL;
- pColumnCacheLastCellFrm= NULL;
- pRowCacheLastTable = NULL;
- pRowCacheLastTabFrm = NULL;
- pRowCacheLastCellFrm= NULL;
+ pColumnCacheLastTable = nullptr;
+ pColumnCacheLastTabFrm = nullptr;
+ pColumnCacheLastCellFrm= nullptr;
+ pRowCacheLastTable = nullptr;
+ pRowCacheLastTabFrm = nullptr;
+ pRowCacheLastCellFrm= nullptr;
}
SwLayoutFrm::DestroyImpl();
@@ -250,7 +250,7 @@ static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpR
// additionally the objects are moved 'out of range'.
static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
const bool _bMoveObjsOutOfRange = false,
- SwPageFrm* _pPageFrm = 0L )
+ SwPageFrm* _pPageFrm = nullptr )
{
// determine page frame, if needed
if ( !_pPageFrm )
@@ -427,7 +427,7 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine )
{
// move complete row:
pTmpSourceRow->RemoveFromLayout();
- pTmpSourceRow->InsertBefore( pCurrDestCell, 0 );
+ pTmpSourceRow->InsertBefore( pCurrDestCell, nullptr );
}
pTmpSourceRow = static_cast<SwRowFrm*>(pCurrSourceCell->Lower());
@@ -461,7 +461,7 @@ static void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm&
{
SwFootnoteBossFrm* pOldBoss = rSource.FindFootnoteBossFrm( true );
SwFootnoteBossFrm* pNewBoss = rDest.FindFootnoteBossFrm( true );
- rRowFrm.MoveLowerFootnotes( 0, pOldBoss, pNewBoss, true );
+ rRowFrm.MoveLowerFootnotes( nullptr, pOldBoss, pNewBoss, true );
}
}
@@ -548,7 +548,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
pNewRow->SetFollowFlowRow( true );
pNewRow->SetFollowRow( pTmpLastLineRow->GetFollowRow() );
pTmpLastLineRow->SetFollowRow( pNewRow );
- pNewRow->InsertBehind( pCurrFollowFlowLineCell, 0 );
+ pNewRow->InsertBehind( pCurrFollowFlowLineCell, nullptr );
pTmpLastLineRow = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
}
@@ -558,7 +558,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
SwRowFrm* pTmp = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pTmpLastLineRow );
pTmpLastLineRow->RemoveFromLayout();
- pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, 0 );
+ pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, nullptr );
pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
pTmpLastLineRow = pTmp;
@@ -581,7 +581,7 @@ static void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine )
{
SwRowFrm* pRowFrm = static_cast<SwRowFrm*>(pCurrMasterCell->GetLastLower());
- if ( NULL != pRowFrm->GetPrev() && !pRowFrm->ContainsContent() )
+ if ( nullptr != pRowFrm->GetPrev() && !pRowFrm->ContainsContent() )
{
OSL_ENSURE( pRowFrm->GetFollowRow(), "Deleting row frame without follow" );
@@ -642,7 +642,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
// Lock this tab frame and its follow
bool bUnlockMaster = false;
bool bUnlockFollow = false;
- SwTabFrm* pMaster = rTab.IsFollow() ? rTab.FindMaster() : 0;
+ SwTabFrm* pMaster = rTab.IsFollow() ? rTab.FindMaster() : nullptr;
if ( pMaster && !pMaster->IsJoinLocked() )
{
bUnlockMaster = true;
@@ -789,7 +789,7 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow )
}
pCurrentRowFrm = bNextRow ?
static_cast<const SwRowFrm*>(pCurrentRowFrm->GetNext() ) :
- 0;
+ nullptr;
}
return nRet;
@@ -1102,7 +1102,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
*GetTable()->GetTabLines()[ nRowCount ], this );
pHeadline->SetRepeatedHeadline( true );
bDontCreateObjects = false;
- pHeadline->InsertBefore( pFoll, 0 );
+ pHeadline->InsertBefore( pFoll, nullptr );
SwPageFrm *pPage = pHeadline->FindPageFrm();
const SwFrameFormats *pTable = GetFormat()->GetDoc()->GetSpzFrameFormats();
@@ -1122,8 +1122,8 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
}
}
- SwRowFrm* pLastRow = 0; // will point to the last remaining line in master
- SwRowFrm* pFollowRow = 0; // points to either the follow flow line of the
+ SwRowFrm* pLastRow = nullptr; // will point to the last remaining line in master
+ SwRowFrm* pFollowRow = nullptr; // points to either the follow flow line of the
// first regular line in the follow
if ( bSplitRowAllowed )
@@ -1367,7 +1367,7 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave,
// FME 2007-08-30 #i81146# new loop control
int nLoopControlRuns = 0;
const int nLoopControlMax = 10;
- const SwModify* pLoopControlCond = 0;
+ const SwModify* pLoopControlCond = nullptr;
while ( pCnt && pDontLeave->IsAnLower( pCnt ) )
{
@@ -1447,7 +1447,7 @@ static bool lcl_InnerCalcLayout( SwFrm *pFrm,
long nBottom,
bool _bOnlyRowsAndCells )
{
- vcl::RenderContext* pRenderContext = pFrm->getRootFrm()->GetCurrShell() ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : 0;
+ vcl::RenderContext* pRenderContext = pFrm->getRootFrm()->GetCurrShell() ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr;
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
bool bRet = false;
@@ -1681,13 +1681,13 @@ SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm )
namespace {
bool AreAllRowsKeepWithNext( const SwRowFrm* pFirstRowFrm )
{
- bool bRet = pFirstRowFrm != 0 &&
+ bool bRet = pFirstRowFrm != nullptr &&
pFirstRowFrm->ShouldRowKeepWithNext();
- while ( bRet && pFirstRowFrm->GetNext() != 0 )
+ while ( bRet && pFirstRowFrm->GetNext() != nullptr )
{
pFirstRowFrm = dynamic_cast<const SwRowFrm*>(pFirstRowFrm->GetNext());
- bRet = pFirstRowFrm != 0 &&
+ bRet = pFirstRowFrm != nullptr &&
pFirstRowFrm->ShouldRowKeepWithNext();
}
@@ -1708,7 +1708,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
return;
}
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
LockJoin(); //I don't want to be destroyed on the way.
SwLayNotify aNotify( this ); //does the notification in the DTor
@@ -1808,7 +1808,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( nRepeat )
{
if( GetFollow() && !GetFollow()->IsJoinLocked() &&
- 0 == GetFirstNonHeadlineRow() )
+ nullptr == GetFirstNonHeadlineRow() )
{
if ( HasFollowFlowLine() )
RemoveFollowFlowLine();
@@ -1878,7 +1878,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
aNotify.SetLowersComplete( false );
}
SwFrm *pPre;
- if ( bKeep || (0 != (pPre = FindPrev()) &&
+ if ( bKeep || (nullptr != (pPre = FindPrev()) &&
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
m_bCalcLowers = true;
@@ -1941,7 +1941,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
pMaster->InvalidatePos();
}
}
- SwFootnoteBossFrm *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrm( true ) : 0;
+ SwFootnoteBossFrm *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrm( true ) : nullptr;
bool bReformat;
if ( MoveBwd( bReformat ) )
{
@@ -1949,7 +1949,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
bMovedBwd = true;
aNotify.SetLowersComplete( false );
if ( bFootnotesInDoc )
- MoveLowerFootnotes( 0, pOldBoss, 0, true );
+ MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true );
if ( bReformat || bKeep )
{
long nOldTop = (Frm().*fnRect->fnGetTop)();
@@ -1971,7 +1971,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
mbValidPrtArea = false;
Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
}
- lcl_RecalcTable( *this, 0, aNotify );
+ lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
if ( bKeep && KEEPTAB )
{
@@ -1982,7 +1982,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// Thus, find next content, table or section
// and, if a section is found, get its first
// content.
- if ( 0 != sw_FormatNextContentForKeep( this ) && !GetNext() )
+ if ( nullptr != sw_FormatNextContentForKeep( this ) && !GetNext() )
{
mbValidPos = false;
}
@@ -2077,7 +2077,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
const bool bMoveFootnotes = bFootnotesInDoc && !GetFollow()->IsJoinLocked();
- SwFootnoteBossFrm *pOldBoss = 0;
+ SwFootnoteBossFrm *pOldBoss = nullptr;
if ( bMoveFootnotes )
pOldBoss = pRowToMove->FindFootnoteBossFrm( true );
@@ -2096,7 +2096,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
//Displace the footnotes!
if ( bMoveFootnotes )
- if ( static_cast<SwLayoutFrm*>(pRowToMove)->MoveLowerFootnotes( 0, pOldBoss, FindFootnoteBossFrm( true ), true ) )
+ if ( static_cast<SwLayoutFrm*>(pRowToMove)->MoveLowerFootnotes( nullptr, pOldBoss, FindFootnoteBossFrm( true ), true ) )
GetUpper()->Calc(pRenderContext);
pRowToMove = pNextRow;
@@ -2162,7 +2162,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if (m_bCalcLowers)
{
- lcl_RecalcTable( *this, 0, aNotify );
+ lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
}
@@ -2185,7 +2185,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if (m_bCalcLowers && IsValid())
{
- lcl_RecalcTable( *this, 0, aNotify );
+ lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
}
@@ -2204,7 +2204,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if (m_bCalcLowers && IsValid())
{
- lcl_RecalcTable( *this, 0, aNotify );
+ lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
if( !IsValid() )
@@ -2495,7 +2495,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
(Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
- lcl_RecalcTable( *this, 0, aNotify );
+ lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
}
@@ -2539,7 +2539,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
const IDocumentSettingAccess& rIDSA = GetFormat()->getIDocumentSettingAccess();
const bool bWrapAllowed = rIDSA.get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ||
- ( !IsInFootnote() && 0 == FindFooterOrHeader() );
+ ( !IsInFootnote() && nullptr == FindFooterOrHeader() );
if ( pPage->GetSortedObjs() && bWrapAllowed )
{
@@ -2614,7 +2614,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
// #148493# If bConsiderWrapOnObjPos is set,
// we want to consider the fly if it is located in the header and
// the table is located in the body:
- ( !bConsiderWrapOnObjPos || 0 != pThisHeaderFooterFrm || !pFlyHeaderFooterFrm->IsHeaderFrm() ) )
+ ( !bConsiderWrapOnObjPos || nullptr != pThisHeaderFooterFrm || !pFlyHeaderFooterFrm->IsHeaderFrm() ) )
bConsiderFly = false;
}
@@ -3033,7 +3033,7 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( nInvFlags & 0x40 )
_InvalidatePos();
SwFrm *pTmp;
- if ( 0 != (pTmp = GetIndNext()) )
+ if ( nullptr != (pTmp = GetIndNext()) )
{
if ( nInvFlags & 0x04 )
{
@@ -3044,7 +3044,7 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( nInvFlags & 0x10 )
pTmp->SetCompletePaint();
}
- if ( nInvFlags & 0x08 && 0 != (pTmp = GetPrev()) )
+ if ( nInvFlags & 0x08 && nullptr != (pTmp = GetPrev()) )
{
pTmp->_InvalidatePrt();
if ( pTmp->IsContentFrm() )
@@ -3072,8 +3072,8 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( IsFollow() )
{
// Delete remaining headlines:
- SwRowFrm* pLowerRow = 0;
- while ( 0 != ( pLowerRow = static_cast<SwRowFrm*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() )
+ SwRowFrm* pLowerRow = nullptr;
+ while ( nullptr != ( pLowerRow = static_cast<SwRowFrm*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() )
{
pLowerRow->Cut();
SwFrm::DestroyFrm(pLowerRow);
@@ -3219,8 +3219,8 @@ SwContentFrm *SwTabFrm::FindLastContent()
const SwFrm* pRow = pRet->GetUpper();
while ( pRow && !pRow->GetUpper()->IsTabFrm() )
pRow = pRow->GetUpper();
- const SwContentFrm* pContentFrm = pRow ? static_cast<const SwLayoutFrm*>(pRow)->ContainsContent() : NULL;
- pRet = 0;
+ const SwContentFrm* pContentFrm = pRow ? static_cast<const SwLayoutFrm*>(pRow)->ContainsContent() : nullptr;
+ pRet = nullptr;
while ( pContentFrm && static_cast<const SwLayoutFrm*>(pRow)->IsAnLower( pContentFrm ) )
{
@@ -3375,7 +3375,7 @@ void SwTabFrm::Cut()
{
InvalidateNextPos();
//Someone has to do the retouch: predecessor or upper
- if ( 0 != (pFrm = GetPrev()) )
+ if ( nullptr != (pFrm = GetPrev()) )
{ pFrm->SetRetouche();
pFrm->Prepare( PREP_WIDOWS_ORPHANS );
pFrm->_InvalidatePos();
@@ -3407,7 +3407,7 @@ void SwTabFrm::Cut()
if ( pUp )
{
OSL_ENSURE( !pUp->IsFootnoteFrm(), "Table in Footnote." );
- SwSectionFrm *pSct = 0;
+ SwSectionFrm *pSct = nullptr;
// #126020# - adjust check for empty section
// #130797# - correct fix #126020#
if ( !pUp->Lower() && pUp->IsInSct() &&
@@ -3503,7 +3503,7 @@ bool SwTabFrm::Prepare( const PrepareHint eHint, const void *, bool )
SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent)
: SwLayoutFrm( rLine.GetFrameFormat(), pSib )
, m_pTabLine( &rLine )
- , m_pFollowRow( 0 )
+ , m_pFollowRow( nullptr )
// #i29550#
, mnTopMarginForLowers( 0 )
, mnBottomMarginForLowers( 0 )
@@ -3518,7 +3518,7 @@ SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent)
//Create the boxes and insert them.
const SwTableBoxes &rBoxes = rLine.GetTabBoxes();
- SwFrm *pTmpPrev = 0;
+ SwFrm *pTmpPrev = nullptr;
for ( size_t i = 0; i < rBoxes.size(); ++i )
{
SwCellFrm *pNew = new SwCellFrm( *rBoxes[i], this, bInsertContent );
@@ -3552,7 +3552,7 @@ void SwRowFrm::RegistFlys( SwPageFrm *pPage )
void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if( bAttrSetChg )
{
@@ -3601,7 +3601,7 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
while( pTmp )
{
// #i26945# - consider follow text frames
- const SwSortedObjs* pObjs( 0L );
+ const SwSortedObjs* pObjs( nullptr );
bool bIsFollow( false );
if ( pTmp->IsTextFrm() && static_cast<const SwTextFrm*>(pTmp)->IsFollow() )
{
@@ -3613,7 +3613,7 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
if ( pTmpFrm->GetPrev() && pTmpFrm->GetPrev()->IsTextFrm() &&
static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() &&
static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() != pTmp )
- pMaster = 0;
+ pMaster = nullptr;
else
pMaster = pTmpFrm->FindMaster();
@@ -3728,7 +3728,7 @@ static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBor
// cell height.
static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
const bool _bConsiderObjs,
- const SwBorderAttrs *pAttrs = 0 )
+ const SwBorderAttrs *pAttrs = nullptr )
{
SWRECTFN( _pCell )
SwTwips nHeight = 0;
@@ -3958,7 +3958,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this );
const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this );
- const SwRowFrm* pPreviousRow = 0;
+ const SwRowFrm* pPreviousRow = nullptr;
// #i32456#
// In order to calculate the top printing area for the lower cell
@@ -3967,7 +3967,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// of this row. The best way to find the 'previous' row is to
// use the table structure:
const SwTable* pTable = pTabFrm->GetTable();
- const SwTableLine* pPrevTabLine = 0;
+ const SwTableLine* pPrevTabLine = nullptr;
const SwRowFrm* pTmpRow = this;
while ( pTmpRow && !pPrevTabLine )
@@ -3992,7 +3992,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
pTmpRow = pTmpRow->GetUpper()->GetUpper() &&
pTmpRow->GetUpper()->GetUpper()->IsRowFrm() ?
static_cast<const SwRowFrm*>( pTmpRow->GetUpper()->GetUpper() ) :
- 0;
+ nullptr;
}
}
@@ -4107,7 +4107,7 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
while ( pFrm )
{
- SwFrm* pNotify = 0;
+ SwFrm* pNotify = nullptr;
SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(pFrm);
@@ -4128,8 +4128,8 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
}
}
- SwCellFrm* pToAdjust = 0;
- SwFrm* pToAdjustRow = 0;
+ SwCellFrm* pToAdjust = nullptr;
+ SwFrm* pToAdjustRow = nullptr;
// If current frame is covered frame, we still want to adjust the
// height of the cell starting the row span
@@ -4412,7 +4412,7 @@ SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent)
else
{
const SwTableLines &rLines = rBox.GetTabLines();
- SwFrm *pTmpPrev = 0;
+ SwFrm *pTmpPrev = nullptr;
for ( size_t i = 0; i < rLines.size(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i], this, bInsertContent );
@@ -4738,7 +4738,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
// 1. sum of widths of cells up to this cell (in model)
const SwTableLine* pTabLine = GetTabBox()->GetUpper();
const SwTableBoxes& rBoxes = pTabLine->GetTabBoxes();
- const SwTableBox* pTmpBox = 0;
+ const SwTableBox* pTmpBox = nullptr;
SwTwips nSumWidth = 0;
size_t i = 0;
@@ -4823,11 +4823,11 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
// From now on, all operations are related to the table cell.
SWREFRESHFN( this )
- SwPageFrm* pPg = 0;
+ SwPageFrm* pPg = nullptr;
if ( !FindTabFrm()->IsRebuildLastLine() && text::VertOrientation::NONE != rOri.GetVertOrient() &&
// #158225# no vertical alignment of covered cells
!IsCoveredCell() &&
- (pPg = FindPageFrm())!=NULL )
+ (pPg = FindPageFrm())!=nullptr )
{
if ( !Lower()->IsContentFrm() && !Lower()->IsSctFrm() && !Lower()->IsTabFrm() )
{
@@ -4922,7 +4922,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if( bAttrSetChg )
static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, false, &pItem);
@@ -4993,7 +4993,7 @@ long SwCellFrm::GetLayoutRowSpan() const
if ( nRet < 1 )
{
const SwFrm* pRow = GetUpper();
- const SwTabFrm* pTab = pRow ? static_cast<const SwTabFrm*>(pRow->GetUpper()) : NULL;
+ const SwTabFrm* pTab = pRow ? static_cast<const SwTabFrm*>(pRow->GetUpper()) : nullptr;
if ( pTab && pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow() )
nRet = -nRet;
@@ -5186,7 +5186,7 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine )
( !pTmp->IsTextFrm() ||
!static_cast<const SwTextFrm*>(pTmp)->IsFollow() ) )
{
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace( NULL, pLast);
+ nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace( nullptr, pLast);
nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcLowerSpace();
}
// #115759# - consider additional lower
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 738da43a1505..ecf536ec64e8 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -68,7 +68,7 @@ namespace {
bool bBackgroundMatches = ( bInBackground && bSearchBackground ) ||
( !bInBackground && !bSearchBackground );
- const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0;
+ const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr;
if ( pFly && bBackgroundMatches &&
( ( pCMS && pCMS->m_bSetInReadOnly ) ||
!pFly->IsProtected() ) &&
@@ -132,11 +132,11 @@ public:
void Exit( const SwFlyFrm *pFly )
{
if ( pFly == pEntry )
- pEntry = pStk1 = pStk2 = 0;
+ pEntry = pStk1 = pStk2 = nullptr;
}
};
-static SwCrsrOszControl aOszCtrl = { 0, 0, 0 };
+static SwCrsrOszControl aOszCtrl = { nullptr, nullptr, nullptr };
/** Searches the ContentFrm owning the PrtArea containing the point. */
bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
@@ -406,7 +406,7 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c
pPage = pPage->GetNext();
}
else
- pPage = 0;
+ pPage = nullptr;
}
return !aSelList.isEmpty();
}
@@ -426,7 +426,7 @@ bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
Point aOldPoint = rPoint;
// search for page containing rPoint. The borders around the pages are considered
- const SwPageFrm* pPage = GetPageAtPos( rPoint, 0, true );
+ const SwPageFrm* pPage = GetPageAtPos( rPoint, nullptr, true );
// #i95626#
// special handling for <rPoint> beyond root frames area
@@ -557,7 +557,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
while ( aIter() && !bRet )
{
const SwVirtFlyDrawObj* pObj = static_cast<const SwVirtFlyDrawObj*>(aIter());
- const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0;
+ const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr;
if ( pFly && pFly->Frm().IsInside( rPoint ) &&
Frm().IsInside( pFly->Frm() ) )
{
@@ -639,7 +639,7 @@ typedef const SwContentFrm *(*GetNxtPrvCnt)( const SwContentFrm* );
/// Frame in repeated headline?
static bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
- const SwTabFrm** ppTFrm = 0 )
+ const SwTabFrm** ppTFrm = nullptr )
{
const SwTabFrm *pTab = pFrm->FindTabFrm();
if( ppTFrm )
@@ -687,7 +687,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
OSL_ENSURE( &pPam->GetNode() == pStart->GetNode(),
"lcl_UpDown doesn't work for others." );
- const SwContentFrm *pCnt = 0;
+ const SwContentFrm *pCnt = nullptr;
//We have to cheat a little bit during a table selection: Go to the
//beginning of the cell while going up and go to the end of the cell while
@@ -709,7 +709,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
static_cast<const SwCellFrm*>(pCell)->GetPreviousCell();
const SwContentFrm* pTmpStart = pStart;
- while ( pTmpCell && 0 != ( pTmpStart = pTmpCell->ContainsContent() ) )
+ while ( pTmpCell && nullptr != ( pTmpStart = pTmpCell->ContainsContent() ) )
{
pCell = pTmpCell;
pTmpCell = bFwd ?
@@ -729,7 +729,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
const SwTabFrm *pStTab = pStart->FindTabFrm();
- const SwTabFrm *pTable = 0;
+ const SwTabFrm *pTable = nullptr;
const bool bTab = pStTab || (pCnt && pCnt->IsInTab());
bool bEnd = !bTab;
@@ -747,7 +747,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
Point aCenter = aRect.Center();
nX = bVert ? aCenter.Y() : aCenter.X();
- pTable = pCnt ? pCnt->FindTabFrm() : 0;
+ pTable = pCnt ? pCnt->FindTabFrm() : nullptr;
if ( !pTable )
pTable = pStTab;
@@ -844,7 +844,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
pCntUp = pCntUp->GetUpper();
}
if ( !bSame )
- pCnt = 0;
+ pCnt = nullptr;
else if ( pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow() ) // i73332
{
pCnt = (*fnNxtPrv)( pCnt );
@@ -963,7 +963,7 @@ sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
{
OSL_ENSURE( pActualCrsr, "got no page cursor" );
SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode().
- GetContentNode()->getLayoutFrm( this, 0,
+ GetContentNode()->getLayoutFrm( this, nullptr,
pActualCrsr->GetPoint(),
false );
return pActFrm->FindPageFrm()->GetPhyPageNum();
@@ -978,7 +978,7 @@ sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
*/
sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
{
- vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : 0;
+ vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr;
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "No page available." );
SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
@@ -1045,11 +1045,11 @@ SwLayoutFrm *GetNextFrm( const SwLayoutFrm *pFrm )
{
SwLayoutFrm *pNext =
(pFrm->GetNext() && pFrm->GetNext()->IsLayoutFrm()) ?
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetNext())) : 0;
+ const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetNext())) : nullptr;
// #i39402# in case of an empty page
if(pNext && !pNext->ContainsContent())
pNext = (pNext->GetNext() && pNext->GetNext()->IsLayoutFrm()) ?
- static_cast<SwLayoutFrm*>(pNext->GetNext()) : 0;
+ static_cast<SwLayoutFrm*>(pNext->GetNext()) : nullptr;
return pNext;
}
@@ -1062,11 +1062,11 @@ SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm )
{
SwLayoutFrm *pPrev =
(pFrm->GetPrev() && pFrm->GetPrev()->IsLayoutFrm()) ?
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetPrev())) : 0;
+ const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetPrev())) : nullptr;
// #i39402# in case of an empty page
if(pPrev && !pPrev->ContainsContent())
pPrev = (pPrev->GetPrev() && pPrev->GetPrev()->IsLayoutFrm()) ?
- static_cast<SwLayoutFrm*>(pPrev->GetPrev()) : 0;
+ static_cast<SwLayoutFrm*>(pPrev->GetPrev()) : nullptr;
return pPrev;
}
@@ -1088,11 +1088,11 @@ bool GetFrmInPage( const SwContentFrm *pCnt, SwWhichPage fnWhichPage,
//First find the requested page, at first the current, then the one which
//was requests through fnWichPage.
const SwLayoutFrm *pLayoutFrm = pCnt->FindPageFrm();
- if ( !pLayoutFrm || (0 == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) )
+ if ( !pLayoutFrm || (nullptr == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) )
return false;
//Now the desired ContentFrm below the page
- if( 0 == (pCnt = (*fnPosPage)(pLayoutFrm)) )
+ if( nullptr == (pCnt = (*fnPosPage)(pLayoutFrm)) )
return false;
else
{
@@ -1158,13 +1158,13 @@ static const SwLayoutFrm* lcl_Inside( const SwContentFrm *pCnt, Point& rPt )
{
if( rPt.Y() >= pUp->Frm().Top() && rPt.Y() <= pUp->Frm().Bottom() )
return pUp;
- return NULL;
+ return nullptr;
}
if( pUp->IsFootnoteContFrm() )
- return pUp->Frm().IsInside( rPt ) ? pUp : NULL;
+ return pUp->Frm().IsInside( rPt ) ? pUp : nullptr;
pUp = pUp->GetUpper();
}
- return NULL;
+ return nullptr;
}
/** Search for the nearest Content to pass.
@@ -1195,7 +1195,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
pContent = pContent->GetNextContentFrm();
const SwContentFrm *pActual= pContent;
- const SwLayoutFrm *pInside = NULL;
+ const SwLayoutFrm *pInside = nullptr;
sal_uInt16 nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
Point aPoint = rPoint;
sal_uInt64 nDistance = SAL_MAX_UINT64;
@@ -1284,7 +1284,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
{
++nMaxPage;
if( !pStart->GetPrev()->IsLayoutFrm() )
- return 0;
+ return nullptr;
pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev());
pContent = pStart->IsInDocBody()
? pStart->ContainsContent()
@@ -1296,7 +1296,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
while ( pContent && !pContent->IsInDocBody() )
pContent = pContent->GetNextContentFrm();
if ( !pContent )
- return 0; // There is no document content yet!
+ return nullptr; // There is no document content yet!
}
}
else
@@ -1305,7 +1305,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
if ( pStart->GetPrev() )
{
if( !pStart->GetPrev()->IsLayoutFrm() )
- return 0;
+ return nullptr;
pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev());
pContent = pStart->ContainsContent();
}
@@ -1328,7 +1328,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{
const_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true;
- return 0;
+ return nullptr;
}
}
@@ -1494,7 +1494,7 @@ class DisableCallbackAction
*/
Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const
{
- vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : 0;
+ vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr;
// #123110# - disable creation of an action by a callback
// event during processing of this method. Needed because formatting is
// triggered by this method.
@@ -1623,7 +1623,7 @@ SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -1726,7 +1726,7 @@ bool SwFrm::WannaRightPage() const
return true;
const SwFrm *pFlow = pPage->FindFirstBodyContent();
- const SwPageDesc *pDesc = 0;
+ const SwPageDesc *pDesc = nullptr;
::boost::optional<sal_uInt16> oPgNum;
if ( pFlow )
{
@@ -1822,14 +1822,14 @@ sal_uInt16 SwFrm::GetVirtPageNum() const
//Because searching backwards needs a lot of time we search specific using
//the dependencies. From the PageDescs we get the attributes and from the
//attributes we get the sections.
- const SwPageFrm *pVirtPage = 0;
- const SwFrm *pFrm = 0;
+ const SwPageFrm *pVirtPage = nullptr;
+ const SwFrm *pFrm = nullptr;
const SfxItemPool &rPool = pPage->GetFormat()->GetDoc()->GetAttrPool();
sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
const SfxPoolItem* pItem = rPool.GetItem2( RES_PAGEDESC, n );
- if ( 0 == pItem )
+ if ( nullptr == pItem )
continue;
const SwFormatPageDesc *pDesc = static_cast<const SwFormatPageDesc*>(pItem);
@@ -1891,11 +1891,11 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr )
const SwContentNode* pTmpStartNode = rTableCrsr.GetContentNode();
const SwContentNode* pTmpEndNode = rTableCrsr.GetContentNode(false);
- const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->getLayoutFrm( this, &aPtPt, 0, false ) : 0;
- const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->getLayoutFrm( this, &aMkPt, 0, false ) : 0;
+ const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->getLayoutFrm( this, &aPtPt, nullptr, false ) : nullptr;
+ const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->getLayoutFrm( this, &aMkPt, nullptr, false ) : nullptr;
- const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : 0;
- const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : 0;
+ const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : nullptr;
+ const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : nullptr;
OSL_ENSURE( pStart && pEnd, "MakeTableCrsrs: Good to have the code robust here!" );
@@ -2054,7 +2054,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
if (pObj) aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) );
const SwAnchoredObject* pObj2 = pEndFrm->FindFlyFrm();
OSL_ENSURE( pObj2, "SwRootFrm::CalcFrmRects(..) - FlyFrame missing - looks like an invalid selection" );
- if ( pObj2 != NULL && pObj2 != pObj )
+ if ( pObj2 != nullptr && pObj2 != pObj )
{
aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj2)) );
}
@@ -2124,7 +2124,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
SwRect aStRect, aEndRect;
pStartFrm->GetCharRect( aStRect, *pStartPos, &aTmpState );
Sw2LinesPos *pSt2Pos = aTmpState.m_p2Lines;
- aTmpState.m_p2Lines = NULL;
+ aTmpState.m_p2Lines = nullptr;
aTmpState.m_nCursorBidiLevel = pEndFrm->IsRightToLeft() ? 1 : 0;
pEndFrm->GetCharRect( aEndRect, *pEndPos, &aTmpState );
@@ -2484,9 +2484,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
//Now the frames between, if there are any
bool const bBody = pStartFrm->IsInDocBody();
const SwTableBox* pCellBox = pStartFrm->GetUpper()->IsCellFrm() ?
- static_cast<const SwCellFrm*>(pStartFrm->GetUpper())->GetTabBox() : 0;
+ static_cast<const SwCellFrm*>(pStartFrm->GetUpper())->GetTabBox() : nullptr;
if (pSh->IsSelectAll())
- pCellBox = 0;
+ pCellBox = nullptr;
const SwContentFrm *pContent = pStartFrm->GetNextContentFrm();
SwRect aPrvRect;
@@ -2505,9 +2505,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
// If pStartFrm is inside a SwCellFrm, consider only frames which are inside the
// same cell frame (or its follow cell)
const SwTableBox* pTmpCellBox = pContent->GetUpper()->IsCellFrm() ?
- static_cast<const SwCellFrm*>(pContent->GetUpper())->GetTabBox() : 0;
+ static_cast<const SwCellFrm*>(pContent->GetUpper())->GetTabBox() : nullptr;
if (pSh->IsSelectAll())
- pTmpCellBox = 0;
+ pTmpCellBox = nullptr;
if ( bBody == pContent->IsInDocBody() &&
( !pCellBox || pCellBox == pTmpCellBox ) )
{
@@ -2585,8 +2585,8 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
const SwVirtFlyDrawObj* pObj = pFly->GetVirtDrawObj();
const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround();
const SwPosition* anchoredAt = pAnchoredObj->GetFrameFormat().GetAnchor().GetContentAnchor();
- bool inSelection = ( anchoredAt != NULL && *pStartPos <= *anchoredAt && *anchoredAt < *pEndPos );
- if( anchoredAt != NULL && *anchoredAt == *pEndPos )
+ bool inSelection = ( anchoredAt != nullptr && *pStartPos <= *anchoredAt && *anchoredAt < *pEndPos );
+ if( anchoredAt != nullptr && *anchoredAt == *pEndPos )
{
const SwNodes& nodes = anchoredAt->GetDoc()->GetNodes();
if( *pEndPos == SwPosition( nodes.GetEndOfContent()))
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 8d69905e947f..28b2d6f00dfe 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -163,7 +163,7 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn )
if( bOn )
{
pSh = pShell;
- pOut = NULL;
+ pOut = nullptr;
OutputDevice *pO = pSh->GetOut();
// We don't cheat on printers or virtual output devices...
if( OUTDEV_WINDOW != pO->GetOutDevType() )
@@ -182,7 +182,7 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn )
// Does the rectangle fit in our buffer?
if( !DoesFit( aTmpRect.GetSize() ) )
{
- pOut = NULL;
+ pOut = nullptr;
return;
}
@@ -212,7 +212,7 @@ void SwLayVout::_Flush()
pOut->DrawOutDev( aRect.Pos(), aRect.SSize(),
aRect.Pos(), aRect.SSize(), *pVirDev );
SetOutDev( pSh, pOut );
- pOut = NULL;
+ pOut = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index f855b4e828b1..1b00c40208e3 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -42,7 +42,7 @@ private:
bool DoesFit( const Size &rOut );
public:
- SwLayVout() : pSh(0), pOut(0), pVirDev(0), aSize(0, VIRTUALHEIGHT), nCount(0) {}
+ SwLayVout() : pSh(nullptr), pOut(nullptr), pVirDev(nullptr), aSize(0, VIRTUALHEIGHT), nCount(0) {}
~SwLayVout() { pVirDev.disposeAndClear(); }
/// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index fbf706e7f331..81827714315b 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -256,7 +256,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( nInvFlags & 0x08 )
SetCompletePaint();
SwFrm *pNxt;
- if ( nInvFlags & 0x30 && 0 != (pNxt = GetNext()) )
+ if ( nInvFlags & 0x30 && nullptr != (pNxt = GetNext()) )
{
pNxt->InvalidatePage( pPage );
if ( nInvFlags & 0x10 )
@@ -307,8 +307,8 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
if ( IsRowFrm() )
{
- bool bInFollowFlowRow = 0 != IsInFollowFlowRow();
- if ( bInFollowFlowRow || 0 != IsInSplitTableRow() )
+ bool bInFollowFlowRow = nullptr != IsInFollowFlowRow();
+ if ( bInFollowFlowRow || nullptr != IsInSplitTableRow() )
{
SwTabFrm* pTab = FindTabFrm();
if ( bInFollowFlowRow )
@@ -532,7 +532,7 @@ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind )
mpNext = pBehind;
if( pBehind )
{ //Insert before pBehind.
- if( 0 != (mpPrev = pBehind->mpPrev) )
+ if( nullptr != (mpPrev = pBehind->mpPrev) )
mpPrev->mpNext = this;
else
mpUpper->m_pLower = this;
@@ -568,7 +568,7 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
if ( pBefore )
{
//Insert after pBefore
- if ( 0 != (mpNext = pBefore->mpNext) )
+ if ( nullptr != (mpNext = pBefore->mpNext) )
mpNext->mpPrev = this;
pBefore->mpNext = this;
}
@@ -634,10 +634,10 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
if( pBehind )
{ // Insert before pBehind.
if( pBehind->GetPrev() )
- pBehind->GetPrev()->mpNext = NULL;
+ pBehind->GetPrev()->mpNext = nullptr;
else
pBehind->GetUpper()->m_pLower = nullptr;
- pBehind->mpPrev = NULL;
+ pBehind->mpPrev = nullptr;
SwLayoutFrm* pTmp = static_cast<SwLayoutFrm*>(pSct);
if( pTmp->Lower() )
{
@@ -673,7 +673,7 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
pLast->mpNext = pBehind;
if( pBehind )
{ // Insert before pBehind.
- if( 0 != (mpPrev = pBehind->mpPrev) )
+ if( nullptr != (mpPrev = pBehind->mpPrev) )
mpPrev->mpNext = this;
else
mpUpper->m_pLower = this;
@@ -712,8 +712,8 @@ void SwFrm::RemoveFromLayout()
mpNext->mpPrev = mpPrev;
// Remove link
- mpNext = mpPrev = 0;
- mpUpper = 0;
+ mpNext = mpPrev = nullptr;
+ mpUpper = nullptr;
}
void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
@@ -751,7 +751,7 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pNxt->IsSctFrm() )
pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsContent();
if( pNxt && pNxt->IsTextFrm() && pNxt->IsInFootnote() )
- pNxt->Prepare( PREP_FTN, 0, false );
+ pNxt->Prepare( PREP_FTN, nullptr, false );
}
if ( Frm().Height() )
@@ -791,11 +791,11 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm && pFrm->IsSctFrm() )
pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, false );
+ pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
if( !GetNext() )
{
pFrm = FindFootnoteFrm()->GetNext();
- if( pFrm && 0 != (pFrm=static_cast<SwLayoutFrm*>(pFrm)->ContainsAny()) )
+ if( pFrm && nullptr != (pFrm=static_cast<SwLayoutFrm*>(pFrm)->ContainsAny()) )
pFrm->_InvalidatePrt();
}
}
@@ -806,7 +806,7 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
{
while ( pNxt && pNxt->IsInTab() )
{
- if( 0 != (pNxt = pNxt->FindTabFrm()) )
+ if( nullptr != (pNxt = pNxt->FindTabFrm()) )
pNxt = pNxt->FindNextCnt();
}
if ( pNxt )
@@ -833,7 +833,7 @@ void SwContentFrm::Cut()
{
pFrm->_InvalidatePrt();
if( IsInFootnote() )
- pFrm->Prepare( PREP_QUOVADIS, 0, false );
+ pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
}
// #i26250# - invalidate printing area of previous
// table frame.
@@ -848,7 +848,7 @@ void SwContentFrm::Cut()
{
while ( pNxt && pNxt->IsInTab() )
{
- if( 0 != (pNxt = pNxt->FindTabFrm()) )
+ if( nullptr != (pNxt = pNxt->FindTabFrm()) )
pNxt = pNxt->FindNextCnt();
}
if ( pNxt )
@@ -859,7 +859,7 @@ void SwContentFrm::Cut()
}
}
- if( 0 != (pFrm = GetIndNext()) )
+ if( nullptr != (pFrm = GetIndNext()) )
{
// The old follow may have calculated a gap to the predecessor which
// now becomes obsolete or different as it becomes the first one itself
@@ -877,7 +877,7 @@ void SwContentFrm::Cut()
}
}
if( pFrm && IsInFootnote() )
- pFrm->Prepare( PREP_ERGOSUM, 0, false );
+ pFrm->Prepare( PREP_ERGOSUM, nullptr, false );
if( IsInSct() && !GetPrev() )
{
SwSectionFrm* pSct = FindSctFrm();
@@ -892,7 +892,7 @@ void SwContentFrm::Cut()
{
InvalidateNextPos();
//Someone needs to do the retouching: predecessor or upper
- if ( 0 != (pFrm = GetPrev()) )
+ if ( nullptr != (pFrm = GetPrev()) )
{ pFrm->SetRetouche();
pFrm->Prepare( PREP_WIDOWS_ORPHANS );
pFrm->_InvalidatePos();
@@ -922,7 +922,7 @@ void SwContentFrm::Cut()
if ( IsInTab() )
{
SwTabFrm* pThisTab = FindTabFrm();
- SwTabFrm* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : 0;
+ SwTabFrm* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr;
if ( pMasterTab )
{
pMasterTab->_InvalidatePos();
@@ -936,7 +936,7 @@ void SwContentFrm::Cut()
RemoveFromLayout();
if ( pUp )
{
- SwSectionFrm *pSct = 0;
+ SwSectionFrm *pSct = nullptr;
if ( !pUp->Lower() &&
( ( pUp->IsFootnoteFrm() && !pUp->IsColLocked() ) ||
( pUp->IsInSct() &&
@@ -1049,7 +1049,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( !IsColumnFrm() )
{
SwFrm *pFrm = GetIndNext();
- if( 0 != pFrm )
+ if( nullptr != pFrm )
{
pFrm->_InvalidatePos();
if( IsInFootnote() )
@@ -1057,15 +1057,15 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm->IsSctFrm() )
pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_ERGOSUM, 0, false );
+ pFrm->Prepare( PREP_ERGOSUM, nullptr, false );
}
}
- if ( IsInFootnote() && 0 != ( pFrm = GetIndPrev() ) )
+ if ( IsInFootnote() && nullptr != ( pFrm = GetIndPrev() ) )
{
if( pFrm->IsSctFrm() )
pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, false );
+ pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
}
}
@@ -1384,7 +1384,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
Prt().SSize().Height() = nOldFrmHeight;
if ( pUp->GetUpper() )
- static_cast<SwRootFrm*>(pUp->GetUpper())->CheckViewLayout( 0, 0 );
+ static_cast<SwRootFrm*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr );
//static_cast<SwPageFrm*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect );
Frm().SSize().Height() = nOldFrmHeight;
@@ -1406,7 +1406,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SwTwips nReal = 0,
nAdd = 0;
- SwFrm *pFrm = 0;
+ SwFrm *pFrm = nullptr;
SWRECTFN( this )
if( IsBodyFrm() )
@@ -1507,7 +1507,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if( nReal < 0 && pFrm->IsInSct() )
{
SwLayoutFrm* pUp = pFrm->GetUpper();
- if( pUp && 0 != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrm() &&
+ if( pUp && nullptr != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrm() &&
!pUp->IsColLocked() )
pUp->InvalidateSize();
}
@@ -1754,7 +1754,7 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
(Frm().*fnRect->fnSetHeight)( nOld + nDist );
if( IsVertical()&& !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
- SwTabFrm *pTab = (nOld && IsInTab()) ? FindTabFrm() : NULL;
+ SwTabFrm *pTab = (nOld && IsInTab()) ? FindTabFrm() : nullptr;
if (pTab)
{
if ( pTab->GetTable()->GetHTMLTableLayout() &&
@@ -1842,7 +1842,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical() && !IsVertLR() )
Frm().Pos().X() += nDist;
nDist = nRstHeight;
- SwTabFrm *pTab = IsInTab() ? FindTabFrm() : NULL;
+ SwTabFrm *pTab = IsInTab() ? FindTabFrm() : nullptr;
if (pTab)
{
if ( pTab->GetTable()->GetHTMLTableLayout() &&
@@ -1874,7 +1874,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
bool bInvalidate = true;
const SwRect aRect( Frm() );
const SwPageFrm* pPage = FindPageFrm();
- const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : 0;
+ const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : nullptr;
if( pSorted )
{
for ( size_t i = 0; i < pSorted->size(); ++i )
@@ -2264,7 +2264,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( -1 == rEndCell.GetTabBox()->getRowSpan() )
pToGrow = rEndCell.GetUpper();
else
- pToGrow = 0;
+ pToGrow = nullptr;
}
nGrow = pToGrow ? pToGrow->Grow( nReal, bTst, bInfo ) : 0;
@@ -2511,7 +2511,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if( IsFootnoteFrm() && !static_cast<SwFootnoteFrm*>(this)->GetAttr()->GetFootnote().IsEndNote() &&
( GetFormat()->GetDoc()->GetFootnoteInfo().ePos != FTNPOS_CHAPTER ||
( IsInSct() && FindSctFrm()->IsFootnoteAtEnd() ) ) &&
- 0 != (pCnt = static_cast<SwFootnoteFrm*>(this)->GetRefFromAttr() ) )
+ nullptr != (pCnt = static_cast<SwFootnoteFrm*>(this)->GetRefFromAttr() ) )
{
if ( pCnt->IsFollow() )
{ // If we are in an other column/page than the frame with the
@@ -2591,7 +2591,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
if( pLowerFrm->IsSctFrm() )
pLowerFrm = static_cast<SwSectionFrm*>(pLowerFrm)->GetSection() &&
!static_cast<SwSectionFrm*>(pLowerFrm)->ToMaximize( false ) ?
- static_cast<SwSectionFrm*>(pLowerFrm)->FindLastContent() : NULL;
+ static_cast<SwSectionFrm*>(pLowerFrm)->FindLastContent() : nullptr;
// continue with found last lower, probably the last content of a section
if ( pLowerFrm )
@@ -2905,7 +2905,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
Lower()->IsColumnFrm() )
{
// get column attribute
- const SwFormatCol* pColAttr = NULL;
+ const SwFormatCol* pColAttr = nullptr;
if ( IsPageBodyFrm() )
{
OSL_ENSURE( GetUpper()->IsPageFrm(), "Upper is not page frame" );
@@ -3142,7 +3142,7 @@ static long lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
}
//Skip empty columns!
pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
- while ( pCol && 0 == (pFrm = pCol->Lower()) )
+ while ( pCol && nullptr == (pFrm = pCol->Lower()) )
pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
} while ( pFrm && pCol );
@@ -3198,8 +3198,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
bool bEnd = false;
bool bBackLock = false;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- SwViewShellImp *pImp = pSh ? pSh->Imp() : 0;
- vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : 0;
+ SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
+ vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
{
// Underlying algorithm
// We try to find the optimal height for the column.
@@ -3284,7 +3284,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// #i3317# - reset temporarly consideration
// of wrapping style influence
SwPageFrm* pPageFrm = FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : 0L;
+ SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -3333,7 +3333,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// OD 28.03.2003 #108446# - check for all column content and all columns
while ( bMinDiff && pCol )
{
- bMinDiff = 0 != pCol->ContainsContent();
+ bMinDiff = nullptr != pCol->ContainsContent();
pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
}
pCol = static_cast<SwLayoutFrm*>(Lower());
@@ -3480,7 +3480,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// #i3317# - reset temporarly consideration
// of wrapping style influence
SwPageFrm* pTmpPageFrm = FindPageFrm();
- SwSortedObjs* pTmpObjs = pTmpPageFrm ? pTmpPageFrm->GetSortedObjs() : 0L;
+ SwSortedObjs* pTmpObjs = pTmpPageFrm ? pTmpPageFrm->GetSortedObjs() : nullptr;
if ( pTmpObjs )
{
for ( size_t i = 0; i < pTmpObjs->size(); ++i )
@@ -3542,7 +3542,7 @@ static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
// Exception: If a table is directly passed.
if( ( ( pCnt->IsInTab() && !pSect->IsInTab() ) ||
( pCnt->IsInFootnote() && !pSect->IsInFootnote() ) ) && !pCnt->IsTabFrm() )
- return NULL;
+ return nullptr;
if( nInv & INV_SIZE )
pSect->_InvalidateSize();
if( nInv & INV_POS )
@@ -3551,7 +3551,7 @@ static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
pSect->_InvalidatePrt();
SwFlowFrm *pFoll = pSect->GetFollow();
// Temporary separation from follow
- pSect->SetFollow( NULL );
+ pSect->SetFollow( nullptr );
SwContentFrm* pRet = pSect->FindLastContent();
pSect->SetFollow( pFoll );
return pRet;
@@ -3574,8 +3574,8 @@ static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv );
static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
{
- SwContentFrm *pLastTabCnt = NULL;
- SwContentFrm *pLastSctCnt = NULL;
+ SwContentFrm *pLastTabCnt = nullptr;
+ SwContentFrm *pLastSctCnt = nullptr;
while ( pCnt )
{
if( nInv & INV_SECTION )
@@ -3586,7 +3586,7 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
if( !pLastSctCnt )
pLastSctCnt = lcl_InvalidateSection( pCnt, nInv );
if( pLastSctCnt == pCnt )
- pLastSctCnt = NULL;
+ pLastSctCnt = nullptr;
}
#if OSL_DEBUG_LEVEL > 0
else
@@ -3607,12 +3607,12 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
if( !pLastTabCnt )
{
pLastTabCnt = lcl_InvalidateTable( pCnt->FindTabFrm(), nInv );
- pLastSctCnt = NULL;
+ pLastSctCnt = nullptr;
}
if( pLastTabCnt == pCnt )
{
- pLastTabCnt = NULL;
- pLastSctCnt = NULL;
+ pLastTabCnt = nullptr;
+ pLastSctCnt = nullptr;
}
}
#if OSL_DEBUG_LEVEL > 0
@@ -3622,7 +3622,7 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
}
if( nInv & INV_SIZE )
- pCnt->Prepare( PREP_CLEAR, 0, false );
+ pCnt->Prepare( PREP_CLEAR, nullptr, false );
if( nInv & INV_POS )
pCnt->_InvalidatePos();
if( nInv & INV_PRTAREA )
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index a82498976db4..099c6cfabcd8 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -44,9 +44,9 @@ using namespace objectpositioning;
SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj )
: mrDrawObj( _rDrawObj ),
mbIsObjFly( false ),
- mpAnchoredObj( 0 ),
- mpAnchorFrm( 0 ),
- mpContact( 0 ),
+ mpAnchoredObj( nullptr ),
+ mpAnchorFrm( nullptr ),
+ mpContact( nullptr ),
// #i62875#
mbFollowTextFlow( false ),
mbDoNotCaptureAnchoredObj( false )
@@ -135,12 +135,12 @@ bool SwAnchoredObjectPosition::IsAnchoredToChar() const
const SwFrm* SwAnchoredObjectPosition::ToCharOrientFrm() const
{
- return NULL;
+ return nullptr;
}
const SwRect* SwAnchoredObjectPosition::ToCharRect() const
{
- return NULL;
+ return nullptr;
}
// #i22341#
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index ef5f6e3090cf..a99c16c022f1 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -47,12 +47,12 @@ using namespace ::com::sun::star;
SwToContentAnchoredObjectPosition::SwToContentAnchoredObjectPosition( SdrObject& _rDrawObj )
: SwAnchoredObjectPosition ( _rDrawObj ),
- mpVertPosOrientFrm( 0 ),
+ mpVertPosOrientFrm( nullptr ),
// #i26791#
maOffsetToFrmAnchorPos( Point() ),
mbAnchorToChar ( false ),
- mpToCharOrientFrm( 0 ),
- mpToCharRect( 0 ),
+ mpToCharOrientFrm( nullptr ),
+ mpToCharRect( nullptr ),
// #i22341#
mnToCharTopOfLine( 0 )
{}
@@ -143,7 +143,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// at a frame belonging to the footer.
const SwFrm* pFooter = GetAnchorFrm().FindFooterOrHeader();
if ( pFooter && !pFooter->IsFooterFrm() )
- pFooter = NULL;
+ pFooter = nullptr;
// declare and set <bBrowse> to true, if document is in browser mode and
// object is anchored at the body, but not at frame belonging to a table.
@@ -434,7 +434,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// #i28701# - determine 'virtual' anchor frame.
// This frame is used in the following instead of the 'real' anchor
// frame <rAnchorTextFrm> for the 'vertical' position in all cases.
- const SwLayoutFrm* pUpperOfOrientFrm = 0L;
+ const SwLayoutFrm* pUpperOfOrientFrm = nullptr;
{
// #i28701# - As long as the anchor frame is on the
// same page as <pOrientFrm> and the vertical position isn't aligned
@@ -594,7 +594,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// #i23512# - correction:
// consider section frame for grow in online layout.
// use new local method <lcl_DoesVertPosFits(..)>
- SwLayoutFrm* pLayoutFrmToGrow = 0L;
+ SwLayoutFrm* pLayoutFrmToGrow = nullptr;
const bool bDoesVertPosFits = lcl_DoesVertPosFits(
nRelPosY, nAvail, pUpperOfOrientFrm, bBrowse,
bGrow, pLayoutFrmToGrow );
@@ -759,7 +759,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// #i23512# - correction:
// consider section frame for grow in online layout and
// consider page alignment for grow in table.
- SwLayoutFrm* pLayoutFrmToGrow = 0L;
+ SwLayoutFrm* pLayoutFrmToGrow = nullptr;
if ( bBrowse && rAnchorTextFrm.IsMoveable() )
{
if ( pUpperOfOrientFrm->IsInSct() )
@@ -770,7 +770,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
(pLayoutFrmToGrow->*fnRect->fnGetPrtBottom)() );
if ( nDist >= 0 )
{
- pLayoutFrmToGrow = 0L;
+ pLayoutFrmToGrow = nullptr;
}
}
else
@@ -897,7 +897,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// isn't a footnote frame, object can't follow the text flow
if ( bInFootnote && pNextLay && !pNextLay->IsFootnoteFrm() )
{
- pNextLay = 0L;
+ pNextLay = nullptr;
}
if ( pNextLay )
{
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 679f43e9e4bb..36289181918d 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -84,7 +84,7 @@ public:
void RemoveObj( SwOLEObj& rObj );
};
-SwOLELRUCache* pOLELRU_Cache = 0;
+SwOLELRUCache* pOLELRU_Cache = nullptr;
class SwOLEListener_Impl : public ::cppu::WeakImplHelper< embed::XStateChangeListener >
{
@@ -129,7 +129,7 @@ void SwOLEListener_Impl::Release()
{
if ( mpObj && pOLELRU_Cache )
pOLELRU_Cache->RemoveObj( *mpObj );
- mpObj=0;
+ mpObj=nullptr;
release();
}
@@ -154,7 +154,7 @@ public:
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- bool Connect() { return GetRealObject() != NULL; }
+ bool Connect() { return GetRealObject() != nullptr; }
};
SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode):
@@ -214,7 +214,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTextNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( xObj ),
bOLESizeInvalid( false ),
- mpObjectLink( NULL )
+ mpObjectLink( nullptr )
{
aOLEObj.SetNode( this );
}
@@ -227,7 +227,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTextNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( rString, nAspect ),
bOLESizeInvalid( false ),
- mpObjectLink( NULL )
+ mpObjectLink( nullptr )
{
aOLEObj.SetNode( this );
}
@@ -241,7 +241,7 @@ const Graphic* SwOLENode::GetGraphic()
{
if ( aOLEObj.GetOleRef().is() )
return aOLEObj.xOLERef.GetGraphic();
- return 0;
+ return nullptr;
}
SwContentNode *SwOLENode::SplitContentNode( const SwPosition & )
@@ -279,7 +279,7 @@ bool SwOLENode::RestorePersistentData()
if ( !p->GetEmbeddedObjectContainer().InsertEmbeddedObject( aOLEObj.xOLERef.GetObject(), aObjName ) )
{
if ( xChild.is() )
- xChild->setParent( 0 );
+ xChild->setParent( nullptr );
OSL_FAIL( "InsertObject failed" );
}
else
@@ -316,7 +316,7 @@ bool SwOLENode::SavePersistentData()
{
uno::Reference < container::XChild > xChild( aOLEObj.xOLERef.GetObject(), uno::UNO_QUERY );
if ( xChild.is() )
- xChild->setParent( 0 );
+ xChild->setParent( nullptr );
/*
#i119941
@@ -350,7 +350,7 @@ bool SwOLENode::SavePersistentData()
// TODO/LATER: aOLEObj.aName has no meaning here, since the undo container contains the object
// by different name, in future it might makes sense that the name is transported here.
- aOLEObj.xOLERef.AssignToContainer( 0, aOLEObj.aName );
+ aOLEObj.xOLERef.AssignToContainer( nullptr, aOLEObj.aName );
try
{
// "unload" object
@@ -519,7 +519,7 @@ bool SwOLENode::UpdateLinkURL_Impl()
if ( mpObjectLink )
{
OUString aNewLinkURL;
- sfx2::LinkManager::GetDisplayNames( mpObjectLink, 0, &aNewLinkURL );
+ sfx2::LinkManager::GetDisplayNames( mpObjectLink, nullptr, &aNewLinkURL );
if ( !aNewLinkURL.equalsIgnoreAsciiCase( maLinkURL ) )
{
if ( !aOLEObj.xOLERef.is() )
@@ -590,7 +590,7 @@ void SwOLENode::DisconnectFileLink_Impl()
if ( mpObjectLink )
{
GetDoc()->getIDocumentLinksAdministration().GetLinkManager().Remove( mpObjectLink );
- mpObjectLink = NULL;
+ mpObjectLink = nullptr;
}
}
@@ -637,8 +637,8 @@ bool SwOLENode::IsChart() const
}
SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
- pOLENd( 0 ),
- pListener( 0 ),
+ pOLENd( nullptr ),
+ pListener( nullptr ),
xOLERef( xObj )
{
xOLERef.Lock();
@@ -651,8 +651,8 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
}
SwOLEObj::SwOLEObj( const OUString &rString, sal_Int64 nAspect ) :
- pOLENd( 0 ),
- pListener( 0 ),
+ pOLENd( nullptr ),
+ pListener( nullptr ),
aName( rString )
{
xOLERef.Lock();
@@ -687,10 +687,10 @@ SwOLEObj::~SwOLEObj()
{
uno::Reference < container::XChild > xChild( xOLERef.GetObject(), uno::UNO_QUERY );
if ( xChild.is() )
- xChild->setParent( 0 );
+ xChild->setParent( nullptr );
// not already removed by deleting the object
- xOLERef.AssignToContainer( 0, aName );
+ xOLERef.AssignToContainer( nullptr, aName );
// unlock object so that object can be closed in RemoveEmbeddedObject
// successful closing of the object will automatically clear the reference then
@@ -742,7 +742,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
{
OSL_FAIL( "InsertObject failed" );
if ( xChild.is() )
- xChild->setParent( 0 );
+ xChild->setParent( nullptr );
}
else
xOLERef.AssignToContainer( &p->GetEmbeddedObjectContainer(), aObjName );
@@ -780,7 +780,7 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
{
// We could not load this part (probably broken)
Rectangle aArea;
- SwFrm *pFrm = pOLENd->getLayoutFrm(0);
+ SwFrm *pFrm = pOLENd->getLayoutFrm(nullptr);
if ( pFrm )
{
Size aSz( pFrm->Frm().SSize() );
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index bb893e039377..fb9b973f01a3 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -50,8 +50,8 @@ TYPEINIT1_AUTOFACTORY( SwParaConnectBorderItem, SfxBoolItem);
SwFormatDrop::SwFormatDrop()
: SfxPoolItem( RES_PARATR_DROP ),
- SwClient( 0 ),
- pDefinedIn( 0 ),
+ SwClient( nullptr ),
+ pDefinedIn( nullptr ),
nDistance( 0 ),
nReadFormat( USHRT_MAX ),
nLines( 0 ),
@@ -63,7 +63,7 @@ SwFormatDrop::SwFormatDrop()
SwFormatDrop::SwFormatDrop( const SwFormatDrop &rCpy )
: SfxPoolItem( RES_PARATR_DROP ),
SwClient( rCpy.GetRegisteredInNonConst() ),
- pDefinedIn( 0 ),
+ pDefinedIn( nullptr ),
nDistance( rCpy.GetDistance() ),
nReadFormat( rCpy.nReadFormat ),
nLines( rCpy.GetLines() ),
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index 4b9aae4a5190..68867f5c47f9 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -67,7 +67,7 @@ bool SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg,
const OUString& rFileName, const OUString& rShort,
SfxObjectShell& rObjSh, OUString& rLong )
{
- if( 0 == dynamic_cast<const SwDocShell*>( &rObjSh) )
+ if( nullptr == dynamic_cast<const SwDocShell*>( &rObjSh) )
return false;
SwDocShell& rDShell = static_cast<SwDocShell&>(rObjSh);
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 8027654bafae..05494d6fa47c 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -54,7 +54,7 @@ SvXMLImportContext *SwXMLSectionList::CreateContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) ||
( nPrefix == XML_NAMESPACE_TEXT &&
@@ -92,7 +92,7 @@ SvXMLImportContext *SvXMLSectionListContext::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TEXT && ( IsXMLToken ( rLocalName, XML_SECTION ) ||
IsXMLToken ( rLocalName, XML_BOOKMARK) ) )
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index acc880db734d..2f911a5a654d 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -46,13 +46,13 @@ using namespace ::com::sun::star;
void SwXMLTextBlocks::InitBlockMode ( const uno::Reference < embed::XStorage >& rStorage )
{
xBlkRoot = rStorage;
- xRoot = 0;
+ xRoot = nullptr;
}
void SwXMLTextBlocks::ResetBlockMode ( )
{
- xBlkRoot = 0;
- xRoot = 0;
+ xBlkRoot = nullptr;
+ xRoot = nullptr;
}
SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile )
@@ -130,7 +130,7 @@ SwXMLTextBlocks::~SwXMLTextBlocks()
ResetBlockMode ();
if(xDocShellRef.Is())
xDocShellRef->DoClose();
- xDocShellRef = 0;
+ xDocShellRef = nullptr;
if( pDoc && !pDoc->release() )
delete pDoc;
}
@@ -219,7 +219,7 @@ sal_uLong SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const OUString& rNewShort, c
uno::Reference < embed::XTransactedObject > xTrans( xRoot, uno::UNO_QUERY );
if ( xTrans.is() )
xTrans->commit();
- xRoot = 0;
+ xRoot = nullptr;
}
try
@@ -349,7 +349,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const OUString& )
if ( xRoot.is() )
{
- SfxMedium* pTmpMedium = NULL;
+ SfxMedium* pTmpMedium = nullptr;
try
{
uno::Reference< embed::XStorage > xTempStorage =
@@ -384,7 +384,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const OUString& )
uno::Reference < embed::XTransactedObject > xTrans( xRoot, uno::UNO_QUERY );
if ( xTrans.is() )
xTrans->commit();
- xRoot = 0;
+ xRoot = nullptr;
if ( !nCommitFlags )
{
uno::Reference < embed::XTransactedObject > xTmpTrans( xBlkRoot, uno::UNO_QUERY );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index d264bbeff80c..889be6a14534 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -87,7 +87,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
{
}
- xRoot = 0;
+ xRoot = nullptr;
}
else
{
@@ -142,7 +142,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
{
}
- xRoot = 0;
+ xRoot = nullptr;
}
return 0;
}
@@ -153,7 +153,7 @@ const struct SvEventDescription aAutotextEvents[] =
{
{ SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" },
{ SW_EVENT_END_INS_GLOSSARY, "OnInsertDone" },
- { 0, NULL }
+ { 0, nullptr }
};
sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
@@ -328,7 +328,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const OUString& rShort, OUString& rText
// re throw ?
}
- xRoot = 0;
+ xRoot = nullptr;
}
catch ( uno::Exception& )
{
@@ -396,7 +396,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const OUString& rShort, const OUString&
nRes = ERR_SWG_WRITE_ERROR;
}
- xRoot = 0;
+ xRoot = nullptr;
//TODO/LATER: error handling
/*
@@ -615,7 +615,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
xTrans->commit();
}
- xRoot = 0;
+ xRoot = nullptr;
}
catch ( uno::Exception& )
{
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 2b595c1f00a3..775254ab9b2d 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -90,7 +90,7 @@ SwImpBlocks::SwImpBlocks( const OUString& rFile, bool )
: aFile( rFile ),
aDateModified( Date::EMPTY ),
aTimeModified( tools::Time::EMPTY ),
- pDoc( 0 ), nCur( USHRT_MAX ),
+ pDoc( nullptr ), nCur( USHRT_MAX ),
bReadOnly( true ), bInPutMuchBlocks( false ),
bInfoChanged(false)
{
@@ -233,7 +233,7 @@ bool SwImpBlocks::PutMuchEntries( bool )
}
SwTextBlocks::SwTextBlocks( const OUString& rFile )
- : pImp( 0 ), nErr( 0 )
+ : pImp( nullptr ), nErr( 0 )
{
INetURLObject aObj(rFile);
const OUString sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE );
@@ -517,7 +517,7 @@ SwDoc* SwTextBlocks::GetDoc()
{
if( pImp )
return pImp->pDoc;
- return 0;
+ return nullptr;
}
void SwTextBlocks::ClearDoc()
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index c06a42f041ca..1c4f3961d2d7 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -87,7 +87,7 @@ bool SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
{
if( pUndo )
pUndo->SetSelBoxes( rBoxes );
- DeleteSel( pDoc, rBoxes, &rMerged, 0, true, true );
+ DeleteSel( pDoc, rBoxes, &rMerged, nullptr, true, true );
CHECK_TABLE( *this )
return true;
@@ -192,7 +192,7 @@ the row (table line) to be scanned
static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine )
{
if( !pLine )
- return 0;
+ return nullptr;
long nCurrLeft = 0;
const size_t nCount = pLine->GetTabBoxes().size();
for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
@@ -217,7 +217,7 @@ static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine )
nCurrLeft += pBox->GetFrameFormat()->GetFrmSize().GetWidth();
}
OSL_FAIL( "Didn't found wished box" );
- return 0;
+ return nullptr;
}
/** lcl_ChangeRowSpan corrects row span after insertion/deletion of rows
@@ -325,11 +325,11 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
OSL_ENSURE( m_bNewModel, "Don't call me for old tables" );
if( m_aLines.empty() )
- return 0;
+ return nullptr;
const SwNode* pStartNd = rPam.Start()->nNode.GetNode().FindTableBoxStartNode();
const SwNode* pEndNd = rPam.End()->nNode.GetNode().FindTableBoxStartNode();
if( !pStartNd || !pEndNd || pStartNd == pEndNd )
- return 0;
+ return nullptr;
const size_t nLines = m_aLines.size();
size_t nTop = 0;
@@ -364,7 +364,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
}
}
if( nFound < 2 )
- return 0;
+ return nullptr;
bool bOkay = true;
long nMid = ( nMin + nMax ) / 2;
@@ -396,9 +396,9 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
bOkay = false;
continue;
}
- SwTableBox* pInnerBox = 0;
- SwTableBox* pLeftBox = 0;
- SwTableBox* pRightBox = 0;
+ SwTableBox* pInnerBox = nullptr;
+ SwTableBox* pLeftBox = nullptr;
+ SwTableBox* pRightBox = nullptr;
long nDiff = 0;
long nDiff2 = 0;
if( nLeft < nMin )
@@ -547,7 +547,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
aTmp.second = nDiff;
aNewWidthList.push_back( aTmp );
}
- pOuterBox = pOuterBox == pRightBox ? 0 : pRightBox;
+ pOuterBox = pOuterBox == pRightBox ? nullptr : pRightBox;
if( nDiff2 )
nDiff = nDiff2;
} while( pOuterBox );
@@ -577,7 +577,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
else
{
delete pRet;
- pRet = 0;
+ pRet = nullptr;
}
return pRet;
}
@@ -685,12 +685,12 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
AdjustWidths( static_cast< long >(nTableWidth), static_cast< long >(nTableWidth - nAddWidth) );
}
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
SwTableNode* pTableNd = GetTableNode();
- std::vector<SwTableBoxFormat*> aInsFormat( nCnt, 0 );
+ std::vector<SwTableBoxFormat*> aInsFormat( nCnt, nullptr );
size_t nLastLine = SAL_MAX_SIZE;
long nLastRowSpan = 1;
@@ -736,11 +736,11 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
nLastRowSpan = nRowSpan;
}
const SvxBoxItem& aSelBoxItem = pBoxFrameFormat->GetBox();
- SvxBoxItem* pNoRightBorder = 0;
+ SvxBoxItem* pNoRightBorder = nullptr;
if( aSelBoxItem.GetRight() )
{
pNoRightBorder = new SvxBoxItem( aSelBoxItem );
- pNoRightBorder->SetLine( 0, SvxBoxItemLine::RIGHT );
+ pNoRightBorder->SetLine( nullptr, SvxBoxItemLine::RIGHT );
}
for( sal_uInt16 j = 0; j < nCnt; ++j )
{
@@ -834,7 +834,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
// The right and bottom border instead has to be derived from the right-
// bottom box of the selection. If this is a overlapped cell,
// the appropriate master box.
- SwTableBox* pLastBox = 0; // the right-bottom (master) cell
+ SwTableBox* pLastBox = nullptr; // the right-bottom (master) cell
SwDoc* pDoc = GetFrameFormat()->GetDoc();
SwPosition aInsPos( *pMergeBox->GetSttNd()->EndOfSectionNode() );
SwPaM aChkPam( aInsPos );
@@ -844,8 +844,8 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
long nRowSpan = static_cast<long>(nLineCount);
// We will need the first and last line of the selection
// to check if there any superfluous row after merging
- SwTableLine* pFirstLn = 0;
- SwTableLine* pLastLn = 0;
+ SwTableLine* pFirstLn = nullptr;
+ SwTableLine* pLastLn = nullptr;
// Iteration over the lines of the selection...
for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
@@ -1400,7 +1400,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
{
CHECK_TABLE( *this )
++nCnt;
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rBoxes, *this );
if( bSameHeight && pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
@@ -1491,7 +1491,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
sal_uInt16 nRowIdx = lcl_LineIndex( *this, rBoxes, bBehind );
if( nRowIdx < USHRT_MAX )
{
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
@@ -1935,7 +1935,7 @@ void SwTable::CheckRowSpan( SwTableLine* &rpLine, bool bUp ) const
else
{
bChange = false;
- rpLine = 0;
+ rpLine = nullptr;
}
}
}
@@ -1960,7 +1960,7 @@ void SwTable::CheckRowSpan( SwTableLine* &rpLine, bool bUp ) const
if( nLineIdx >= nMaxLine )
{
bChange = false;
- rpLine = 0;
+ rpLine = nullptr;
}
}
}
@@ -2039,7 +2039,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
else
{
nNewSpan += nRowSp;
- pNext = 0;
+ pNext = nullptr;
}
pBox->setRowSpan( nNewSpan );
}
@@ -2053,14 +2053,14 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
SwSaveRowSpan* SwTable::CleanUpTopRowSpan( sal_uInt16 nSplitLine )
{
- SwSaveRowSpan* pRet = 0;
+ SwSaveRowSpan* pRet = nullptr;
if( !IsNewModel() )
return pRet;
pRet = new SwSaveRowSpan( GetTabLines()[0]->GetTabBoxes(), nSplitLine );
if( pRet->mnRowSpans.empty() )
{
delete pRet;
- pRet = 0;
+ pRet = nullptr;
}
return pRet;
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 24d352ef3b67..f27f315c1a61 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -195,7 +195,7 @@ void _InsTableBox( SwDoc* pDoc, SwTableNode* pTableNd,
}
else
pDoc->GetNodes().InsBoxen( pTableNd, pLine, pBoxFrameFormat,
- pDoc->GetDfltTextFormatColl(), 0,
+ pDoc->GetDfltTextFormatColl(), nullptr,
nInsPos, nCnt );
long nRowSpan = pBox->getRowSpan();
@@ -212,8 +212,8 @@ void _InsTableBox( SwDoc* pDoc, SwTableNode* pTableNd,
SwTable::SwTable( SwTableFormat* pFormat )
: SwClient( pFormat ),
- m_pHTMLLayout( 0 ),
- m_pTableNode( 0 ),
+ m_pHTMLLayout( nullptr ),
+ m_pTableNode( nullptr ),
m_nGraphicsThatResize( 0 ),
m_nRowsToRepeat( 1 ),
m_bModifyLocked( false ),
@@ -225,8 +225,8 @@ SwTable::SwTable( SwTableFormat* pFormat )
SwTable::SwTable( const SwTable& rTable )
: SwClient( rTable.GetFrameFormat() ),
- m_pHTMLLayout( 0 ),
- m_pTableNode( 0 ),
+ m_pHTMLLayout( nullptr ),
+ m_pTableNode( nullptr ),
m_eTableChgMode( rTable.m_eTableChgMode ),
m_nGraphicsThatResize( 0 ),
m_nRowsToRepeat( rTable.GetRowsToRepeat() ),
@@ -240,7 +240,7 @@ void DelBoxNode( SwTableSortBoxes& rSortCntBoxes )
{
for (size_t n = 0; n < rSortCntBoxes.size(); ++n)
{
- rSortCntBoxes[ n ]->m_pStartNode = 0;
+ rSortCntBoxes[ n ]->m_pStartNode = nullptr;
}
}
@@ -356,7 +356,7 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
// catch SSize changes, to adjust the lines/boxes
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
- const SwFormatFrmSize* pNewSize = 0, *pOldSize = 0;
+ const SwFormatFrmSize* pNewSize = nullptr, *pOldSize = nullptr;
if( RES_ATTRSET_CHG == nWhich )
{
@@ -440,7 +440,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
}
}
pCur = pLine->GetUpper();
- pLine = pCur ? pCur->GetUpper() : 0;
+ pLine = pCur ? pCur->GetUpper() : nullptr;
}
}
@@ -585,14 +585,14 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
// 2. and 3.
const SwTableLine *pLine = pStart->GetUpper()->GetUpper() ?
- pStart->GetUpper()->GetUpper()->GetUpper() : 0;
+ pStart->GetUpper()->GetUpper()->GetUpper() : nullptr;
while ( pLine )
{
const SwTableBoxes &rBoxes2 = pLine->GetTabBoxes();
for ( size_t k = 0; k < rBoxes2.size(); ++k )
::lcl_SortedTabColInsert( rToFill, rBoxes2[k],
pTabFormat, false, bRefreshHidden );
- pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
+ pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : nullptr;
}
if ( !bRefreshHidden )
@@ -684,7 +684,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nOldAct, rParm.nOldWish);
}
pCur = pLine->GetUpper();
- pLine = pCur ? pCur->GetUpper() : 0;
+ pLine = pCur ? pCur->GetUpper() : nullptr;
}
long nLeftDiff = 0;
long nRightDiff = 0;
@@ -781,7 +781,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if ( pBox->GetUpper()->GetUpper() &&
pBox->GetUpper() != pBox->GetUpper()->GetUpper()->GetTabLines().back())
{
- pBox = 0;
+ pBox = nullptr;
}
else
{
@@ -792,7 +792,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if ( pBox != pBox->GetUpper()->GetTabBoxes().back() )
nDiff -= nRightDiff;
- pBox = nDiff ? pBox->GetUpper()->GetUpper() : 0;
+ pBox = nDiff ? pBox->GetUpper()->GetUpper() : nullptr;
}
}
}
@@ -847,7 +847,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
{
CHECK_TABLE( *this )
- SetHTMLTableLayout( 0 ); // delete HTML-Layout
+ SetHTMLTableLayout( nullptr ); // delete HTML-Layout
// FME: Made rOld const. The caller is responsible for passing correct
// values of rOld. Therefore we do not have to call GetTabCols anymore:
@@ -949,7 +949,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
::lcl_ProcessBoxPtr( rBoxes[i], aParm.aBoxArr, false );
const SwTableLine *pLine = pStart->GetUpper()->GetUpper() ?
- pStart->GetUpper()->GetUpper()->GetUpper() : 0;
+ pStart->GetUpper()->GetUpper()->GetUpper() : nullptr;
const SwTableBox *pExcl = pStart->GetUpper()->GetUpper();
while ( pLine )
{
@@ -963,7 +963,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
bBefore = false;
}
pExcl = pLine->GetUpper();
- pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
+ pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : nullptr;
}
// After we've inserted a bunch of boxes (hopefully all and in
// correct order), we just need to process them in reverse order.
@@ -1360,7 +1360,7 @@ sal_uInt16 SwTable::_GetBoxNum( OUString& rStr, bool bFirstPart,
const SwTableBox* SwTable::GetTableBox( const OUString& rName,
const bool bPerformValidCheck ) const
{
- const SwTableBox* pBox = 0;
+ const SwTableBox* pBox = nullptr;
const SwTableLine* pLine;
const SwTableLines* pLines;
@@ -1368,7 +1368,7 @@ const SwTableBox* SwTable::GetTableBox( const OUString& rName,
OUString aNm( rName );
while( !aNm.isEmpty() )
{
- nBox = SwTable::_GetBoxNum( aNm, 0 == pBox, bPerformValidCheck );
+ nBox = SwTable::_GetBoxNum( aNm, nullptr == pBox, bPerformValidCheck );
// first box ?
if( !pBox )
pLines = &GetTabLines();
@@ -1383,13 +1383,13 @@ const SwTableBox* SwTable::GetTableBox( const OUString& rName,
// determine line
if( !nLine || nLine > pLines->size() )
- return 0;
+ return nullptr;
pLine = (*pLines)[ nLine-1 ];
// determine box
const SwTableBoxes* pBoxes = &pLine->GetTabBoxes();
if( nBox >= pBoxes->size() )
- return 0;
+ return nullptr;
pBox = (*pBoxes)[ nBox ];
}
@@ -1410,12 +1410,12 @@ SwTableBox* SwTable::GetTableBox( sal_uLong nSttIdx )
// Converting text to table, tries certain conditions
// to ask for a table box of a table that is not yet having a format
if(!GetFrameFormat())
- return 0;
- SwTableBox* pRet = 0;
+ return nullptr;
+ SwTableBox* pRet = nullptr;
SwNodes& rNds = GetFrameFormat()->GetDoc()->GetNodes();
sal_uLong nIndex = nSttIdx + 1;
- SwContentNode* pCNd = 0;
- SwTableNode* pTableNd = 0;
+ SwContentNode* pCNd = nullptr;
+ SwTableNode* pTableNd = nullptr;
while ( nIndex < rNds.Count() )
{
@@ -1554,7 +1554,7 @@ void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat )
if ( bInFirstNonHeadlineRow ||
!pRow->GetNext() ||
( bInFollowFlowRow = pRow->IsInFollowFlowRow() ) ||
- 0 != pRow->IsInSplitTableRow() )
+ nullptr != pRow->IsInSplitTableRow() )
{
if ( bInFirstNonHeadlineRow || bInFollowFlowRow )
pTab = pTab->FindMaster();
@@ -1579,7 +1579,7 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
SwIterator<SwRowFrm,SwFormat> aIter( *GetFrameFormat() );
// A row could appear several times in headers/footers so only one chain of master/follow tables
// will be accepted...
- const SwTabFrm* pChain = NULL; // My chain
+ const SwTabFrm* pChain = nullptr; // My chain
for( SwRowFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
if( pLast->GetTabLine() == this )
@@ -1612,8 +1612,8 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
}
SwTableBox::SwTableBox()
- : m_pStartNode(0)
- , m_pUpper(0)
+ : m_pStartNode(nullptr)
+ , m_pUpper(nullptr)
, mnRowSpan(1)
, mbDummyFlag(false)
, mbDirectFormatting(false)
@@ -1621,9 +1621,9 @@ SwTableBox::SwTableBox()
}
SwTableBox::SwTableBox( SwTableBoxFormat* pFormat, sal_uInt16 nLines, SwTableLine *pUp )
- : SwClient(0)
+ : SwClient(nullptr)
, m_aLines()
- , m_pStartNode(0)
+ , m_pStartNode(nullptr)
, m_pUpper(pUp)
, mnRowSpan(1)
, mbDummyFlag(false)
@@ -1635,7 +1635,7 @@ SwTableBox::SwTableBox( SwTableBoxFormat* pFormat, sal_uInt16 nLines, SwTableLin
SwTableBox::SwTableBox( SwTableBoxFormat* pFormat, const SwNodeIndex &rIdx,
SwTableLine *pUp )
- : SwClient(0)
+ : SwClient(nullptr)
, m_aLines()
, m_pUpper(pUp)
, mnRowSpan(1)
@@ -1656,7 +1656,7 @@ SwTableBox::SwTableBox( SwTableBoxFormat* pFormat, const SwNodeIndex &rIdx,
}
SwTableBox::SwTableBox( SwTableBoxFormat* pFormat, const SwStartNode& rSttNd, SwTableLine *pUp )
- : SwClient(0)
+ : SwClient(nullptr)
, m_aLines()
, m_pStartNode(&rSttNd)
, m_pUpper(pUp)
@@ -1686,7 +1686,7 @@ void SwTableBox::RemoveFromTable()
GetTabSortBoxes();
SwTableBox *p = this; // error: &this
rSrtArr.erase( p ); // remove
- m_pStartNode = 0; // clear it so this is only run once
+ m_pStartNode = nullptr; // clear it so this is only run once
}
}
@@ -1873,7 +1873,7 @@ OUString SwTableBox::GetName() const
sNm = sTmp;
sTmp = OUString::number(( nPos = pBoxes->GetPos( pBox )) + 1 );
- if( 0 != ( pBox = pLine->GetUpper()) )
+ if( nullptr != ( pBox = pLine->GetUpper()) )
sNm = sTmp + "." + sNm;
else
sw_GetTableBoxColStr( nPos, sNm );
@@ -1999,10 +1999,10 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
// assign color or save "user color"
if( !pTNd->GetpSwAttrSet() || SfxItemState::SET != pTNd->GetpSwAttrSet()->
GetItemState( RES_CHRATR_COLOR, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
const Color* pOldNumFormatColor = rBox.GetSaveNumFormatColor();
- const Color* pNewUserColor = pItem ? &static_cast<const SvxColorItem*>(pItem)->GetValue() : 0;
+ const Color* pNewUserColor = pItem ? &static_cast<const SvxColorItem*>(pItem)->GetValue() : nullptr;
if( ( pNewUserColor && pOldNumFormatColor &&
*pNewUserColor == *pOldNumFormatColor ) ||
@@ -2091,7 +2091,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
bool bChgAlign = pDoc->IsInsTableAlignNum();
const SfxPoolItem* pItem;
- Color* pCol = 0;
+ Color* pCol = nullptr;
if( css::util::NumberFormat::TEXT != static_cast<sal_Int16>(nFormat) )
{
// special text format:
@@ -2123,10 +2123,10 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
// assign color or save "user color"
if( !pAttrSet || SfxItemState::SET != pAttrSet->
GetItemState( RES_CHRATR_COLOR, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
const Color* pOldNumFormatColor = rBox.GetSaveNumFormatColor();
- const Color* pNewUserColor = pItem ? &static_cast<const SvxColorItem*>(pItem)->GetValue() : 0;
+ const Color* pNewUserColor = pItem ? &static_cast<const SvxColorItem*>(pItem)->GetValue() : nullptr;
if( ( pNewUserColor && pOldNumFormatColor &&
*pNewUserColor == *pOldNumFormatColor ) ||
@@ -2173,9 +2173,9 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
{
if( !IsModifyLocked() && !IsInDocDTOR() )
{
- const SwTableBoxNumFormat *pNewFormat = 0;
- const SwTableBoxFormula *pNewFormula = 0;
- const SwTableBoxValue *pNewVal = 0;
+ const SwTableBoxNumFormat *pNewFormat = nullptr;
+ const SwTableBoxFormula *pNewFormula = nullptr;
+ const SwTableBoxValue *pNewVal = nullptr;
sal_uLong nOldFormat = css::util::NumberFormat::TEXT;
switch( pNew ? pNew->Which() : 0 )
@@ -2208,7 +2208,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// something changed and some BoxAttribut remained in the set!
if( pNewFormat || pNewFormula || pNewVal )
{
- GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty(true, NULL, 0);
+ GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty(true, nullptr, 0);
if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMAT, false ) ||
SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false ) ||
@@ -2228,7 +2228,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// new formatting
// is it newer or has the current been removed?
if( SfxItemState::SET != GetItemState( RES_BOXATR_VALUE, false ))
- pNewFormat = 0;
+ pNewFormat = nullptr;
}
else
{
@@ -2326,7 +2326,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
fVal = pNewVal->GetValue();
// format contents with the new value assigned and write to paragraph
- Color* pCol = 0;
+ Color* pCol = nullptr;
OUString sNewText;
if( DBL_MAX == fVal )
{
@@ -2421,10 +2421,10 @@ bool SwTableBox::IsNumberChanged() const
if( SfxItemState::SET != GetFrameFormat()->GetItemState( RES_BOXATR_VALUE, false,
reinterpret_cast<const SfxPoolItem**>(&pValue) ))
- pValue = 0;
+ pValue = nullptr;
if( SfxItemState::SET != GetFrameFormat()->GetItemState( RES_BOXATR_FORMAT, false,
reinterpret_cast<const SfxPoolItem**>(&pNumFormat) ))
- pNumFormat = 0;
+ pNumFormat = nullptr;
sal_uLong nNdPos;
if( pNumFormat && pValue && ULONG_MAX != ( nNdPos = IsValidNumTextNd() ) )
@@ -2433,7 +2433,7 @@ bool SwTableBox::IsNumberChanged() const
GetTextNode()->GetRedlineText() );
lcl_DelTabsAtSttEnd( sOldText );
- Color* pCol = 0;
+ Color* pCol = nullptr;
GetFrameFormat()->GetDoc()->GetNumberFormatter()->GetOutputString(
pValue->GetValue(), pNumFormat->GetValue(), sNewText, &pCol );
@@ -2454,20 +2454,20 @@ sal_uLong SwTableBox::IsValidNumTextNd( bool bCheckAttr ) const
SwNodeIndex aIdx( *m_pStartNode );
sal_uLong nIndex = aIdx.GetIndex();
const sal_uLong nIndexEnd = m_pStartNode->GetNodes()[ nIndex ]->EndOfSectionIndex();
- const SwTextNode *pTextNode = 0;
+ const SwTextNode *pTextNode = nullptr;
while( ++nIndex < nIndexEnd )
{
const SwNode* pNode = m_pStartNode->GetNodes()[nIndex];
if( pNode->IsTableNode() )
{
- pTextNode = 0;
+ pTextNode = nullptr;
break;
}
if( pNode->IsTextNode() )
{
if( pTextNode )
{
- pTextNode = 0;
+ pTextNode = nullptr;
break;
}
else
@@ -2536,7 +2536,7 @@ sal_uInt16 SwTableBox::IsFormulaOrValueBox() const
pFormat->GetTableBoxNumFormat().GetValue() ))
nWhich = RES_BOXATR_VALUE;
else if( m_pStartNode && m_pStartNode->GetIndex() + 2 == m_pStartNode->EndOfSectionIndex()
- && 0 != ( pTNd = m_pStartNode->GetNodes()[ m_pStartNode->GetIndex() + 1 ]
+ && nullptr != ( pTNd = m_pStartNode->GetNodes()[ m_pStartNode->GetIndex() + 1 ]
->GetTextNode() ) && pTNd->GetText().isEmpty())
nWhich = USHRT_MAX;
@@ -2558,7 +2558,7 @@ void SwTableBox::ActualiseValueBox()
ULONG_MAX != (nNdPos = IsValidNumTextNd()) )
{
double fVal = static_cast<const SwTableBoxValue*>(pValItem)->GetValue();
- Color* pCol = 0;
+ Color* pCol = nullptr;
OUString sNewText;
pNumFormatr->GetOutputString( fVal, nFormatId, sNewText, &pCol );
@@ -2579,7 +2579,7 @@ struct SwTableCellInfo::Impl
public:
Impl()
- : m_pTable(NULL), m_pCellFrm(NULL), m_pTabFrm(NULL)
+ : m_pTable(nullptr), m_pCellFrm(nullptr), m_pTabFrm(nullptr)
{
}
@@ -2604,7 +2604,7 @@ public:
const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm)
{
- const SwFrm * pResult = NULL;
+ const SwFrm * pResult = nullptr;
if (((! pFrm->IsTabFrm()) || pFrm == m_pTabFrm) && pFrm->GetLower())
pResult = pFrm->GetLower();
@@ -2612,7 +2612,7 @@ const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm)
pResult = pFrm->GetNext();
else
{
- while (pFrm->GetUpper() != NULL)
+ while (pFrm->GetUpper() != nullptr)
{
pFrm = pFrm->GetUpper();
@@ -2635,9 +2635,9 @@ const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm)
const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm)
{
- const SwCellFrm * pResult = NULL;
+ const SwCellFrm * pResult = nullptr;
- while ((pFrm = getNextFrmInTable(pFrm)) != NULL)
+ while ((pFrm = getNextFrmInTable(pFrm)) != nullptr)
{
if (pFrm->IsCellFrm())
{
@@ -2651,9 +2651,9 @@ const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm)
const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * pFrm)
{
- const SwCellFrm * pResult = NULL;
+ const SwCellFrm * pResult = nullptr;
- while ((pFrm = getNextCellFrm(pFrm)) != NULL)
+ while ((pFrm = getNextCellFrm(pFrm)) != nullptr)
{
const SwCellFrm * pCellFrm = static_cast<const SwCellFrm *>(pFrm);
const SwTableBox * pTabBox = pCellFrm->GetTabBox();
@@ -2677,15 +2677,15 @@ const SwCellFrm * SwTableCellInfo::getCellFrm() const
bool SwTableCellInfo::Impl::getNext()
{
- if (m_pCellFrm == NULL)
+ if (m_pCellFrm == nullptr)
{
- if (m_pTabFrm != NULL)
+ if (m_pTabFrm != nullptr)
m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pTabFrm);
}
else
m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pCellFrm);
- return m_pCellFrm != NULL;
+ return m_pCellFrm != nullptr;
}
SwTableCellInfo::SwTableCellInfo(const SwTable * pTable)
@@ -2707,7 +2707,7 @@ SwRect SwTableCellInfo::getRect() const
{
SwRect aRet;
- if (getCellFrm() != NULL)
+ if (getCellFrm() != nullptr)
aRet = getCellFrm()->Frm();
return aRet;
@@ -2715,9 +2715,9 @@ SwRect SwTableCellInfo::getRect() const
const SwTableBox * SwTableCellInfo::getTableBox() const
{
- const SwTableBox * pRet = NULL;
+ const SwTableBox * pRet = nullptr;
- if (getCellFrm() != NULL)
+ if (getCellFrm() != nullptr)
pRet = getCellFrm()->GetTabBox();
return pRet;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 4a4b99e58078..f5db518de93c 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -185,7 +185,7 @@ bool lcl_IsInNonStructEnv( const SwFrm& rFrm )
{
bool bRet = false;
- if ( 0 != rFrm.FindFooterOrHeader() &&
+ if ( nullptr != rFrm.FindFooterOrHeader() &&
!rFrm.IsHeaderFrm() && !rFrm.IsFooterFrm() )
{
bRet = true;
@@ -204,7 +204,7 @@ bool lcl_IsInNonStructEnv( const SwFrm& rFrm )
// Generate key from frame for reopening tags:
void* lcl_GetKeyFromFrame( const SwFrm& rFrm )
{
- void* pKey = 0;
+ void* pKey = nullptr;
if ( rFrm.IsPageFrm() )
pKey = const_cast<void*>(static_cast<void const *>(&(static_cast<const SwPageFrm&>(rFrm).GetFormat()->getIDocumentSettingAccess())));
@@ -324,7 +324,7 @@ bool SwTaggedPDFHelper::CheckReopenTag()
if ( mpFrmInfo )
{
const SwFrm& rFrm = mpFrmInfo->mrFrm;
- const SwFrm* pKeyFrm = 0;
+ const SwFrm* pKeyFrm = nullptr;
// Reopen an existing structure element if
// - rFrm is not the first page frame (reopen Document tag)
@@ -882,7 +882,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
do
aIter = rNumListBodyIdMap.find( pParent );
- while ( aIter == rNumListBodyIdMap.end() && 0 != ( pParent = pParent->GetParent() ) );
+ while ( aIter == rNumListBodyIdMap.end() && nullptr != ( pParent = pParent->GetParent() ) );
if ( aIter != rNumListBodyIdMap.end() )
nReopenTag = (*aIter).second;
@@ -1062,7 +1062,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
static_cast<const SwTextFrm*>(pFrm)->GetTextNode();
const SwFormat* pTextFormat = pTextNd->GetFormatColl();
- const SwFormat* pParentTextFormat = pTextFormat ? pTextFormat->DerivedFrom() : NULL;
+ const SwFormat* pParentTextFormat = pTextFormat ? pTextFormat->DerivedFrom() : nullptr;
OUString sStyleName;
OUString sParentStyleName;
@@ -1350,7 +1350,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
pNd->GetTextAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT));
// TODO: handle more than 1 char style?
const SwCharFormat* pCharFormat = (charAttrs.size())
- ? (*charAttrs.begin())->GetCharFormat().GetCharFormat() : 0;
+ ? (*charAttrs.begin())->GetCharFormat().GetCharFormat() : nullptr;
if ( pCharFormat )
SwStyleNameMapper::FillProgName( pCharFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
}
@@ -1454,7 +1454,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
const SwPrintData& rPrintData )
: mrSh( rSh ),
mrOut( rOut ),
- mpRangeEnum( 0 ),
+ mpRangeEnum( nullptr ),
mbSkipEmptyPages( bSkipEmptyPages ),
mbEditEngineOnly( bEditEngineOnly ),
mrPrintData( rPrintData )
@@ -1572,7 +1572,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
if( pFirst->GetTextField() && pFirst->IsFieldInDoc() )
{
const SwTextNode* pTNd = pFirst->GetTextField()->GetpTextNode();
- OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
+ OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
@@ -1627,10 +1627,10 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
for( auto &rAttr : aArr )
{
SwGetINetAttr* p = &rAttr;
- OSL_ENSURE( 0 != p, "Enhanced pdf export - SwGetINetAttr is missing" );
+ OSL_ENSURE( nullptr != p, "Enhanced pdf export - SwGetINetAttr is missing" );
const SwTextNode* pTNd = p->rINetAttr.GetpTextNode();
- OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
+ OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the hyperlink
@@ -1822,7 +1822,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
if( pFirst->GetTextField() && pFirst->IsFieldInDoc() )
{
const SwTextNode* pTNd = pFirst->GetTextField()->GetpTextNode();
- OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
+ OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
@@ -1992,7 +1992,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
// Check if outline is hidden
const SwTextNode* pTNd = mrSh.GetNodes().GetOutLineNds()[ i ]->GetTextNode();
- OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
+ OSL_ENSURE( nullptr != pTNd, "Enhanced pdf export - text node is missing" );
if ( pTNd->IsHidden() ||
// #i40292# Skip empty outlines:
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 3ba82c6296fe..6d82c85adac5 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -134,7 +134,7 @@ namespace CharFormat
/// Returns the item set associated with an character/inet/auto style
const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
{
- const SfxItemSet* pSet = 0;
+ const SfxItemSet* pSet = nullptr;
if ( RES_TXTATR_AUTOFMT == rAttr.Which() )
{
@@ -163,16 +163,16 @@ const SfxPoolItem* GetItem( const SwTextAttr& rAttr, sal_uInt16 nWhich )
RES_TXTATR_AUTOFMT == rAttr.Which() )
{
const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
- if ( !pSet ) return 0;
+ if ( !pSet ) return nullptr;
bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
const SfxPoolItem* pItem;
bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem );
- return bRet ? pItem : 0;
+ return bRet ? pItem : nullptr;
}
- return ( nWhich == rAttr.Which() ) ? &rAttr.GetAttr() : 0;
+ return ( nWhich == rAttr.Which() ) ? &rAttr.GetAttr() : nullptr;
}
/// Checks if item is included in character/inet/auto style
@@ -323,7 +323,7 @@ void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
const SwTextAttr* SwAttrHandler::SwAttrStack::Top() const
{
- return nCount ? pArray[ nCount - 1 ] : 0;
+ return nCount ? pArray[ nCount - 1 ] : nullptr;
}
sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
@@ -343,9 +343,9 @@ sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
}
SwAttrHandler::SwAttrHandler()
- : mpIDocumentSettingAccess(NULL)
- , mpShell(NULL)
- , pFnt(NULL)
+ : mpIDocumentSettingAccess(nullptr)
+ , mpShell(nullptr)
+ , pFnt(nullptr)
, bVertLayout(false)
{
memset( pDefaultArray, 0, NUM_DEFAULT_VALUES * sizeof(SfxPoolItem*) );
@@ -476,7 +476,7 @@ bool SwAttrHandler::Push( const SwTextAttr& rAttr, const SfxPoolItem& rItem )
if ( !pTopAttr
|| rAttr.IsPriorityAttr()
|| ( !pTopAttr->IsPriorityAttr()
- && !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
+ && !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, nullptr ) ) )
{
aAttrStack[ nStack ].Push( rAttr );
return true;
@@ -549,7 +549,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
const SwTextAttr* pTopAt = aAttrStack[ nStackPos ].Top();
if ( pTopAt )
{
- const SfxPoolItem* pItemNext(NULL);
+ const SfxPoolItem* pItemNext(nullptr);
// check if top attribute is collection of attributes
if ( RES_TXTATR_INETFMT == pTopAt->Which() ||
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index db11349a518e..06ac0786b3c3 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -35,7 +35,7 @@
* They are then triggered rhythimcally for a repaint. They can query
* for being visible or invisible with IsVisible().
*/
-SwBlink *pBlink = NULL;
+SwBlink *pBlink = nullptr;
SwBlink::SwBlink()
{
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 81d17a0e953c..5323eec7bd88 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -127,7 +127,7 @@ bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew )
nNew = 0;
}
pFrm->SetOfst( nNew );
- pFrm->SetPara( 0 );
+ pFrm->SetPara( nullptr );
pFrm->GetFormatted();
if( pFrm->Frm().HasArea() )
pFrm->getRootFrm()->GetCurrShell()->InvalidateWindows( pFrm->Frm() );
@@ -561,7 +561,7 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
SwitchRTLtoLTR( (Point&)rPoint );
SwFillData *pFillData = ( pCMS && pCMS->m_pFill ) ?
- new SwFillData( pCMS, pPos, Frm(), rPoint ) : NULL;
+ new SwFillData( pCMS, pPos, Frm(), rPoint ) : nullptr;
if ( IsEmpty() )
{
@@ -811,7 +811,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
{
aLine.PrevLine();
while ( aLine.GetStart() == nStart &&
- 0 != ( pPrevLine = aLine.GetPrevLine() ) &&
+ nullptr != ( pPrevLine = aLine.GetPrevLine() ) &&
pPrevLine != aLine.GetCurr() )
aLine.PrevLine();
}
@@ -874,7 +874,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
if ( pPrevPrev->IsFollow() )
pPrevPrev = pTmpPrev->FindMaster();
else
- pPrevPrev = NULL;
+ pPrevPrev = nullptr;
}
if ( !pPrevPrev )
return pTmpPrev->SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly );
@@ -895,7 +895,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir )
{
const SwLinePortion* pPor = rCurrLine.GetFirstPortion();
- const SwLinePortion* pLast = 0;
+ const SwLinePortion* pLast = nullptr;
// What's the current portion?
while ( pPor && nIdx + pPor->GetLen() <= nPos )
@@ -1081,7 +1081,7 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( nLen, 0, &nError );
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), nLen, nDefaultDir, NULL, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), nLen, nDefaultDir, nullptr, &nError ); // UChar != sal_Unicode in MinGW
sal_Int32 nTmpPos = 0;
bool bOutOfBounds = false;
@@ -1153,7 +1153,7 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
const_cast<SwTextFrm*>(this)->GetFormatted();
const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex();
SwRect aCharBox;
- const SwContentFrm *pTmpFollow = 0;
+ const SwContentFrm *pTmpFollow = nullptr;
if ( IsVertical() )
const_cast<SwTextFrm*>(this)->SwapWidthAndHeight();
@@ -1207,7 +1207,7 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
return true;
}
- if( 0 != ( pTmpFollow = GetFollow() ) )
+ if( nullptr != ( pTmpFollow = GetFollow() ) )
{ // Skip protected follows
const SwContentFrm* pTmp = pTmpFollow;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -1466,7 +1466,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const
if( FILL_TAB != rFill.Mode() )
{
const OUString aTmp(" ");
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTmp, 0, 2 );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, aTmp, 0, 2 );
nSpace = pFnt->_GetTextSize( aDrawInf ).Width()/2;
}
if( rFill.X() >= nRight )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 3312d9a16bed..f4f21058639e 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -91,7 +91,7 @@ void SwTextFrm::ValidateFrm()
if( !pSct->IsColLocked() )
pSct->ColLock();
else
- pSct = NULL;
+ pSct = nullptr;
}
SwFrm *pUp = GetUpper();
@@ -114,7 +114,7 @@ void SwTextFrm::ValidateFrm()
// First we search outwards, on the way back we calculate everything.
void _ValidateBodyFrm( SwFrm *pFrm )
{
- vcl::RenderContext* pRenderContext = pFrm ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : 0;
+ vcl::RenderContext* pRenderContext = pFrm ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr;
if( pFrm && !pFrm->IsCellFrm() )
{
if( !pFrm->IsBodyFrm() && pFrm->GetUpper() )
@@ -176,7 +176,7 @@ const SwBodyFrm *SwTextFrm::FindBodyFrm() const
pFrm = pFrm->GetUpper();
return static_cast<const SwBodyFrm*>(pFrm);
}
- return 0;
+ return nullptr;
}
bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst )
@@ -204,7 +204,7 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst )
SwTwips nOldBottom = (GetUpper()->Frm().*fnRect->fnGetBottom)();
SwTwips nMyPos = (Frm().*fnRect->fnGetTop)();
- const SwPageFrm *pPage = 0;
+ const SwPageFrm *pPage = nullptr;
bool bOldInvaContent = true;
if ( !IsInFly() && GetNext() )
{
@@ -606,8 +606,8 @@ SwContentFrm *SwTextFrm::JoinFrm()
const SwpHints *pHints = pFoll->GetTextNode()->GetpSwpHints();
if( pHints )
{
- SwFootnoteBossFrm *pFootnoteBoss = 0;
- SwFootnoteBossFrm *pEndBoss = 0;
+ SwFootnoteBossFrm *pFootnoteBoss = nullptr;
+ SwFootnoteBossFrm *pEndBoss = nullptr;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
const SwTextAttr *pHt = pHints->Get(i);
@@ -699,8 +699,8 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos )
const SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( pHints )
{
- SwFootnoteBossFrm *pFootnoteBoss = 0;
- SwFootnoteBossFrm *pEndBoss = 0;
+ SwFootnoteBossFrm *pFootnoteBoss = nullptr;
+ SwFootnoteBossFrm *pEndBoss = nullptr;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
const SwTextAttr *pHt = pHints->Get(i);
@@ -1201,7 +1201,7 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev )
SwTwips nRght = std::max( nOldWidth, pNew->Width() +
pNew->GetHangingMargin() );
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- const SwViewOption *pOpt = pSh ? pSh->GetViewOptions() : 0;
+ const SwViewOption *pOpt = pSh ? pSh->GetViewOptions() : nullptr;
if( pOpt && (pOpt->IsParagraph() || pOpt->IsLineBreak()) )
nRght += ( std::max( nOldAscent, pNew->GetAscent() ) );
else
@@ -1263,7 +1263,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
SwCharRange &rReformat = pPara->GetReformat();
SwRepaint &rRepaint = pPara->GetRepaint();
- SwRepaint *pFreeze = NULL;
+ SwRepaint *pFreeze = nullptr;
// Due to performance reasons we set rReformat to COMPLETE_STRING in Init()
// In this case we adjust rReformat
@@ -1355,9 +1355,9 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
&& aFrmBreak.IsBreakNowWidAndOrp( rLine );
if( bBreak )
{
- bool bPrevDone = 0 != rLine.Prev();
+ bool bPrevDone = nullptr != rLine.Prev();
while( bPrevDone && aFrmBreak.IsBreakNowWidAndOrp(rLine) )
- bPrevDone = 0 != rLine.Prev();
+ bPrevDone = nullptr != rLine.Prev();
if( bPrevDone )
{
aFrmBreak.SetKeep( false );
@@ -1398,7 +1398,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
{
SwTextFrm *pMaster = FindMaster();
OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" );
- const SwLineLayout* pLine=NULL;
+ const SwLineLayout* pLine=nullptr;
if (pMaster)
{
if( !pMaster->HasPara() )
@@ -1409,7 +1409,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
pLine = aMasterLine.GetCurr();
}
SwLinePortion* pRest = pLine ?
- rLine.MakeRestPortion(pLine, GetOfst()) : NULL;
+ rLine.MakeRestPortion(pLine, GetOfst()) : nullptr;
if( pRest )
rInf.SetRest( pRest );
else
@@ -1506,7 +1506,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
if( !rInf.IsNewLine() )
{
if( !bFormat )
- bFormat = 0 != rInf.GetRest();
+ bFormat = nullptr != rInf.GetRest();
if( rInf.IsStop() || rInf.GetIdx() >= nStrLen )
break;
if( !bFormat && ( !bMaxHyph || ( !bWatchEndHyph &&
@@ -1797,7 +1797,7 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs
_SetOfst( 0 );
const bool bOrphan = IsWidow();
- const SwFootnoteBossFrm* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrm() : 0;
+ const SwFootnoteBossFrm* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrm() : nullptr;
SwTwips nFootnoteHeight = 0;
if( pFootnoteBoss )
{
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index e1a795cbb51b..b59345a5ef9a 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -279,7 +279,7 @@ sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos,
return 0;
const Point aPoint( nNextIndent, aLine.Y() );
- rFndPos = aLine.GetCrsrOfst( 0, aPoint, false );
+ rFndPos = aLine.GetCrsrOfst( nullptr, aPoint, false );
if( 1 >= rFndPos )
return 0;
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index bfda652d1bc4..c8f8063c123b 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -89,11 +89,11 @@ public:
SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh,
const SwLineNumberInfo &rLnInf, const SwRect &rRct,
sal_Int16 eHor, bool bLnNm )
- : aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : 0 )
+ : aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : nullptr )
, aRect( rRct )
, pTextFrm( pFrm )
, pSh( pVwSh )
- , pFnt( 0 )
+ , pFnt( nullptr )
, rLineInf( rLnInf )
, nX(0)
, nRedX(0)
@@ -186,13 +186,13 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
: rLineInf.GetDivider() );
// Get script type of line numbering:
- pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmp, 0 ) );
+ pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmp, nullptr ) );
- SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, aTmp.getLength() );
+ SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), nullptr, aTmp, 0, aTmp.getLength() );
aDrawInf.SetSpace( 0 );
- aDrawInf.SetWrong( NULL );
- aDrawInf.SetGrammarCheck( NULL );
- aDrawInf.SetSmartTags( NULL );
+ aDrawInf.SetWrong( nullptr );
+ aDrawInf.SetGrammarCheck( nullptr );
+ aDrawInf.SetSmartTags( nullptr );
aDrawInf.SetLeft( 0 );
aDrawInf.SetRight( LONG_MAX );
aDrawInf.SetFrm( pTextFrm );
@@ -310,7 +310,7 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const
aLayoutModeModifier.Modify( false );
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() );
SwExtraPainter aExtra( this, pSh, rLineInf, rRect, eHor, bLineNum );
@@ -486,7 +486,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
{
SwAttrHandler aAttrHandler;
aAttrHandler.Init( rTextNode.GetSwAttrSet(),
- *rTextNode.getIDocumentSettingAccess(), NULL );
+ *rTextNode.getIDocumentSettingAccess(), nullptr );
SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler, nRedlPos, true );
}
}
@@ -523,7 +523,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
pClip->ChgClip( rRect );
}
else
- pClip = NULL;
+ pClip = nullptr;
aPos.Y() += pFnt->GetAscent( pSh, *pSh->GetOut() );
@@ -546,15 +546,15 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
if ( EmptyHeight( ) > 1 )
{
const OUString aTmp( CH_PAR );
- SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), nullptr, aTmp, 0, 1 );
aDrawInf.SetLeft( rRect.Left() );
aDrawInf.SetRight( rRect.Right() );
aDrawInf.SetPos( aPos );
aDrawInf.SetSpace( 0 );
aDrawInf.SetKanaComp( 0 );
- aDrawInf.SetWrong( NULL );
- aDrawInf.SetGrammarCheck( NULL );
- aDrawInf.SetSmartTags( NULL );
+ aDrawInf.SetWrong( nullptr );
+ aDrawInf.SetGrammarCheck( nullptr );
+ aDrawInf.SetSmartTags( nullptr );
aDrawInf.SetFrm( this );
aDrawInf.SetFont( pFnt );
aDrawInf.SetSnapToGrid( false );
@@ -581,10 +581,10 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
SwViewShell *pSh = getRootFrm()->GetCurrShell();
Num_Info aNumInfo( *this );
- SwTaggedPDFHelper aTaggedPDFHelperNumbering( &aNumInfo, 0, 0, rRenderContext );
+ SwTaggedPDFHelper aTaggedPDFHelperNumbering( &aNumInfo, nullptr, nullptr, rRenderContext );
Frm_Info aFrmInfo( *this );
- SwTaggedPDFHelper aTaggedPDFHelperParagraph( 0, &aFrmInfo, 0, rRenderContext );
+ SwTaggedPDFHelper aTaggedPDFHelperParagraph( nullptr, &aFrmInfo, nullptr, rRenderContext );
if( !IsEmpty() || !PaintEmpty( rRect, true ) )
{
@@ -667,9 +667,9 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
aInf.GetTextFly().Relax();
OutputDevice* pOut = aInf.GetOut();
- const bool bOnWin = pSh->GetWin() != 0;
+ const bool bOnWin = pSh->GetWin() != nullptr;
- SwSaveClip aClip( bOnWin || IsUndersized() ? pOut : 0 );
+ SwSaveClip aClip( bOnWin || IsUndersized() ? pOut : nullptr );
// Output loop: For each Line ... (which is still visible) ...
// adapt rRect (Top + 1, Bottom - 1)
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 5c351da76e17..f558d0576341 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -407,7 +407,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
{
nPorLen = nBreakPos - rInf.GetIdx();
if( '-' == rInf.GetText()[ nBreakPos - 1 ] )
- xHyphWord = NULL;
+ xHyphWord = nullptr;
}
}
else if ( !bHyph && nBreakPos >= rInf.GetLineStart() )
@@ -415,7 +415,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
OSL_ENSURE( nBreakPos != COMPLETE_STRING, "we should have found a break pos" );
// found break position within line
- xHyphWord = NULL;
+ xHyphWord = nullptr;
// check, if break position is soft hyphen and an underflow
// has to be triggered
diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx
index 1ee872ecc5fb..750acf5d764a 100644
--- a/sw/source/core/text/guess.hxx
+++ b/sw/source/core/text/guess.hxx
@@ -37,7 +37,7 @@ class SwTextGuess
// a field in the text has been expanded
sal_uInt16 nBreakWidth; // width of the broken portion
public:
- inline SwTextGuess(): pHanging( NULL ), nCutPos(0), nBreakStart(0),
+ inline SwTextGuess(): pHanging( nullptr ), nCutPos(0), nBreakStart(0),
nBreakPos(0), nFieldDiff(0), nBreakWidth(0)
{ }
~SwTextGuess() { delete pHanging; }
@@ -48,7 +48,7 @@ public:
bool AlternativeSpelling( const SwTextFormatInfo &rInf, const sal_Int32 nPos );
inline SwHangingPortion* GetHangingPortion() const { return pHanging; }
- inline void ClearHangingPortion() { pHanging = NULL; }
+ inline void ClearHangingPortion() { pHanging = nullptr; }
inline sal_uInt16 BreakWidth() const { return nBreakWidth; }
inline sal_Int32 CutPos() const { return nCutPos; }
inline sal_Int32 BreakStart() const { return nBreakStart; }
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 1ca8b8447ea7..d38630a1b11e 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -87,8 +87,8 @@ using namespace ::com::sun::star::beans;
#define DRAW_SPECIAL_OPTIONS_ROTATE 2
SwLineInfo::SwLineInfo()
- : pRuler( 0 ),
- pSpace( 0 ),
+ : pRuler( nullptr ),
+ pSpace( nullptr ),
nVertAlign( 0 ),
nDefTabStop( 0 ),
bListTabStopIncluded( false ),
@@ -185,15 +185,15 @@ inline sal_Int32 GetMinLen( const SwTextSizeInfo &rInf )
}
SwTextSizeInfo::SwTextSizeInfo()
-: m_pKanaComp(0)
-, m_pVsh(0)
-, m_pOut(0)
-, m_pRef(0)
-, m_pFnt(0)
-, m_pUnderFnt(0)
-, m_pFrm(0)
-, m_pOpt(0)
-, m_pText(0)
+: m_pKanaComp(nullptr)
+, m_pVsh(nullptr)
+, m_pOut(nullptr)
+, m_pRef(nullptr)
+, m_pFnt(nullptr)
+, m_pUnderFnt(nullptr)
+, m_pFrm(nullptr)
+, m_pOpt(nullptr)
+, m_pText(nullptr)
, m_nIdx(0)
, m_nLen(0)
, m_nKanaIdx(0)
@@ -250,7 +250,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew )
void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, SwFont *pNewFnt,
const sal_Int32 nNewIdx, const sal_Int32 nNewLen )
{
- m_pKanaComp = NULL;
+ m_pKanaComp = nullptr;
m_nKanaIdx = 0;
m_pFrm = pFrame;
CtorInitTextInfo( m_pFrm );
@@ -310,7 +310,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF
m_pFrm->IsInDocBody() );
m_pFnt = pNewFnt;
- m_pUnderFnt = 0;
+ m_pUnderFnt = nullptr;
m_pText = &pNd->GetText();
m_nIdx = nNewIdx;
@@ -452,7 +452,7 @@ sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth,
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
- aDrawInf.SetHyphPos( 0 );
+ aDrawInf.SetHyphPos( nullptr );
return m_pFnt->GetTextBreak( aDrawInf, nLineWidth );
}
@@ -489,15 +489,15 @@ void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTex
aTextFly.CtorInitTextFly( pFrame ),
aPaintRect = rPaint;
nSpaceIdx = 0;
- pSpaceAdd = NULL;
- pWrongList = NULL;
- pGrammarCheckList = NULL;
- pSmartTags = NULL;
+ pSpaceAdd = nullptr;
+ pWrongList = nullptr;
+ pGrammarCheckList = nullptr;
+ pSmartTags = nullptr;
#if OSL_DEBUG_LEVEL > 1
pBrushItem = reinterpret_cast<SvxBrushItem*>(-1);
#else
- pBrushItem = 0;
+ pBrushItem = nullptr;
#endif
}
@@ -557,10 +557,10 @@ static bool lcl_IsDarkBackground( const SwTextPaintInfo& rInf )
// Determined color <pCol> can be <COL_TRANSPARENT>. Thus, check it.
if ( pCol->GetColor() == COL_TRANSPARENT)
- pCol = NULL;
+ pCol = nullptr;
}
else
- pCol = NULL;
+ pCol = nullptr;
}
if( !pCol )
@@ -607,12 +607,12 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo
else
{
delete pBlink;
- pBlink = NULL;
+ pBlink = nullptr;
}
}
// The SwScriptInfo is useless if we are inside a field portion
- SwScriptInfo* pSI = 0;
+ SwScriptInfo* pSI = nullptr;
if ( ! rPor.InFieldGrp() )
pSI = &GetParaPortion()->GetScriptInfo();
@@ -708,9 +708,9 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo
aDrawInf.SetSize( aSize );
aDrawInf.SetAscent( rPor.GetAscent() );
aDrawInf.SetKern( bKern ? rPor.Width() : 0 );
- aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
- aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
- aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL );
+ aDrawInf.SetWrong( bTmpWrong ? pWrongList : nullptr );
+ aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : nullptr );
+ aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : nullptr );
GetTextFly().DrawTextOpaque( aDrawInf );
}
else
@@ -720,9 +720,9 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo
m_pFnt->_DrawStretchText( aDrawInf );
else
{
- aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
- aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
- aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL );
+ aDrawInf.SetWrong( bTmpWrong ? pWrongList : nullptr );
+ aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : nullptr );
+ aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : nullptr );
m_pFnt->_DrawText( aDrawInf );
}
}
@@ -842,7 +842,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r
const SwFont* pOldFnt = rInf.GetFont();
// Font is generated only once:
- static SwFont* m_pFnt = 0;
+ static SwFont* m_pFnt = nullptr;
if ( ! m_pFnt )
{
m_pFnt = new SwFont( *pOldFnt );
@@ -1115,7 +1115,7 @@ void SwTextPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
OSL_ENSURE( OnWin(), "SwTextPaintInfo::DrawBackground: printer pollution ?" );
SwRect aIntersect;
- CalcRect( rPor, 0, &aIntersect, true );
+ CalcRect( rPor, nullptr, &aIntersect, true );
if ( aIntersect.HasArea() )
{
@@ -1142,11 +1142,11 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
{
{
SwRect aIntersect;
- CalcRect( rPor, &aIntersect, 0, true );
+ CalcRect( rPor, &aIntersect, nullptr, true );
if(aIntersect.HasArea())
{
SwTextNode *pNd = m_pFrm->GetTextNode();
- const ::sw::mark::IMark* pFieldmark = NULL;
+ const ::sw::mark::IMark* pFieldmark = nullptr;
if(pNd)
{
const SwDoc *doc=pNd->GetDoc();
@@ -1163,7 +1163,7 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
SAL_INFO("sw.core", pFieldmark->ToString() << "\n");
}
if(bIsStartMark) OSL_TRACE("Found StartMark");
- if (OnWin() && (pFieldmark!=NULL || bIsStartMark) &&
+ if (OnWin() && (pFieldmark!=nullptr || bIsStartMark) &&
SwViewOption::IsFieldShadings() &&
!GetOpt().IsPagePreview())
{
@@ -1178,14 +1178,14 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
}
SwRect aIntersect;
- CalcRect( rPor, 0, &aIntersect, true );
+ CalcRect( rPor, nullptr, &aIntersect, true );
if ( aIntersect.HasArea() )
{
OutputDevice* pTmpOut = const_cast<OutputDevice*>(GetOut());
// #i16816# tagged pdf support
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pTmpOut );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pTmpOut );
Color aFillColor;
@@ -1277,7 +1277,7 @@ void SwTextPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
OSL_ENSURE( pNoteURL, "NotifyURL: pNoteURL gone with the wind!" );
SwRect aIntersect;
- CalcRect( rPor, 0, &aIntersect );
+ CalcRect( rPor, nullptr, &aIntersect );
if( aIntersect.HasArea() )
{
@@ -1371,7 +1371,7 @@ void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwT
m_nFirst = 0;
m_nRealWidth = 0;
m_nForcedLeftMargin = 0;
- m_pRest = 0;
+ m_pRest = nullptr;
m_nLineHeight = 0;
m_nLineNetHeight = 0;
SetLineStart(0);
@@ -1422,7 +1422,7 @@ const SwFormatDrop *SwTextFormatInfo::GetDropFormat() const
const SwFormatDrop *pDrop = &GetTextFrm()->GetTextNode()->GetSwAttrSet().GetDrop();
if( 1 >= pDrop->GetLines() ||
( !pDrop->GetChars() && !pDrop->GetWholeWord() ) )
- pDrop = 0;
+ pDrop = nullptr;
return pDrop;
}
@@ -1438,7 +1438,7 @@ void SwTextFormatInfo::Init()
{
const SwTextFrm* pMaster = GetTextFrm()->FindMaster();
OSL_ENSURE(pMaster, "pTextFrm without Master");
- const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : NULL;
+ const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : nullptr;
// there is a master for this follow and the master does not have
// any contents (especially it does not have a number portion)
@@ -1446,12 +1446,12 @@ void SwTextFormatInfo::Init()
! static_cast<const SwParaPortion*>(pTmpPara)->GetFirstPortion()->IsFlyPortion();
}
- m_pRoot = 0;
- m_pLast = 0;
- m_pFly = 0;
- m_pLastField = 0;
- m_pLastTab = 0;
- m_pUnderflow = 0;
+ m_pRoot = nullptr;
+ m_pLast = nullptr;
+ m_pFly = nullptr;
+ m_pLastField = nullptr;
+ m_pLastTab = nullptr;
+ m_pUnderflow = nullptr;
m_cTabDecimal = 0;
m_nWidth = m_nRealWidth;
m_nForcedLeftMargin = 0;
@@ -1483,11 +1483,11 @@ SwTextFormatInfo::SwTextFormatInfo( const SwTextFormatInfo& rInf,
{
m_pRoot = &rLay;
m_pLast = &rLay;
- m_pFly = NULL;
- m_pLastField = NULL;
- m_pUnderflow = NULL;
- m_pRest = NULL;
- m_pLastTab = NULL;
+ m_pFly = nullptr;
+ m_pLastField = nullptr;
+ m_pUnderflow = nullptr;
+ m_pRest = nullptr;
+ m_pLastTab = nullptr;
m_nSoftHyphPos = 0;
m_nUnderScorePos = COMPLETE_STRING;
@@ -1649,13 +1649,13 @@ bool SwTextFormatInfo::LastKernPortion()
return false;
}
SwLinePortion* pPor = GetRoot();
- SwLinePortion *pKern = NULL;
+ SwLinePortion *pKern = nullptr;
while( pPor )
{
if( pPor->IsKernPortion() )
pKern = pPor;
else if( pPor->Width() || ( pPor->GetLen() && !pPor->IsHolePortion() ) )
- pKern = NULL;
+ pKern = nullptr;
pPor = pPor->GetPortion();
}
if( pKern )
@@ -1672,13 +1672,13 @@ SwTextSlot::SwTextSlot(
bool bTextLen,
bool bExgLists,
OUString const & rCh )
- : pOldText(0)
- , pOldSmartTagList(0)
- , pOldGrammarCheckList(0)
- , pTempList(0)
+ : pOldText(nullptr)
+ , pOldSmartTagList(nullptr)
+ , pOldGrammarCheckList(nullptr)
+ , pTempList(nullptr)
, nIdx(0)
, nLen(0)
- , pInf(NULL)
+ , pInf(nullptr)
{
if( rCh.isEmpty() )
{
@@ -1716,11 +1716,11 @@ SwTextSlot::SwTextSlot(
else if( !pTempList && nPos < pOldSmartTagList->Count() && nListPos < nIdx && !aText.isEmpty() )
{
pTempList = new SwWrongList( WRONGLIST_SMARTTAG );
- pTempList->Insert( OUString(), 0, 0, aText.getLength(), 0 );
+ pTempList->Insert( OUString(), nullptr, 0, aText.getLength(), 0 );
static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( pTempList );
}
else
- static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( 0);
+ static_cast<SwTextPaintInfo*>(pInf)->SetSmartTags( nullptr);
}
pOldGrammarCheckList = static_cast<SwTextPaintInfo*>(pInf)->GetGrammarCheckList();
if ( pOldGrammarCheckList )
@@ -1732,11 +1732,11 @@ SwTextSlot::SwTextSlot(
else if( !pTempList && nPos < pOldGrammarCheckList->Count() && nListPos < nIdx && !aText.isEmpty() )
{
pTempList = new SwWrongList( WRONGLIST_GRAMMAR );
- pTempList->Insert( OUString(), 0, 0, aText.getLength(), 0 );
+ pTempList->Insert( OUString(), nullptr, 0, aText.getLength(), 0 );
static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( pTempList );
}
else
- static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( 0);
+ static_cast<SwTextPaintInfo*>(pInf)->SetGrammarCheckList( nullptr);
}
}
}
@@ -1763,9 +1763,9 @@ SwTextSlot::~SwTextSlot()
SwFontSave::SwFontSave(const SwTextSizeInfo &rInf, SwFont *pNew,
SwAttrIter* pItr)
- : pInf(NULL)
- , pFnt(pNew ? const_cast<SwTextSizeInfo&>(rInf).GetFont() : NULL)
- , pIter(NULL)
+ : pInf(nullptr)
+ , pFnt(pNew ? const_cast<SwTextSizeInfo&>(rInf).GetFont() : nullptr)
+ , pIter(nullptr)
{
if( pFnt )
{
@@ -1786,7 +1786,7 @@ SwFontSave::SwFontSave(const SwTextSizeInfo &rInf, SwFont *pNew,
pInf->SetFont( pNew );
}
else
- pFnt = 0;
+ pFnt = nullptr;
pNew->Invalidate();
pNew->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
if( pItr && pItr->GetFnt() == pFnt )
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 1eec0f6f5c8c..de1a8cd94f97 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -123,7 +123,7 @@ class SwTextInfo
protected:
SwTextInfo()
- : m_pPara(0)
+ : m_pPara(nullptr)
, m_nTextStart(0)
{}
@@ -187,7 +187,7 @@ protected:
sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
protected:
- void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, SwFont *pFnt = 0,
+ void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, SwFont *pFnt = nullptr,
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING );
SwTextSizeInfo();
@@ -197,7 +197,7 @@ public:
const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING );
- SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt = 0,
+ SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt = nullptr,
const sal_Int32 nIndex = 0,
const sal_Int32 nLength = COMPLETE_STRING );
@@ -376,10 +376,10 @@ class SwTextPaintInfo : public SwTextSizeInfo
protected:
SwTextPaintInfo()
- : pWrongList(0)
- , pGrammarCheckList(0)
- , pSmartTags(0)
- , pSpaceAdd(0)
+ : pWrongList(nullptr)
+ , pGrammarCheckList(nullptr)
+ , pSmartTags(nullptr)
+ , pSpaceAdd(nullptr)
#ifdef DBG_UTIL
, pBrushItem(reinterpret_cast<SvxBrushItem*>(-1))
#else
@@ -450,7 +450,7 @@ public:
* is excluded (e.g. for background)
**/
void CalcRect( const SwLinePortion& rPor, SwRect* pRect,
- SwRect* pIntersect = 0, const bool bInsideBox = false ) const;
+ SwRect* pIntersect = nullptr, const bool bInsideBox = false ) const;
inline SwTwips GetPaintOfst() const;
inline void SetPaintOfst( const SwTwips nNew );
@@ -720,7 +720,7 @@ class SwFontSave
SwAttrIter *pIter;
public:
SwFontSave( const SwTextSizeInfo &rInf, SwFont *pFnt,
- SwAttrIter* pItr = NULL );
+ SwAttrIter* pItr = nullptr );
~SwFontSave();
};
@@ -740,7 +740,7 @@ inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
{
- return GetTextSize( m_pOut, 0, rText, 0, rText.getLength(), 0 );
+ return GetTextSize( m_pOut, nullptr, rText, 0, rText.getLength(), 0 );
}
inline SwPosSize SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI,
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 022d07ab5a01..d4f18ed048f3 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -41,7 +41,7 @@ void SwTextAdjuster::FormatBlock( )
// And for tabs it doesn't exist out of tradition
// If we have Flys we continue.
- const SwLinePortion *pFly = 0;
+ const SwLinePortion *pFly = nullptr;
bool bSkip = !IsLastBlock() &&
nStart + pCurr->GetLen() >= GetInfo().GetText().getLength();
@@ -60,7 +60,7 @@ void SwTextAdjuster::FormatBlock( )
bSkip = false;
pPor = pPor->GetPortion();
}
- pLay = bSkip ? pLay->GetNext() : 0;
+ pLay = bSkip ? pLay->GetNext() : nullptr;
}
}
@@ -75,7 +75,7 @@ void SwTextAdjuster::FormatBlock( )
}
else
{
- const SwLinePortion *pTmpFly = NULL;
+ const SwLinePortion *pTmpFly = nullptr;
// End at the last Fly
const SwLinePortion *pPos = pCurr->GetFirstPortion();
@@ -87,7 +87,7 @@ void SwTextAdjuster::FormatBlock( )
else if ( pTmpFly && pPos->InTextGrp() )
{
pFly = pTmpFly; // A Fly with follow-up text!
- pTmpFly = NULL;
+ pTmpFly = nullptr;
}
pPos = pPos->GetPortion();
}
@@ -121,7 +121,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
// total number of kashida positions, or the number of kashida positions after some positions
// have been dropped.
// Here we want the clean total, which is OK: We have called ClearKashidaInvalid() before.
- rKashidas = rSI.KashidaJustify ( 0, 0, rItr.GetStart(), rItr.GetLength() );
+ rKashidas = rSI.KashidaJustify ( nullptr, nullptr, rItr.GetStart(), rItr.GetLength() );
if (rKashidas <= 0) // nothing to do
return true;
@@ -145,7 +145,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
if ( nNext == COMPLETE_STRING || nNext > nEnd )
nNext = nEnd;
- sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( 0, 0, nIdx, nNext - nIdx );
+ sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
if (nKashidasInAttr > 0)
{
// Kashida glyph looks suspicious, skip Kashida justification
@@ -212,7 +212,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
if ( nNext == COMPLETE_STRING || nNext > nEnd )
nNext = nEnd;
- sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( 0, 0, nIdx, nNext - nIdx );
+ sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
long nFontMinKashida = rInf.GetOut()->GetMinKashida();
if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
@@ -689,7 +689,7 @@ SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth,
SwTextFly aTextFly( GetTextFrm() );
const sal_uInt16 nCurrWidth = pCurr->PrtWidth();
- SwFlyPortion *pFlyPortion = 0;
+ SwFlyPortion *pFlyPortion = nullptr;
SwRect aLineVert( rCurrRect );
if ( GetTextFrm()->IsRightToLeft() )
@@ -759,7 +759,7 @@ void SwTextAdjuster::CalcDropAdjust()
pPor = pPor->GetPortion();
SwGluePortion *pRight = ( pPor && pPor->InGlueGrp() ) ?
- static_cast<SwGluePortion*>(pPor) : 0;
+ static_cast<SwGluePortion*>(pPor) : nullptr;
if( pRight && pRight != pLeft )
{
// 5) Calculate nMinLeft. Who is the most to left?
@@ -775,7 +775,7 @@ void SwTextAdjuster::CalcDropAdjust()
pPor = pCurr->GetFirstPortion();
const SwMarginPortion *pMar = pPor->IsMarginPortion() ?
- static_cast<SwMarginPortion*>(pPor) : 0;
+ static_cast<SwMarginPortion*>(pPor) : nullptr;
if( !pMar )
nMinLeft = 0;
else
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 1af40f97db4a..2a86ba989a92 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -103,7 +103,7 @@ SwAttrIter::~SwAttrIter()
*/
SwTextAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
{
- return (m_pTextNode) ? m_pTextNode->GetTextAttrForCharAt(nPosition) : 0;
+ return (m_pTextNode) ? m_pTextNode->GetTextAttrForCharAt(nPosition) : nullptr;
}
bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut )
@@ -243,7 +243,7 @@ bool SwAttrIter::Seek( const sal_Int32 nNewPos )
if( !nNewPos || nNewPos < nPos )
{
if( pRedln )
- pRedln->Clear( NULL );
+ pRedln->Clear( nullptr );
// reset font to its original state
aAttrHandler.Reset();
@@ -268,7 +268,7 @@ bool SwAttrIter::Seek( const sal_Int32 nNewPos )
SeekFwd( nNewPos );
}
- pFnt->SetActual( SwScriptInfo::WhichFont( nNewPos, 0, pScriptInfo ) );
+ pFnt->SetActual( SwScriptInfo::WhichFont( nNewPos, nullptr, pScriptInfo ) );
if( pRedln )
nChgCnt = nChgCnt + pRedln->Seek( *pFnt, nNewPos, nPos );
@@ -307,7 +307,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
}
}
}
- if (m_pTextNode!=NULL) {
+ if (m_pTextNode!=nullptr) {
// TODO: maybe use hints like FieldHints for this instead of looking at the text...
const sal_Int32 l = nNext<m_pTextNode->Len() ? nNext : m_pTextNode->Len();
sal_Int32 p=nPos;
@@ -390,7 +390,7 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
}
}
- SwDrawTextInfo aDrawInf( rArg.pSh, *rArg.pOut, 0, rText, nIdx, nStop - nIdx );
+ SwDrawTextInfo aDrawInf( rArg.pSh, *rArg.pOut, nullptr, rText, nIdx, nStop - nIdx );
long nAktWidth = pFnt->_GetTextSize( aDrawInf ).Width();
rArg.nRowWidth += nAktWidth;
if( bClear )
@@ -446,7 +446,7 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn )
return;
long nMin, nMax;
- SwHTMLTableLayout *pLayout = 0;
+ SwHTMLTableLayout *pLayout = nullptr;
const bool bIsDrawFrameFormat = pNd->Which()==RES_DRAWFRMFMT;
if( !bIsDrawFrameFormat )
{
@@ -624,7 +624,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM
sal_Int32 nStop = aScriptInfo.NextScriptChg( nIdx );
if( nNextChg > nStop )
nNextChg = nStop;
- SwTextAttr *pHint = NULL;
+ SwTextAttr *pHint = nullptr;
sal_Unicode cChar = CH_BLANK;
nStop = nIdx;
while( nStop < nLen && nStop < nNextChg &&
@@ -634,7 +634,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM
!pHint )
{
if( ( CH_TXTATR_BREAKWORD != cChar && CH_TXTATR_INWORD != cChar )
- || ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) )
+ || ( nullptr == ( pHint = aIter.GetAttr( nStop ) ) ) )
++nStop;
}
if ( lcl_MinMaxString( aArg, aIter.GetFnt(), m_Text, nIdx, nStop ) )
@@ -668,7 +668,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM
{
OUString sTmp( cChar );
SwDrawTextInfo aDrawInf( getIDocumentLayoutAccess().GetCurrentViewShell(),
- *pOut, 0, sTmp, 0, 1, 0, false );
+ *pOut, nullptr, sTmp, 0, 1, 0, false );
nAktWidth = aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
aArg.nWordWidth += nAktWidth;
aArg.nRowWidth += nAktWidth;
@@ -791,7 +791,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
const
{
SwViewShell const * pSh = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
- OutputDevice* pOut = NULL;
+ OutputDevice* pOut = nullptr;
if ( pSh )
pOut = &pSh->GetRefDev();
@@ -866,7 +866,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
sal_Int32 nStop = nIdx;
sal_Unicode cChar = CH_BLANK;
- SwTextAttr* pHint = NULL;
+ SwTextAttr* pHint = nullptr;
// stop at special characters in [ nIdx, nNextChg ]
while( nStop < nEnd && nStop < nNextChg )
@@ -880,7 +880,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
CHAR_SOFTHYPHEN == cChar ||
(
(CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) &&
- (0 == (pHint = aIter.GetAttr(nStop)))
+ (nullptr == (pHint = aIter.GetAttr(nStop)))
)
)
{
@@ -893,7 +893,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
// calculate text widths up to cChar
if ( nStop > nIdx )
{
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetText(), nIdx, nStop - nIdx );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, GetText(), nIdx, nStop - nIdx );
nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
}
@@ -910,7 +910,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
{
// tab receives width of one space
OUString sTmp( CH_BLANK );
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, sTmp, 0, 1 );
nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
nIdx++;
}
@@ -919,7 +919,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
else if ( cChar == CHAR_HARDBLANK || cChar == CHAR_HARDHYPHEN )
{
OUString sTmp( cChar );
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, sTmp, 0, 1 );
nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
nIdx++;
}
@@ -930,7 +930,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
case RES_TXTATR_FTN :
{
const OUString aText = pHint->GetFootnote().GetNumStr();
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aText, 0, aText.getLength() );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, aText, 0, aText.getLength() );
nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
break;
@@ -941,7 +941,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
{
SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
OUString const aText = pField->ExpandField(true);
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aText, 0, aText.getLength() );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, aText, 0, aText.getLength() );
nProWidth += aIter.GetFnt()->_GetTextSize( aDrawInf ).Width();
break;
@@ -960,7 +960,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
// search for a text frame this node belongs to
SwIterator<SwTextFrm,SwTextNode> aFrmIter( *this );
- SwTextFrm* pFrm = 0;
+ SwTextFrm* pFrm = nullptr;
for( SwTextFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() )
{
if ( pTmpFrm->GetOfst() <= nStt &&
@@ -988,7 +988,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
aIter.SeekAndChgAttrIter( nStt, pOut );
pOut->SetMapMode( aOldMap );
- SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetText(), nStt, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *pOut, nullptr, GetText(), nStt, 1 );
return (sal_uInt16)
( nWidth ? ((100 * aIter.GetFnt()->_GetTextSize( aDrawInf ).Height()) / nWidth ) : 0 );
}
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 2627367e76e3..fa6136cf2747 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -64,29 +64,29 @@ private:
protected:
void Chg( SwTextAttr *pHt );
void Rst( SwTextAttr *pHt );
- void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm = 0 );
+ void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm = nullptr );
explicit SwAttrIter(SwTextNode* pTextNode)
- : pShell(0)
- , pFnt(0)
- , pHints(0)
- , pAttrSet(0)
- , pScriptInfo(0)
- , pLastOut(0)
+ : pShell(nullptr)
+ , pFnt(nullptr)
+ , pHints(nullptr)
+ , pAttrSet(nullptr)
+ , pScriptInfo(nullptr)
+ , pLastOut(nullptr)
, nChgCnt(0)
- , pRedln(0)
+ , pRedln(nullptr)
, nStartIndex(0)
, nEndIndex(0)
, nPos(0)
, nPropFont(0)
, m_pTextNode(pTextNode)
{
- aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
+ aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = nullptr;
}
public:
// Constructor, destructor
SwAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf )
- : pShell(0), pFnt(0), pHints(0), pScriptInfo(0), pLastOut(0), nChgCnt(0), pRedln(0),nPropFont(0), m_pTextNode(&rTextNode)
+ : pShell(nullptr), pFnt(nullptr), pHints(nullptr), pScriptInfo(nullptr), pLastOut(nullptr), nChgCnt(0), pRedln(nullptr),nPropFont(0), m_pTextNode(&rTextNode)
{ CtorInitAttrIter( rTextNode, rScrInf ); }
virtual ~SwAttrIter();
@@ -108,7 +108,7 @@ public:
bool SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont = false );
// Do we have an attribute change at all?
- bool HasHints() const { return 0 != pHints; }
+ bool HasHints() const { return nullptr != pHints; }
// Returns the attribute for a position
SwTextAttr *GetAttr( const sal_Int32 nPos ) const;
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 852044e85d35..35d7c5188705 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -68,7 +68,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
sal_Int32 nFieldLen = 0;
OUString sString;
- const OUString* pString = 0;
+ const OUString* pString = nullptr;
const SwLinePortion* pPor = &rPor;
do
{
@@ -80,7 +80,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
}
else
{
- pString = 0;
+ pString = nullptr;
nFieldLen = 0;
}
@@ -99,7 +99,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
if ( pString )
{
// get script for field portion
- rInf.GetFont()->SetActual( SwScriptInfo::WhichFont( 0, pString, 0 ) );
+ rInf.GetFont()->SetActual( SwScriptInfo::WhichFont( 0, pString, nullptr ) );
sal_Int32 nOldLen = pPor->GetLen();
const_cast<SwLinePortion*>(pPor)->SetLen( nLen - 1 );
@@ -509,7 +509,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwTwips nX = 0;
SwTwips nTmpFirst = 0;
SwLinePortion *pPor = pCurr->GetFirstPortion();
- SwBidiPortion* pLastBidiPor = 0;
+ SwBidiPortion* pLastBidiPor = nullptr;
SwTwips nLastBidiPorWidth = 0;
std::deque<sal_uInt16>* pKanaComp = pCurr->GetpKanaComp();
sal_uInt16 nSpaceIdx = 0;
@@ -1155,7 +1155,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if ( pCMS && pCMS->m_bRealHeight )
{
- nTmpAscent = AdjustBaseLine( *pCurr, 0, nPorHeight, nPorAscent );
+ nTmpAscent = AdjustBaseLine( *pCurr, nullptr, nPorHeight, nPorAscent );
if ( nTmpAscent > nPorAscent )
pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent;
else
@@ -1390,7 +1390,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
bLastHyph = pPor->InHyphGrp();
}
- const bool bLastPortion = (0 == pPor->GetPortion());
+ const bool bLastPortion = (nullptr == pPor->GetPortion());
if( nX==nWidth )
{
@@ -1602,7 +1602,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
const_cast<SwTextCursor*>(this)->SeekAndChg( aSizeInf );
SwTextSlot aDiffText( &aSizeInf, static_cast<SwTextPortion*>(pPor), false, false );
SwFontSave aSave( aSizeInf, pPor->IsDropPortion() ?
- static_cast<SwDropPortion*>(pPor)->GetFnt() : NULL );
+ static_cast<SwDropPortion*>(pPor)->GetFnt() : nullptr );
SwParaPortion* pPara = const_cast<SwParaPortion*>(GetInfo().GetParaPortion());
OSL_ENSURE( pPara, "No paragraph!" );
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 83f50b91fdf8..31f1400ecc36 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -84,7 +84,7 @@ namespace {
inline void ClearFly( SwTextFormatInfo &rInf )
{
delete rInf.GetFly();
- rInf.SetFly(0);
+ rInf.SetFly(nullptr);
}
void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInfo *pNewInf )
@@ -92,7 +92,7 @@ void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInf
CtorInitTextPainter( pNewFrm, pNewInf );
pInf = pNewInf;
pDropFormat = GetInfo().GetDropFormat();
- pMulti = NULL;
+ pMulti = nullptr;
bOnceMore = false;
bFlyInCntBase = false;
@@ -103,7 +103,7 @@ void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInf
nLeftScanIdx = COMPLETE_STRING;
nRightScanIdx = 0;
m_nHintEndIndex = 0;
- m_pFirstOfBorderMerge = 0;
+ m_pFirstOfBorderMerge = nullptr;
if( nStart > GetInfo().GetText().getLength() )
{
@@ -120,7 +120,7 @@ SwTextFormatter::~SwTextFormatter()
if( GetInfo().GetRest() )
{
delete GetInfo().GetRest();
- GetInfo().SetRest(0);
+ GetInfo().SetRest(nullptr);
}
}
@@ -158,7 +158,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
// Save values and initialize rInf
SwLinePortion *pUnderflow = rInf.GetUnderflow();
if( !pUnderflow )
- return 0;
+ return nullptr;
// We format backwards, i.e. attribute changes can happen the next
// line again.
@@ -170,13 +170,13 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
// Save flys and set to 0, or else segmentation fault
// Not ClearFly(rInf) !
SwFlyPortion *pFly = rInf.GetFly();
- rInf.SetFly( 0 );
+ rInf.SetFly( nullptr );
FeedInf( rInf );
rInf.SetLast( pCurr );
// pUnderflow does not need to be deleted, because it will drown in the following
// Truncate()
- rInf.SetUnderflow(0);
+ rInf.SetUnderflow(nullptr);
rInf.SetSoftHyphPos( nSoftHyphPos );
rInf.SetUnderScorePos( nUnderScorePos );
rInf.SetPaintOfst( GetLeftMargin() );
@@ -248,7 +248,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
if( !pPor || !(rInf.X() + pPor->Width()) )
{
delete pFly;
- return 0;
+ return nullptr;
}
// Preparing for Format()
@@ -269,7 +269,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
rInf.SetFly( pFly );
CalcFlyWidth( rInf );
}
- rInf.GetLast()->SetPortion(0);
+ rInf.GetLast()->SetPortion(nullptr);
// The SwLineLayout is an exception to this, which splits at the first
// portion change.
@@ -282,7 +282,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
*static_cast<SwLinePortion*>(pCurr) = *pPor;
pCurr->SetPortion( pPor->GetPortion() );
pCurr->SetWhichPor( nOldWhich );
- pPor->SetPortion( 0 );
+ pPor->SetPortion( nullptr );
delete pPor;
pPor = pCurr;
}
@@ -296,7 +296,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
--m_nHintEndIndex;
}
delete pRest;
- rInf.SetRest(0);
+ rInf.SetRest(nullptr);
return pPor;
}
@@ -390,7 +390,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// used for grid mode only:
// the pointer is stored, because after formatting of non-asian text,
// the width of the kerning portion has to be adjusted
- SwKernPortion* pGridKernPortion = 0;
+ SwKernPortion* pGridKernPortion = nullptr;
bool bFull = false;
SwTwips nUnderLineStart = 0;
@@ -476,7 +476,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
SwKernPortion* pKrn =
new SwKernPortion( *rInf.GetLast(), nLstHeight,
pLast->InFieldGrp() && pPor->InFieldGrp() );
- rInf.GetLast()->SetPortion( NULL );
+ rInf.GetLast()->SetPortion( nullptr );
InsertPortion( rInf, pKrn );
}
}
@@ -631,7 +631,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
const sal_uInt8 nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
const sal_uInt8 nNextScript = nTmp >= rInf.GetText().getLength() ?
SW_CJK :
- SwScriptInfo::WhichFont( nTmp, 0, pScriptInfo );
+ SwScriptInfo::WhichFont( nTmp, nullptr, pScriptInfo );
// snap non-asian text to grid if next portion is ASIAN or
// there are no more portions in this line
@@ -668,13 +668,13 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
new SwKernPortion( *pPor, (short)(nKernWidth - nKernWidth_1),
false, true );
- pGridKernPortion = 0;
+ pGridKernPortion = nullptr;
}
else if ( pPor->IsMultiPortion() || pPor->InFixMargGrp() ||
pPor->IsFlyCntPortion() || pPor->InNumberGrp() ||
pPor->InFieldGrp() || nCurrScript != nNextScript )
// next portion should snap to grid
- pGridKernPortion = 0;
+ pGridKernPortion = nullptr;
}
rInf.SetFull( bFull );
@@ -850,7 +850,7 @@ namespace sw { namespace mark {
SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
{
- SwTextPortion *pPor = 0;
+ SwTextPortion *pPor = nullptr;
if( GetFnt()->IsTox() )
{
pPor = new SwToxPortion;
@@ -883,8 +883,8 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
SwIndex aIndex(pNd, rInf.GetIdx());
SwPosition aPosition(*pNd, aIndex);
sw::mark::IFieldmark *pBM = doc->getIDocumentMarkAccess()->getFieldmarkFor(aPosition);
- OSL_ENSURE(pBM != NULL, "Where is my form field bookmark???");
- if (pBM != NULL)
+ OSL_ENSURE(pBM != nullptr, "Where is my form field bookmark???");
+ if (pBM != nullptr)
{
if (pBM->GetFieldname( ) == ODF_FORMCHECKBOX)
{
@@ -998,13 +998,13 @@ SwTextPortion *SwTextFormatter::NewTextPortion( SwTextFormatInfo &rInf )
SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
{
- SwLinePortion *pPor = 0;
+ SwLinePortion *pPor = nullptr;
if( rInf.GetRest() )
{
// Tabs and fields
if( '\0' != rInf.GetHookChar() )
- return 0;
+ return nullptr;
pPor = rInf.GetRest();
if( pPor->IsErgoSumPortion() )
@@ -1016,7 +1016,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
if( pPor->InNumberGrp() )
rInf.SetNumDone(true);
- rInf.SetRest(0);
+ rInf.SetRest(nullptr);
pCurr->SetRest( true );
return pPor;
}
@@ -1061,7 +1061,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
if( pPor )
{
pCurr->SetRest( true );
- rInf.SetRest(0);
+ rInf.SetRest(nullptr);
}
}
}
@@ -1175,7 +1175,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
// LineBreaks and Flys (bug05.sdw)
// IsDummy()
if( rInf.IsNewLine() && (!rInf.GetFly() || !pCurr->IsDummy()) )
- return 0;
+ return nullptr;
// Wenn der Text an den Fly gestossen ist, oder wenn
// der Fly als erstes drankommt, weil er ueber dem linken
@@ -1187,7 +1187,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
if( rInf.GetLast()->IsBreakPortion() )
{
delete rInf.GetFly();
- rInf.SetFly( 0 );
+ rInf.SetFly( nullptr );
}
return rInf.GetFly();
@@ -1218,7 +1218,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
}
}
- return 0;
+ return nullptr;
}
SwLinePortion *pPor = WhichFirstPortion( rInf );
@@ -1244,7 +1244,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
SwMultiCreator* pCreate = rInf.GetMultiCreator( nEnd, pMulti );
if( pCreate )
{
- SwMultiPortion* pTmp = NULL;
+ SwMultiPortion* pTmp = nullptr;
if ( SW_MC_BIDI == pCreate->nId )
pTmp = new SwBidiPortion( nEnd, pCreate->nLevel );
@@ -1252,7 +1252,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
{
Seek( rInf.GetIdx() );
bool bRubyTop = false;
- bool* pRubyPos = 0;
+ bool* pRubyPos = nullptr;
if ( rInf.SnapToGrid() )
{
@@ -1363,15 +1363,15 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
if( rInf.IsFull() )
{
rInf.SetNewLine(true);
- return 0;
+ return nullptr;
}
pPor = rInf.GetRest();
- rInf.SetRest(0);
+ rInf.SetRest(nullptr);
}
else
{
if( rInf.IsFull() )
- return 0;
+ return nullptr;
pPor = NewTextPortion( rInf );
}
break;
@@ -1387,7 +1387,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
if( !pPor || rInf.IsStop() )
{
delete pPor;
- return 0;
+ return nullptr;
}
}
@@ -1599,7 +1599,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
if ( GetInfo().GetRest() )
{
delete GetInfo().GetRest();
- GetInfo().SetRest( 0 );
+ GetInfo().SetRest( nullptr );
}
// set original rest portion
@@ -1966,7 +1966,7 @@ bool SwTextFormatter::AllowRepaintOpt() const
else
{
// ????: Blank in der letzten Masterzeile (blocksat.sdw)
- bOptimizeRepaint = 0 == pCurr->GetNext() && !pFrm->GetFollow();
+ bOptimizeRepaint = nullptr == pCurr->GetNext() && !pFrm->GetFollow();
if ( bOptimizeRepaint )
{
SwLinePortion *pPos = pCurr->GetFirstPortion();
@@ -2124,7 +2124,7 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
aSt.Y() += pLay->Height();
pLay = pLay->GetNext();
} while ( pLay );
- const_cast<SwTextFormatter*>(this)->pMulti = NULL;
+ const_cast<SwTextFormatter*>(this)->pMulti = nullptr;
}
pPos->Move( aTmpInf );
pPos = pPos->GetPortion();
@@ -2475,7 +2475,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
SwTextAttr *pHint ) const
{
- SwFlyCntPortion *pRet = 0;
+ SwFlyCntPortion *pRet = nullptr;
const SwFrm *pFrame = static_cast<SwFrm*>(pFrm);
SwFlyInCntFrm *pFly;
@@ -2483,7 +2483,7 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
if( RES_FLYFRMFMT == pFrameFormat->Which() )
pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrm(pFrame);
else
- pFly = NULL;
+ pFly = nullptr;
// aBase is the document-global position, from which the new extra portion is placed
// aBase.X() = Offset in the line after the current position
// aBase.Y() = LineIter.Y() + Ascent of the current position
@@ -2672,7 +2672,7 @@ void SwTextFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTextForma
bReachCurrent = true;
}
}
- m_pFirstOfBorderMerge = 0;
+ m_pFirstOfBorderMerge = nullptr;
}
}
Seek(rInf.GetIdx());
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index 802e230e10b9..1f5b97f1cf20 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -196,7 +196,7 @@ public:
SwLinePortion* MakeRestPortion(const SwLineLayout* pLine, sal_Int32 nPos);
const SwFormatDrop *GetDropFormat() const { return pDropFormat; }
- void ClearDropFormat() { pDropFormat = 0; }
+ void ClearDropFormat() { pDropFormat = nullptr; }
SwMultiPortion *GetMulti() const { return pMulti; }
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 2b46d0cc98d6..3b034e1d2cf7 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -98,7 +98,7 @@ SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint )
// 8310: painten von LineBreaks in leeren Zeilen.
if( nPaintOfst && pCurr->Width() )
{
- SwLinePortion *pLast = 0;
+ SwLinePortion *pLast = nullptr;
// 7529 und 4757: nicht <= nPaintOfst
while( pPor && GetInfo().X() + pPor->Width() + (pPor->Height()/2)
< nPaintOfst )
@@ -237,7 +237,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm()));
const bool bAdjustBaseLine =
( !GetTextFrm()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) ) && (! GetTextFrm()->IsInFly()) &&
- ( 0 != pGrid );
+ ( nullptr != pGrid );
const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent;
if ( ! bAdjustBaseLine )
GetInfo().Y( nLineBaseLine );
@@ -251,7 +251,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
{
const SwTwips nOldY = GetInfo().Y();
- GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *pCurr, 0,
+ GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *pCurr, nullptr,
GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), *pOut ),
GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), *pOut )
) );
@@ -270,7 +270,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const bool bRest = pCurr->IsRest();
bool bFirst = true;
- SwArrowPortion *pArrow = NULL;
+ SwArrowPortion *pArrow = nullptr;
// Reference portion for the paragraph end portion
SwLinePortion* pEndTempl = pCurr->GetFirstPortion();
@@ -357,17 +357,17 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
// in extended input mode we do not want a common underline font.
- SwUnderlineFont* pOldUnderLineFnt = 0;
+ SwUnderlineFont* pOldUnderLineFnt = nullptr;
if ( GetRedln() && GetRedln()->ExtOn() )
{
pOldUnderLineFnt = GetInfo().GetUnderFnt();
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
}
{
// #i16816# tagged pdf support
Por_Info aPorInfo( *pPor, *this );
- SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, &aPorInfo, *pOut );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, &aPorInfo, *pOut );
if( pPor->IsMultiPortion() )
PaintMultiPortion( rPaint, static_cast<SwMultiPortion&>(*pPor) );
@@ -397,12 +397,12 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().GetVsh()->GetViewOptions()->IsPDFExport() &&
pNext && pNext->IsHolePortion() ) ?
pNext :
- 0;
+ nullptr;
}
// delete underline font
delete GetInfo().GetUnderFnt();
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
// paint remaining stuff
if( bDrawInWindow )
@@ -472,7 +472,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
{
// delete underline font
delete GetInfo().GetUnderFnt();
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
return;
}
@@ -536,7 +536,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
nUnderEnd = GetEnd() - 1;
// calculate the new common underline font
- SwFont* pUnderlineFnt = 0;
+ SwFont* pUnderlineFnt = nullptr;
Point aCommonBaseLine;
// check, if underlining is not isolated
@@ -644,7 +644,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
}
else
// I'm sorry, we do not have a special underlining font for you.
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx
index 8ab7bd23fee1..a200524efb28 100644
--- a/sw/source/core/text/itrpaint.hxx
+++ b/sw/source/core/text/itrpaint.hxx
@@ -50,7 +50,7 @@ public:
// if PaintMultiPortion is called recursively, we have to pass the
// surrounding SwBidiPortion
void PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti,
- const SwMultiPortion* pEnvPor = 0 );
+ const SwMultiPortion* pEnvPor = nullptr );
inline void SetPaintDrop( const bool bNew ) { bPaintDrop = bNew; }
inline bool IsPaintDrop() const { return bPaintDrop; }
inline SwTextPaintInfo &GetInfo()
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 149a506bab4e..b6aa6a7cb35e 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -58,7 +58,7 @@ void SwTextIter::Init()
nStart = pInf->GetTextStart();
nY = nFrameStart;
bPrev = true;
- pPrev = 0;
+ pPrev = nullptr;
nLineNr = 1;
}
@@ -70,11 +70,11 @@ void SwTextIter::CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight )
SwLineLayout *SwTextIter::_GetPrev()
{
- pPrev = 0;
+ pPrev = nullptr;
bPrev = true;
SwLineLayout *pLay = pInf->GetParaPortion();
if( pCurr == pLay )
- return 0;
+ return nullptr;
while( pLay->GetNext() != pCurr )
pLay = pLay->GetNext();
return pPrev = pLay;
@@ -102,7 +102,7 @@ const SwLineLayout *SwTextIter::Prev()
return pCurr;
}
else
- return 0;
+ return nullptr;
}
const SwLineLayout *SwTextIter::Next()
@@ -118,7 +118,7 @@ const SwLineLayout *SwTextIter::Next()
return pCurr = pCurr->GetNext();
}
else
- return 0;
+ return nullptr;
}
const SwLineLayout *SwTextIter::NextLine()
@@ -145,7 +145,7 @@ const SwLineLayout *SwTextIter::GetPrevLine()
{
const SwLineLayout *pRoot = pInf->GetParaPortion();
if( pRoot == pCurr )
- return 0;
+ return nullptr;
const SwLineLayout *pLay = pRoot;
while( pLay->GetNext() != pCurr )
@@ -154,7 +154,7 @@ const SwLineLayout *SwTextIter::GetPrevLine()
if( pLay->IsDummy() )
{
const SwLineLayout *pTmp = pRoot;
- pLay = pRoot->IsDummy() ? 0 : pRoot;
+ pLay = pRoot->IsDummy() ? nullptr : pRoot;
while( pTmp->GetNext() != pCurr )
{
if( !pTmp->IsDummy() )
@@ -171,7 +171,7 @@ const SwLineLayout *SwTextIter::PrevLine()
{
const SwLineLayout *pMyPrev = Prev();
if( !pMyPrev )
- return 0;
+ return nullptr;
const SwLineLayout *pLast = pMyPrev;
while( pMyPrev && pMyPrev->IsDummy() )
@@ -321,7 +321,7 @@ void SwTextIter::TruncLines( bool bNoteFollow )
if( pDel )
{
- pCurr->SetNext( 0 );
+ pCurr->SetNext( nullptr );
if( GetHints() && bNoteFollow )
{
GetInfo().GetParaPortion()->SetFollowField( pDel->IsRest() ||
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 77a09886fb19..ddddc49e4638 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -55,10 +55,10 @@ protected:
void CtorInitTextIter( SwTextFrm *pFrm, SwTextInfo *pInf );
explicit SwTextIter(SwTextNode* pTextNode)
: SwAttrIter(pTextNode)
- , pFrm(NULL)
- , pInf(NULL)
- , pCurr(NULL)
- , pPrev(NULL)
+ , pFrm(nullptr)
+ , pInf(nullptr)
+ , pCurr(nullptr)
+ , pPrev(nullptr)
, nFrameStart(0)
, nY(0)
, nRegStart(0)
@@ -243,7 +243,7 @@ protected:
SwTwips nReal = 0, bool bSkipKashida = false );
SwTwips CalcKanaAdj( SwLineLayout *pCurr );
public:
- inline SwTextAdjuster( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrm!=NULL?pTextFrm->GetTextNode():NULL)
+ inline SwTextAdjuster( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrm!=nullptr?pTextFrm->GetTextNode():nullptr)
{ CtorInitTextMargin( pTextFrm, pTextSizeInf ); }
// Is overloaded by SwTextFormatter due to UpdatePos
@@ -279,12 +279,12 @@ public:
{
CtorInitTextCursor(pTextFrm, pTextSizeInf);
}
- bool GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = 0,
+ bool GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr,
const long nMax = 0 );
- bool GetEndCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = 0,
+ bool GetEndCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr,
const long nMax = 0 );
sal_Int32 GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
- bool bChgNode, SwCrsrMoveState* = 0 ) const;
+ bool bChgNode, SwCrsrMoveState* = nullptr ) const;
// Respects ambiguities: For the implementation see below
const SwLineLayout *CharCrsrToLine( const sal_Int32 nPos );
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index 981a7560bfdc..aa30769ee351 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -25,7 +25,7 @@
#include <svtools/imap.hxx>
// Global variable
-SwNoteURL *pNoteURL = NULL;
+SwNoteURL *pNoteURL = nullptr;
void SwNoteURL::InsertURLNote( const OUString& rURL, const OUString& rTarget,
const SwRect& rRect )
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 11598ab1d899..a4ac1422830a 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -42,7 +42,7 @@ class SwDropPortionPart
public:
SwDropPortionPart( SwFont& rFont, const sal_Int32 nL )
- : pFollow( 0 ), pFnt( &rFont ), nLen( nL ), nWidth( 0 ), m_bJoinBorderWithNext(false), m_bJoinBorderWithPrev(false) {};
+ : pFollow( nullptr ), pFnt( &rFont ), nLen( nL ), nWidth( 0 ), m_bJoinBorderWithNext(false), m_bJoinBorderWithPrev(false) {};
~SwDropPortionPart();
inline SwDropPortionPart* GetFollow() const { return pFollow; };
@@ -98,7 +98,7 @@ public:
inline void SetY( short nNew ) { nY = nNew; }
- inline SwFont* GetFnt() const { return pPart ? &pPart->GetFont() : NULL; }
+ inline SwFont* GetFnt() const { return pPart ? &pPart->GetFont() : nullptr; }
static void DeleteDropCapCache();
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index e4fc38442301..44afffdda300 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -66,9 +66,9 @@ void SwExpandPortion::Paint( const SwTextPaintInfo &rInf ) const
SwTextSlot aDiffText( &rInf, this, true, true );
const SwFont aOldFont = *rInf.GetFont();
if( GetJoinBorderWithPrev() )
- const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetLeftBorder(0);
+ const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetLeftBorder(nullptr);
if( GetJoinBorderWithNext() )
- const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetRightBorder(0);
+ const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetRightBorder(nullptr);
rInf.DrawBackBrush( *this );
rInf.DrawBorder( *this );
@@ -86,7 +86,7 @@ void SwExpandPortion::Paint( const SwTextPaintInfo &rInf ) const
// ST2
if ( rInf.GetSmartTags() || rInf.GetGrammarCheckList() )
rInf.DrawMarkedText( *this, rInf.GetLen(), false, false,
- 0 != rInf.GetSmartTags(), 0 != rInf.GetGrammarCheckList() );
+ nullptr != rInf.GetSmartTags(), nullptr != rInf.GetGrammarCheckList() );
else
rInf.DrawText( *this, rInf.GetLen() );
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index dacc158f7a7d..3f40a3384879 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -46,12 +46,12 @@
using namespace ::com::sun::star;
SwLinePortion *SwFieldPortion::Compress()
-{ return (GetLen() || !aExpand.isEmpty() || SwLinePortion::Compress()) ? this : 0; }
+{ return (GetLen() || !aExpand.isEmpty() || SwLinePortion::Compress()) ? this : nullptr; }
SwFieldPortion *SwFieldPortion::Clone( const OUString &rExpand ) const
{
SwFont *pNewFnt;
- if( 0 != ( pNewFnt = pFnt ) )
+ if( nullptr != ( pNewFnt = pFnt ) )
{
pNewFnt = new SwFont( *pFnt );
}
@@ -104,7 +104,7 @@ SwFieldPortion::SwFieldPortion( const SwFieldPortion& rField )
if ( rField.HasFont() )
pFnt = new SwFont( *rField.GetFont() );
else
- pFnt = 0;
+ pFnt = nullptr;
SetWhichPor( POR_FLD );
}
@@ -149,10 +149,10 @@ public:
};
SwFieldSlot::SwFieldSlot( const SwTextFormatInfo* pNew, const SwFieldPortion *pPor )
- : pOldText(NULL)
+ : pOldText(nullptr)
, nIdx(0)
, nLen(0)
- , pInf(NULL)
+ , pInf(nullptr)
{
bOn = pPor->GetExpText( *pNew, aText );
@@ -233,7 +233,7 @@ void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf )
{
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nFieldDir, NULL, &nError );
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nFieldDir, nullptr, &nError );
int32_t nEnd;
UBiDiLevel nCurrDir;
ubidi_getLogicalRun( pBidi, 0, &nEnd, &nCurrDir );
@@ -473,7 +473,7 @@ SwPosSize SwFieldPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
SwFieldPortion *SwHiddenPortion::Clone(const OUString &rExpand ) const
{
SwFont *pNewFnt;
- if( 0 != ( pNewFnt = pFnt ) )
+ if( nullptr != ( pNewFnt = pFnt ) )
pNewFnt = new SwFont( *pFnt );
return new SwHiddenPortion( rExpand, pNewFnt );
}
@@ -519,7 +519,7 @@ sal_Int32 SwNumberPortion::GetCrsrOfst( const sal_uInt16 ) const
SwFieldPortion *SwNumberPortion::Clone( const OUString &rExpand ) const
{
SwFont *pNewFnt;
- if( 0 != ( pNewFnt = pFnt ) )
+ if( nullptr != ( pNewFnt = pFnt ) )
pNewFnt = new SwFont( *pFnt );
return new SwNumberPortion( rExpand, pNewFnt, IsLeft(), IsCenter(),
@@ -759,7 +759,7 @@ SwGrfNumPortion::SwGrfNumPortion(
const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize,
const bool bLft, const bool bCntr, const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive ) :
- SwNumberPortion( rGraphicFollowedBy, NULL, bLft, bCntr, nMinDst,
+ SwNumberPortion( rGraphicFollowedBy, nullptr, bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive ),
pBrush( new SvxBrushItem(RES_BACKGROUND) ), nId( 0 )
{
@@ -798,7 +798,7 @@ SwGrfNumPortion::~SwGrfNumPortion()
{
Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic());
if (pGraph)
- pGraph->StopAnimation( 0, nId );
+ pGraph->StopAnimation( nullptr, nId );
}
delete pBrush;
}
@@ -946,7 +946,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
{
Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic());
if (pGraph)
- pGraph->StopAnimation(0,nId);
+ pGraph->StopAnimation(nullptr,nId);
rInf.GetTextFrm()->getRootFrm()->GetCurrShell()->InvalidateWindows( aTmp );
}
@@ -973,7 +973,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic());
if (pGraph)
- pGraph->StopAnimation( 0, nId );
+ pGraph->StopAnimation( nullptr, nId );
}
}
@@ -1050,9 +1050,9 @@ void SwTextFrm::StopAnimation( OutputDevice* pOut )
// The NumberPortion is always at the first char,
// which means we can cancel as soon as we've reached a portion
// with a length > 0
- pPor = pPor->GetLen() ? 0 : pPor->GetPortion();
+ pPor = pPor->GetLen() ? nullptr : pPor->GetPortion();
}
- pLine = pLine->GetLen() ? 0 : pLine->GetNext();
+ pLine = pLine->GetLen() ? nullptr : pLine->GetNext();
}
}
}
@@ -1216,7 +1216,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
aTmpFont.SetSize( aFontSize, nScrp );
}
- SwDrawTextInfo aDrawInf( pSh, *rInf.GetOut(), 0, aExpand, i, 1 );
+ SwDrawTextInfo aDrawInf( pSh, *rInf.GetOut(), nullptr, aExpand, i, 1 );
Size aSize = aTmpFont._GetTextSize( aDrawInf );
const sal_uInt16 nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
aPos[ i ] = (sal_uInt16)aSize.Width();
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 56739b441c6d..69088b37b4b4 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -54,13 +54,13 @@ protected:
public:
SwFieldPortion( const SwFieldPortion& rField );
- SwFieldPortion( const OUString &rExpand, SwFont *pFnt = 0, bool bPlaceHolder = false );
+ SwFieldPortion( const OUString &rExpand, SwFont *pFnt = nullptr, bool bPlaceHolder = false );
virtual ~SwFieldPortion();
sal_uInt16 m_nAttrFieldType;
void TakeNextOffset( const SwFieldPortion* pField );
void CheckScript( const SwTextSizeInfo &rInf );
- inline bool HasFont() const { return 0 != pFnt; }
+ inline bool HasFont() const { return nullptr != pFnt; }
// #i89179# - made public
inline const SwFont *GetFont() const { return pFnt; }
@@ -112,7 +112,7 @@ public:
class SwHiddenPortion : public SwFieldPortion
{
public:
- inline SwHiddenPortion( const OUString &rExpand, SwFont *pFntL = 0 )
+ inline SwHiddenPortion( const OUString &rExpand, SwFont *pFntL = nullptr )
: SwFieldPortion( rExpand, pFntL )
{ SetLen(1); SetWhichPor( POR_HIDDEN ); }
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 5ae1943ffa51..9fa002ba6b6b 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -67,7 +67,7 @@ bool SwFlyPortion::Format( SwTextFormatInfo &rInf )
}
// resetting
- rInf.SetFly( 0 );
+ rInf.SetFly( nullptr );
rInf.Width( rInf.RealWidth() );
rInf.GetParaPortion()->SetFly();
@@ -149,8 +149,8 @@ bool SwFlyCntPortion::Format( SwTextFormatInfo &rInf )
*/
void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd )
{
- SwSortedObjs *pObjs = 0L;
- if ( 0 != (pObjs = GetDrawObjs()) )
+ SwSortedObjs *pObjs = nullptr;
+ if ( nullptr != (pObjs = GetDrawObjs()) )
{
for ( size_t i = 0; GetDrawObjs() && i < pObjs->size(); ++i )
{
@@ -186,7 +186,7 @@ sal_Int32 SwTextFrm::CalcFlyPos( SwFrameFormat* pSearch )
OSL_ENSURE( pHints, "CalcFlyPos: Why me?" );
if( !pHints )
return COMPLETE_STRING;
- SwTextAttr* pFound = NULL;
+ SwTextAttr* pFound = nullptr;
for ( size_t i = 0; i < pHints->Count(); ++i )
{
SwTextAttr *pHt = pHints->Get( i );
@@ -315,7 +315,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase,
{
// Use new class to position object
// Determine drawing object
- SdrObject* pSdrObj = 0L;
+ SdrObject* pSdrObj = nullptr;
if( bDraw )
{
// Determine drawing object ('master' or 'virtual') by frame
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 0a0b5e7e283a..e5e130166997 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -163,28 +163,28 @@ SwMarginPortion::SwMarginPortion( const sal_uInt16 nFixedWidth )
*/
void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
- SwGluePortion *pRight = 0;
- bool bNoMove = 0 != pCurr->GetpKanaComp();
+ SwGluePortion *pRight = nullptr;
+ bool bNoMove = nullptr != pCurr->GetpKanaComp();
while( pRight != this )
{
// 1) We search for the left Glue
SwLinePortion *pPos = this;
- SwGluePortion *pLeft = 0;
+ SwGluePortion *pLeft = nullptr;
while( pPos )
{
if( pPos->InFixMargGrp() )
pLeft = static_cast<SwGluePortion*>(pPos);
pPos = pPos->GetPortion();
if( pPos == pRight)
- pPos = 0;
+ pPos = nullptr;
}
// Two adjoining FlyPortions are merged
if( pRight && pLeft && pLeft->GetPortion() == pRight )
{
pRight->MoveAllGlue( pLeft );
- pRight = 0;
+ pRight = nullptr;
}
sal_uInt16 nRightGlue = pRight && 0 < pRight->GetPrtGlue()
? sal_uInt16(pRight->GetPrtGlue()) : 0;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index cb25bfa36f96..ac8a87d3f903 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -182,7 +182,7 @@ bool SwLineLayout::Format( SwTextFormatInfo &rInf )
SwMarginPortion *SwLineLayout::CalcLeftMargin()
{
SwMarginPortion *pLeft = (GetPortion() && GetPortion()->IsMarginPortion()) ?
- static_cast<SwMarginPortion *>(GetPortion()) : 0;
+ static_cast<SwMarginPortion *>(GetPortion()) : nullptr;
if( !GetPortion() )
SetPortion(SwTextPortion::CopyLinePortion(*this));
if( !pLeft )
@@ -197,7 +197,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
pLeft->Width( 0 );
pLeft->SetLen( 0 );
pLeft->SetAscent( 0 );
- pLeft->SetPortion( NULL );
+ pLeft->SetPortion( nullptr );
pLeft->SetFixWidth(0);
}
@@ -213,7 +213,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
GetKanaComp().pop_front();
}
else
- pPos = 0;
+ pPos = nullptr;
}
return pLeft;
}
@@ -260,7 +260,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
SetHanging( false );
bool bTmpDummy = !GetLen();
- SwFlyCntPortion* pFlyCnt = 0;
+ SwFlyCntPortion* pFlyCnt = nullptr;
if( bTmpDummy )
{
nFlyAscent = 0;
@@ -922,7 +922,7 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL )
// we search for connecting opportunities (kashida)
else if ( bAdjustBlock && i18n::ScriptType::COMPLEX == nScript )
{
- SwScanner aScanner( rNode, rNode.GetText(), 0, ModelToViewHelper(),
+ SwScanner aScanner( rNode, rNode.GetText(), nullptr, ModelToViewHelper(),
i18n::WordType::DICTIONARY_WORD,
nLastKashida, nChg );
@@ -1210,7 +1210,7 @@ void SwScriptInfo::UpdateBidiInfo( const OUString& rText )
nError = U_ZERO_ERROR;
ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(), // UChar != sal_Unicode in MinGW
- nDefaultDir, NULL, &nError );
+ nDefaultDir, nullptr, &nError );
nError = U_ZERO_ERROR;
int nCount = ubidi_countRuns( pBidi, &nError );
int32_t nStart = 0;
@@ -1938,7 +1938,7 @@ SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTextNode& rTNd,
bool bAllowInvalid )
{
SwIterator<SwTextFrm,SwTextNode> aIter( rTNd );
- SwScriptInfo* pScriptInfo = 0;
+ SwScriptInfo* pScriptInfo = nullptr;
for( SwTextFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
@@ -1947,7 +1947,7 @@ SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTextNode& rTNd,
{
if ( bAllowInvalid || COMPLETE_STRING == pScriptInfo->GetInvalidityA() )
break;
- pScriptInfo = 0;
+ pScriptInfo = nullptr;
}
}
@@ -1996,9 +1996,9 @@ const SwDropPortion *SwParaPortion::FindDropPortion() const
pPos = pPos->GetPortion();
if( pPos && pPos->IsDropPortion() )
return static_cast<const SwDropPortion *>(pPos);
- pLay = pLay->GetLen() ? NULL : pLay->GetNext();
+ pLay = pLay->GetLen() ? nullptr : pLay->GetNext();
}
- return NULL;
+ return nullptr;
}
void SwLineLayout::Init( SwLinePortion* pNextPortion )
@@ -2062,7 +2062,7 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode, MultiSelect
assert((rNode.GetText().isEmpty() && rHiddenMulti.GetTotalRange().Len() == 1)
|| (rNode.GetText().getLength() == rHiddenMulti.GetTotalRange().Len()));
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) &&
static_cast<const SvxCharHiddenItem*>(pItem)->GetValue() )
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 8e398446e748..e5640a76a228 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -143,7 +143,7 @@ public:
inline const SwLineLayout *GetNext() const { return pNext; }
inline void SetNext( SwLineLayout *pNew ) { pNext = pNew; }
- void Init( SwLinePortion *pNextPortion = NULL);
+ void Init( SwLinePortion *pNextPortion = nullptr);
// Collects the data for the line
void CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
@@ -161,10 +161,10 @@ public:
virtual bool Format( SwTextFormatInfo &rInf ) override;
// Stuff for justified alignment
- inline bool IsSpaceAdd() { return pLLSpaceAdd != NULL; }
+ inline bool IsSpaceAdd() { return pLLSpaceAdd != nullptr; }
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
- inline void FinishSpaceAdd() { delete pLLSpaceAdd; pLLSpaceAdd = NULL; }
+ inline void FinishSpaceAdd() { delete pLLSpaceAdd; pLLSpaceAdd = nullptr; }
inline sal_uInt16 GetLLSpaceAddCount() const { return sal::static_int_cast< sal_uInt16 >(pLLSpaceAdd->size()); }
inline void SetLLSpaceAdd( long nNew, sal_uInt16 nIdx )
{
@@ -179,7 +179,7 @@ public:
// Stuff for Kana compression
inline void SetKanaComp( std::deque<sal_uInt16>* pNew ){ pKanaComp = pNew; }
- inline void FinishKanaComp() { delete pKanaComp; pKanaComp = NULL; }
+ inline void FinishKanaComp() { delete pKanaComp; pKanaComp = nullptr; }
inline std::deque<sal_uInt16>* GetpKanaComp() const { return pKanaComp; }
inline std::deque<sal_uInt16>& GetKanaComp() { return *pKanaComp; }
@@ -219,7 +219,7 @@ public:
SwTwips& _orDescent,
SwTwips& _orObjAscent,
SwTwips& _orObjDescent,
- const SwLinePortion* _pDontConsiderPortion = NULL,
+ const SwLinePortion* _pDontConsiderPortion = nullptr,
const bool _bNoFlyCntPorAndLinePor = false ) const;
OUTPUT_OPERATOR_OVERRIDE
@@ -324,7 +324,7 @@ inline void SwLineLayout::ResetFlags()
}
inline SwLineLayout::SwLineLayout()
- : pNext( 0 ), pLLSpaceAdd( 0 ), pKanaComp( 0 ), nRealHeight( 0 ),
+ : pNext( nullptr ), pLLSpaceAdd( nullptr ), pKanaComp( nullptr ), nRealHeight( 0 ),
bUnderscore( false )
{
ResetFlags();
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 01fc7285ebf2..3aec6cad6347 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -41,7 +41,7 @@ bool ChkChain( SwLinePortion *pStart )
{
// der Lebensretter
pPor = pStart->GetPortion();
- pStart->SetPortion(0);
+ pStart->SetPortion(nullptr);
pPor->Truncate();
pStart->SetPortion( pPor );
return false;
@@ -60,7 +60,7 @@ SwLinePortion::~SwLinePortion()
SwLinePortion *SwLinePortion::Compress()
{
- return GetLen() || Width() ? this : 0;
+ return GetLen() || Width() ? this : nullptr;
}
sal_uInt16 SwLinePortion::GetViewWidth( const SwTextSizeInfo & ) const
@@ -69,7 +69,7 @@ sal_uInt16 SwLinePortion::GetViewWidth( const SwTextSizeInfo & ) const
}
SwLinePortion::SwLinePortion( ) :
- pPortion( NULL ),
+ pPortion( nullptr ),
nLineLength( 0 ),
nAscent( 0 ),
nWhichPor( POR_LIN ),
@@ -159,12 +159,12 @@ void SwLinePortion::_Truncate()
{ OSL_ENSURE( pPos != this, "SwLinePortion::Truncate: loop" );
SwLinePortion *pLast = pPos;
pPos = pPos->GetPortion();
- pLast->SetPortion( 0 );
+ pLast->SetPortion( nullptr );
delete pLast;
} while( pPos );
- pPortion = 0;
+ pPortion = nullptr;
}
// Es wird immer hinter uns eingefuegt.
@@ -193,7 +193,7 @@ SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
{
SwLinePortion *pPos = FindLastPortion();
pPos->SetPortion( pIns );
- pIns->SetPortion( 0 );
+ pIns->SetPortion( nullptr );
#if OSL_DEBUG_LEVEL > 0
ChkChain( this );
#endif
@@ -205,7 +205,7 @@ SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
SwLinePortion *pPrev = pVictim->FindPrevPortion( this );
OSL_ENSURE( pPrev, "SwLinePortion::Cut(): can't cut" );
pPrev->SetPortion( pVictim->GetPortion() );
- pVictim->SetPortion(0);
+ pVictim->SetPortion(nullptr);
return pVictim;
}
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index e78d96e25e5c..85d2a2f81eca 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -202,7 +202,7 @@ inline bool SwLinePortion::operator==(const SwLinePortion &rPortion ) const
inline SwLinePortion::SwLinePortion(const SwLinePortion &rPortion) :
SwPosSize( rPortion ),
- pPortion( 0 ),
+ pPortion( nullptr ),
nLineLength( rPortion.nLineLength ),
nAscent( rPortion.nAscent ),
nWhichPor( rPortion.nWhichPor ),
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index b3145b50ff44..137ed694edfa 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -233,7 +233,7 @@ sal_Int32 SwBidiPortion::GetSpaceCnt( const SwTextSizeInfo &rInf ) const
// brackets, these will be deleted.
SwDoubleLinePortion::SwDoubleLinePortion(SwDoubleLinePortion& rDouble, sal_Int32 nEnd)
: SwMultiPortion(nEnd)
- , pBracket(0)
+ , pBracket(nullptr)
, nLineDiff(0)
, nBlank1(0)
, nBlank2(0)
@@ -294,21 +294,21 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
if( pBracket->cPre > 255 )
{
OUString aText = OUString(pBracket->cPre);
- nTmp = SwScriptInfo::WhichFont( 0, &aText, 0 );
+ nTmp = SwScriptInfo::WhichFont( 0, &aText, nullptr );
}
pBracket->nPreScript = nTmp;
nTmp = SW_SCRIPTS;
if( pBracket->cPost > 255 )
{
OUString aText = OUString(pBracket->cPost);
- nTmp = SwScriptInfo::WhichFont( 0, &aText, 0 );
+ nTmp = SwScriptInfo::WhichFont( 0, &aText, nullptr );
}
pBracket->nPostScript = nTmp;
if( !pBracket->cPre && !pBracket->cPost )
{
delete pBracket;
- pBracket = 0;
+ pBracket = nullptr;
}
// double line portions have the same direction as the frame directions
@@ -577,7 +577,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
pRubyFont->SetVertical( rFnt.GetOrientation() );
}
else
- pRubyFont = NULL;
+ pRubyFont = nullptr;
OUString aStr = rRuby.GetText().copy( nOffs );
SwFieldPortion *pField = new SwFieldPortion( aStr, pRubyFont );
@@ -713,7 +713,7 @@ void SwRubyPortion::CalcRubyOffset()
return;
}
const SwLinePortion *pPor = pCurr->GetFirstPortion();
- const SwFieldPortion *pField = NULL;
+ const SwFieldPortion *pField = nullptr;
while( pPor )
{
if( pPor->InFieldGrp() )
@@ -820,10 +820,10 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
{
rPos = bFieldBidi ? rPos + 1 : rSI.NextDirChg( rPos, &nCurrLevel );
if ( COMPLETE_STRING == rPos )
- return NULL;
+ return nullptr;
SwMultiCreator *pRet = new SwMultiCreator;
- pRet->pItem = NULL;
- pRet->pAttr = NULL;
+ pRet->pItem = nullptr;
+ pRet->pAttr = nullptr;
pRet->nId = SW_MC_BIDI;
pRet->nLevel = nCurrLevel + 1;
return pRet;
@@ -831,32 +831,32 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
// a bidi portion can only contain other bidi portions
if ( pMulti )
- return NULL;
+ return nullptr;
- const SvxCharRotateItem* pRotate = NULL;
+ const SvxCharRotateItem* pRotate = nullptr;
const SfxPoolItem* pRotItem;
if( SfxItemState::SET == m_pFrm->GetTextNode()->GetSwAttrSet().
GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) &&
static_cast<const SvxCharRotateItem*>(pRotItem)->GetValue() )
pRotate = static_cast<const SvxCharRotateItem*>(pRotItem);
else
- pRotItem = NULL;
- const SvxTwoLinesItem* p2Lines = NULL;
+ pRotItem = nullptr;
+ const SvxTwoLinesItem* p2Lines = nullptr;
const SwTextNode *pLclTextNode = m_pFrm->GetTextNode();
if( !pLclTextNode )
- return NULL;
+ return nullptr;
const SfxPoolItem* pItem;
if( SfxItemState::SET == pLclTextNode->GetSwAttrSet().
GetItemState( RES_CHRATR_TWO_LINES, true, &pItem ) &&
static_cast<const SvxTwoLinesItem*>(pItem)->GetValue() )
p2Lines = static_cast<const SvxTwoLinesItem*>(pItem);
else
- pItem = NULL;
+ pItem = nullptr;
const SwpHints *pHints = pLclTextNode->GetpSwpHints();
if( !pHints && !p2Lines && !pRotate )
- return NULL;
- const SwTextAttr *pRuby = NULL;
+ return nullptr;
+ const SwTextAttr *pRuby = nullptr;
bool bTwo = false;
bool bRot = false;
size_t n2Lines = SAL_MAX_SIZE;
@@ -874,13 +874,13 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
pRuby = pTmp;
else
{
- const SvxCharRotateItem* pRoTmp = NULL;
+ const SvxCharRotateItem* pRoTmp = nullptr;
if( lcl_HasRotation( *pTmp, pRoTmp, bRot ) )
{
nRotate = bRot ? i : nCount;
pRotate = pRoTmp;
}
- const SvxTwoLinesItem* p2Tmp = NULL;
+ const SvxTwoLinesItem* p2Tmp = nullptr;
if( lcl_Has2Lines( *pTmp, p2Tmp, bTwo ) )
{
n2Lines = bTwo ? i : nCount;
@@ -894,7 +894,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
// the end of the multiportion is the end of the ruby attribute.
rPos = *pRuby->End();
SwMultiCreator *pRet = new SwMultiCreator;
- pRet->pItem = NULL;
+ pRet->pItem = nullptr;
pRet->pAttr = pRuby;
pRet->nId = SW_MC_RUBY;
pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0;
@@ -916,7 +916,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
if( n2Lines < nCount )
{
- pRet->pItem = NULL;
+ pRet->pItem = nullptr;
pRet->pAttr = pHints->Get(n2Lines);
aEnd.push_front( *pRet->pAttr->End() );
if( pItem )
@@ -931,7 +931,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
else
{
pRet->pItem = pItem;
- pRet->pAttr = NULL;
+ pRet->pAttr = nullptr;
aEnd.push_front( GetText().getLength() );
}
pRet->nId = SW_MC_DOUBLE;
@@ -1059,7 +1059,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
bOn = true;
break;
}
- p2Lines = NULL;
+ p2Lines = nullptr;
if( lcl_Has2Lines( *pTmp, p2Lines, bTwo ) )
{
if( bTwo == bOn )
@@ -1088,7 +1088,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
bOn = true;
if( nRotate < nCount )
{
- pRet->pItem = NULL;
+ pRet->pItem = nullptr;
pRet->pAttr = pHints->Get(nRotate);
aEnd.push_front( *pRet->pAttr->End() );
if( pRotItem )
@@ -1101,7 +1101,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
else
{
pRet->pItem = pRotItem;
- pRet->pAttr = NULL;
+ pRet->pAttr = nullptr;
aEnd.push_front( GetText().getLength() );
}
for( size_t i = 0; i < nCount; ++i )
@@ -1155,7 +1155,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos,
rPos = n2Start;
return pRet;
}
- return NULL;
+ return nullptr;
}
// A little helper class to manage the spaceadd-arrays of the text adjustment
@@ -1203,7 +1203,7 @@ SwSpaceManipulator::SwSpaceManipulator( SwTextPaintInfo& rInf,
bSpaceChg = rMulti.ChgSpaceAdd( &rMulti.GetRoot(), nSpaceAdd );
}
else if( rMulti.HasTabulator() )
- rInfo.SetpSpaceAdd( NULL );
+ rInfo.SetpSpaceAdd( nullptr );
}
else if ( ! rMulti.IsBidi() )
{
@@ -1229,7 +1229,7 @@ void SwSpaceManipulator::SecondLine()
else
{
rInfo.SetpSpaceAdd( (!rMulti.IsDouble() || rMulti.HasTabulator() ) ?
- 0 : pOldSpaceAdd );
+ nullptr : pOldSpaceAdd );
rInfo.SetSpaceIdx( nOldSpIdx);
}
}
@@ -1327,8 +1327,8 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
}
else
{
- pFontSave = NULL;
- pTmpFnt = NULL;
+ pFontSave = nullptr;
+ pTmpFnt = nullptr;
}
if( rMulti.HasBrackets() )
@@ -1388,7 +1388,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
bool bRest = pLay->IsRest();
bool bFirst = true;
- OSL_ENSURE( 0 == GetInfo().GetUnderFnt() || rMulti.IsBidi(),
+ OSL_ENSURE( nullptr == GetInfo().GetUnderFnt() || rMulti.IsBidi(),
" Only BiDi portions are allowed to use the common underlining font" );
do
@@ -1506,7 +1506,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
// delete underline font
delete GetInfo().GetUnderFnt();
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
if( rMulti.HasRotation() )
{
@@ -1550,7 +1550,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
if ( ! rMulti.IsBidi() )
{
delete GetInfo().GetUnderFnt();
- GetInfo().SetUnderFnt( 0 );
+ GetInfo().SetUnderFnt( nullptr );
}
GetInfo().SetIdx( nOldIdx );
@@ -1583,16 +1583,16 @@ static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpField
pLast = rpField;
rpField = rpField->GetPortion();
}
- bool bRet = rpField != 0;
+ bool bRet = rpField != nullptr;
if( bRet )
{
if( static_cast<SwFieldPortion*>(rpField)->IsFollow() )
{
rpField->Truncate();
- pLast->SetPortion( NULL );
+ pLast->SetPortion( nullptr );
}
else
- rpField = NULL;
+ rpField = nullptr;
}
pLine->Truncate();
return bRet;
@@ -1718,17 +1718,17 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
if( !rMulti.IsDouble() && rMulti.GetRoot().GetNext() )
lcl_ExtractFieldFollow( rMulti.GetRoot().GetNext(), pSecondRest );
else
- pSecondRest = NULL;
+ pSecondRest = nullptr;
}
else
{
pFirstRest = rMulti.GetRoot().GetPortion();
pSecondRest = rMulti.GetRoot().GetNext() ?
- rMulti.GetRoot().GetNext()->GetPortion() : NULL;
+ rMulti.GetRoot().GetNext()->GetPortion() : nullptr;
if( pFirstRest )
- rMulti.GetRoot().SetPortion( NULL );
+ rMulti.GetRoot().SetPortion( nullptr );
if( pSecondRest )
- rMulti.GetRoot().GetNext()->SetPortion( NULL );
+ rMulti.GetRoot().GetNext()->SetPortion( nullptr );
rMulti.SetFormatted();
nMultiLen = nMultiLen - rInf.GetIdx();
}
@@ -1746,8 +1746,8 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
// line break determination.
bool bFirstMulti = rInf.GetIdx() != rInf.GetLineStart();
- SwLinePortion *pNextFirst = NULL;
- SwLinePortion *pNextSecond = NULL;
+ SwLinePortion *pNextFirst = nullptr;
+ SwLinePortion *pNextSecond = nullptr;
bool bRet = false;
SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
@@ -1831,7 +1831,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
}
else
aTmp.SetRest( aInf.GetRest() );
- aInf.SetRest( NULL );
+ aInf.SetRest( nullptr );
// in grid mode we temporarily have to disable the grid for the ruby line
if ( bHasGrid && aTmp.IsRuby() && ! bRubyTop )
@@ -1889,7 +1889,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
bFirstMulti = true;
}
delete pNextFirst;
- pNextFirst = NULL;
+ pNextFirst = nullptr;
} while ( true );
pMulti = pOldMulti;
@@ -1923,7 +1923,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
// Kashida justification can be combined with white-space justification to various extents.
// The default value of bSkipKashida (the 4th parameter passed to 'CalcNewBlock') is false.
// Only when Adjust is SVX_ADJUST_BLOCK ( alignment is justify ), multiportion will be showed in justification in new code.
- CalcNewBlock( pLine, NULL, rMulti.Width(), GetAdjust() != SVX_ADJUST_BLOCK );
+ CalcNewBlock( pLine, nullptr, rMulti.Width(), GetAdjust() != SVX_ADJUST_BLOCK );
GetInfo().SetMulti( false );
}
@@ -1995,7 +1995,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
{
// we try to keep our ruby portion together
lcl_TruncateMultiPortion( rMulti, rInf, nStartIdx );
- pTmp = 0;
+ pTmp = nullptr;
}
}
else if( rMulti.HasRotation() )
@@ -2022,7 +2022,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
if ( pPor->GetPortion() && pPor->GetPortion()->IsHolePortion() )
{
SwLinePortion* pHolePor = pPor->GetPortion();
- pPor->SetPortion( NULL );
+ pPor->SetPortion( nullptr );
aRoot.SetLen( aRoot.GetLen() - pHolePor->GetLen() );
rMulti.SetLen( rMulti.GetLen() - pHolePor->GetLen() );
rMulti.SetPortion( pHolePor );
@@ -2035,7 +2035,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
static_cast<SwBidiPortion&>(rMulti).GetLevel() );
}
else
- pTmp = NULL;
+ pTmp = nullptr;
if ( ! rMulti.GetLen() && rInf.GetLast() )
{
@@ -2085,12 +2085,12 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
sal_Int32 nPosition )
{
if( !nPosition )
- return NULL;
+ return nullptr;
sal_Int32 nMultiPos = nPosition - pLine->GetLen();
- const SwMultiPortion *pTmpMulti = NULL;
- const SwMultiPortion *pHelpMulti = NULL;
+ const SwMultiPortion *pTmpMulti = nullptr;
+ const SwMultiPortion *pHelpMulti = nullptr;
const SwLinePortion* pPor = pLine->GetFirstPortion();
- SwFieldPortion *pField = NULL;
+ SwFieldPortion *pField = nullptr;
while( pPor )
{
if( pPor->GetLen() )
@@ -2098,13 +2098,13 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
if( !pHelpMulti )
{
nMultiPos = nMultiPos + pPor->GetLen();
- pTmpMulti = NULL;
+ pTmpMulti = nullptr;
}
}
if( pPor->InFieldGrp() )
{
if( !pHelpMulti )
- pTmpMulti = NULL;
+ pTmpMulti = nullptr;
pField = const_cast<SwFieldPortion*>(static_cast<const SwFieldPortion*>(pPor));
}
else if( pPor->IsMultiPortion() )
@@ -2112,7 +2112,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
OSL_ENSURE( !pHelpMulti || pHelpMulti->IsBidi(),
"Nested multiportions are forbidden." );
- pField = NULL;
+ pField = nullptr;
pTmpMulti = static_cast<const SwMultiPortion*>(pPor);
}
pPor = pPor->GetPortion();
@@ -2127,7 +2127,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
// line, if we are in a double line portion
if( !pHelpMulti->IsRuby() )
pPor = pHelpMulti->GetRoot().GetNext();
- pTmpMulti = NULL;
+ pTmpMulti = nullptr;
}
else
{ // Now we enter a multiportion, in a ruby portion we take the
@@ -2143,9 +2143,9 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
}
}
if( pField && !pField->HasFollow() )
- pField = NULL;
+ pField = nullptr;
- SwLinePortion *pRest = NULL;
+ SwLinePortion *pRest = nullptr;
if( pField )
{
const SwTextAttr *pHint = GetAttr( nPosition - 1 );
@@ -2159,7 +2159,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
else
{
delete pRest;
- pRest = NULL;
+ pRest = nullptr;
}
}
}
@@ -2167,14 +2167,14 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
return pRest;
nPosition = nMultiPos + pHelpMulti->GetLen();
- SwMultiCreator* pCreate = GetInfo().GetMultiCreator( nMultiPos, 0 );
+ SwMultiCreator* pCreate = GetInfo().GetMultiCreator( nMultiPos, nullptr );
if ( !pCreate )
{
OSL_ENSURE( !pHelpMulti->GetLen(), "Multiportion without attribute?" );
if ( nMultiPos )
--nMultiPos;
- pCreate = GetInfo().GetMultiCreator( --nMultiPos, 0 );
+ pCreate = GetInfo().GetMultiCreator( --nMultiPos, nullptr );
}
if (!pCreate)
@@ -2191,7 +2191,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
else if( pHelpMulti->IsRuby() )
{
bool bRubyTop;
- bool* pRubyPos = 0;
+ bool* pRubyPos = nullptr;
if ( GetInfo().SnapToGrid() )
{
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 5ec7998c17ee..ed87a58271e4 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -86,7 +86,7 @@ class SwMultiPortion : public SwLinePortion
sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees)
protected:
explicit SwMultiPortion(sal_Int32 nEnd)
- : pFieldRest(0)
+ : pFieldRest(nullptr)
, bTab1(false)
, bTab2(false)
, bDouble(false)
@@ -242,7 +242,7 @@ public:
inline bool SwMultiPortion::HasBrackets() const
{
- return IsDouble() && 0 != static_cast<const SwDoubleLinePortion*>(this)->GetBrackets();
+ return IsDouble() && nullptr != static_cast<const SwDoubleLinePortion*>(this)->GetBrackets();
}
#endif
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 68bfd3b7cc19..1c45f5d5bac6 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -88,7 +88,7 @@ sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const
{ return 0; }
SwLinePortion *SwBreakPortion::Compress()
-{ return (GetPortion() && GetPortion()->InTextGrp() ? 0 : this); }
+{ return (GetPortion() && GetPortion()->InTextGrp() ? nullptr : this); }
void SwBreakPortion::Paint( const SwTextPaintInfo &rInf ) const
{
@@ -240,7 +240,7 @@ SwTwips SwTextFrm::EmptyHeight() const
if ( IsVertical() )
pFnt->SetVertical( 2700 );
- OutputDevice* pOut = pSh ? pSh->GetOut() : 0;
+ OutputDevice* pOut = pSh ? pSh->GetOut() : nullptr;
if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsPrtFormat() )
{
@@ -255,7 +255,7 @@ SwTwips SwTextFrm::EmptyHeight() const
{
SwAttrHandler aAttrHandler;
aAttrHandler.Init( GetTextNode()->GetSwAttrSet(),
- *GetTextNode()->getIDocumentSettingAccess(), NULL );
+ *GetTextNode()->getIDocumentSettingAccess(), nullptr );
SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler,
nRedlPos, true );
}
@@ -283,7 +283,7 @@ bool SwTextFrm::FormatEmpty()
bool bCollapse = EmptyHeight( ) == 1 && this->IsCollapse( );
if ( HasFollow() || GetTextNode()->GetpSwpHints() ||
- 0 != GetTextNode()->GetNumRule() ||
+ nullptr != GetTextNode()->GetNumRule() ||
GetTextNode()->HasHiddenCharAttribute( true ) ||
IsInFootnote() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
return false;
@@ -381,7 +381,7 @@ bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
SwFontAccess aFontAccess( pFormat, pSh );
SwFont aFnt( aFontAccess.Get()->GetFont() );
- OutputDevice *pOut = 0;
+ OutputDevice *pOut = nullptr;
if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsPrtFormat() )
pOut = GetTextNode()->getIDocumentDeviceAccess().getReferenceDevice( true );
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index e3a6388e15fc..2cf9befa9790 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -51,7 +51,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
const SwLinePortion& rPor )
{
sal_Int32 nPos, nEnd;
- const SwScriptInfo* pSI = 0;
+ const SwScriptInfo* pSI = nullptr;
if ( pStr )
{
@@ -114,7 +114,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
{
if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
{
- const sal_Int32 nKashRes = pSI->KashidaJustify( 0, 0, nPos, nEnd - nPos );
+ const sal_Int32 nKashRes = pSI->KashidaJustify( nullptr, nullptr, nPos, nEnd - nPos );
// i60591: need to check result of KashidaJustify
// determine if kashida justification is applicable
if (nKashRes != -1)
@@ -130,7 +130,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
if ( LANGUAGE_THAI == aLang )
{
- nCnt = SwScriptInfo::ThaiJustify( *pStr, 0, 0, nPos, nEnd - nPos );
+ nCnt = SwScriptInfo::ThaiJustify( *pStr, nullptr, nullptr, nPos, nEnd - nPos );
const SwLinePortion* pPor = rPor.GetPortion();
if ( pPor && ( pPor->IsKernPortion() ||
@@ -442,7 +442,7 @@ bool SwTextPortion::Format( SwTextFormatInfo &rInf )
Width( 0 );
SetLen( 0 );
SetAscent( 0 );
- SetPortion( NULL ); // ????
+ SetPortion( nullptr ); // ????
return true;
}
@@ -543,9 +543,9 @@ void SwTextPortion::Paint( const SwTextPaintInfo &rInf ) const
const SwWrongList *pGrammarCheckList = rInf.GetGrammarCheckList();
const SwWrongList *pSmarttags = rInf.GetSmartTags();
- const bool bWrong = 0 != pWrongList;
- const bool bGrammarCheck = 0 != pGrammarCheckList;
- const bool bSmartTags = 0 != pSmarttags;
+ const bool bWrong = nullptr != pWrongList;
+ const bool bGrammarCheck = nullptr != pGrammarCheckList;
+ const bool bSmartTags = nullptr != pSmarttags;
if ( bWrong || bSmartTags || bGrammarCheck )
rInf.DrawMarkedText( *this, rInf.GetLen(), false, bWrong, bSmartTags, bGrammarCheck );
@@ -585,7 +585,7 @@ sal_Int32 SwTextPortion::GetSpaceCnt( const SwTextSizeInfo &rInf,
}
else if( !IsDropPortion() )
{
- nCnt = nCnt + lcl_AddSpace( rInf, 0, *this );
+ nCnt = nCnt + lcl_AddSpace( rInf, nullptr, *this );
nPos = GetLen();
}
rCharCnt = rCharCnt + nPos;
@@ -620,7 +620,7 @@ long SwTextPortion::CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) co
else if( !IsDropPortion() )
{
if( nSpaceAdd > 0 )
- nCnt = nCnt + lcl_AddSpace( rInf, 0, *this );
+ nCnt = nCnt + lcl_AddSpace( rInf, nullptr, *this );
else
{
nSpaceAdd = -nSpaceAdd;
@@ -743,8 +743,8 @@ void SwHolePortion::Paint( const SwTextPaintInfo &rInf ) const
// #i68503# the hole must have no decoration for a consistent visual appearance
const SwFont* pOrigFont = rInf.GetFont();
- SwFont* pHoleFont = NULL;
- SwFontSave* pFontSave = NULL;
+ SwFont* pHoleFont = nullptr;
+ SwFontSave* pFontSave = nullptr;
if( pOrigFont->GetUnderline() != UNDERLINE_NONE
|| pOrigFont->GetOverline() != UNDERLINE_NONE
|| pOrigFont->GetStrikeout() != STRIKEOUT_NONE )
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index b9ce387cb16e..ca6880bcb090 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -47,7 +47,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
{
// during HTML-Import it can happen, that no layout exists
SwRootFrm* pRootFrm = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout();
- pShell = pRootFrm ? pRootFrm->GetCurrShell() : 0;
+ pShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr;
pScriptInfo = &rScrInf;
@@ -82,7 +82,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
aAttrHandler.Init( aFontAccess.Get()->GetDefault(), pAttrSet,
*rTextNode.getIDocumentSettingAccess(), pShell, *pFnt, bVertLayout );
- aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
+ aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = nullptr;
// determine script changes if not already done for current paragraph
OSL_ENSURE( pScriptInfo, "No script info available");
@@ -91,7 +91,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
if ( g_pBreakIt->GetBreakIter().is() )
{
- pFnt->SetActual( SwScriptInfo::WhichFont( 0, 0, pScriptInfo ) );
+ pFnt->SetActual( SwScriptInfo::WhichFont( 0, nullptr, pScriptInfo ) );
sal_Int32 nChg = 0;
size_t nCnt = 0;
@@ -135,7 +135,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
const sal_uInt16 nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
if( pExtInp || USHRT_MAX != nRedlPos )
{
- const std::vector<sal_uInt16> *pArr = 0;
+ const std::vector<sal_uInt16> *pArr = nullptr;
sal_Int32 nInputStt = 0;
if( pExtInp )
{
@@ -169,20 +169,20 @@ SwRedlineItr::SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt,
SwAttrHandler& rAH, sal_Int32 nRed, bool bShw,
const std::vector<sal_uInt16> *pArr,
sal_Int32 nExtStart )
- : rDoc( *rTextNd.GetDoc() ), rAttrHandler( rAH ), pSet( 0 ),
+ : rDoc( *rTextNd.GetDoc() ), rAttrHandler( rAH ), pSet( nullptr ),
nNdIdx( rTextNd.GetIndex() ), nFirst( nRed ),
nAct( COMPLETE_STRING ), bOn( false ), bShow( bShw )
{
if( pArr )
pExt = new SwExtend( *pArr, nExtStart );
else
- pExt = NULL;
+ pExt = nullptr;
Seek (rFnt, 0, COMPLETE_STRING);
}
SwRedlineItr::~SwRedlineItr()
{
- Clear( NULL );
+ Clear( nullptr );
delete pSet;
delete pExt;
}
@@ -456,7 +456,7 @@ bool SwExtend::_Leave(SwFont& rFnt, sal_Int32 nNew)
{
rFnt = *pFnt;
delete pFnt;
- pFnt = NULL;
+ pFnt = nullptr;
return true;
}
return false;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 0863e423954a..43b6b65af3f3 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -42,11 +42,11 @@ class SwExtend
bool Inside() const { return ( nPos >= nStart && nPos < nEnd ); }
static void ActualizeFont( SwFont &rFnt, sal_uInt16 nAttr );
public:
- SwExtend( const std::vector<sal_uInt16> &rA, sal_Int32 nSt ) : pFnt(0), rArr( rA ),
+ SwExtend( const std::vector<sal_uInt16> &rA, sal_Int32 nSt ) : pFnt(nullptr), rArr( rA ),
nStart( nSt ), nPos( COMPLETE_STRING ), nEnd( nStart + rA.size() ) {}
~SwExtend() { delete pFnt; }
- bool IsOn() const { return pFnt != 0; }
- void Reset() { if( pFnt ) { delete pFnt; pFnt = NULL; } nPos = COMPLETE_STRING; }
+ bool IsOn() const { return pFnt != nullptr; }
+ void Reset() { if( pFnt ) { delete pFnt; pFnt = nullptr; } nPos = COMPLETE_STRING; }
bool Leave( SwFont& rFnt, sal_Int32 nNew )
{ return pFnt && _Leave( rFnt, nNew ); }
short Enter( SwFont& rFnt, sal_Int32 nNew );
@@ -81,7 +81,7 @@ class SwRedlineItr
{ if( pExt ) return pExt->Next( nNext ); return nNext; }
public:
SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt, SwAttrHandler& rAH,
- sal_Int32 nRedlPos, bool bShw, const std::vector<sal_uInt16> *pArr = 0,
+ sal_Int32 nRedlPos, bool bShw, const std::vector<sal_uInt16> *pArr = nullptr,
sal_Int32 nExtStart = COMPLETE_STRING );
~SwRedlineItr();
inline bool IsOn() const { return bOn || ( pExt && pExt->IsOn() ); }
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 898894726bd1..029f2d6c862f 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -88,7 +88,7 @@ SwParaPortion *SwTextFrm::GetPara()
else
mnCacheIndex = USHRT_MAX;
}
- return 0;
+ return nullptr;
}
void SwTextFrm::ClearPara()
@@ -101,7 +101,7 @@ void SwTextFrm::ClearPara()
if ( pTextLine )
{
delete pTextLine->GetPara();
- pTextLine->SetPara( 0 );
+ pTextLine->SetPara( nullptr );
}
else
mnCacheIndex = USHRT_MAX;
diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx
index 0f1435b66a2b..afa02c271dd1 100644
--- a/sw/source/core/text/txtcache.hxx
+++ b/sw/source/core/text/txtcache.hxx
@@ -33,7 +33,7 @@ class SwTextLine : public SwCacheObj
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTextLine)
- SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew = 0 );
+ SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew = nullptr );
virtual ~SwTextLine();
inline SwParaPortion *GetPara() { return pLine; }
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 3cbe90733200..33a8f31bb889 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -102,7 +102,7 @@ SwDropPortion::SwDropPortion( const sal_uInt16 nLineCnt,
const sal_uInt16 nDrpHeight,
const sal_uInt16 nDrpDescent,
const sal_uInt16 nDist )
- : pPart( 0 ),
+ : pPart( nullptr ),
nLines( nLineCnt ),
nDropHeight(nDrpHeight),
nDropDescent(nDrpDescent),
@@ -346,7 +346,7 @@ void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawBackground( *this );
// make sure that font is not rotated
- SwFont* pTmpFont = 0;
+ SwFont* pTmpFont = nullptr;
if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ) )
{
pTmpFont = new SwFont( *rInf.GetFont() );
@@ -371,7 +371,7 @@ bool SwDropPortion::FormatText( SwTextFormatInfo &rInf )
return false;
// looks like shit, but what can we do?
- rInf.SetUnderflow( 0 );
+ rInf.SetUnderflow( nullptr );
Truncate();
SetLen( nOldLen );
rInf.SetLen( nOldInfLen );
@@ -407,7 +407,7 @@ SwPosSize SwDropPortion::GetTextSize( const SwTextSizeInfo &rInf ) const
}
// robust
- SwFontSave aFontSave( rInf, pCurrPart ? &pCurrPart->GetFont() : 0 );
+ SwFontSave aFontSave( rInf, pCurrPart ? &pCurrPart->GetFont() : nullptr );
SwPosSize aPosSize( SwTextPortion::GetTextSize( rInf ) );
aPosSize.Width( aPosSize.Width() + nMyX );
@@ -507,17 +507,17 @@ void SwTextFormatter::GuessDropHeight( const sal_uInt16 nLines )
SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf )
{
if( !pDropFormat )
- return 0;
+ return nullptr;
sal_Int32 nPorLen = pDropFormat->GetWholeWord() ? 0 : pDropFormat->GetChars();
nPorLen = pFrm->GetTextNode()->GetDropLen( nPorLen );
if( !nPorLen )
{
static_cast<SwTextFormatter*>(this)->ClearDropFormat();
- return 0;
+ return nullptr;
}
- SwDropPortion *pDropPor = 0;
+ SwDropPortion *pDropPor = nullptr;
// first or second round?
if ( !( GetDropHeight() || IsOnceMore() ) )
@@ -551,7 +551,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf )
OSL_ENSURE( ! rInf.GetIdx(), "Drop Portion not at 0 position!" );
sal_Int32 nNextChg = 0;
const SwCharFormat* pFormat = pDropFormat->GetCharFormat();
- SwDropPortionPart* pCurrPart = 0;
+ SwDropPortionPart* pCurrPart = nullptr;
while ( nNextChg < nPorLen )
{
@@ -668,7 +668,7 @@ void SwDropPortion::DeleteDropCapCache()
void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf )
{
- const void* pFntNo = 0;
+ const void* pFntNo = nullptr;
sal_uInt16 nTmpIdx = 0;
OSL_ENSURE( pDrop->GetPart(),"DropPortion without part during font calculation");
@@ -1002,7 +1002,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf )
// And now for another round
nDropHeight = nLines = 0;
delete pPart;
- pPart = NULL;
+ pPart = nullptr;
// Meanwhile use normal formatting
bFull = SwTextPortion::Format( rInf );
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index b09fad211a1d..d86959233161 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -62,7 +62,7 @@ static bool lcl_IsInBody( SwFrm *pFrm )
{
const SwFrm *pTmp = pFrm;
const SwFlyFrm *pFly;
- while ( 0 != (pFly = pTmp->FindFlyFrm()) )
+ while ( nullptr != (pFly = pTmp->FindFlyFrm()) )
pTmp = pFly->GetAnchorFrm();
return pTmp->IsInDocBody();
}
@@ -71,12 +71,12 @@ static bool lcl_IsInBody( SwFrm *pFrm )
SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
const SwTextAttr *pHint ) const
{
- SwExpandPortion *pRet = 0;
+ SwExpandPortion *pRet = nullptr;
SwFrm *pFrame = pFrm;
SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
const bool bName = rInf.GetOpt().IsFieldName();
- SwCharFormat* pChFormat = 0;
+ SwCharFormat* pChFormat = nullptr;
bool bNewFlyPor = false;
sal_uInt16 subType = 0;
@@ -91,7 +91,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
}
SwViewShell *pSh = rInf.GetVsh();
- SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 );
+ SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : nullptr );
bool const bInClipboard( pDoc == nullptr || pDoc->IsClipBoard() );
bool bPlaceHolder = false;
@@ -165,7 +165,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
static_cast<SwPageNumberField*>(pField)
->ChangeExpansion(nVirtNum, nNumPages);
pPageNr->ChangeExpansion(pDoc,
- bVirt, nNumFormat > -1 ? &nNumFormat : 0);
+ bVirt, nNumFormat > -1 ? &nNumFormat : nullptr);
}
{
OUString const aStr( (bName)
@@ -275,7 +275,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
if( bNewFlyPor )
{
- SwFont *pTmpFnt = 0;
+ SwFont *pTmpFnt = nullptr;
if( !bName )
{
pTmpFnt = new SwFont( *pFnt );
@@ -301,7 +301,7 @@ static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr & rHint, const bool bPrefi
OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
if (pField)
{
- pField->GetPrefixAndSuffix((bPrefix) ? &fix : 0, (bPrefix) ? 0 : &fix);
+ pField->GetPrefixAndSuffix((bPrefix) ? &fix : nullptr, (bPrefix) ? nullptr : &fix);
}
return new SwFieldPortion( fix );
}
@@ -340,13 +340,13 @@ SwExpandPortion * SwTextFormatter::TryNewNoLengthPortion(SwTextFormatInfo & rInf
}
}
}
- return 0;
+ return nullptr;
}
SwLinePortion *SwTextFormatter::NewExtraPortion( SwTextFormatInfo &rInf )
{
SwTextAttr *pHint = GetAttr( rInf.GetIdx() );
- SwLinePortion *pRet = 0;
+ SwLinePortion *pRet = nullptr;
if( !pHint )
{
pRet = new SwTextPortion;
@@ -416,7 +416,7 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTextFor
SwTextAttr* hint = hints->Get( i );
// Formatting for the paragraph mark is set to apply only to the (non-existent) extra character
// the at end of the txt node.
- if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetEnd() != NULL
+ if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetEnd() != nullptr
&& hint->GetStart() == *hint->GetEnd() && hint->GetStart() == node->Len())
{
std::shared_ptr<SfxItemSet> pSet(hint->GetAutoFormat().GetStyleHandle());
@@ -451,9 +451,9 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
{
if( rInf.IsNumDone() || rInf.GetTextStart() != nStart
|| rInf.GetTextStart() != rInf.GetIdx() )
- return 0;
+ return nullptr;
- SwNumberPortion *pRet = 0;
+ SwNumberPortion *pRet = nullptr;
const SwTextNode* pTextNd = GetTextFrm()->GetTextNode();
const SwNumRule* pNumRule = pTextNd->GetNumRule();
@@ -495,10 +495,10 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
// The SwFont is created dynamically and passed in the ctor,
// as the CharFormat only returns an SV-Font.
// In the dtor of SwNumberPortion, the SwFont is deleted.
- SwFont *pNumFnt = 0;
+ SwFont *pNumFnt = nullptr;
const SwAttrSet* pFormat = rNumFormat.GetCharFormat() ?
&rNumFormat.GetCharFormat()->GetAttrSet() :
- NULL;
+ nullptr;
const IDocumentSettingAccess* pIDSA = pTextNd->getIDocumentSettingAccess();
if( SVX_NUM_CHAR_SPECIAL == rNumFormat.GetNumberingType() )
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index ff93cced605d..cfb5832f8a03 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -219,7 +219,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
delete pTextRanger[ nObjCnt ];
}
::basegfx::B2DPolyPolygon aPolyPolygon;
- ::basegfx::B2DPolyPolygon* pPolyPolygon = 0L;
+ ::basegfx::B2DPolyPolygon* pPolyPolygon = nullptr;
if ( dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr )
{
@@ -311,11 +311,11 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
}
SwTextFly::SwTextFly()
- : pPage(0)
- , mpCurrAnchoredObj(0)
- , pCurrFrm(0)
- , pMaster(0)
- , mpAnchoredObjList(0)
+ : pPage(nullptr)
+ , mpCurrAnchoredObj(nullptr)
+ , pCurrFrm(nullptr)
+ , pMaster(nullptr)
+ , mpAnchoredObjList(nullptr)
, nMinBottom(0)
, nNextTop(0)
, nIndex(0)
@@ -345,7 +345,7 @@ SwTextFly::SwTextFly( const SwTextFly& rTextFly )
}
else
{
- mpAnchoredObjList = NULL;
+ mpAnchoredObjList = nullptr;
}
bOn = rTextFly.bOn;
@@ -373,15 +373,15 @@ void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm )
// #i68520#
mpCurrAnchoredObj = pTmp;
pCurrFrm = pFrm;
- pMaster = pCurrFrm->IsFollow() ? NULL : pCurrFrm;
+ pMaster = pCurrFrm->IsFollow() ? nullptr : pCurrFrm;
// #i68520#
- mpAnchoredObjList = NULL;
+ mpAnchoredObjList = nullptr;
// If we're not overlapped by a frame or if a FlyCollection does not exist
// at all, we switch off forever.
// It could be, however, that a line is added while formatting, that
// extends into a frame.
// That's why we do not optimize for: bOn = pSortedFlys && IsAnyFrm();
- bOn = pPage->GetSortedObjs() != 0;
+ bOn = pPage->GetSortedObjs() != nullptr;
bTopRule = true;
nMinBottom = 0;
nNextTop = 0;
@@ -415,7 +415,7 @@ bool SwTextFly::IsAnyFrm() const
SwRect aRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(),
pCurrFrm->Prt().SSize() );
- return ForEach( aRect, NULL, false );
+ return ForEach( aRect, nullptr, false );
}
bool SwTextFly::IsAnyObj( const SwRect &rRect ) const
@@ -534,7 +534,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
const SwNoTextFrm *pNoText =
rFly.Lower() && rFly.Lower()->IsNoTextFrm()
? static_cast<const SwNoTextFrm*>(rFly.Lower())
- : 0;
+ : nullptr;
if ( !pNoText ||
(!pNoText->IsTransparent() && !rSur.IsContour()) )
{
@@ -820,12 +820,12 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
return true;
}
- const SwFrm* pHeader = 0;
+ const SwFrm* pHeader = nullptr;
if ( pCurrFrm->GetNext() != pTmp &&
( IsFrmInSameKontext( pTmp, pCurrFrm ) ||
// #i13832#, #i24135# wrap around objects in page header
( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) &&
- 0 != ( pHeader = pTmp->FindFooterOrHeader() ) &&
+ nullptr != ( pHeader = pTmp->FindFooterOrHeader() ) &&
!pHeader->IsFooterFrm() &&
pCurrFrm->IsInDocBody() ) ) )
{
@@ -864,7 +864,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList()
const size_t nCount = pSorted ? pSorted->size() : 0;
// --> #108724# Page header/footer content doesn't have to wrap around
// floating screen objects
- const bool bFooterHeader = 0 != pCurrFrm->FindFooterOrHeader();
+ const bool bFooterHeader = nullptr != pCurrFrm->FindFooterOrHeader();
const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess();
// #i40155# - check, if frame is marked not to wrap
const bool bWrapAllowed = ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ||
@@ -989,7 +989,7 @@ SwTwips SwTextFly::CalcMinBottom() const
SwTwips nRet = 0;
const SwContentFrm *pLclMaster = GetMaster();
OSL_ENSURE(pLclMaster, "SwTextFly without master");
- const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : NULL;
+ const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : nullptr;
const size_t nCount = pDrawObj ? pDrawObj->size() : 0;
if( nCount )
{
@@ -1407,7 +1407,7 @@ bool SwTextFly::IsAnyFrm( const SwRect &rLine ) const
OSL_ENSURE( bOn, "IsAnyFrm: Why?" );
- return ForEach( rLine, NULL, false );
+ return ForEach( rLine, nullptr, false );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 4dec5172a829..267b3c9e5a50 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -382,7 +382,7 @@ void SwTextFrm::DestroyImpl()
ClearPara();
const SwContentNode* pCNd;
- if( 0 != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) &&
+ if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) &&
!pCNd->GetDoc()->IsInDtor() && HasFootnote() )
{
SwTextNode *pTextNd = static_cast<SwTextFrm*>(this)->GetTextNode();
@@ -424,7 +424,7 @@ void SwTextFrm::ResetPreps()
if ( GetCacheIdx() != USHRT_MAX )
{
SwParaPortion *pPara;
- if( 0 != (pPara = GetPara()) )
+ if( nullptr != (pPara = GetPara()) )
pPara->ResetPreps();
}
}
@@ -480,7 +480,7 @@ void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd )
if( pHints )
{
const size_t nSize = pHints->Count();
- SwPageFrm *pPage = 0;
+ SwPageFrm *pPage = nullptr;
for ( size_t i = 0; i < nSize; ++i )
{
const SwTextAttr *pHt = pHints->Get(i);
@@ -1033,7 +1033,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
hasA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getFormatAttr() ) )
{
// #i104008#
- SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if ( pViewSh )
{
pViewSh->InvalidateAccessibleParaAttrs( *this );
@@ -1102,7 +1102,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
InvalidateLineNum();
const SwAttrSet& rNewSet = *static_cast<const SwAttrSetChg*>(pNew)->GetChgSet();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
int nClear = 0;
sal_uInt16 nCount = rNewSet.Count();
@@ -1121,7 +1121,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( IsIdxInside( nPos, 1 ) )
{
const SfxPoolItem* pOldItem = pOld ?
- &(static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->Get(RES_TXTATR_FIELD)) : NULL;
+ &(static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->Get(RES_TXTATR_FIELD)) : nullptr;
if( pItem == pOldItem )
{
InvalidatePage();
@@ -1289,7 +1289,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if (isA11yRelevantAttribute(nWhich))
{
// #i88069#
- SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if ( pViewSh )
{
pViewSh->InvalidateAccessibleParaAttrs( *this );
@@ -1331,7 +1331,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
// is called by e. g. HiddenPara with 0
SwFrm *pNxt;
- if ( 0 != (pNxt = FindNext()) )
+ if ( nullptr != (pNxt = FindNext()) )
pNxt->InvalidatePrt();
}
}
@@ -1702,19 +1702,19 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( pPara->GetRepaint().HasArea() )
SetCompletePaint();
Init();
- pPara = 0;
+ pPara = nullptr;
_InvalidateSize();
}
}
else
{
if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue() )
- bParaPossiblyInvalid = Prepare( PREP_REGISTER, 0, bNotify );
+ bParaPossiblyInvalid = Prepare( PREP_REGISTER, nullptr, bNotify );
// The Frames need to be readjusted, which caused by changes
// in position
else if( HasFootnote() )
{
- bParaPossiblyInvalid = Prepare( PREP_ADJUST_FRM, 0, bNotify );
+ bParaPossiblyInvalid = Prepare( PREP_ADJUST_FRM, nullptr, bNotify );
_InvalidateSize();
}
else
@@ -1742,7 +1742,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
InvalidateSize();
_InvalidatePrt();
SwFrm* pNxt;
- if ( 0 != ( pNxt = GetIndNext() ) )
+ if ( nullptr != ( pNxt = GetIndNext() ) )
{
pNxt->_InvalidatePrt();
if ( pNxt->IsLayoutFrm() )
@@ -1802,7 +1802,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( pPara->GetRepaint().HasArea() )
SetCompletePaint();
Init();
- pPara = 0;
+ pPara = nullptr;
if( GetOfst() && !IsFollow() )
_SetOfst( 0 );
if ( bNotify )
@@ -1872,7 +1872,7 @@ SwTestFormat::SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPre, SwTwips nMax
(pFrm->Prt().*fnRect->fnSetWidth)(
(pFrm->Frm().*fnRect->fnGetWidth)() -
( rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ) ) );
- pOldPara = pFrm->HasPara() ? pFrm->GetPara() : NULL;
+ pOldPara = pFrm->HasPara() ? pFrm->GetPara() : nullptr;
pFrm->SetPara( new SwParaPortion(), false );
OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped before _Format" );
@@ -1900,7 +1900,7 @@ SwTestFormat::~SwTestFormat()
bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit )
{
- PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, 0 )
+ PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, nullptr )
if( IsLocked() && GetUpper()->Prt().Width() <= 0 )
return false;
@@ -2269,7 +2269,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont )
if ( pLastFont )
{
SwFntObj *pOldFont = pLastFont;
- pLastFont = NULL;
+ pLastFont = nullptr;
aFont.SetFntChg( true );
aFont.ChgPhysFnt( pVsh, *pOut );
mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut );
@@ -2286,7 +2286,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont )
mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut );
//coverity[var_deref_model] - pLastFont is set in SwSubFont::ChgFnt
pLastFont->Unlock();
- pLastFont = NULL;
+ pLastFont = nullptr;
pOut->SetFont( aOldFont );
}
}
@@ -2325,7 +2325,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont )
// fly content portions and the line portion.
pLineLayout->MaxAscentDescent( nAscent, nDescent,
nDummy1, nDummy2,
- 0, true );
+ nullptr, true );
// #i71281#
// Suppress wrong invalidation of printing area, if method is
// called recursive.
@@ -2478,7 +2478,7 @@ void SwTextFrm::ChgThisLines()
SwFrm *pNxt = GetNextContentFrm();
while( pNxt && pNxt->IsInTab() )
{
- if( 0 != (pNxt = pNxt->FindTabFrm()) )
+ if( nullptr != (pNxt = pNxt->FindTabFrm()) )
pNxt = pNxt->FindNextCnt();
}
if( pNxt )
@@ -2528,7 +2528,7 @@ void SwTextFrm::RecalcAllLines()
// #i78254# Restart line numbering at page change
// First body content may be in table!
if ( bRestart && pPrv && pPrv->FindPageFrm() != FindPageFrm() )
- pPrv = 0;
+ pPrv = nullptr;
nNewNum = pPrv ? static_cast<SwTextFrm*>(pPrv)->GetAllLines() : 0;
}
@@ -2555,7 +2555,7 @@ void SwTextFrm::RecalcAllLines()
void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const
{
- const SwParaPortion* pPara = IsValid() ? GetPara() : NULL;
+ const SwParaPortion* pPara = IsValid() ? GetPara() : nullptr;
if (pPara)
{
@@ -2583,7 +2583,7 @@ void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const
const SwScriptInfo* SwTextFrm::GetScriptInfo() const
{
const SwParaPortion* pPara = GetPara();
- return pPara ? &pPara->GetScriptInfo() : 0;
+ return pPara ? &pPara->GetScriptInfo() : nullptr;
}
/**
@@ -2696,7 +2696,7 @@ void SwTextFrm::repaintTextFrames( const SwTextNode& rNode )
{
SwRect aRec( pFrm->PaintArea() );
const SwRootFrm *pRootFrm = pFrm->getRootFrm();
- SwViewShell *pCurShell = pRootFrm ? pRootFrm->GetCurrShell() : NULL;
+ SwViewShell *pCurShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr;
if( pCurShell )
pCurShell->InvalidateWindows( aRec );
}
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 456c39b654f6..ed13bd3ec992 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -75,7 +75,7 @@ SwTextFrm *SwTextFrm::FindFootnoteRef( const SwTextFootnote *pFootnote )
if( SwFootnoteBossFrm::FindFootnote( pFrm, pFootnote ) )
return pFrm;
pFrm = bFwd ? pFrm->GetFollow() :
- pFrm->IsFollow() ? pFrm->FindMaster() : 0;
+ pFrm->IsFollow() ? pFrm->FindMaster() : nullptr;
}
return pFrm;
}
@@ -147,7 +147,7 @@ bool SwTextFrm::CalcPrepFootnoteAdjust()
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
aLine.TruncLines();
- SetPara( 0 ); // May be deleted!
+ SetPara( nullptr ); // May be deleted!
ResetPreps();
return false;
}
@@ -367,17 +367,17 @@ SwTextFrm *SwTextFrm::FindQuoVadisFrm()
{
// Check whether we're in a FootnoteFrm
if( GetIndPrev() || !IsInFootnote() )
- return 0;
+ return nullptr;
// To the preceding FootnoteFrm
SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm()->GetMaster();
if( !pFootnoteFrm )
- return 0;
+ return nullptr;
// Now the last Content
SwContentFrm *pCnt = pFootnoteFrm->ContainsContent();
if( !pCnt )
- return NULL;
+ return nullptr;
SwContentFrm *pLast;
do
{ pLast = pCnt;
@@ -414,10 +414,10 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen )
if( nSize )
{
- SwPageFrm* pUpdate = NULL;
+ SwPageFrm* pUpdate = nullptr;
bool bRemove = false;
- SwFootnoteBossFrm *pFootnoteBoss = 0;
- SwFootnoteBossFrm *pEndBoss = 0;
+ SwFootnoteBossFrm *pFootnoteBoss = nullptr;
+ SwFootnoteBossFrm *pEndBoss = nullptr;
bool bFootnoteEndDoc
= FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos;
for ( size_t i = nSize; i; )
@@ -519,7 +519,7 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen )
{
if( !bEndDoc || ( bEndn && pEndBoss->IsInSct() &&
!SwLayouter::Collecting( GetNode()->GetDoc(),
- pEndBoss->FindSctFrm(), NULL ) ) )
+ pEndBoss->FindSctFrm(), nullptr ) ) )
{
if( bEndn )
pEndBoss->RemoveFootnote( this, pFootnote );
@@ -626,15 +626,15 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
if( pFootnoteFrm && pFootnoteFrm->IsInSct() )
{
pBoss->RemoveFootnote( pSrcFrm, pFootnote );
- pSrcFrm = 0;
+ pSrcFrm = nullptr;
}
}
}
else if( bEnd && pSect )
{
- SwFootnoteFrm *pFootnoteFrm = pSrcFrm ? SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ) : NULL;
+ SwFootnoteFrm *pFootnoteFrm = pSrcFrm ? SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ) : nullptr;
if( pFootnoteFrm && !pFootnoteFrm->GetUpper() )
- pFootnoteFrm = NULL;
+ pFootnoteFrm = nullptr;
SwDoc *pDoc = GetNode()->GetDoc();
if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrm ) )
{
@@ -657,7 +657,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
pFootnoteBoss->ImplFindSctFrm()->GetSection()!=pSect->GetSection() )
{
pBoss->RemoveFootnote( pSrcFrm, pFootnote );
- pSrcFrm = 0;
+ pSrcFrm = nullptr;
}
}
}
@@ -748,7 +748,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
if( bBrutal )
{
pBoss->RemoveFootnote( pSrcFrm, pFootnote, false );
- SwSaveFootnoteHeight *pHeight = bEnd ? NULL : new SwSaveFootnoteHeight( pBoss, nDeadLine );
+ SwSaveFootnoteHeight *pHeight = bEnd ? nullptr : new SwSaveFootnoteHeight( pBoss, nDeadLine );
pBoss->AppendFootnote( this, pFootnote );
delete pHeight;
}
@@ -795,7 +795,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
"NewFootnotePortion with unswapped frame" );
if( !pFrm->IsFootnoteAllowed() )
- return 0;
+ return nullptr;
SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint);
const SwFormatFootnote& rFootnote = static_cast<const SwFormatFootnote&>(pFootnote->GetFootnote());
@@ -836,7 +836,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
SwTextFrm *pScrFrm = pFrm->FindFootnoteRef( pFootnote );
SwFootnoteBossFrm *pBoss = pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() );
- SwFootnoteFrm *pFootnoteFrm = NULL;
+ SwFootnoteFrm *pFootnoteFrm = nullptr;
if( pScrFrm )
pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pScrFrm, pFootnote );
@@ -865,7 +865,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
if( !pFootnoteCont )
{
rInf.SetStop( true );
- return 0;
+ return nullptr;
}
else
{
@@ -881,7 +881,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
if( pTmpFrm && *pTmpFrm < pFootnote )
{
rInf.SetStop( true );
- return 0;
+ return nullptr;
}
}
}
@@ -907,7 +907,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf,
// We're in the last Line and the Footnote has moved
// to another Page. We also want to be on that Page!
rInf.SetStop( true );
- return 0;
+ return nullptr;
}
}
}
@@ -932,7 +932,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf
"This is the wrong place for a ftnnumber" );
if( rInf.GetTextStart() != nStart ||
rInf.GetTextStart() != rInf.GetIdx() )
- return 0;
+ return nullptr;
const SwFootnoteFrm* pFootnoteFrm = pFrm->FindFootnoteFrm();
const SwTextFootnote* pFootnote = pFootnoteFrm->GetAttr();
@@ -991,23 +991,23 @@ SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) c
if( !pFrm->IsInFootnote() || pFrm->GetPrev() ||
rInf.IsErgoDone() || rInf.GetIdx() != pFrm->GetOfst() ||
pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() )
- return 0;
+ return nullptr;
// Aha, wir sind also im Fussnotenbereich
const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo();
SwTextFrm *pQuoFrm = pFrm->FindQuoVadisFrm();
if( !pQuoFrm )
- return 0;
+ return nullptr;
const SwPageFrm* pPage = pFrm->FindPageFrm();
const SwPageFrm* pQuoPage = pQuoFrm->FindPageFrm();
if( pPage == pQuoFrm->FindPageFrm() )
- return 0; // If the QuoVadis is on the same Column/Page
+ return nullptr; // If the QuoVadis is on the same Column/Page
const OUString aPage = lcl_GetPageNumber( pPage );
SwParaPortion *pPara = pQuoFrm->GetPara();
if( pPara )
pPara->SetErgoSumNum( aPage );
if( rFootnoteInfo.aErgoSum.isEmpty() )
- return 0;
+ return nullptr;
SwErgoSumPortion *pErgo = new SwErgoSumPortion( rFootnoteInfo.aErgoSum,
lcl_GetPageNumber( pQuoPage ) );
return pErgo;
@@ -1087,7 +1087,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
while ( rInf.GetRest() )
{
SwLinePortion* pFollow = rInf.GetRest();
- rInf.SetRest( 0 );
+ rInf.SetRest( nullptr );
pCurrPor->Move( rInf );
OSL_ENSURE( pFollow->IsQuoVadisPortion(),
@@ -1118,14 +1118,14 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
// It's possible that there's a Margin Portion at the end, which would
// just cause a lot of trouble, when respanning
pPor = pCurr->FindLastPortion();
- SwGluePortion *pGlue = pPor->IsMarginPortion() ? static_cast<SwMarginPortion*>(pPor) : 0;
+ SwGluePortion *pGlue = pPor->IsMarginPortion() ? static_cast<SwMarginPortion*>(pPor) : nullptr;
if( pGlue )
{
pGlue->Height( 0 );
pGlue->Width( 0 );
pGlue->SetLen( 0 );
pGlue->SetAscent( 0 );
- pGlue->SetPortion( NULL );
+ pGlue->SetPortion( nullptr );
pGlue->SetFixWidth(0);
}
@@ -1245,8 +1245,8 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
const bool bApplyGivenScriptType,
const sal_uInt8 nGivenScriptType )
: pInf( &((SwTextSizeInfo&)rInf) )
- , pFnt( 0 )
- , pOld( 0 )
+ , pFnt( nullptr )
+ , pOld( nullptr )
{
if( pTextFootnote && rInf.GetTextFrm() )
{
@@ -1266,7 +1266,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
{
// examine text and set script
OUString aTmpStr( rFootnote.GetViewNumStr( *pDoc ) );
- pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmpStr, 0 ) );
+ pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmpStr, nullptr ) );
}
const SwEndNoteInfo* pInfo;
@@ -1300,7 +1300,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
pFnt->SetBackColor( new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() ) );
}
else
- pFnt = NULL;
+ pFnt = nullptr;
}
SwFootnoteSave::~SwFootnoteSave()
@@ -1317,7 +1317,7 @@ SwFootnoteSave::~SwFootnoteSave()
SwFootnotePortion::SwFootnotePortion( const OUString &rExpand,
SwTextFootnote *pFootn, sal_uInt16 nReal )
- : SwFieldPortion( rExpand, 0 )
+ : SwFieldPortion( rExpand, nullptr )
, pFootnote(pFootn)
, nOrigHeight( nReal )
// #i98418#
@@ -1410,7 +1410,7 @@ bool SwQuoVadisPortion::Format( SwTextFormatInfo &rInf )
if( rInf.GetRest() )
{
delete rInf.GetRest();
- rInf.SetRest( 0 );
+ rInf.SetRest( nullptr );
}
}
return bFull;
@@ -1475,7 +1475,7 @@ bool SwErgoSumPortion::Format( SwTextFormatInfo &rInf )
if( bFull && rInf.GetRest() )
{
delete rInf.GetRest();
- rInf.SetRest( 0 );
+ rInf.SetRest( nullptr );
}
// We return false in order to get some text into the current line,
@@ -1491,7 +1491,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
pLay = pLay->GetNext();
}
SwLinePortion *pPor = pLay;
- SwQuoVadisPortion *pQuo = 0;
+ SwQuoVadisPortion *pQuo = nullptr;
while( pPor && !pQuo )
{
if ( pPor->IsQuoVadisPortion() )
@@ -1513,7 +1513,7 @@ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
pLay = pLay->GetNext();
}
SwLinePortion *pPor = pLay;
- SwQuoVadisPortion *pQuo = 0;
+ SwQuoVadisPortion *pQuo = nullptr;
while( pPor && !pQuo )
{
if ( pPor->IsQuoVadisPortion() )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 3e528f587c8c..9e603137ecc9 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -40,7 +40,7 @@ Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord(
const OUString &rText, const sal_Int32 nMinTrail )
{
if( rText.getLength() < 4 || m_pFnt->IsSymbol(m_pVsh) )
- return 0;
+ return nullptr;
Reference< XHyphenator > xHyph = ::GetHyphenator();
Reference< XHyphenatedWord > xHyphWord;
@@ -301,7 +301,7 @@ bool SwTextPortion::CreateHyphen( SwTextFormatInfo &rInf, SwTextGuess &rGuess )
pHyphPor = new SwHyphPortion;
pHyphPor->SetLen( 1 );
- static const void* pLastMagicNo = 0;
+ static const void* pLastMagicNo = nullptr;
static sal_uInt16 aMiniCacheH = 0, aMiniCacheW = 0;
const void* pTmpMagic;
sal_uInt16 nFntIdx;
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 15f1309b860e..cc6e330dd405 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -38,10 +38,10 @@
#include "txtfly.hxx"
#include "dbg_lay.hxx"
-SwCache *SwTextFrm::pTextCache = 0;
+SwCache *SwTextFrm::pTextCache = nullptr;
long SwTextFrm::nMinPrtLine = 0;
-SwContourCache *pContourCache = 0;
-SwDropCapCache *pDropCapCache = 0;
+SwContourCache *pContourCache = nullptr;
+SwDropCapCache *pDropCapCache = nullptr;
IMPL_FIXEDMEMPOOL_NEWDEL( SwTextLine )
IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion ) // Paragraphs
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index 98c2ba61b230..16f883907427 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -41,7 +41,7 @@ public:
}
inline ~SwSaveClip();
- inline void ChgClip( const SwRect &rRect, const SwTextFrm* pFrm = 0,
+ inline void ChgClip( const SwRect &rRect, const SwTextFrm* pFrm = nullptr,
bool bEnlargeRect = false)
{ if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); }
void Reset();
@@ -82,7 +82,7 @@ public:
};
inline SwDbgOut::SwDbgOut( OutputDevice* pOutDev, const bool bOn )
- :pOut( bOn ? pOutDev : 0 )
+ :pOut( bOn ? pOutDev : nullptr )
{ }
inline DbgBackColor::DbgBackColor( OutputDevice* pOutDev, const bool bOn,
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index bcc08766dd00..3549126258e3 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -48,12 +48,12 @@ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos, const SwTwip
{
const SvxTabStop &rTabStop = pRuler->operator[](i);
if( rTabStop.GetTabPos() > SwTwips(nRight) )
- return i ? 0 : &rTabStop;
+ return i ? nullptr : &rTabStop;
if( rTabStop.GetTabPos() > nSearchPos )
return &rTabStop;
}
- return 0;
+ return nullptr;
}
sal_uInt16 SwLineInfo::NumberOfTabStops() const
@@ -250,7 +250,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto
nNewTabPos = sal_uInt16(nNextPos);
}
- SwTabPortion *pTabPor = 0;
+ SwTabPortion *pTabPor = nullptr;
if ( bAuto )
{
if ( SVX_TAB_ADJUST_DECIMAL == eAdj &&
@@ -415,7 +415,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
Width( 0 );
SetLen( 0 );
SetAscent( 0 );
- SetPortion( NULL ); //?????
+ SetPortion( nullptr ); //?????
}
return true;
}
@@ -489,7 +489,7 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf )
}
SetFixWidth( PrtWidth() );
// reset last values
- rInf.SetLastTab(0);
+ rInf.SetLastTab(nullptr);
if( POR_TABDECIMAL == nWhich )
rInf.SetTabDecimal(0);
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index b0a9ffe25b6a..458b5d6aca67 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -26,7 +26,7 @@ SwWrongArea::SwWrongArea( const OUString& rType, WrongListType listType,
css::uno::Reference< css::container::XStringKeyMap > xPropertyBag,
sal_Int32 nPos,
sal_Int32 nLen)
-: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(0)
+: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(nullptr)
{
mColor = getWrongAreaColor(listType, xPropertyBag);
mLineType = getWrongAreaLineType(listType, xPropertyBag);
@@ -39,7 +39,7 @@ SwWrongArea::SwWrongArea( const OUString& rType,
SwWrongList* pSubList)
: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList), mLineType(WRONGAREA_NONE)
{
- if (pSubList != 0)
+ if (pSubList != nullptr)
{
mColor = getWrongAreaColor(pSubList->GetWrongListType(), xPropertyBag);
mLineType = getWrongAreaLineType(pSubList->GetWrongListType(), xPropertyBag);
@@ -85,7 +85,7 @@ void SwWrongList::ClearList()
{
if (maList[i].mpSubList)
delete maList[i].mpSubList;
- maList[i].mpSubList = NULL;
+ maList[i].mpSubList = nullptr;
}
maList.clear();
}
@@ -448,7 +448,7 @@ bool SwWrongList::InvalidateWrong( )
SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos )
{
- SwWrongList *pRet = NULL;
+ SwWrongList *pRet = nullptr;
sal_uInt16 nLst = 0;
while( nLst < Count() && Pos( nLst ) < nSplitPos )
++nLst;
@@ -536,7 +536,7 @@ void SwWrongList::InsertSubList( sal_Int32 nNewPos, sal_Int32 nNewLen, sal_uInt1
i = maList.end(); // robust
else
i += nWhere;
- maList.insert(i, SwWrongArea( OUString(), 0, nNewPos, nNewLen, pSubList ) );
+ maList.insert(i, SwWrongArea( OUString(), nullptr, nNewPos, nNewLen, pSubList ) );
}
// New functions: Necessary because SwWrongList has been changed to use std::vector
@@ -553,7 +553,7 @@ void SwWrongList::Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator s
// pSubList-Pointers to 0
while ( startPos != endPos )
{
- (*startPos).mpSubList = 0;
+ (*startPos).mpSubList = nullptr;
++startPos;
}
}
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index e3f90dd71579..cc173c3e1f84 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -216,7 +216,7 @@ namespace
xmlTextWriterPtr lcl_createDefaultWriter()
{
xmlTextWriterPtr writer = xmlNewTextWriterFilename( "layout.xml", 0 );
- xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
+ xmlTextWriterStartDocument( writer, nullptr, nullptr, nullptr );
return writer;
}
@@ -229,11 +229,11 @@ namespace
void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const
{
- bool bCreateWriter = ( NULL == writer );
+ bool bCreateWriter = ( nullptr == writer );
if ( bCreateWriter )
writer = lcl_createDefaultWriter();
- const char *name = NULL;
+ const char *name = nullptr;
switch ( GetType( ) )
{
@@ -287,7 +287,7 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const
break;
};
- if ( name != NULL )
+ if ( name != nullptr )
{
xmlTextWriterStartElement( writer, reinterpret_cast<const xmlChar *>(name) );
@@ -395,7 +395,7 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) const
{
const SwFrm *pFrm = GetLower( );
- for ( ; pFrm != NULL; pFrm = pFrm->GetNext( ) )
+ for ( ; pFrm != nullptr; pFrm = pFrm->GetNext( ) )
{
pFrm->dumpAsXml( writer );
}
@@ -403,7 +403,7 @@ void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) const
void SwAnchoredObject::dumpAsXml( xmlTextWriterPtr writer ) const
{
- bool bCreateWriter = ( NULL == writer );
+ bool bCreateWriter = ( nullptr == writer );
if ( bCreateWriter )
writer = lcl_createDefaultWriter();
@@ -437,7 +437,7 @@ void SwTextFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
if ( HasFollow() )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() );
- if (m_pPrecede != NULL)
+ if (m_pPrecede != nullptr)
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrm*>(m_pPrecede)->GetFrmId() );
}
@@ -447,7 +447,7 @@ void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
if ( HasFollow() )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() );
- if (m_pPrecede != NULL)
+ if (m_pPrecede != nullptr)
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrm*>( m_pPrecede )->GetFrmId() );
}
@@ -457,7 +457,7 @@ void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
if ( HasFollow() )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() );
- if (m_pPrecede != NULL)
+ if (m_pPrecede != nullptr)
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrm*>( m_pPrecede )->GetFrmId() );
}
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index a0b93093f701..2285d9150b89 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -96,9 +96,9 @@ TYPEINIT2( SwTOXMark, SfxPoolItem, SwClient ); // fuers rtti
/// pool default constructor
SwTOXMark::SwTOXMark()
: SfxPoolItem( RES_TXTATR_TOXMARK )
- , SwModify( 0 )
+ , SwModify( nullptr )
,
- m_pTextAttr( 0 ), m_nLevel( 0 ),
+ m_pTextAttr( nullptr ), m_nLevel( 0 ),
m_bAutoGenerated(false),
m_bMainEntry(false)
{
@@ -108,7 +108,7 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp )
: SfxPoolItem( RES_TXTATR_TOXMARK )
, SwModify( const_cast<SwTOXType*>(pTyp) )
,
- m_pTextAttr( 0 ), m_nLevel( 0 ),
+ m_pTextAttr( nullptr ), m_nLevel( 0 ),
m_bAutoGenerated(false),
m_bMainEntry(false)
{
@@ -122,7 +122,7 @@ SwTOXMark::SwTOXMark( const SwTOXMark& rCopy )
m_aTextReading( rCopy.m_aTextReading ),
m_aPrimaryKeyReading( rCopy.m_aPrimaryKeyReading ),
m_aSecondaryKeyReading( rCopy.m_aSecondaryKeyReading ),
- m_pTextAttr( 0 ), m_nLevel( rCopy.m_nLevel ),
+ m_pTextAttr( nullptr ), m_nLevel( rCopy.m_nLevel ),
m_bAutoGenerated( rCopy.m_bAutoGenerated),
m_bMainEntry(rCopy.m_bMainEntry)
{
@@ -155,7 +155,7 @@ void SwTOXMark::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew)
NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
- SetXTOXMark(css::uno::Reference<css::text::XDocumentIndexMark>(0));
+ SetXTOXMark(css::uno::Reference<css::text::XDocumentIndexMark>(nullptr));
}
}
@@ -199,7 +199,7 @@ void SwTOXMark::InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType )
// Manage types of TOX
SwTOXType::SwTOXType( TOXTypes eTyp, const OUString& rName )
- : SwModify(0),
+ : SwModify(nullptr),
m_aName(rName),
m_eType(eTyp)
{
@@ -369,7 +369,7 @@ void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237#
for ( sal_uInt16 nLevel = 1; nLevel < nFormMax; ++nLevel )
{
SwTextFormatColl* pColl = rDoc.FindTextFormatCollByName( GetTemplate(nLevel) );
- if( pColl == NULL )
+ if( pColl == nullptr )
{
// Paragraph Style for this level has not been created.
// --> No need to propagate default values
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index c943f61912f0..4c3e07b3e728 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -131,7 +131,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwContentNode* pNd,
const SwTextTOXMark* pMark,
const SwTOXInternational* pInter,
const lang::Locale* pLocale )
- : pTOXNd( 0 ), pTextMark( pMark ), pTOXIntl( pInter ),
+ : pTOXNd( nullptr ), pTextMark( pMark ), pTOXIntl( pInter ),
nPos( 0 ), nCntPos( 0 ), nType( static_cast<sal_uInt16>(nTyp) ), bValidText( false )
{
if ( pLocale )
@@ -158,7 +158,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwContentNode* pNd,
{
// Then get the 'anchor' (body) position
Point aPt;
- const SwContentFrm* pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false );
+ const SwContentFrm* pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
if( pFrm )
{
SwPosition aPos( *pNd );
@@ -405,7 +405,7 @@ SwTOXCustom::SwTOXCustom(const TextAndReading& rKey,
sal_uInt16 nLevel,
const SwTOXInternational& rIntl,
const lang::Locale& rLocale )
- : SwTOXSortTabBase( TOX_SORT_CUSTOM, 0, 0, &rIntl, &rLocale ),
+ : SwTOXSortTabBase( TOX_SORT_CUSTOM, nullptr, nullptr, &rIntl, &rLocale ),
m_aKey(rKey), nLev(nLevel)
{
}
@@ -482,7 +482,7 @@ sal_uInt16 SwTOXContent::GetLevel() const
// Watch out for OLE/graphics when sorting!
// The position must not come from the document, but from the "anchor"!
SwTOXPara::SwTOXPara( const SwContentNode& rNd, SwTOXElement eT, sal_uInt16 nLevel, const OUString& sSeqName )
- : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, 0, 0 ),
+ : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, nullptr, nullptr ),
eType( eT ),
m_nLevel(nLevel),
nStartIndex(0),
@@ -594,7 +594,7 @@ OUString SwTOXPara::GetURL() const
case nsSwTOXElement::TOX_OLE: pStr = "ole"; break;
case nsSwTOXElement::TOX_GRAPHIC: pStr = "graphic"; break;
case nsSwTOXElement::TOX_FRAME: pStr = "frame"; break;
- default: pStr = 0;
+ default: pStr = nullptr;
}
if( pStr )
aText += OUString::createFromAscii( pStr );
@@ -614,7 +614,7 @@ OUString SwTOXPara::GetURL() const
// Table
SwTOXTable::SwTOXTable( const SwContentNode& rNd )
- : SwTOXSortTabBase( TOX_SORT_TABLE, &rNd, 0, 0 ),
+ : SwTOXSortTabBase( TOX_SORT_TABLE, &rNd, nullptr, nullptr ),
nLevel(FORM_ALPHA_DELIMITTER)
{
}
@@ -660,7 +660,7 @@ OUString SwTOXTable::GetURL() const
SwTOXAuthority::SwTOXAuthority( const SwContentNode& rNd,
SwFormatField& rField, const SwTOXInternational& rIntl ) :
- SwTOXSortTabBase( TOX_SORT_AUTHORITY, &rNd, 0, &rIntl ),
+ SwTOXSortTabBase( TOX_SORT_AUTHORITY, &rNd, nullptr, &rIntl ),
m_rField(rField)
{
if(rField.GetTextField())
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx
index 262185a61af3..86291396e92a 100644
--- a/sw/source/core/txtnode/SwGrammarContact.cxx
+++ b/sw/source/core/txtnode/SwGrammarContact.cxx
@@ -59,7 +59,7 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
};
-SwGrammarContact::SwGrammarContact() : mpProxyList(0), mbFinished( false )
+SwGrammarContact::SwGrammarContact() : mpProxyList(nullptr), mbFinished( false )
{
aTimer.SetTimeout( 2000 ); // Repaint of grammar check after 'setChecked'
aTimer.SetTimeoutHdl( LINK(this, SwGrammarContact, TimerRepaint) );
@@ -73,7 +73,7 @@ IMPL_LINK_TYPED( SwGrammarContact, TimerRepaint, Timer *, pTimer, void )
if( GetRegisteredIn() )
{ //Replace the old wrong list by the proxy list and repaint all frames
getMyTextNode()->SetGrammarCheck( mpProxyList );
- mpProxyList = 0;
+ mpProxyList = nullptr;
SwTextFrm::repaintTextFrames( *getMyTextNode() );
}
}
@@ -94,7 +94,7 @@ void SwGrammarContact::updateCursorPosition( const SwPosition& rNewPos )
SwTextFrm::repaintTextFrames( *getMyTextNode() );
}
GetRegisteredInNonConst()->Remove( this ); // good bye old paragraph
- mpProxyList = 0;
+ mpProxyList = nullptr;
}
if( pTextNode )
pTextNode->Add( this ); // welcome new paragraph
@@ -104,7 +104,7 @@ void SwGrammarContact::updateCursorPosition( const SwPosition& rNewPos )
/* deliver a grammar check list for the given text node */
SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTextNode& rTextNode, bool bCreate )
{
- SwGrammarMarkUp *pRet = 0;
+ SwGrammarMarkUp *pRet = nullptr;
if( GetRegisteredIn() == &rTextNode ) // hey, that's my current paragraph!
{ // so you will get a proxy list...
if( bCreate )
@@ -112,7 +112,7 @@ SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTextNode& rTextNode, bool
if( mbFinished )
{
delete mpProxyList;
- mpProxyList = 0;
+ mpProxyList = nullptr;
}
if( !mpProxyList )
{
@@ -153,7 +153,7 @@ void SwGrammarContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem * )
aTimer.Stop();
GetRegisteredInNonConst()->Remove( this );
delete mpProxyList;
- mpProxyList = 0;
+ mpProxyList = nullptr;
}
}
@@ -170,7 +170,7 @@ void SwGrammarContact::finishGrammarCheck( SwTextNode& rTextNode )
}
else if( getMyTextNode()->GetGrammarCheck() )
{ // all grammar problems seems to be gone, no delay needed
- getMyTextNode()->SetGrammarCheck( 0 );
+ getMyTextNode()->SetGrammarCheck( nullptr );
SwTextFrm::repaintTextFrames( *getMyTextNode() );
}
}
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index e1e15b540bb2..43f12917d220 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -43,10 +43,10 @@ TYPEINIT3(SwFormatField, SfxPoolItem, SwModify, SfxBroadcaster)
// constructor for default item in attribute-pool
SwFormatField::SwFormatField( sal_uInt16 nWhich )
: SfxPoolItem( nWhich )
- , SwModify(0)
+ , SwModify(nullptr)
, SfxBroadcaster()
- , mpField( NULL )
- , mpTextField( NULL )
+ , mpField( nullptr )
+ , mpTextField( nullptr )
{
}
@@ -55,7 +55,7 @@ SwFormatField::SwFormatField( const SwField &rField )
, SwModify( rField.GetTyp() )
, SfxBroadcaster()
, mpField( rField.CopyField() )
- , mpTextField( NULL )
+ , mpTextField( nullptr )
{
if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
{
@@ -81,10 +81,10 @@ SwFormatField::SwFormatField( const SwField &rField )
// corrected
SwFormatField::SwFormatField( const SwFormatField& rAttr )
: SfxPoolItem( RES_TXTATR_FIELD )
- , SwModify(0)
+ , SwModify(nullptr)
, SfxBroadcaster()
- , mpField( NULL )
- , mpTextField( NULL )
+ , mpField( nullptr )
+ , mpTextField( nullptr )
{
if ( rAttr.GetField() )
{
@@ -114,10 +114,10 @@ SwFormatField::SwFormatField( const SwFormatField& rAttr )
SwFormatField::~SwFormatField()
{
- SwFieldType* pType = mpField ? mpField->GetTyp() : 0;
+ SwFieldType* pType = mpField ? mpField->GetTyp() : nullptr;
if (pType && pType->Which() == RES_DBFLD)
- pType = 0; // DB-Feldtypen zerstoeren sich selbst
+ pType = nullptr; // DB-Feldtypen zerstoeren sich selbst
Broadcast( SwFormatFieldHint( this, SwFormatFieldHintWhich::REMOVED ) );
delete mpField;
@@ -179,7 +179,7 @@ void SwFormatField::SetTextField( SwTextField& rTextField )
void SwFormatField::ClearTextField()
{
- mpTextField = NULL;
+ mpTextField = nullptr;
}
bool SwFormatField::operator==( const SfxPoolItem& rAttr ) const
@@ -231,7 +231,7 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached UNO object
- SetXTextField(css::uno::Reference<css::text::XTextField>(0));
+ SetXTextField(css::uno::Reference<css::text::XTextField>(nullptr));
// ??? why does this Modify method not already do this?
NotifyClients(pOld, pNew);
return;
@@ -286,7 +286,7 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_DBNUMSETFLD:
case RES_DBNEXTSETFLD:
case RES_DBNAMEFLD:
- pTextNd->ModifyNotification( 0, pNew);
+ pTextNd->ModifyNotification( nullptr, pNew);
return;
}
@@ -300,7 +300,7 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
}
- const bool bForceNotify = (pOld == NULL) && (pNew == NULL);
+ const bool bForceNotify = (pOld == nullptr) && (pNew == nullptr);
mpTextField->ExpandTextField( bForceNotify );
}
@@ -308,7 +308,7 @@ bool SwFormatField::GetInfo( SfxPoolItem& rInfo ) const
{
const SwTextNode* pTextNd;
if( RES_AUTOFMT_DOCNODE != rInfo.Which() ||
- !mpTextField || 0 == ( pTextNd = mpTextField->GetpTextNode() ) ||
+ !mpTextField || nullptr == ( pTextNd = mpTextField->GetpTextNode() ) ||
&pTextNd->GetNodes() != static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes )
return true;
@@ -318,14 +318,14 @@ bool SwFormatField::GetInfo( SfxPoolItem& rInfo ) const
bool SwFormatField::IsFieldInDoc() const
{
- return mpTextField != NULL
+ return mpTextField != nullptr
&& mpTextField->IsFieldInDoc();
}
bool SwFormatField::IsProtect() const
{
- return mpTextField != NULL
- && mpTextField->GetpTextNode() != NULL
+ return mpTextField != nullptr
+ && mpTextField->GetpTextNode() != nullptr
&& mpTextField->GetpTextNode()->IsProtect();
}
@@ -339,7 +339,7 @@ SwTextField::SwTextField(
// fdo#39694 the ExpandField here may not give the correct result in all cases,
// but is better than nothing
, m_aExpand( rAttr.GetField()->ExpandField(bInClipboard) )
- , m_pTextNode( NULL )
+ , m_pTextNode( nullptr )
{
rAttr.SetTextField( *this );
SetHasDummyChar(true);
@@ -356,7 +356,7 @@ SwTextField::~SwTextField( )
bool SwTextField::IsFieldInDoc() const
{
- return GetpTextNode() != NULL
+ return GetpTextNode() != nullptr
&& GetpTextNode()->GetNodes().IsDocNodes();
}
@@ -381,7 +381,7 @@ void SwTextField::ExpandTextField(const bool bForceNotify) const
{
if( m_pTextNode->CalcHiddenParaField() )
{
- m_pTextNode->ModifyNotification( 0, 0 );
+ m_pTextNode->ModifyNotification( nullptr, nullptr );
}
if ( !bForceNotify )
{
@@ -465,7 +465,7 @@ void SwTextField::NotifyContentChange(SwFormatField& rFormatField)
//if not in undo section notify the change
if (m_pTextNode && m_pTextNode->GetNodes().IsDocNodes())
{
- m_pTextNode->ModifyNotification(0, &rFormatField);
+ m_pTextNode->ModifyNotification(nullptr, &rFormatField);
}
}
@@ -474,7 +474,7 @@ void SwTextField::GetPamForTextField(
const SwTextField& rTextField,
std::shared_ptr< SwPaM >& rPamForTextField )
{
- if (rTextField.GetpTextNode() == NULL)
+ if (rTextField.GetpTextNode() == nullptr)
{
SAL_WARN("sw.core", "<SwTextField::GetPamForField> - missing <SwTextNode>");
return;
@@ -483,7 +483,7 @@ void SwTextField::GetPamForTextField(
const SwTextNode& rTextNode = rTextField.GetTextNode();
rPamForTextField.reset( new SwPaM( rTextNode,
- (rTextField.End() != NULL) ? *(rTextField.End()) : ( rTextField.GetStart() + 1 ),
+ (rTextField.End() != nullptr) ? *(rTextField.End()) : ( rTextField.GetStart() + 1 ),
rTextNode,
rTextField.GetStart() ) );
@@ -492,11 +492,11 @@ void SwTextField::GetPamForTextField(
/*static*/
void SwTextField::DeleteTextField( const SwTextField& rTextField )
{
- if (rTextField.GetpTextNode() != NULL)
+ if (rTextField.GetpTextNode() != nullptr)
{
std::shared_ptr< SwPaM > pPamForTextField;
GetPamForTextField(rTextField, pPamForTextField);
- if (pPamForTextField.get() != NULL)
+ if (pPamForTextField.get() != nullptr)
{
rTextField.GetTextNode().GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPamForTextField);
}
@@ -567,9 +567,9 @@ void SwTextInputField::UpdateFieldContent()
const OUString aNewFieldContent = GetTextNode().GetExpandText( nIdx, nLen );
const SwInputField* pInputField = dynamic_cast<const SwInputField*>(GetFormatField().GetField());
- OSL_ENSURE( pInputField != NULL,
+ OSL_ENSURE( pInputField != nullptr,
"<SwTextInputField::GetContent()> - Missing <SwInputField> instance!" );
- if ( pInputField != NULL )
+ if ( pInputField != nullptr )
{
const_cast<SwInputField*>(pInputField)->applyFieldContent( aNewFieldContent );
// trigger update of fields for scenarios in which the Input Field's content is part of e.g. a table formula
@@ -616,27 +616,27 @@ SwTextAnnotationField::~SwTextAnnotationField()
SwDoc* pDoc ) const
{
const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(GetFormatField().GetField());
- OSL_ENSURE( pPostItField != NULL, "<SwTextAnnotationField::GetAnnotationMark()> - field missing" );
- if ( pPostItField == NULL )
+ OSL_ENSURE( pPostItField != nullptr, "<SwTextAnnotationField::GetAnnotationMark()> - field missing" );
+ if ( pPostItField == nullptr )
{
- return NULL;
+ return nullptr;
}
- if ( pDoc == NULL )
+ if ( pDoc == nullptr )
{
pDoc = static_cast<const SwPostItFieldType*>(pPostItField->GetTyp())->GetDoc();
}
- OSL_ENSURE( pDoc != NULL, "<SwTextAnnotationField::GetAnnotationMark()> - missing document" );
- if ( pDoc == NULL )
+ OSL_ENSURE( pDoc != nullptr, "<SwTextAnnotationField::GetAnnotationMark()> - missing document" );
+ if ( pDoc == nullptr )
{
- return NULL;
+ return nullptr;
}
IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t pMark = pMarksAccess->findAnnotationMark( pPostItField->GetName() );
return pMark != pMarksAccess->getAnnotationMarksEnd()
? pMark->get()
- : NULL;
+ : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 78948542eba8..51b50f7c7e9b 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -37,7 +37,7 @@
SwFormatFlyCnt::SwFormatFlyCnt( SwFrameFormat *pFrameFormat )
: SfxPoolItem( RES_TXTATR_FLYCNT ),
- pTextAttr( 0 ),
+ pTextAttr( nullptr ),
pFormat( pFrameFormat )
{
}
@@ -123,7 +123,7 @@ void SwTextFlyCnt::CopyFlyFormat( SwDoc* pDoc )
}
else
{
- pos.nContent.Assign( 0, 0 );
+ pos.nContent.Assign( nullptr, 0 );
OSL_ENSURE( false, "CopyFlyFormat: Was fuer ein Anker?" );
}
aAnchor.SetAnchor( &pos );
@@ -218,7 +218,7 @@ SwFlyInCntFrm *SwTextFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm )
if( RES_DRAWFRMFMT == pFrameFormat->Which() )
{
OSL_ENSURE( false, "SwTextFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" );
- return NULL;
+ return nullptr;
}
SwIterator<SwFlyFrm,SwFormat> aIter( *GetFlyCnt().pFormat );
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index fe0c97bccf26..9f74feb41b73 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -119,8 +119,8 @@ namespace {
SwFormatFootnote::SwFormatFootnote( bool bEndNote )
: SfxPoolItem( RES_TXTATR_FTN )
- , SwModify(0)
- , m_pTextAttr(0)
+ , SwModify(nullptr)
+ , m_pTextAttr(nullptr)
, m_nNumber(0)
, m_bEndNote(bEndNote)
{
@@ -148,7 +148,7 @@ void SwFormatFootnote::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached UNO object
- SetXFootnote(css::uno::Reference<css::text::XFootnote>(0));
+ SetXFootnote(css::uno::Reference<css::text::XFootnote>(nullptr));
}
}
@@ -165,7 +165,7 @@ void SwFormatFootnote::SetEndNote( bool b )
{
if ( GetTextFootnote() )
{
- GetTextFootnote()->DelFrms(0);
+ GetTextFootnote()->DelFrms(nullptr);
}
m_bEndNote = b;
}
@@ -208,7 +208,7 @@ OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings )
bool bMakeNum = true;
const SwSectionNode* pSectNd = m_pTextAttr
? SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr( *m_pTextAttr )
- : 0;
+ : nullptr;
if( pSectNd )
{
@@ -248,8 +248,8 @@ OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings )
SwTextFootnote::SwTextFootnote( SwFormatFootnote& rAttr, sal_Int32 nStartPos )
: SwTextAttr( rAttr, nStartPos )
- , m_pStartNode( 0 )
- , m_pTextNode( 0 )
+ , m_pStartNode( nullptr )
+ , m_pTextNode( nullptr )
, m_nSeqNo( USHRT_MAX )
{
rAttr.m_pTextAttr = this;
@@ -258,7 +258,7 @@ SwTextFootnote::SwTextFootnote( SwFormatFootnote& rAttr, sal_Int32 nStartPos )
SwTextFootnote::~SwTextFootnote()
{
- SetStartNode( 0 );
+ SetStartNode( nullptr );
}
void SwTextFootnote::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode )
@@ -309,7 +309,7 @@ void SwTextFootnote::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode )
// Werden die Nodes nicht geloescht mussen sie bei den Seiten
// abmeldet (Frms loeschen) werden, denn sonst bleiben sie
// stehen (Undo loescht sie nicht!)
- DelFrms( 0 );
+ DelFrms( nullptr );
}
DELETEZ( m_pStartNode );
@@ -341,7 +341,7 @@ void SwTextFootnote::SetNumber( const sal_uInt16 nNewNum, const OUString &sNumSt
OSL_ENSURE( m_pTextNode, "SwTextFootnote: where is my TextNode?" );
SwNodes &rNodes = m_pTextNode->GetDoc()->GetNodes();
- m_pTextNode->ModifyNotification( 0, &rFootnote );
+ m_pTextNode->ModifyNotification( nullptr, &rFootnote );
if ( m_pStartNode )
{
// must iterate over all TextNodes because of footnotes on other pages
@@ -352,7 +352,7 @@ void SwTextFootnote::SetNumber( const sal_uInt16 nNewNum, const OUString &sNumSt
// Es koennen ja auch Grafiken in der Fussnote stehen ...
SwNode* pNd;
if( ( pNd = rNodes[ nSttIdx ] )->IsTextNode() )
- static_cast<SwTextNode*>(pNd)->ModifyNotification( 0, &rFootnote );
+ static_cast<SwTextNode*>(pNd)->ModifyNotification( nullptr, &rFootnote );
}
}
}
@@ -423,7 +423,7 @@ void SwTextFootnote::MakeNewTextSection( SwNodes& rNodes )
nPoolId = RES_POOLCOLL_FOOTNOTE;
}
- if( 0 == (pFormatColl = pInfo->GetFootnoteTextColl() ) )
+ if( nullptr == (pFormatColl = pInfo->GetFootnoteTextColl() ) )
pFormatColl = rNodes.GetDoc()->getIDocumentStylePoolAccess().GetTextCollFromPool( nPoolId );
SwStartNode* pSttNd = rNodes.MakeTextSection( SwNodeIndex( rNodes.GetEndOfInserts() ),
@@ -438,7 +438,7 @@ void SwTextFootnote::DelFrms( const SwFrm* pSib )
if ( !m_pTextNode )
return;
- const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
+ const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : nullptr;
bool bFrmFnd = false;
{
SwIterator<SwContentFrm,SwTextNode> aIter( *m_pTextNode );
@@ -522,7 +522,7 @@ void SwTextFootnote::SetUniqueSeqRefNo( SwDoc& rDoc )
{
std::set<sal_uInt16> aUsedNums;
std::vector<SwTextFootnote*> badRefNums;
- ::lcl_FillUsedFootnoteRefNumbers(rDoc, NULL, aUsedNums, badRefNums);
+ ::lcl_FillUsedFootnoteRefNumbers(rDoc, nullptr, aUsedNums, badRefNums);
std::vector<sal_uInt16> aUnused;
::lcl_FillUnusedSeqRefNums(aUnused, aUsedNums, badRefNums.size());
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index 416e29ea9964..4bef9ea47849 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -30,16 +30,16 @@ SwFormatRefMark::~SwFormatRefMark( )
SwFormatRefMark::SwFormatRefMark( const OUString& rName )
: SfxPoolItem(RES_TXTATR_REFMARK)
- , SwModify(0)
- , pTextAttr(0)
+ , SwModify(nullptr)
+ , pTextAttr(nullptr)
, aRefName(rName)
{
}
SwFormatRefMark::SwFormatRefMark( const SwFormatRefMark& rAttr )
: SfxPoolItem(RES_TXTATR_REFMARK)
- , SwModify(0)
- , pTextAttr(0)
+ , SwModify(nullptr)
+ , pTextAttr(nullptr)
, aRefName(rAttr.aRefName)
{
}
@@ -60,7 +60,7 @@ void SwFormatRefMark::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached UNO object
- SetXRefMark(css::uno::Reference<css::text::XTextContent>(0));
+ SetXRefMark(css::uno::Reference<css::text::XTextContent>(nullptr));
}
}
@@ -77,8 +77,8 @@ SwTextRefMark::SwTextRefMark( SwFormatRefMark& rAttr,
sal_Int32 const nStartPos, sal_Int32 const*const pEnd)
: SwTextAttr(rAttr, nStartPos)
, SwTextAttrEnd( rAttr, nStartPos, nStartPos )
- , m_pTextNode( 0 )
- , m_pEnd( 0 )
+ , m_pTextNode( nullptr )
+ , m_pEnd( nullptr )
{
rAttr.pTextAttr = this;
if ( pEnd )
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index f395e6d1bdb0..60eeb0f67166 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -27,8 +27,8 @@ SwTextTOXMark::SwTextTOXMark( SwTOXMark& rAttr,
sal_Int32 const nStartPos, sal_Int32 const*const pEnd)
: SwTextAttr( rAttr, nStartPos )
, SwTextAttrEnd( rAttr, nStartPos, nStartPos )
- , m_pTextNode( 0 )
- , m_pEnd( 0 )
+ , m_pTextNode( nullptr )
+ , m_pEnd( nullptr )
{
rAttr.m_pTextAttr = this;
if ( rAttr.GetAlternativeText().isEmpty() )
@@ -58,7 +58,7 @@ void SwTextTOXMark::CopyTOXMark( SwDoc* pDoc )
SwTOXMark& rTOX = (SwTOXMark&)GetTOXMark();
TOXTypes eType = rTOX.GetTOXType()->GetType();
const sal_uInt16 nCount = pDoc->GetTOXTypeCount( eType );
- const SwTOXType* pType = 0;
+ const SwTOXType* pType = nullptr;
const OUString rNm = rTOX.GetTOXType()->GetTypeName();
// kein entsprechender Verzeichnistyp vorhanden -> anlegen
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index d3b4528b4f02..b9def1c5c168 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -58,14 +58,14 @@ TYPEINIT1_AUTOFACTORY(SwFormatAutoFormat, SfxPoolItem);
SwFormatCharFormat::SwFormatCharFormat( SwCharFormat *pFormat )
: SfxPoolItem( RES_TXTATR_CHARFMT ),
SwClient(pFormat),
- pTextAttr( 0 )
+ pTextAttr( nullptr )
{
}
SwFormatCharFormat::SwFormatCharFormat( const SwFormatCharFormat& rAttr )
: SfxPoolItem( RES_TXTATR_CHARFMT ),
SwClient( rAttr.GetCharFormat() ),
- pTextAttr( 0 )
+ pTextAttr( nullptr )
{
}
@@ -162,8 +162,8 @@ SwFormatINetFormat::SwFormatINetFormat()
, msINetFormatName()
, msVisitedFormatName()
, msHyperlinkName()
- , mpMacroTable( 0 )
- , mpTextAttr( 0 )
+ , mpMacroTable( nullptr )
+ , mpTextAttr( nullptr )
, mnINetFormatId( 0 )
, mnVisitedFormatId( 0 )
{}
@@ -175,8 +175,8 @@ SwFormatINetFormat::SwFormatINetFormat( const OUString& rURL, const OUString& rT
, msINetFormatName()
, msVisitedFormatName()
, msHyperlinkName()
- , mpMacroTable( 0 )
- , mpTextAttr( 0 )
+ , mpMacroTable( nullptr )
+ , mpTextAttr( nullptr )
, mnINetFormatId( RES_POOLCHR_INET_NORMAL )
, mnVisitedFormatId( RES_POOLCHR_INET_VISIT )
{
@@ -191,8 +191,8 @@ SwFormatINetFormat::SwFormatINetFormat( const SwFormatINetFormat& rAttr )
, msINetFormatName( rAttr.msINetFormatName )
, msVisitedFormatName( rAttr.msVisitedFormatName )
, msHyperlinkName( rAttr.msHyperlinkName )
- , mpMacroTable( 0 )
- , mpTextAttr( 0 )
+ , mpMacroTable( nullptr )
+ , mpTextAttr( nullptr )
, mnINetFormatId( rAttr.mnINetFormatId )
, mnVisitedFormatId( rAttr.mnVisitedFormatId )
{
@@ -247,7 +247,7 @@ void SwFormatINetFormat::SetMacroTable( const SvxMacroTableDtor* pNewTable )
mpMacroTable = new SvxMacroTableDtor( *pNewTable );
}
else
- delete mpMacroTable, mpMacroTable = 0;
+ delete mpMacroTable, mpMacroTable = nullptr;
}
void SwFormatINetFormat::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
@@ -260,7 +260,7 @@ void SwFormatINetFormat::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
const SvxMacro* SwFormatINetFormat::GetMacro( sal_uInt16 nEvent ) const
{
- const SvxMacro* pRet = 0;
+ const SvxMacro* pRet = nullptr;
if( mpMacroTable && mpMacroTable->IsKeyValid( nEvent ) )
pRet = mpMacroTable->Get( nEvent );
return pRet;
@@ -395,7 +395,7 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SwFormatRuby::SwFormatRuby( const OUString& rRubyText )
: SfxPoolItem( RES_TXTATR_CJK_RUBY ),
sRubyText( rRubyText ),
- pTextAttr( 0 ),
+ pTextAttr( nullptr ),
nCharFormatId( 0 ),
nPosition( 0 ),
nAdjustment( 0 )
@@ -406,7 +406,7 @@ SwFormatRuby::SwFormatRuby( const SwFormatRuby& rAttr )
: SfxPoolItem( RES_TXTATR_CJK_RUBY ),
sRubyText( rAttr.sRubyText ),
sCharFormatName( rAttr.sCharFormatName ),
- pTextAttr( 0 ),
+ pTextAttr( nullptr ),
nCharFormatId( rAttr.nCharFormatId),
nPosition( rAttr.nPosition ),
nAdjustment( rAttr.nAdjustment )
@@ -424,7 +424,7 @@ SwFormatRuby& SwFormatRuby::operator=( const SwFormatRuby& rAttr )
nCharFormatId = rAttr.nCharFormatId;
nPosition = rAttr.nPosition;
nAdjustment = rAttr.nAdjustment;
- pTextAttr = 0;
+ pTextAttr = nullptr;
return *this;
}
@@ -525,7 +525,7 @@ SwFormatMeta * SwFormatMeta::CreatePoolDefault(const sal_uInt16 i_nWhich)
SwFormatMeta::SwFormatMeta(const sal_uInt16 i_nWhich)
: SfxPoolItem( i_nWhich )
, m_pMeta()
- , m_pTextAttr( 0 )
+ , m_pTextAttr( nullptr )
{
OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
"ERROR: SwFormatMeta: invalid which id!");
@@ -535,7 +535,7 @@ SwFormatMeta::SwFormatMeta( std::shared_ptr< ::sw::Meta > const & i_pMeta,
const sal_uInt16 i_nWhich )
: SfxPoolItem( i_nWhich )
, m_pMeta( i_pMeta )
- , m_pTextAttr( 0 )
+ , m_pTextAttr( nullptr )
{
OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
"ERROR: SwFormatMeta: invalid which id!");
@@ -547,8 +547,8 @@ SwFormatMeta::~SwFormatMeta()
{
if (m_pMeta && (m_pMeta->GetFormatMeta() == this))
{
- NotifyChangeTextNode(0);
- m_pMeta->SetFormatMeta(0);
+ NotifyChangeTextNode(nullptr);
+ m_pMeta->SetFormatMeta(nullptr);
}
}
@@ -583,8 +583,8 @@ void SwFormatMeta::SetTextAttr(SwTextMeta * const i_pTextAttr)
}
else if (m_pMeta->GetFormatMeta() == this)
{ // text attribute gone => de-register from text node!
- NotifyChangeTextNode(0);
- m_pMeta->SetFormatMeta(0);
+ NotifyChangeTextNode(nullptr);
+ m_pMeta->SetFormatMeta(nullptr);
}
}
}
@@ -633,7 +633,7 @@ Meta::Meta(SwFormatMeta * const i_pFormat)
: ::sfx2::Metadatable()
, SwModify()
, m_pFormat(i_pFormat)
- , m_pTextNode(0)
+ , m_pTextNode(nullptr)
{
}
@@ -643,7 +643,7 @@ Meta::~Meta()
SwTextMeta * Meta::GetTextAttr() const
{
- return (m_pFormat) ? m_pFormat->GetTextAttr() : 0;
+ return (m_pFormat) ? m_pFormat->GetTextAttr() : nullptr;
}
@@ -677,7 +677,7 @@ void Meta::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew )
NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
- SetXMeta(uno::Reference<rdf::XMetadatable>(0));
+ SetXMeta(uno::Reference<rdf::XMetadatable>(nullptr));
}
}
@@ -740,7 +740,7 @@ void MetaField::GetPrefixAndSuffix(
SwTextNode * const pTextNode( GetTextNode() );
SwDocShell const * const pShell(pTextNode->GetDoc()->GetDocShell());
const uno::Reference<frame::XModel> xModel(
- (pShell) ? pShell->GetModel() : 0, uno::UNO_SET_THROW);
+ (pShell) ? pShell->GetModel() : nullptr, uno::UNO_SET_THROW);
getPrefixAndSuffix(xModel, xMetaField, o_pPrefix, o_pSuffix);
}
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ea290e4e7f06..d1d94e8f3d79 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -58,16 +58,16 @@ using namespace ::com::sun::star;
// global variables declared in fntcache.hxx
// FontCache is created in txtinit.cxx _TextInit and deleted in _TextFinit
-SwFntCache *pFntCache = NULL;
+SwFntCache *pFntCache = nullptr;
// last Font set by ChgFntCache
-SwFntObj *pLastFont = NULL;
+SwFntObj *pLastFont = nullptr;
// "MagicNumber" used to identify Fonts
-sal_uInt8* pMagicNo = NULL;
+sal_uInt8* pMagicNo = nullptr;
-Color *pWaveCol = 0;
+Color *pWaveCol = nullptr;
long SwFntObj::nPixWidth;
-MapMode* SwFntObj::pPixMap = NULL;
+MapMode* SwFntObj::pPixMap = nullptr;
VclPtr<OutputDevice> SwFntObj::pPixOut;
namespace
@@ -99,7 +99,7 @@ void SwFntCache::Flush( )
if ( pLastFont )
{
pLastFont->Unlock();
- pLastFont = NULL;
+ pLastFont = nullptr;
}
SwCache::Flush( );
}
@@ -107,9 +107,9 @@ void SwFntCache::Flush( )
SwFntObj::SwFntObj(const SwSubFont &rFont, const void *pOwn, SwViewShell const *pSh)
: SwCacheObj(pOwn)
, aFont(rFont)
- , pScrFont(NULL)
+ , pScrFont(nullptr)
, pPrtFont(&aFont)
- , pPrinter(NULL)
+ , pPrinter(nullptr)
, nGuessedLeading(USHRT_MAX)
, nExtLeading(USHRT_MAX)
, nScrAscent(0)
@@ -154,7 +154,7 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt )
++nWidth;
pPrtFont = new vcl::Font( aFont );
pPrtFont->SetSize( Size( nWidth, aFont.GetSize().Height() ) );
- pScrFont = NULL;
+ pScrFont = nullptr;
}
}
@@ -718,7 +718,7 @@ static void lcl_DrawLineForWrongListData(
const SwWrongArea* wrongArea = pWList->GetElement(wrongPos);
- if (wrongArea != 0)
+ if (wrongArea != nullptr)
{
if (WRONGAREA_DASHED == wrongArea->mLineType)
{
@@ -1259,7 +1259,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
{
if ( pSI && pSI->CountKashida() &&
- pSI->KashidaJustify( pKernArray, 0, rInf.GetIdx(),
+ pSI->KashidaJustify( pKernArray, nullptr, rInf.GetIdx(),
rInf.GetLen(), nSpaceAdd ) != -1 )
{
bSpecialJust = true;
@@ -1277,7 +1277,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
// Use rInf.GetSpace() because it has more precision than
// nSpaceAdd:
- SwScriptInfo::ThaiJustify( rInf.GetText(), pKernArray, 0,
+ SwScriptInfo::ThaiJustify( rInf.GetText(), pKernArray, nullptr,
rInf.GetIdx(), rInf.GetLen(),
rInf.GetNumberOfBlanks(),
rInf.GetSpace() );
@@ -2062,7 +2062,7 @@ sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
{
if ( pSI && pSI->CountKashida() &&
- pSI->KashidaJustify( pKernArray, 0, rInf.GetIdx(), rInf.GetLen(),
+ pSI->KashidaJustify( pKernArray, nullptr, rInf.GetIdx(), rInf.GetLen(),
nSpaceAdd ) != -1 )
nSpaceAdd = 0;
}
@@ -2075,7 +2075,7 @@ sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( LANGUAGE_THAI == aLang )
{
- SwScriptInfo::ThaiJustify( rInf.GetText(), pKernArray, 0,
+ SwScriptInfo::ThaiJustify( rInf.GetText(), pKernArray, nullptr,
rInf.GetIdx(), rInf.GetLen(),
rInf.GetNumberOfBlanks(),
rInf.GetSpace() );
@@ -2220,7 +2220,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
}
{
- OutputDevice* pOut = 0;
+ OutputDevice* pOut = nullptr;
sal_uInt16 nZoom = USHRT_MAX;
// Get the reference device
@@ -2242,7 +2242,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
return; // result of Check: Drucker+Zoom okay.
}
pFntObj->Unlock(); // forget this object, printer/zoom differs
- pObj = NULL;
+ pObj = nullptr;
}
// Search by font comparison, quite expensive!
@@ -2285,7 +2285,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
OSL_ENSURE( !pFntObj->pPrinter, "SwFntAccess: Printer Changed" );
pFntObj->CreatePrtFont( *pOut );
pFntObj->pPrinter = pOut;
- pFntObj->pScrFont = NULL;
+ pFntObj->pScrFont = nullptr;
pFntObj->nGuessedLeading = USHRT_MAX;
pFntObj->nExtLeading = USHRT_MAX;
pFntObj->nPrtAscent = USHRT_MAX;
@@ -2529,7 +2529,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
if ( bChgFntColor )
{
// check if current background has a user defined setting
- const Color* pCol = GetFont() ? GetFont()->GetBackColor() : NULL;
+ const Color* pCol = GetFont() ? GetFont()->GetBackColor() : nullptr;
Color aColor;
if( ! pCol || COL_TRANSPARENT == pCol->GetColor() )
{
@@ -2563,10 +2563,10 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
/// OD 30.08.2002 #99657#
/// determined color <pCol> can be <COL_TRANSPARENT>. Thus, check it.
if ( pCol->GetColor() == COL_TRANSPARENT)
- pCol = NULL;
+ pCol = nullptr;
}
else
- pCol = NULL;
+ pCol = nullptr;
}
// no user defined color at paragraph or font background
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 027e9ae2ae7e..aabaeedd4b7a 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -94,7 +94,7 @@ protected:
SwDrawTextInfo &rInf;
SwCapitalInfo* pCapInf; // referes to additional information
// required by the ::Do function
- explicit SwDoCapitals ( SwDrawTextInfo &rInfo ) : rInf( rInfo ), pCapInf( 0 ) { }
+ explicit SwDoCapitals ( SwDrawTextInfo &rInfo ) : rInf( rInfo ), pCapInf( nullptr ) { }
~SwDoCapitals() {}
public:
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) = 0;
@@ -217,9 +217,9 @@ sal_Int32 SwFont::GetCapitalBreak( SwViewShell const * pSh, const OutputDevice*
0, false);
aInfo.SetPos( aPos );
aInfo.SetSpace( 0 );
- aInfo.SetWrong( NULL );
- aInfo.SetGrammarCheck( NULL );
- aInfo.SetSmartTags( NULL );
+ aInfo.SetWrong( nullptr );
+ aInfo.SetGrammarCheck( nullptr );
+ aInfo.SetSmartTags( nullptr );
aInfo.SetDrawSpace( false );
aInfo.SetKern( CheckKerning() );
aInfo.SetKanaComp( pScript ? 0 : 100 );
@@ -237,7 +237,7 @@ protected:
SwFntObj *pLowerFnt;
public:
explicit SwDoDrawCapital( SwDrawTextInfo &rInfo ) :
- SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0)
+ SwDoCapitals( rInfo ), pUpperFnt(nullptr), pLowerFnt(nullptr)
{ }
virtual ~SwDoDrawCapital() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) override;
@@ -321,7 +321,7 @@ protected:
sal_uInt16 nOfst;
public:
SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) :
- SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0), nCrsr( 0 ), nOfst( nOfs )
+ SwDoCapitals( rInfo ), pUpperFnt(nullptr), pLowerFnt(nullptr), nCrsr( 0 ), nOfst( nOfs )
{ }
virtual ~SwDoCapitalCrsrOfst() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) override;
@@ -489,12 +489,12 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
rDo.SetCapInf( aCapInf );
SwFntObj *pOldLast = pLastFont;
- SwFntAccess *pBigFontAccess = NULL;
+ SwFntAccess *pBigFontAccess = nullptr;
SwFntObj *pBigFont;
- SwFntAccess *pSpaceFontAccess = NULL;
- SwFntObj *pSpaceFont = NULL;
+ SwFntAccess *pSpaceFontAccess = nullptr;
+ SwFntObj *pSpaceFont = nullptr;
- const void *pMagic2 = NULL;
+ const void *pMagic2 = nullptr;
sal_uInt16 nIndex2 = 0;
SwSubFont aFont( *this );
Point aStartPos( rDo.GetInf().GetPos() );
@@ -522,7 +522,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
aFont.SetUnderline( UNDERLINE_NONE );
aFont.SetOverline( UNDERLINE_NONE );
aFont.SetStrikeout( STRIKEOUT_NONE );
- pMagic2 = NULL;
+ pMagic2 = nullptr;
nIndex2 = 0;
pBigFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
rDo.GetInf().GetShell() );
@@ -538,7 +538,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
// the option there).
int smallCapsPercentage = m_bSmallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE;
aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100 );
- pMagic2 = NULL;
+ pMagic2 = nullptr;
nIndex2 = 0;
SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
rDo.GetInf().GetShell() );
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 72c5946d8e77..5e4baaa09a36 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -150,8 +150,8 @@ bool SwpHints::Check(bool bPortionsMerged) const
sal_Int32 nLastStart = 0;
sal_Int32 nLastEnd = 0;
- const SwTextAttr *pLastStart = 0;
- const SwTextAttr *pLastEnd = 0;
+ const SwTextAttr *pLastStart = nullptr;
+ const SwTextAttr *pLastEnd = nullptr;
std::set<SwTextAttr const*> RsidOnlyAutoFormats;
if (bPortionsMerged)
{
@@ -233,7 +233,7 @@ bool SwpHints::Check(bool bPortionsMerged) const
// 8) style portion check
const SwTextAttr* pHtThis = m_HintsByStart[i];
- const SwTextAttr* pHtLast = i > 0 ? m_HintsByStart[i-1] : 0;
+ const SwTextAttr* pHtLast = i > 0 ? m_HintsByStart[i-1] : nullptr;
CHECK_ERR( (0 == i)
|| ( (RES_TXTATR_CHARFMT != pHtLast->Which())
&& (RES_TXTATR_AUTOFMT != pHtLast->Which()))
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8cda73e9cdec..aa805592b77d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -127,7 +127,7 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere,
// if there is no layout or it is in a hidden section, MakeFrms is not needed
const SwSectionNode* pSectNd;
if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ||
- ( 0 != (pSectNd = pNode->FindSectionNode()) &&
+ ( nullptr != (pSectNd = pNode->FindSectionNode()) &&
pSectNd->GetSection().IsHiddenFlag() ))
return pNode;
@@ -199,10 +199,10 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere,
SwTextNode::SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl, const SfxItemSet* pAutoAttr )
: SwContentNode( rWhere, ND_TEXTNODE, pTextColl ),
- m_pSwpHints( 0 ),
- mpNodeNum( 0 ),
+ m_pSwpHints( nullptr ),
+ mpNodeNum( nullptr ),
m_Text(),
- m_pParaIdleData_Impl(0),
+ m_pParaIdleData_Impl(nullptr),
m_bContainsHiddenChars(false),
m_bHiddenCharsHidePara(false),
m_bRecalcHiddenCharFlags(false),
@@ -210,7 +210,7 @@ SwTextNode::SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl,
m_bNotifiable( false ),
mbEmptyListStyleSetDueToSetOutlineLevelAttr( false ),
mbInSetOrResetAttr( false ),
- mpList( 0 ),
+ mpList( nullptr ),
m_pNumStringCache(),
m_wXParagraph(),
maFillAttributes()
@@ -247,7 +247,7 @@ SwTextNode::~SwTextNode()
{
// do not delete attributes twice when those delte their content
SwpHints* pTmpHints = m_pSwpHints;
- m_pSwpHints = 0;
+ m_pSwpHints = nullptr;
for( size_t j = pTmpHints->Count(); j; )
{
@@ -303,11 +303,11 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode )
SwpHints *pSwpHints = rNode.GetpSwpHints();
if( pSwpHints && rNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
{
- SwContentFrm* pFrm = NULL;
+ SwContentFrm* pFrm = nullptr;
// OD 07.11.2002 #104840# - local variable to remember first footnote
// of node <rNode> in order to invalidate position of its first content.
// Thus, in its <MakeAll()> it will checked its position relative to its reference.
- SwFootnoteFrm* pFirstFootnoteOfNode = 0;
+ SwFootnoteFrm* pFirstFootnoteOfNode = nullptr;
for( size_t j = pSwpHints->Count(); j; )
{
SwTextAttr* pHt = pSwpHints->Get(--j);
@@ -350,7 +350,7 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode )
}
}
#if OSL_DEBUG_LEVEL > 0
- while( 0 != (pContent = aIter.Next()) )
+ while( nullptr != (pContent = aIter.Next()) )
{
SwFootnoteFrm *pDbgFootnote = pContent->FindFootnoteFrm();
OSL_ENSURE( !pDbgFootnote || pDbgFootnote->GetRef() == pFrm,
@@ -397,7 +397,7 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos )
ResetAttr( RES_PARATR_LIST_ISRESTART );
ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- if ( GetNumRule() == 0 || (parentIsOutline && !IsOutline()) )
+ if ( GetNumRule() == nullptr || (parentIsOutline && !IsOutline()) )
{
ResetAttr( RES_PARATR_LIST_ID );
ResetAttr( RES_PARATR_LIST_LEVEL );
@@ -448,7 +448,7 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos )
if ( pNode->m_pSwpHints->CanBeDeleted() )
{
delete pNode->m_pSwpHints;
- pNode->m_pSwpHints = 0;
+ pNode->m_pSwpHints = nullptr;
}
else
{
@@ -504,19 +504,19 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos )
// text node.
const SwRootFrm *pRootFrm;
if ( (nTextLen != nSplitPos) ||
- ( (pRootFrm = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != 0 &&
+ ( (pRootFrm = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != nullptr &&
pRootFrm->IsAnyShellAccessible() ) )
{
// dann sage den Frames noch, das am Ende etwas "geloescht" wurde
if( 1 == nTextLen - nSplitPos )
{
SwDelChr aHint( nSplitPos );
- pNode->NotifyClients( 0, &aHint );
+ pNode->NotifyClients( nullptr, &aHint );
}
else
{
SwDelText aHint( nSplitPos, nTextLen - nSplitPos );
- pNode->NotifyClients( 0, &aHint );
+ pNode->NotifyClients( nullptr, &aHint );
}
}
if ( HasHints() )
@@ -529,17 +529,17 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos )
else
{
SwWrongList *pList = GetWrong();
- SetWrong( 0, false );
+ SetWrong( nullptr, false );
SetWrongDirty(WrongState::TODO);
SwGrammarMarkUp *pList3 = GetGrammarCheck();
- SetGrammarCheck( 0, false );
+ SetGrammarCheck( nullptr, false );
SetGrammarCheckDirty( true );
SetWordCountDirty( true );
SwWrongList *pList2 = GetSmartTags();
- SetSmartTags( 0, false );
+ SetSmartTags( nullptr, false );
SetSmartTagDirty( true );
SwIndex aIdx( this );
@@ -652,7 +652,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList->JoinList( pTextNode->GetWrong(), nOldLen );
SetWrongDirty(WrongState::TODO);
- SetWrong( 0, false );
+ SetWrong( nullptr, false );
}
else
{
@@ -661,7 +661,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList->Move( 0, nOldLen );
SetWrongDirty(WrongState::TODO);
- pTextNode->SetWrong( 0, false );
+ pTextNode->SetWrong( nullptr, false );
}
}
@@ -670,7 +670,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList3->JoinGrammarList( pTextNode->GetGrammarCheck(), nOldLen );
SetGrammarCheckDirty( true );
- SetGrammarCheck( 0, false );
+ SetGrammarCheck( nullptr, false );
}
else
{
@@ -679,7 +679,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList3->MoveGrammar( 0, nOldLen );
SetGrammarCheckDirty( true );
- pTextNode->SetGrammarCheck( 0, false );
+ pTextNode->SetGrammarCheck( nullptr, false );
}
}
@@ -688,7 +688,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList2->JoinList( pTextNode->GetSmartTags(), nOldLen );
SetSmartTagDirty( true );
- SetSmartTags( 0, false );
+ SetSmartTags( nullptr, false );
}
else
{
@@ -697,7 +697,7 @@ SwContentNode *SwTextNode::JoinNext()
{
pList2->Move( 0, nOldLen );
SetSmartTagDirty( true );
- pTextNode->SetSmartTags( 0, false );
+ pTextNode->SetSmartTags( nullptr, false );
}
}
@@ -743,8 +743,8 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList->JoinList( GetWrong(), Len() );
SetWrongDirty(WrongState::TODO);
- pTextNode->SetWrong( 0, false );
- SetWrong( NULL );
+ pTextNode->SetWrong( nullptr, false );
+ SetWrong( nullptr );
}
else
{
@@ -753,7 +753,7 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList->Move( 0, nLen );
SetWrongDirty(WrongState::TODO);
- SetWrong( 0, false );
+ SetWrong( nullptr, false );
}
}
@@ -762,8 +762,8 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList3->JoinGrammarList( GetGrammarCheck(), Len() );
SetGrammarCheckDirty( true );
- pTextNode->SetGrammarCheck( 0, false );
- SetGrammarCheck( NULL );
+ pTextNode->SetGrammarCheck( nullptr, false );
+ SetGrammarCheck( nullptr );
}
else
{
@@ -772,7 +772,7 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList3->MoveGrammar( 0, nLen );
SetGrammarCheckDirty( true );
- SetGrammarCheck( 0, false );
+ SetGrammarCheck( nullptr, false );
}
}
@@ -781,8 +781,8 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList2->JoinList( GetSmartTags(), Len() );
SetSmartTagDirty( true );
- pTextNode->SetSmartTags( 0, false );
- SetSmartTags( NULL );
+ pTextNode->SetSmartTags( nullptr, false );
+ SetSmartTags( nullptr );
}
else
{
@@ -791,7 +791,7 @@ SwContentNode *SwTextNode::JoinPrev()
{
pList2->Move( 0, nLen );
SetSmartTagDirty( true );
- SetSmartTags( 0, false );
+ SetSmartTags( nullptr, false );
}
}
@@ -1184,7 +1184,7 @@ void SwTextNode::Update(
//Any drawing objects anchored into this text node may be sorted by their
//anchor position which may have changed here, so resort them
SwContentFrm* pContentFrm = getLayoutFrm(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout());
- SwSortedObjs* pSortedObjs = pContentFrm ? pContentFrm->GetDrawObjs() : NULL;
+ SwSortedObjs* pSortedObjs = pContentFrm ? pContentFrm->GetDrawObjs() : nullptr;
if (pSortedObjs)
pSortedObjs->UpdateAll();
}
@@ -1288,7 +1288,7 @@ lcl_GetTextAttrs(
{
size_t const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
sal_Int32 nPreviousIndex(0); // index of last hint with nWhich
- bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=0;
+ bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=nullptr;
switch (eMode)
{
case SwTextNode::DEFAULT: pMatchFunc = &lcl_GetTextAttrDefault; break;
@@ -1347,7 +1347,7 @@ SwTextNode::GetTextAttrsAt(sal_Int32 const nIndex, RES_TXTATR const nWhich,
enum GetTextAttrMode const eMode) const
{
::std::vector<SwTextAttr *> ret;
- lcl_GetTextAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, eMode);
+ lcl_GetTextAttrs(& ret, nullptr, m_pSwpHints, nIndex, nWhich, eMode);
return ret;
}
@@ -1364,18 +1364,18 @@ SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, RES_TXTATR const nWhich,
|| (nWhich == RES_TXTATR_INPUTFIELD ) );
// "GetTextAttrAt() will give wrong result for this hint!")
- SwTextAttr * pRet(0);
- lcl_GetTextAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode);
+ SwTextAttr * pRet(nullptr);
+ lcl_GetTextAttrs(nullptr, & pRet, m_pSwpHints, nIndex, nWhich, eMode);
return pRet;
}
const SwTextInputField* SwTextNode::GetOverlappingInputField( const SwTextAttr& rTextAttr ) const
{
- const SwTextInputField* pTextInputField = NULL;
+ const SwTextInputField* pTextInputField = nullptr;
pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT ));
- if ( pTextInputField == NULL && rTextAttr.End() != NULL )
+ if ( pTextInputField == nullptr && rTextAttr.End() != nullptr )
{
pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( *(rTextAttr.End()), RES_TXTATR_INPUTFIELD, PARENT ));
}
@@ -1385,13 +1385,13 @@ const SwTextInputField* SwTextNode::GetOverlappingInputField( const SwTextAttr&
void SwTextNode::DelFrms_TextNodePart()
{
- SetWrong( NULL );
+ SetWrong( nullptr );
SetWrongDirty(WrongState::TODO);
- SetGrammarCheck( NULL );
+ SetGrammarCheck( nullptr );
SetGrammarCheckDirty( true );
- SetSmartTags( NULL );
+ SetSmartTags( nullptr );
SetSmartTagDirty( true );
SetWordCountDirty( true );
@@ -1402,14 +1402,14 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
const sal_Int32 nIndex,
const bool bIncludeInputFieldAtStart ) const
{
- SwTextField* pTextField = NULL;
+ SwTextField* pTextField = nullptr;
pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, RES_TXTATR_FIELD ));
- if ( pTextField == NULL )
+ if ( pTextField == nullptr )
{
pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, RES_TXTATR_ANNOTATION ));
}
- if ( pTextField == NULL )
+ if ( pTextField == nullptr )
{
pTextField =
dynamic_cast<SwTextField*>( GetTextAttrAt(
@@ -1433,7 +1433,7 @@ static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, cons
return pFormat;
}
}
- return NULL;
+ return nullptr;
}
void lcl_CopyHint(
@@ -1458,7 +1458,7 @@ void lcl_CopyHint(
// TabellenFormel muessen relativ kopiert werden.
case RES_TXTATR_FIELD :
{
- if( pOtherDoc != NULL )
+ if( pOtherDoc != nullptr )
{
static_txtattr_cast<const SwTextField*>(pHt)->CopyTextField(
static_txtattr_cast<SwTextField*>(pNewHt));
@@ -1485,7 +1485,7 @@ void lcl_CopyHint(
case RES_TXTATR_INPUTFIELD :
case RES_TXTATR_ANNOTATION :
- if( pOtherDoc != NULL )
+ if( pOtherDoc != nullptr )
{
static_txtattr_cast<const SwTextField*>(pHt)->CopyTextField(
static_txtattr_cast<SwTextField*>(pNewHt));
@@ -1575,7 +1575,7 @@ void SwTextNode::CopyAttr( SwTextNode *pDest, const sal_Int32 nTextStartIdx,
if ( HasHints() ) // keine Attribute, keine Kekse
{
SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ?
- pDest->GetDoc() : 0;
+ pDest->GetDoc() : nullptr;
for ( size_t i = 0; i < m_pSwpHints->Count(); ++i )
{
@@ -1606,7 +1606,7 @@ void SwTextNode::CopyAttr( SwTextNode *pDest, const sal_Int32 nTextStartIdx,
}
else if( !pOtherDoc
? GetDoc()->IsCopyIsMove()
- : 0 == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) )
+ : nullptr == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) )
{
pDest->InsertItem(
pHt->GetAttr(), nOldPos, nOldPos, SetAttrMode::IS_COPY);
@@ -1624,7 +1624,7 @@ void SwTextNode::CopyAttr( SwTextNode *pDest, const sal_Int32 nTextStartIdx,
nOldPos,
0);
- pDest->ModifyNotification( 0, &aHint );
+ pDest->ModifyNotification( nullptr, &aHint );
}
}
@@ -1708,7 +1708,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
if ( !nLen ) // string not longer?
return;
- SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ? pDest->GetDoc() : 0;
+ SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ? pDest->GetDoc() : nullptr;
// harte Absatz umspannende Attribute kopieren
if( HasSwAttrSet() )
@@ -1781,7 +1781,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
&& ( bUndoNodes
|| ( !pOtherDoc
? GetDoc()->IsCopyIsMove()
- : 0 == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) ) );
+ : nullptr == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) ) );
if ( pEndIdx
&& RES_TXTATR_REFMARK == nWhich
@@ -1793,10 +1793,10 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
// Input Fields are only copied, if completely covered by copied text
if ( nWhich == RES_TXTATR_INPUTFIELD )
{
- OSL_ENSURE( pEndIdx != NULL,
+ OSL_ENSURE( pEndIdx != nullptr,
"<SwTextNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" );
if ( nAttrStartIdx < nTextStartIdx
- || ( pEndIdx != NULL
+ || ( pEndIdx != nullptr
&& *(pEndIdx) > nEnd ) )
{
continue;
@@ -1839,7 +1839,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
}
}
- SwTextAttr * pNewHt = 0;
+ SwTextAttr * pNewHt = nullptr;
if( pDest == this )
{
@@ -1847,7 +1847,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
pNewHt = MakeTextAttr( *GetDoc(), pHt->GetAttr(),
nAttrStt, nAttrEnd, COPY, pDest );
- lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest);
+ lcl_CopyHint(nWhich, pHt, pNewHt, nullptr, pDest);
aArr.push_back( pNewHt );
}
else
@@ -2015,7 +2015,7 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
if ( HasWriterListeners() )
{
SwInsText aHint( aPos, nLen );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
// By inserting a character, the hidden flags
@@ -2115,7 +2115,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
break;
const sal_Int32 * const pEndIdx = pHt->GetEnd();
const sal_uInt16 nWhich = pHt->Which();
- SwTextAttr *pNewHt = 0;
+ SwTextAttr *pNewHt = nullptr;
// if the hint has a dummy character, then it must not be split!
if(nAttrStartIdx < nTextStartIdx)
@@ -2242,9 +2242,9 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
// Frames benachrichtigen;
SwInsText aInsHint( nDestStart, nLen );
- pDest->ModifyNotification( 0, &aInsHint );
+ pDest->ModifyNotification( nullptr, &aInsHint );
SwDelText aDelHint( nTextStartIdx, nLen );
- ModifyNotification( 0, &aDelHint );
+ ModifyNotification( nullptr, &aDelHint );
}
void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
@@ -2331,12 +2331,12 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
if( 1 == nCnt )
{
SwDelChr aHint( nStartIdx );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
else
{
SwDelText aHint( nStartIdx, nCnt );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
@@ -2389,16 +2389,16 @@ void SwTextNode::GCAttr()
nMax,
0);
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
SwFormatChg aNew( GetTextColl() );
- NotifyClients( 0, &aNew );
+ NotifyClients( nullptr, &aNew );
}
}
// #i23726#
SwNumRule* SwTextNode::_GetNumRule(bool bInParent) const
{
- SwNumRule* pRet = 0;
+ SwNumRule* pRet = nullptr;
const SfxPoolItem* pItem = GetNoCondAttr( RES_PARATR_NUMRULE, bInParent );
bool bNoNumRule = false;
@@ -2427,7 +2427,7 @@ SwNumRule* SwTextNode::_GetNumRule(bool bInParent) const
const SwNumRuleItem& rDirectItem = pColl->GetNumRule( false );
if ( rDirectItem.GetValue().isEmpty() )
{
- pRet = 0L;
+ pRet = nullptr;
}
}
}
@@ -2474,7 +2474,7 @@ void SwTextNode::NumRuleChgd()
// -> #i27615#
bool SwTextNode::IsNumbered() const
{
- SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
return pRule && IsCountedInList();
}
@@ -2496,7 +2496,7 @@ SwTextNode* SwTextNode::_MakeNewTextNode( const SwNodeIndex& rPos, bool bNext,
bool bChgFollow )
{
/* hartes PageBreak/PageDesc/ColumnBreak aus AUTO-Set ignorieren */
- SwAttrSet* pNewAttrSet = 0;
+ SwAttrSet* pNewAttrSet = nullptr;
// #i75353#
bool bClearHardSetNumRuleWhenFormatCollChanges( false );
if( HasSwAttrSet() )
@@ -2592,7 +2592,7 @@ SwTextNode* SwTextNode::_MakeNewTextNode( const SwNodeIndex& rPos, bool bNext,
( bChgFollow && pColl != GetTextColl() ))
return pNode; // mehr duerfte nicht gemacht werden oder ????
- pNode->_ChgTextCollUpdateNum( 0, pColl ); // fuer Nummerierung/Gliederung
+ pNode->_ChgTextCollUpdateNum( nullptr, pColl ); // fuer Nummerierung/Gliederung
if( bNext || !bChgFollow )
return pNode;
@@ -2628,7 +2628,7 @@ SwContentNode* SwTextNode::AppendNode( const SwPosition & rPos )
pNew->ResetAttr( RES_PARATR_LIST_ISRESTART );
pNew->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
pNew->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- if ( pNew->GetNumRule() == 0 )
+ if ( pNew->GetNumRule() == nullptr )
{
pNew->ResetAttr( RES_PARATR_LIST_ID );
pNew->ResetAttr( RES_PARATR_LIST_LEVEL );
@@ -2656,16 +2656,16 @@ SwTextAttr * SwTextNode::GetTextAttrForCharAt(
const sal_Int32 nStartPos = pHint->GetStart();
if ( nIndex < nStartPos )
{
- return 0;
+ return nullptr;
}
if ( (nIndex == nStartPos) && pHint->HasDummyChar() )
{
return ( RES_TXTATR_END == nWhich || nWhich == pHint->Which() )
- ? pHint : 0;
+ ? pHint : nullptr;
}
}
}
- return 0;
+ return nullptr;
}
namespace
@@ -2683,7 +2683,7 @@ bool SwTextNode::HasNumber() const
{
bool bResult = false;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule )
{
SwNumFormat aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel())));
@@ -2700,7 +2700,7 @@ bool SwTextNode::HasBullet() const
{
bool bResult = false;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule )
{
SwNumFormat aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel())));
@@ -2722,7 +2722,7 @@ OUString SwTextNode::GetNumString( const bool _bInclPrefixAndSuffixStrings,
// #i111677# do not expand number strings in clipboard documents
return *m_pNumStringCache;
}
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule &&
IsCountedInList() )
{
@@ -2745,7 +2745,7 @@ OUString SwTextNode::GetNumString( const bool _bInclPrefixAndSuffixStrings,
long SwTextNode::GetLeftMarginWithNum( bool bTextLeft ) const
{
long nRet = 0;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if( pRule )
{
const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel()));
@@ -2791,7 +2791,7 @@ bool SwTextNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
rFLOffset = 0;
// #i51089#
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule )
{
if ( IsCountedInList() )
@@ -2832,7 +2832,7 @@ SwTwips SwTextNode::GetAdditionalIndentForStartingNewList() const
{
SwTwips nAdditionalIndent = 0;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule )
{
const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel()));
@@ -2895,7 +2895,7 @@ long SwTextNode::GetLeftMarginForTabCalculation() const
long nLeftMarginForTabCalc = 0;
bool bLeftMarginForTabCalcSetToListLevelIndent( false );
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if( pRule )
{
const SwNumFormat& rFormat = pRule->Get(lcl_BoundListLevel(GetActualListLevel()));
@@ -3356,10 +3356,10 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
SetIgnoreDontExpand( bOldExpFlg );
SwDelText aDelHint( nStartPos, nDelLen );
- NotifyClients( 0, &aDelHint );
+ NotifyClients( nullptr, &aDelHint );
SwInsText aHint( nStartPos, sInserted.getLength() );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
namespace {
@@ -3404,7 +3404,7 @@ namespace {
if( rTextNode.GetNodes().IsDocNodes() )
{
const SwNumRule* pFormerNumRuleAtTextNode =
- rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0;
+ rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : nullptr;
if ( pFormerNumRuleAtTextNode )
{
sOldNumRule = pFormerNumRuleAtTextNode->GetName();
@@ -3428,9 +3428,9 @@ namespace {
}
case RES_ATTRSET_CHG:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SwNumRule* pFormerNumRuleAtTextNode =
- rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0;
+ rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : nullptr;
if ( pFormerNumRuleAtTextNode )
{
sOldNumRule = pFormerNumRuleAtTextNode->GetName();
@@ -3458,7 +3458,7 @@ namespace {
if ( rTextNode.GetNodes().IsDocNodes() )
{
const SwNumRule* pFormerNumRuleAtTextNode =
- rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : 0;
+ rTextNode.GetNum() ? rTextNode.GetNum()->GetNumRule() : nullptr;
if ( pFormerNumRuleAtTextNode )
{
sOldNumRule = pFormerNumRuleAtTextNode->GetName();
@@ -3592,7 +3592,7 @@ void SwTextNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVa
if (pOldValue && (RES_REMOVE_UNO_OBJECT == pOldValue->Which()))
{ // invalidate cached uno object
- SetXParagraph(css::uno::Reference<css::text::XTextContent>(0));
+ SetXParagraph(css::uno::Reference<css::text::XTextContent>(nullptr));
}
}
@@ -3666,7 +3666,7 @@ bool SwTextNode::IsOutline() const
}
else
{
- const SwNumRule* pRule( GetNum() ? GetNum()->GetNumRule() : 0L );
+ const SwNumRule* pRule( GetNum() ? GetNum()->GetNumRule() : nullptr );
if ( pRule && pRule->IsOutlineRule() )
{
bResult = !IsInRedlines();
@@ -3786,7 +3786,7 @@ bool SwTextNode::IsListRestart() const
*/
bool SwTextNode::HasVisibleNumberingOrBullet() const
{
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
+ const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pRule && IsCountedInList())
{
// #i87154#
@@ -3912,7 +3912,7 @@ void SwTextNode::AddToList()
if (!sListId.isEmpty())
{
SwList* pList = GetDoc()->getIDocumentListsAccess().getListByName( sListId );
- if ( pList == 0 )
+ if ( pList == nullptr )
{
// Create corresponding list.
SwNumRule* pNumRule = GetNumRule();
@@ -3921,7 +3921,7 @@ void SwTextNode::AddToList()
pList = GetDoc()->getIDocumentListsAccess().createList( sListId, GetNumRule()->GetName() );
}
}
- OSL_ENSURE( pList != 0,
+ OSL_ENSURE( pList != nullptr,
"<SwTextNode::AddToList()> - no list for given list id. Serious defect" );
if ( pList )
{
@@ -3936,9 +3936,9 @@ void SwTextNode::RemoveFromList()
if ( IsInList() )
{
SwList::RemoveListItem( *mpNodeNum );
- mpList = 0;
+ mpList = nullptr;
delete mpNodeNum;
- mpNodeNum = 0L;
+ mpNodeNum = nullptr;
SetWordCountDirty( true );
}
@@ -3946,7 +3946,7 @@ void SwTextNode::RemoveFromList()
bool SwTextNode::IsInList() const
{
- return GetNum() != 0 && GetNum()->GetParent() != 0;
+ return GetNum() != nullptr && GetNum()->GetParent() != nullptr;
}
bool SwTextNode::IsFirstOfNumRule() const
@@ -4080,7 +4080,7 @@ bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const
{
bool bListTanStopPositionProvided( false );
- const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
+ const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
const SwNumFormat& rFormat = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
@@ -4112,7 +4112,7 @@ bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const
OUString SwTextNode::GetLabelFollowedBy() const
{
- const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
+ const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
const SwNumFormat& rFormat = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
@@ -4339,7 +4339,7 @@ namespace {
// #i70748#
mbOutlineLevelSet( false )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
// handle RES_PARATR_NUMRULE
if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SfxItemState::SET )
{
@@ -4473,7 +4473,7 @@ namespace {
}
else
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( mrTextNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE,
true, &pItem )
!= SfxItemState::SET )
@@ -4566,7 +4566,7 @@ namespace {
// RES_PARATR_NUMRULE and RES_PARATR_LIST_ID
if ( nWhich1 <= RES_PARATR_NUMRULE && RES_PARATR_NUMRULE <= nWhich2 )
{
- bRemoveFromList = mrTextNode.GetNumRule() != 0;
+ bRemoveFromList = mrTextNode.GetNumRule() != nullptr;
mbListStyleOrIdReset = true;
}
else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 )
@@ -4609,7 +4609,7 @@ namespace {
// RES_PARATR_NUMRULE and RES_PARATR_LIST_ID
if ( nWhich1 == RES_PARATR_NUMRULE )
{
- bRemoveFromList = mrTextNode.GetNumRule() != 0;
+ bRemoveFromList = mrTextNode.GetNumRule() != nullptr;
mbListStyleOrIdReset = true;
}
else if ( nWhich1 == RES_PARATR_LIST_ID )
@@ -4667,7 +4667,7 @@ namespace {
if ( *it == RES_PARATR_NUMRULE )
{
bRemoveFromList = bRemoveFromList ||
- mrTextNode.GetNumRule() != 0;
+ mrTextNode.GetNumRule() != nullptr;
mbListStyleOrIdReset = true;
}
else if ( *it == RES_PARATR_LIST_ID )
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index a44915973ac0..f32358b1df6c 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -27,11 +27,11 @@ extern const sal_uInt8 StackPos[];
// globale Variablen, werden in SwFntCch.Hxx bekanntgegeben
// Der FontCache wird in TextInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht
-SwFontCache *pSwFontCache = NULL;
+SwFontCache *pSwFontCache = nullptr;
SwFontObj::SwFontObj( const void *pOwn, SwViewShell *pSh ) :
SwCacheObj( pOwn ),
- aSwFont( &static_cast<SwTextFormatColl const *>(pOwn)->GetAttrSet(), pSh ? &pSh->getIDocumentSettingAccess() : 0 )
+ aSwFont( &static_cast<SwTextFormatColl const *>(pOwn)->GetAttrSet(), pSh ? &pSh->getIDocumentSettingAccess() : nullptr )
{
aSwFont.GoMagic( pSh, aSwFont.GetActual() );
const SwAttrSet& rAttrSet = static_cast<SwTextFormatColl const *>(pOwn)->GetAttrSet();
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 4a0c63f997a2..5a9dec06c0c6 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -72,7 +72,7 @@ void SwFont::SetBackColor( Color* pNewColor )
delete m_pBackColor;
m_pBackColor = pNewColor;
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
@@ -85,7 +85,7 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
m_nTopBorderDist = 0;
}
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
@@ -98,7 +98,7 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
m_nBottomBorderDist = 0;
}
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
@@ -111,7 +111,7 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
m_nRightBorderDist = 0;
}
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
@@ -124,7 +124,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
m_nLeftBorderDist = 0;
}
m_bFontChg = true;
- m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0;
+ m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = nullptr;
}
const boost::optional<editeng::SvxBorderLine>&
@@ -482,7 +482,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
const IDocumentSettingAccess *pIDocumentSettingAccess )
{
delete m_pBackColor;
- m_pBackColor = NULL;
+ m_pBackColor = nullptr;
if( pAttrSet )
{
@@ -686,7 +686,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetShadowWidth(pShadowItem->GetWidth());
SetShadowLocation(pShadowItem->GetLocation());
}
- const SfxPoolItem* pTwoLinesItem = 0;
+ const SfxPoolItem* pTwoLinesItem = nullptr;
if( SfxItemState::SET ==
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem ))
if ( static_cast<const SvxTwoLinesItem*>(pTwoLinesItem)->GetValue() )
@@ -709,7 +709,7 @@ SwFont::SwFont( const SwFont &rFont )
m_aSub[SW_CJK] = rFont.m_aSub[SW_CJK];
m_aSub[SW_CTL] = rFont.m_aSub[SW_CTL];
m_nActual = rFont.m_nActual;
- m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : NULL;
+ m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : nullptr;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
@@ -843,7 +843,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
true, &pItem ))
m_pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
else
- m_pBackColor = NULL;
+ m_pBackColor = nullptr;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
@@ -864,10 +864,10 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
}
else
{
- SetTopBorder(0);
- SetBottomBorder(0);
- SetRightBorder(0);
- SetLeftBorder(0);
+ SetTopBorder(nullptr);
+ SetBottomBorder(nullptr);
+ SetRightBorder(nullptr);
+ SetLeftBorder(nullptr);
SetTopBorderDist(0);
SetBottomBorderDist(0);
SetRightBorderDist(0);
@@ -927,7 +927,7 @@ SwFont& SwFont::operator=( const SwFont &rFont )
m_aSub[SW_CTL] = rFont.m_aSub[SW_CTL];
m_nActual = rFont.m_nActual;
delete m_pBackColor;
- m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : NULL;
+ m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : nullptr;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
@@ -1170,7 +1170,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
rInf.SetLen( nLn );
FontUnderline nOldUnder = UNDERLINE_NONE;
- SwUnderlineFont* pUnderFnt = 0;
+ SwUnderlineFont* pUnderFnt = nullptr;
if( rInf.GetUnderFnt() )
{
@@ -1275,7 +1275,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
rInf.SetIdx( 0 );
rInf.SetLen( 2 );
SetUnderline( nOldUnder );
- rInf.SetUnderFnt( 0 );
+ rInf.SetUnderFnt( nullptr );
// set position for underline font
rInf.SetPos( pUnderFnt->GetPos() );
@@ -1297,7 +1297,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
return;
FontUnderline nOldUnder = UNDERLINE_NONE;
- SwUnderlineFont* pUnderFnt = 0;
+ SwUnderlineFont* pUnderFnt = nullptr;
if( rInf.GetUnderFnt() )
{
@@ -1357,7 +1357,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
rInf.SetIdx( 0 );
rInf.SetLen( 2 );
SetUnderline( nOldUnder );
- rInf.SetUnderFnt( 0 );
+ rInf.SetUnderFnt( nullptr );
// set position for underline font
rInf.SetPos( pUnderFnt->GetPos() );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 0872df429c6d..63d64f267603 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -86,7 +86,7 @@
using namespace ::com::sun::star::i18n;
SwpHints::SwpHints()
- : m_pHistory(0)
+ : m_pHistory(nullptr)
, m_bFontChange(true)
, m_bInSplitNode(false)
, m_bCalcHiddenParaField(false)
@@ -105,7 +105,7 @@ struct TextAttrDeleter
if (RES_TXTATR_META == pAttr->Which() ||
RES_TXTATR_METAFIELD == pAttr->Which())
{
- static_txtattr_cast<SwTextMeta *>(pAttr)->ChgTextNode(0); // prevents ASSERT
+ static_txtattr_cast<SwTextMeta *>(pAttr)->ChgTextNode(nullptr); // prevents ASSERT
}
SwTextAttr::Destroy( pAttr, m_rPool );
}
@@ -731,7 +731,7 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
}
}
- SwTextAttr* pNewAttr = 0;
+ SwTextAttr* pNewAttr = nullptr;
if ( RES_TXTATR_CHARFMT == nWhich )
{
// pNewHint can be inserted after calculating the sort value.
@@ -824,8 +824,8 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
else
{
// Find the current autostyle. Mix attributes if necessary.
- SwTextAttr* pCurrentAutoStyle = 0;
- SwTextAttr* pCurrentCharFormat = 0;
+ SwTextAttr* pCurrentAutoStyle = nullptr;
+ SwTextAttr* pCurrentCharFormat = nullptr;
aIter = aInsDelHints.begin();
while ( aIter != aInsDelHints.end() )
{
@@ -855,16 +855,16 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
do
{
- const SfxPoolItem* pTmpItem = 0;
+ const SfxPoolItem* pTmpItem = nullptr;
if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
- if ( !pCurrentCharFormat || 0 == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) )
+ if ( !pCurrentCharFormat || nullptr == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) )
aNewSet.ClearItem( pItem->Which() );
}
}
- while (!aIter2.IsAtEnd() && 0 != (pItem = aIter2.NextItem()));
+ while (!aIter2.IsAtEnd() && nullptr != (pItem = aIter2.NextItem()));
}
// Remove old hint
@@ -885,7 +885,7 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
// #i81764# This should not be applied for no length attributes!!! <--
if ( !bNoLengthAttribute && rNode.HasSwAttrSet() && pNewStyle->Count() )
{
- SfxItemSet* pNewSet = 0;
+ SfxItemSet* pNewSet = nullptr;
SfxItemIter aIter2( *pNewStyle );
const SfxPoolItem* pItem = aIter2.GetCurItem();
@@ -893,12 +893,12 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
do
{
- const SfxPoolItem* pTmpItem = 0;
+ const SfxPoolItem* pTmpItem = nullptr;
if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
- if ( !pCurrentCharFormat || 0 == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) )
+ if ( !pCurrentCharFormat || nullptr == CharFormat::GetItem( *pCurrentCharFormat, pItem->Which() ) )
{
if ( !pNewSet )
pNewSet = pNewStyle->Clone();
@@ -906,7 +906,7 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint,
}
}
}
- while (!aIter2.IsAtEnd() && 0 != (pItem = aIter2.NextItem()));
+ while (!aIter2.IsAtEnd() && nullptr != (pItem = aIter2.NextItem()));
if ( pNewSet )
{
@@ -1024,7 +1024,7 @@ SwTextAttr* MakeTextAttr(
SfxPoolItem& rNew =
const_cast<SfxPoolItem&>( rDoc.GetAttrPool().Put( rAttr ) );
- SwTextAttr* pNew = 0;
+ SwTextAttr* pNew = nullptr;
switch( rNew.Which() )
{
case RES_TXTATR_CHARFMT:
@@ -1144,7 +1144,7 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr )
break;
case RES_TXTATR_FTN:
- static_cast<SwTextFootnote*>(pAttr)->SetStartNode( 0 );
+ static_cast<SwTextFootnote*>(pAttr)->SetStartNode( nullptr );
static_cast<SwFormatFootnote&>(pAttr->GetAttr()).InvalidateFootnote();
break;
@@ -1204,7 +1204,7 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr )
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- static_txtattr_cast<SwTextMeta*>(pAttr)->ChgTextNode(0);
+ static_txtattr_cast<SwTextMeta*>(pAttr)->ChgTextNode(nullptr);
break;
default:
@@ -1242,7 +1242,7 @@ SwTextAttr* SwTextNode::InsertItem(
// insertion, and thus destroyed!
if (!bSuccess || !m_pSwpHints->Contains( pNew ))
{
- return 0;
+ return nullptr;
}
}
@@ -1284,7 +1284,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// gesetzt ist, dann korrigiere dieses nach dem Einfuegen
// des Zeichens. Sonst muesste das immer ausserhalb
// erfolgen (Fehleranfaellig !)
- const SwFormatAnchor* pAnchor = 0;
+ const SwFormatAnchor* pAnchor = nullptr;
pFormat->GetItemState( RES_ANCHOR, false,
reinterpret_cast<const SfxPoolItem**>(&pAnchor) );
@@ -1387,12 +1387,12 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
}
// wird eine neue Fussnote eingefuegt ??
- bool bNewFootnote = 0 == static_cast<SwTextFootnote*>(pAttr)->GetStartNode();
+ bool bNewFootnote = nullptr == static_cast<SwTextFootnote*>(pAttr)->GetStartNode();
if( bNewFootnote )
{
static_cast<SwTextFootnote*>(pAttr)->MakeNewTextSection( GetNodes() );
SwRegHistory* pHist = GetpSwpHints()
- ? GetpSwpHints()->GetHistory() : 0;
+ ? GetpSwpHints()->GetHistory() : nullptr;
if( pHist )
pHist->ChangeNodeIndex( GetIndex() );
}
@@ -1405,7 +1405,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
for( ; nSttIdx < nEndIdx; ++nSttIdx )
{
SwContentNode* pCNd = rNodes[ nSttIdx ]->GetContentNode();
- if( 0 != pCNd )
+ if( nullptr != pCNd )
pCNd->DelFrms();
}
}
@@ -1427,7 +1427,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
}
// Wir tragen uns am FootnoteIdx-Array des Docs ein ...
- SwTextFootnote* pTextFootnote = 0;
+ SwTextFootnote* pTextFootnote = nullptr;
if( !bNewFootnote )
{
// eine alte Footnote wird umgehaengt (z.B. SplitNode)
@@ -1522,8 +1522,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
InsertText( OUString(CH_TXT_ATR_INPUTFIELDEND), aIdx, nInsertFlags );
sal_Int32* const pEnd(pAttr->GetEnd());
- OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
- if ( pEnd != NULL )
+ OSL_ENSURE( pEnd != nullptr, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != nullptr )
{
*pEnd = *pEnd + 2 + aContent.getLength();
nEnd = *pEnd;
@@ -1538,8 +1538,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags );
bInputFieldStartCharInserted = true;
sal_Int32* const pEnd(pAttr->GetEnd());
- OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
- if ( pEnd != NULL )
+ OSL_ENSURE( pEnd != nullptr, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != nullptr )
{
*pEnd = *pEnd + 1;
nEnd = *pEnd;
@@ -1547,8 +1547,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
}
sal_Int32* const pEnd(pAttr->GetEnd());
- OSL_ENSURE( pEnd != NULL, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
- if ( pEnd != NULL
+ OSL_ENSURE( pEnd != nullptr, "<SwTextNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != nullptr
&& m_Text[ *(pEnd) - 1 ] != CH_TXT_ATR_INPUTFIELDEND )
{
SwIndex aIdx( this, *(pEnd) );
@@ -1572,9 +1572,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
bool bInsertHint = true;
{
const SwTextInputField* pTextInputField = GetOverlappingInputField( *pAttr );
- if ( pTextInputField != NULL )
+ if ( pTextInputField != nullptr )
{
- if ( pAttr->End() == NULL )
+ if ( pAttr->End() == nullptr )
{
bInsertHint = false;
}
@@ -1664,7 +1664,7 @@ void SwTextNode::DeleteAttribute( SwTextAttr * const pAttr )
else if ( pAttr->HasContent() )
{
const SwIndex aIdx( this, pAttr->GetStart() );
- OSL_ENSURE( pAttr->End() != NULL, "<SwTextNode::DeleteAttribute(..)> - missing End() at <SwTextAttr> instance which has content" );
+ OSL_ENSURE( pAttr->End() != nullptr, "<SwTextNode::DeleteAttribute(..)> - missing End() at <SwTextAttr> instance which has content" );
EraseText( aIdx, *pAttr->End() - pAttr->GetStart() );
}
else
@@ -1677,7 +1677,7 @@ void SwTextNode::DeleteAttribute( SwTextAttr * const pAttr )
m_pSwpHints->Delete( pAttr );
SwTextAttr::Destroy( pAttr, GetDoc()->GetAttrPool() );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
TryDeleteSwpHints();
}
@@ -1738,7 +1738,7 @@ void SwTextNode::DeleteAttributes(
else if ( pTextHt->HasContent() )
{
const SwIndex aIdx( this, nStart );
- OSL_ENSURE( pTextHt->End() != NULL, "<SwTextNode::DeleteAttributes(..)> - missing End() at <SwTextAttr> instance which has content" );
+ OSL_ENSURE( pTextHt->End() != nullptr, "<SwTextNode::DeleteAttributes(..)> - missing End() at <SwTextAttr> instance which has content" );
EraseText( aIdx, *pTextHt->End() - nStart );
}
else if( *pEndIdx == nEnd )
@@ -1754,7 +1754,7 @@ void SwTextNode::DeleteAttributes(
m_pSwpHints->DeleteAtPos( nPos ); // gefunden, loeschen,
SwTextAttr::Destroy( pTextHt, GetDoc()->GetAttrPool() );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
}
}
@@ -2046,7 +2046,7 @@ public:
const SfxPoolItem* mpItem;
sal_Int32 mnEndPos;
- SwPoolItemEndPair() : mpItem( 0 ), mnEndPos( 0 ) {};
+ SwPoolItemEndPair() : mpItem( nullptr ), mnEndPos( 0 ) {};
};
static void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTextNode& rTextNode,
@@ -2165,7 +2165,7 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
{
// uneindeutig ?
std::unique_ptr< SfxItemIter > pItemIter;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( RES_TXTATR_AUTOFMT == pHt->Which() )
{
@@ -2239,7 +2239,7 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
}
pItem = ( pItemIter.get() && !pItemIter->IsAtEnd() )
- ? pItemIter->NextItem() : 0;
+ ? pItemIter->NextItem() : nullptr;
} // end while
}
}
@@ -2249,7 +2249,7 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
for (size_t n = 0; n < coArrSz; ++n)
{
const SwPoolItemEndPair& rItemPair = (*pAttrArr)[ n ];
- if( (0 != rItemPair.mpItem) && (reinterpret_cast<SfxPoolItem*>(-1) != rItemPair.mpItem) )
+ if( (nullptr != rItemPair.mpItem) && (reinterpret_cast<SfxPoolItem*>(-1) != rItemPair.mpItem) )
{
const sal_uInt16 nWh =
static_cast<sal_uInt16>(n + RES_CHRATR_BEGIN);
@@ -2519,7 +2519,7 @@ void SwTextNode::FormatToTextAttr( SwTextNode* pNd )
if( aThisSet.Count() )
{
SfxItemIter aIter( aThisSet );
- const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0;
+ const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = nullptr;
SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFormatSetRange );
std::vector<sal_uInt16> aClearWhichIds;
@@ -3025,7 +3025,7 @@ bool SwpHints::TryInsertHint(
case RES_TXTATR_INPUTFIELD:
{
SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pHint));
- bool bDelFirst = 0 != pTextField->GetpTextNode();
+ bool bDelFirst = nullptr != pTextField->GetpTextNode();
pTextField->ChgTextNode( &rNode );
SwDoc* pDoc = rNode.GetDoc();
const SwField* pField = pTextField->GetFormatField().GetField();
@@ -3117,8 +3117,8 @@ bool SwpHints::TryInsertHint(
sal_Int32 *pTmpHintEnd;
if (RES_TXTATR_REFMARK == (pTmpHt = Get(n))->Which() &&
pHint->GetAttr() == pTmpHt->GetAttr() &&
- 0 != ( pTmpHtEnd = pTmpHt->GetEnd() ) &&
- 0 != ( pTmpHintEnd = pHint->GetEnd() ) )
+ nullptr != ( pTmpHtEnd = pTmpHt->GetEnd() ) &&
+ nullptr != ( pTmpHintEnd = pHint->GetEnd() ) )
{
SwComparePosition eCmp = ::ComparePosition(
pTmpHt->GetStart(), *pTmpHtEnd,
@@ -3195,7 +3195,7 @@ bool SwpHints::TryInsertHint(
nHtStart,
nWhich);
- rNode.ModifyNotification(0,&aHint);
+ rNode.ModifyNotification(nullptr,&aHint);
}
return true;
@@ -3279,7 +3279,7 @@ bool SwpHints::TryInsertHint(
nHtStart == nHintEnd ? nHintEnd + 1 : nHintEnd,
nWhich);
- rNode.ModifyNotification( 0, &aHint );
+ rNode.ModifyNotification( nullptr, &aHint );
}
#ifdef DBG_UTIL
@@ -3315,7 +3315,7 @@ void SwpHints::DeleteAtPos( const size_t nPos )
const SwTextNode* pNd = pTextField->GetpTextNode();
if( pNd && pNd->GetNodes().IsDocNodes() )
const_cast<SwDDEFieldType*>(static_cast<const SwDDEFieldType*>(pFieldTyp))->DecRefCnt();
- pTextField->ChgTextNode(0);
+ pTextField->ChgTextNode(nullptr);
}
else if ( m_bHasHiddenParaField &&
RES_HIDDENPARAFLD == pFieldTyp->Which() )
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index f9087b9c776b..6aac71af102e 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -48,7 +48,7 @@ SwTextAttr::~SwTextAttr( )
sal_Int32* SwTextAttr::GetEnd()
{
- return 0;
+ return nullptr;
}
void SwTextAttr::Destroy( SwTextAttr * pToDestroy, SfxItemPool& rPool )
@@ -83,7 +83,7 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
if (End())
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("end"), BAD_CAST(OString::number(*End()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- const char* pWhich = 0;
+ const char* pWhich = nullptr;
boost::optional<OString> oValue;
switch (Which())
{
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 37d413393811..e524a7f572c4 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -97,7 +97,7 @@ SwTextAttrIterator::SwTextAttrIterator( const SwTextNode& rTNd, sal_uInt16 nWhch
sal_Int32 nStt,
bool bUseGetWhichOfScript )
: aSIter( rTNd.GetText(), nStt ), rTextNd( rTNd ),
- pParaItem( 0 ), nAttrPos( 0 ), nChgPos( nStt ), nWhichId( nWhchId ),
+ pParaItem( nullptr ), nAttrPos( 0 ), nChgPos( nStt ), nWhichId( nWhchId ),
bIsUseGetWhichOfScript( bUseGetWhichOfScript )
{
SearchNextChg();
@@ -171,7 +171,7 @@ void SwTextAttrIterator::SearchNextChg()
if( nChgPos == aSIter.GetScriptChgPos() )
{
aSIter.Next();
- pParaItem = 0;
+ pParaItem = nullptr;
nAttrPos = 0; // must be restart at the beginning, because
// some attributes can start before or inside
// the current scripttype!
@@ -199,7 +199,7 @@ void SwTextAttrIterator::SearchNextChg()
aSIter.GetCurrScript() ) : nWhichId;
}
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
for( ; nAttrPos < pHts->Count(); ++nAttrPos )
{
const SwTextAttr* pHt = pHts->Get( nAttrPos );
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 74d301d43c2b..3e96644ad11e 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -42,7 +42,7 @@ SwTextCharFormat::SwTextCharFormat( SwFormatCharFormat& rAttr,
sal_Int32 nStt, sal_Int32 nEnde )
: SwTextAttr( rAttr, nStt )
, SwTextAttrEnd( rAttr, nStt, nEnde )
- , m_pTextNode( 0 )
+ , m_pTextNode( nullptr )
, m_nSortNumber( 0 )
{
rAttr.pTextAttr = this;
@@ -104,8 +104,8 @@ SwTextINetFormat::SwTextINetFormat( SwFormatINetFormat& rAttr,
sal_Int32 nStart, sal_Int32 nEnd )
: SwTextAttr( rAttr, nStart )
, SwTextAttrNesting( rAttr, nStart, nEnd )
- , SwClient( 0 )
- , m_pTextNode( 0 )
+ , SwClient( nullptr )
+ , m_pTextNode( nullptr )
, m_bVisited( false )
, m_bVisitedValid( false )
{
@@ -120,7 +120,7 @@ SwTextINetFormat::~SwTextINetFormat( )
SwCharFormat* SwTextINetFormat::GetCharFormat()
{
const SwFormatINetFormat& rFormat = SwTextAttrEnd::GetINetFormat();
- SwCharFormat* pRet = NULL;
+ SwCharFormat* pRet = nullptr;
if (!rFormat.GetValue().isEmpty())
{
@@ -207,8 +207,8 @@ SwTextRuby::SwTextRuby( SwFormatRuby& rAttr,
sal_Int32 nStart, sal_Int32 nEnd )
: SwTextAttr( rAttr, nStart )
, SwTextAttrNesting( rAttr, nStart, nEnd )
- , SwClient( 0 )
- , m_pTextNode( 0 )
+ , SwClient( nullptr )
+ , m_pTextNode( nullptr )
{
rAttr.pTextAttr = this;
}
@@ -250,7 +250,7 @@ bool SwTextRuby::GetInfo( SfxPoolItem& rInfo ) const
SwCharFormat* SwTextRuby::GetCharFormat()
{
const SwFormatRuby& rFormat = SwTextAttrEnd::GetRuby();
- SwCharFormat* pRet = 0;
+ SwCharFormat* pRet = nullptr;
if( !rFormat.GetText().isEmpty() )
{
@@ -321,7 +321,7 @@ SwTextMeta::~SwTextMeta()
SwFormatMeta & rFormatMeta( static_cast<SwFormatMeta &>(GetAttr()) );
if (rFormatMeta.GetTextAttr() == this)
{
- rFormatMeta.SetTextAttr(0);
+ rFormatMeta.SetTextAttr(nullptr);
}
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 5a60a8de4c86..342538e18b99 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -211,7 +211,7 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart
delete pEnd2Pos;
}
- aTmpState.m_p2Lines = NULL;
+ aTmpState.m_p2Lines = nullptr;
SwRect aTmp;
aPos = SwPosition( aNdIdx, SwIndex( pNode, nChgStart ) );
rTextFrm.GetCharRect( aTmp, aPos, &aTmpState );
@@ -306,7 +306,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
{
bool bRet = false;
- SfxItemSet* pNewSet = 0;
+ SfxItemSet* pNewSet = nullptr;
if ( !pSet1 )
{
@@ -387,11 +387,11 @@ void SwTextNode::RstTextAttr(
{
// enlarge range for the reset of text attributes in case of an overlapping input field
const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT ));
- if ( pTextInputField == NULL )
+ if ( pTextInputField == nullptr )
{
pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT ));
}
- if ( pTextInputField != NULL )
+ if ( pTextInputField != nullptr )
{
if ( nStt > pTextInputField->GetStart() )
{
@@ -419,7 +419,7 @@ void SwTextNode::RstTextAttr(
// iterate over attribute array until start of attribute is behind deletion range
size_t i = 0;
sal_Int32 nAttrStart;
- SwTextAttr *pHt = NULL;
+ SwTextAttr *pHt = nullptr;
while ( (i < m_pSwpHints->Count())
&& ( ( ( nAttrStart = m_pSwpHints->Get(i)->GetStart()) < nEnd )
|| nLen==0 ) && !bExactRange)
@@ -430,7 +430,7 @@ void SwTextNode::RstTextAttr(
// but consider <bInclRefToxMark> used by Undo
sal_Int32* const pAttrEnd = pHt->GetEnd();
const bool bKeepAttrWithoutEnd =
- pAttrEnd == NULL
+ pAttrEnd == nullptr
&& ( !bInclRefToxMark
|| ( RES_TXTATR_REFMARK != pHt->Which()
&& RES_TXTATR_TOXMARK != pHt->Which()
@@ -471,7 +471,7 @@ void SwTextNode::RstTextAttr(
bSkipAttr = nWhich != pHt->Which();
if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() )
{
- bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), 0, nWhich, *static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle );
+ bSkipAttr = !lcl_HaveCommonAttributes( getIDocumentStyleAccess(), nullptr, nWhich, *static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()).GetStyleHandle(), pStyleHandle );
}
}
else if ( !bInclRefToxMark )
@@ -493,7 +493,7 @@ void SwTextNode::RstTextAttr(
if (nStt <= nAttrStart) // Case: 1,3,5
{
- const sal_Int32 nAttrEnd = pAttrEnd != NULL
+ const sal_Int32 nAttrEnd = pAttrEnd != nullptr
? *pAttrEnd
: nAttrStart;
if (nEnd > nAttrStart
@@ -533,7 +533,7 @@ void SwTextNode::RstTextAttr(
}
}
}
- else if (pAttrEnd != 0) // Case: 2,4,5
+ else if (pAttrEnd != nullptr) // Case: 2,4,5
{
if (*pAttrEnd > nStt) // Case: 2,4
{
@@ -650,9 +650,9 @@ void SwTextNode::RstTextAttr(
nMax,
0);
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
SwFormatChg aNew( GetFormatColl() );
- NotifyClients( 0, &aNew );
+ NotifyClients( nullptr, &aNew );
}
}
@@ -962,7 +962,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
? m_Text.getLength()
: pArgs->pEndIdx->GetIndex();
- pArgs->xSpellAlt = NULL;
+ pArgs->xSpellAlt = nullptr;
// 4 cases:
@@ -1006,7 +1006,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
// In case 2. we pass the wrong list to the scanned, because only
// the words in the wrong list have to be checked
- SwScanner aScanner( *this, m_Text, 0, ModelToViewHelper(),
+ SwScanner aScanner( *this, m_Text, nullptr, ModelToViewHelper(),
WordType::DICTIONARY_WORD,
nBegin, nEnd );
while( !pArgs->xSpellAlt.is() && aScanner.NextWord() )
@@ -1029,7 +1029,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
{
if( IsSymbol( aScanner.GetBegin() ) )
{
- pArgs->xSpellAlt = NULL;
+ pArgs->xSpellAlt = nullptr;
}
else
{
@@ -1042,7 +1042,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = rWord.getLength() ? rWord.getStr() + rWord.getLength() - 1 : 0;
+ pChar = rWord.getLength() ? rWord.getStr() + rWord.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -1324,7 +1324,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos )
uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() );
SwDoc* pDoc = pNode->GetDoc();
- SwScanner aScanner( *pNode, pNode->GetText(), 0, ModelToViewHelper(),
+ SwScanner aScanner( *pNode, pNode->GetText(), nullptr, ModelToViewHelper(),
WordType::DICTIONARY_WORD, nBegin, nEnd);
while( aScanner.NextWord() )
@@ -1359,7 +1359,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos )
switch (eState)
{
case SwWrongList::FreshState::FRESH:
- pNode->GetWrong()->Insert(OUString(), 0, nBegin, nLen, nInsertPos++);
+ pNode->GetWrong()->Insert(OUString(), nullptr, nBegin, nLen, nInsertPos++);
break;
case SwWrongList::FreshState::CURSOR:
bPending = true; // fall-through to mark as invalid
@@ -1403,7 +1403,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos )
aRect = lcl_CalculateRepaintRect( *this, nChgStart, nChgEnd );
// fdo#71558 notify misspelled word to accessibility
- SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
if( pViewSh )
pViewSh->InvalidateAccessibleParaAttrs( *this );
}
@@ -1416,7 +1416,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos )
: SwTextNode::WrongState::TODO)
: SwTextNode::WrongState::DONE);
if( !pNode->GetWrong()->Count() && ! pNode->IsWrongDirty() )
- pNode->SetWrong( NULL );
+ pNode->SetWrong( nullptr );
}
else
pNode->SetWrongDirty(SwTextNode::WrongState::DONE);
@@ -1537,7 +1537,7 @@ SwRect SwTextFrm::SmartTagScan( SwContentNode* /*pActNode*/, sal_Int32 /*nActPos
pNode->SetSmartTagDirty( COMPLETE_STRING != pSmartTagList->GetBeginInv() );
if( !pSmartTagList->Count() && !pNode->IsSmartTagDirty() )
- pNode->SetSmartTags( NULL );
+ pNode->SetSmartTags( nullptr );
// Calculate repaint area:
#if OSL_DEBUG_LEVEL > 1
@@ -1574,7 +1574,7 @@ void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos
if( nBegin < nEnd )
{
int nCnt = 200;
- SwScanner aScanner( *pNode, pNode->GetText(), 0, ModelToViewHelper(),
+ SwScanner aScanner( *pNode, pNode->GetText(), nullptr, ModelToViewHelper(),
WordType::DICTIONARY_WORD, nBegin, nEnd );
while( aScanner.NextWord() )
{
@@ -1851,7 +1851,7 @@ void SwTextNode::TransliterateText(
if( rTrans.needLanguageForTheMode() )
pIter = new SwLanguageIterator( *this, nStt );
else
- pIter = 0;
+ pIter = nullptr;
sal_Int32 nEndPos = 0;
sal_uInt16 nLang = LANGUAGE_NONE;
@@ -1957,10 +1957,10 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
// notify the layout!
SwDelText aDelHint( nPos, nTLen );
- NotifyClients( 0, &aDelHint );
+ NotifyClients( nullptr, &aDelHint );
SwInsText aHint( nPos, nTLen );
- NotifyClients( 0, &aHint );
+ NotifyClients( nullptr, &aHint );
}
// the return values allows us to see if we did the heavy-
@@ -2042,7 +2042,7 @@ bool SwTextNode::CountWords( SwDocStat& rStat,
if (g_pBreakIt->GetBreakIter().is())
{
// zero is NULL for pLanguage -----------v last param = true for clipping
- SwScanner aScanner( *this, aExpandText, 0, aConversionMap, i18n::WordType::WORD_COUNT,
+ SwScanner aScanner( *this, aExpandText, nullptr, aConversionMap, i18n::WordType::WORD_COUNT,
nExpandBegin, nExpandEnd, true );
// used to filter out scanner returning almost empty strings (len=1; unichar=0x0001)
@@ -2133,9 +2133,9 @@ struct SwParaIdleData_Impl
bool bAutoComplDirty; // die ACompl-Liste muss angepasst werden
SwParaIdleData_Impl() :
- pWrong ( 0 ),
- pGrammarCheck ( 0 ),
- pSmartTags ( 0 ),
+ pWrong ( nullptr ),
+ pGrammarCheck ( nullptr ),
+ pSmartTags ( nullptr ),
nNumberOfWords ( 0 ),
nNumberOfAsianWords ( 0 ),
nNumberOfChars ( 0 ),
@@ -2159,7 +2159,7 @@ void SwTextNode::InitSwParaStatistics( bool bNew )
delete m_pParaIdleData_Impl->pGrammarCheck;
delete m_pParaIdleData_Impl->pSmartTags;
delete m_pParaIdleData_Impl;
- m_pParaIdleData_Impl = 0;
+ m_pParaIdleData_Impl = nullptr;
}
}
@@ -2177,13 +2177,13 @@ void SwTextNode::SetWrong( SwWrongList* pNew, bool bDelete )
SwWrongList* SwTextNode::GetWrong()
{
- return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : 0;
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : nullptr;
}
// #i71360#
const SwWrongList* SwTextNode::GetWrong() const
{
- return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : 0;
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pWrong : nullptr;
}
void SwTextNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete )
@@ -2200,7 +2200,7 @@ void SwTextNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete )
SwGrammarMarkUp* SwTextNode::GetGrammarCheck()
{
- return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pGrammarCheck : 0;
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pGrammarCheck : nullptr;
}
void SwTextNode::SetSmartTags( SwWrongList* pNew, bool bDelete )
@@ -2220,7 +2220,7 @@ void SwTextNode::SetSmartTags( SwWrongList* pNew, bool bDelete )
SwWrongList* SwTextNode::GetSmartTags()
{
- return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pSmartTags : 0;
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pSmartTags : nullptr;
}
void SwTextNode::SetParaNumberOfWords( sal_uLong nNew ) const
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index b63a51a89201..c57b279a51f7 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -79,7 +79,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
SwTextField * pTextField = sw::DocumentFieldsManager::GetTextFieldAtPos(GetPosition());
- const SwField * pField = pTextField ? pTextField->GetFormatField().GetField() : NULL;
+ const SwField * pField = pTextField ? pTextField->GetFormatField().GetField() : nullptr;
if (pField)
{
@@ -90,7 +90,7 @@ void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
void SwUndoFieldFromDoc::DoImpl()
{
SwTextField * pTextField = sw::DocumentFieldsManager::GetTextFieldAtPos(GetPosition());
- const SwField * pField = pTextField ? pTextField->GetFormatField().GetField() : NULL;
+ const SwField * pField = pTextField ? pTextField->GetFormatField().GetField() : nullptr;
if (pField)
{
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index 5f01e86a3018..ff117c645463 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -34,7 +34,7 @@
SwUndoFormatCreate::SwUndoFormatCreate
(SwUndoId nUndoId, SwFormat * _pNew, SwFormat * _pDerivedFrom, SwDoc * _pDoc)
: SwUndo(nUndoId), pNew(_pNew),
- pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(false)
+ pDoc(_pDoc), pNewSet(nullptr), nId(0), bAuto(false)
{
if (_pDerivedFrom)
sDerivedFrom = _pDerivedFrom->GetName();
@@ -81,7 +81,7 @@ void SwUndoFormatCreate::RedoImpl(::sw::UndoRedoContext &)
pNew = pFormat;
}
else
- pNew = NULL;
+ pNew = nullptr;
}
SwRewriter SwUndoFormatCreate::GetRewriter() const
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index 6473547ff17f..9aadad495952 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -104,7 +104,7 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
UNDO_CHANGE_PAGEDESC ),
aOld(_aOld, _pDoc), aNew(_aNew, _pDoc), pDoc(_pDoc), bExchange( false )
{
- OSL_ENSURE(0 != pDoc, "no document?");
+ OSL_ENSURE(nullptr != pDoc, "no document?");
#if OSL_DEBUG_LEVEL > 1
DebugHeaderFooterContent( aOld.m_PageDesc );
@@ -368,7 +368,7 @@ SwUndoPageDescCreate::SwUndoPageDescCreate(const SwPageDesc * pNew,
: SwUndo(UNDO_CREATE_PAGEDESC), pDesc(pNew), aNew(*pNew, _pDoc),
pDoc(_pDoc)
{
- OSL_ENSURE(0 != pDoc, "no document?");
+ OSL_ENSURE(nullptr != pDoc, "no document?");
}
SwUndoPageDescCreate::~SwUndoPageDescCreate()
@@ -380,7 +380,7 @@ void SwUndoPageDescCreate::UndoImpl(::sw::UndoRedoContext &)
if (pDesc)
{
aNew = *pDesc;
- pDesc = NULL;
+ pDesc = nullptr;
}
pDoc->DelPageDesc(aNew.GetName(), true);
@@ -419,7 +419,7 @@ SwUndoPageDescDelete::SwUndoPageDescDelete(const SwPageDesc & _aOld,
SwDoc * _pDoc)
: SwUndo(UNDO_DELETE_PAGEDESC), aOld(_aOld, _pDoc), pDoc(_pDoc)
{
- OSL_ENSURE(0 != pDoc, "no document?");
+ OSL_ENSURE(nullptr != pDoc, "no document?");
}
SwUndoPageDescDelete::~SwUndoPageDescDelete()
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 7eabe1b2dd3d..02969f6dda90 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -166,7 +166,7 @@ SwUndo* UndoManager::GetLastUndo()
{
if (!SdrUndoManager::GetUndoActionCount())
{
- return 0;
+ return nullptr;
}
SfxUndoAction *const pAction( SdrUndoManager::GetUndoAction() );
return dynamic_cast<SwUndo*>(pAction);
@@ -232,7 +232,7 @@ UndoManager::EndUndo(SwUndoId const i_eUndoId, SwRewriter const*const pRewriter)
SfxUndoAction *const pLastUndo(
(0 == SdrUndoManager::GetUndoActionCount())
- ? 0 : SdrUndoManager::GetUndoAction() );
+ ? nullptr : SdrUndoManager::GetUndoAction() );
int const nCount = LeaveListAction();
@@ -333,7 +333,7 @@ bool UndoManager::GetFirstRedoInfo(OUString *const o_pStr,
}
SfxUndoAction *const pAction( SdrUndoManager::GetRedoAction() );
- if ( pAction == NULL )
+ if ( pAction == nullptr )
{
return false;
}
@@ -389,12 +389,12 @@ SwUndo * UndoManager::RemoveLastUndo()
SdrUndoManager::GetRedoActionCount(TopLevel))
{
OSL_ENSURE(false, "RemoveLastUndoAction(): there are Redo actions?");
- return 0;
+ return nullptr;
}
if (!SdrUndoManager::GetUndoActionCount())
{
OSL_ENSURE(false, "RemoveLastUndoAction(): no Undo actions");
- return 0;
+ return nullptr;
}
SfxUndoAction *const pLastUndo(GetUndoAction());
SdrUndoManager::RemoveLastUndoAction();
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index c1d3e425801b..90b04c018225 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -71,10 +71,10 @@ SwHistorySetFormat::SwHistorySetFormat( const SfxPoolItem* pFormatHt, sal_uLong
switch ( m_pAttr->Which() )
{
case RES_PAGEDESC:
- static_cast<SwFormatPageDesc&>(*m_pAttr).ChgDefinedIn( 0 );
+ static_cast<SwFormatPageDesc&>(*m_pAttr).ChgDefinedIn( nullptr );
break;
case RES_PARATR_DROP:
- static_cast<SwFormatDrop&>(*m_pAttr).ChgDefinedIn( 0 );
+ static_cast<SwFormatDrop&>(*m_pAttr).ChgDefinedIn( nullptr );
break;
case RES_BOXATR_FORMULA:
{
@@ -97,7 +97,7 @@ SwHistorySetFormat::SwHistorySetFormat( const SfxPoolItem* pFormatHt, sal_uLong
}
}
}
- rNew.ChgDefinedIn( 0 );
+ rNew.ChgDefinedIn( nullptr );
}
break;
}
@@ -359,13 +359,13 @@ void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool )
// search for respective TOX type
const sal_uInt16 nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes );
- SwTOXType* pToxType = 0;
+ SwTOXType* pToxType = nullptr;
for ( sal_uInt16 n = 0; n < nCnt; ++n )
{
pToxType = const_cast<SwTOXType*>(pDoc->GetTOXType( m_eTOXTypes, n ));
if ( pToxType->GetTypeName() == m_TOXName )
break;
- pToxType = 0;
+ pToxType = nullptr;
}
if ( !pToxType ) // TOX type not found, create new
@@ -430,7 +430,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTextFootnote* pTextFootnote, sal_u
// keep pointer to StartNode of FootnoteSection and reset its attribute for now
// (as a result, its/all Frms will be deleted automatically)
SwNodeIndex aSttIdx( *pTextFootnote->GetStartNode() );
- pTextFootnote->SetStartNode( 0, false );
+ pTextFootnote->SetStartNode( nullptr, false );
m_pUndo->SaveSection( aSttIdx );
m_nNodeIndex = pSaveNd->GetIndex();
@@ -597,7 +597,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
SwNodes& rNds = pDoc->GetNodes();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
std::unique_ptr<SwPaM> pPam;
- ::sw::mark::IMark* pMark = NULL;
+ ::sw::mark::IMark* pMark = nullptr;
if(m_bSavePos)
{
@@ -623,7 +623,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
"<SwHistoryBookmark::SetInDoc(..)>"
" - wrong node for a mark");
- if(pPam.get() != NULL && pContentNd)
+ if(pPam.get() != nullptr && pContentNd)
{
pPam->SetMark();
pPam->GetMark()->nNode = m_nOtherNode;
@@ -643,13 +643,13 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
if(pPam.get())
{
- if ( pMark != NULL )
+ if ( pMark != nullptr )
{
pMarkAccess->deleteMark( pMark );
}
::sw::mark::IBookmark* const pBookmark =
dynamic_cast< ::sw::mark::IBookmark* >( pMarkAccess->makeMark(*pPam, m_aName, m_eBkmkType) );
- if ( pBookmark != NULL )
+ if ( pBookmark != nullptr )
{
pBookmark->SetKeyCode(m_aKeycode);
pBookmark->SetShortName(m_aShortName);
@@ -697,12 +697,12 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
{
case RES_PAGEDESC:
static_cast<SwFormatPageDesc*>(
- const_cast<SfxPoolItem*>(pItem))->ChgDefinedIn( 0 );
+ const_cast<SfxPoolItem*>(pItem))->ChgDefinedIn( nullptr );
break;
case RES_PARATR_DROP:
static_cast<SwFormatDrop*>(
- const_cast<SfxPoolItem*>(pItem))->ChgDefinedIn( 0 );
+ const_cast<SfxPoolItem*>(pItem))->ChgDefinedIn( nullptr );
break;
case RES_BOXATR_FORMULA:
@@ -735,7 +735,7 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
}
}
}
- rNew.ChgDefinedIn( 0 );
+ rNew.ChgDefinedIn( nullptr );
}
break;
}
@@ -889,7 +889,7 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
aTmp.SetAnchor( &aPos );
// so the Layout does not get confused
- if ( !pCNd || !pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false ) )
+ if ( !pCNd || !pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) )
{
m_rFormat.DelFrms();
}
@@ -987,7 +987,7 @@ void SwHistory::Add(
}
// no default Attribute?
- SwHistoryHint* pHt = 0;
+ SwHistoryHint* pHt = nullptr;
//UUUU To be able to include the DrawingLayer FillItems something more
// general has to be done to check if an Item is default than to check
@@ -1013,7 +1013,7 @@ void SwHistory::Add( SwTextAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
{
OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
- SwHistoryHint * pHt = 0;
+ SwHistoryHint * pHt = nullptr;
if( !bNewAttr )
{
switch ( pHint->Which() )
@@ -1097,13 +1097,13 @@ void SwHistory::Add( SwFlyFrameFormat& rFormat, sal_uInt16& rSetPos )
if ( pChainItem->GetNext() )
{
SwFormatChain aTmp( pChainItem->GetNext()->GetChain() );
- aTmp.SetPrev( 0 );
+ aTmp.SetPrev( nullptr );
pChainItem->GetNext()->SetFormatAttr( aTmp );
}
if ( pChainItem->GetPrev() )
{
SwFormatChain aTmp( pChainItem->GetPrev()->GetChain() );
- aTmp.SetNext( 0 );
+ aTmp.SetNext( nullptr );
pChainItem->GetPrev()->SetFormatAttr( aTmp );
}
}
@@ -1247,7 +1247,7 @@ void SwHistory::CopyAttr(
pHt = pHts->Get(n);
const sal_Int32 nAttrStt = pHt->GetStart();
const sal_Int32 * pEndIdx = pHt->GetEnd();
- if( 0 != pEndIdx && nAttrStt > nEnd )
+ if( nullptr != pEndIdx && nAttrStt > nEnd )
break;
// never copy Flys and Footnote !!
@@ -1286,7 +1286,7 @@ void SwHistory::CopyAttr(
// Class to register the history at a Node, Format, HintsArray, ...
SwRegHistory::SwRegHistory( SwHistory* pHst )
- : SwClient( 0 )
+ : SwClient( nullptr )
, m_pHistory( pHst )
, m_nNodeIndex( ULONG_MAX )
{
@@ -1303,7 +1303,7 @@ SwRegHistory::SwRegHistory( SwModify* pRegIn, const SwNode& rNd,
}
SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst )
- : SwClient( 0 )
+ : SwClient( nullptr )
, m_pHistory( pHst )
, m_nNodeIndex( rNd.GetIndex() )
{
@@ -1333,7 +1333,7 @@ void SwRegHistory::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
else if (pOld && RES_ATTRSET_CHG == pNew->Which())
{
- SwHistoryHint* pNewHstr(0);
+ SwHistoryHint* pNewHstr(nullptr);
const SfxItemSet& rSet = *static_cast< const SwAttrSetChg* >(pOld)->GetChgSet();
if ( 1 < rSet.Count() )
@@ -1427,7 +1427,7 @@ void SwRegHistory::_MakeSetWhichIds()
if( GetRegisteredIn() )
{
- const SfxItemSet* pSet = 0;
+ const SfxItemSet* pSet = nullptr;
if( dynamic_cast< const SwContentNode *>( GetRegisteredIn() ) != nullptr )
{
pSet = static_cast<SwContentNode*>(
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 87e68c3a4870..dfee272a8387 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -191,7 +191,7 @@ void SwUndoFormatAttr::UndoImpl(::sw::UndoRedoContext & rContext)
}
if ( RES_FLYFRMFMT == m_nFormatWhich || RES_DRAWFRMFMT == m_nFormatWhich ) {
- rContext.SetSelections(static_cast<SwFrameFormat*>(m_pFormat), 0);
+ rContext.SetSelections(static_cast<SwFrameFormat*>(m_pFormat), nullptr);
}
}
}
@@ -266,16 +266,16 @@ bool SwUndoFormatAttr::IsFormatInDoc( SwDoc* pDoc )
if ( !bFound )
{
// Format does not exist; reset
- m_pFormat = 0;
+ m_pFormat = nullptr;
}
- return 0 != m_pFormat;
+ return nullptr != m_pFormat;
}
// Check if it is still in Doc
SwFormat* SwUndoFormatAttr::GetFormat( SwDoc& rDoc )
{
- return m_pFormat && IsFormatInDoc( &rDoc ) ? m_pFormat : 0;
+ return m_pFormat && IsFormatInDoc( &rDoc ) ? m_pFormat : nullptr;
}
void SwUndoFormatAttr::RedoImpl(::sw::UndoRedoContext & rContext)
@@ -483,7 +483,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
}
}
- SwDrawContact *pCont = NULL;
+ SwDrawContact *pCont = nullptr;
if ( RES_DRAWFRMFMT == pFrameFormat->Which() ) {
pCont = static_cast<SwDrawContact*>(pFrameFormat->FindContactObj());
// The Draw model also prepared an Undo object for its right positioning
@@ -519,7 +519,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
pCont->GetAnchoredObj(pSdrObj)->MakeObjPos();
}
- rContext.SetSelections(pFrameFormat, 0);
+ rContext.SetSelections(pFrameFormat, nullptr);
// #i35443# - anchor attribute restored.
return true;
@@ -531,7 +531,7 @@ SwUndoFormatResetAttr::SwUndoFormatResetAttr( SwFormat& rChangedFormat,
, m_pChangedFormat( &rChangedFormat )
, m_nWhichId( nWhichId )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (rChangedFormat.GetItemState(nWhichId, false, &pItem ) == SfxItemState::SET && pItem) {
m_pOldItem.reset( pItem->Clone() );
}
@@ -706,7 +706,7 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsContent )
m_pRedlineSaveData.reset( new SwRedlineSaveDatas );
if ( !FillSaveDataForFormat( rPam, *m_pRedlineSaveData )) {
- m_pRedlineSaveData.reset(0);
+ m_pRedlineSaveData.reset(nullptr);
}
SetRedlineMode( pDoc->getIDocumentRedlineAccess().GetRedlineMode() );
@@ -878,7 +878,7 @@ void SwUndoDefaultAttr::UndoImpl(::sw::UndoRedoContext & rContext)
SwUndoFormatAttrHelper aTmp(
*rDoc.GetDfltTextFormatColl() );
rDoc.SetDefault( *m_pOldSet );
- m_pOldSet.reset( 0 );
+ m_pOldSet.reset( nullptr );
if ( aTmp.GetUndo() ) {
// transfer ownership of helper object's old set
m_pOldSet = std::move(aTmp.GetUndo()->m_pOldSet);
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 171ab9c3b929..ab19ecc0e037 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -99,11 +99,11 @@ SwUndoDelete::SwUndoDelete(
bool bCalledByTableCpy )
: SwUndo(UNDO_DELETE),
SwUndRng( rPam ),
- pMvStt( 0 ),
- pSttStr(0),
- pEndStr(0),
- pRedlData(0),
- pRedlSaveData(0),
+ pMvStt( nullptr ),
+ pSttStr(nullptr),
+ pEndStr(nullptr),
+ pRedlData(nullptr),
+ pRedlSaveData(nullptr),
nNode(0),
nNdDiff(0),
nSectDiff(0),
@@ -128,7 +128,7 @@ SwUndoDelete::SwUndoDelete(
{
pRedlSaveData = new SwRedlineSaveDatas;
if( !FillSaveData( rPam, *pRedlSaveData ))
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
}
if( !pHistory )
@@ -169,7 +169,7 @@ SwUndoDelete::SwUndoDelete(
bJoinNext = !bFullPara && pEnd == rPam.GetPoint();
bBackSp = !bFullPara && !bJoinNext;
- SwTextNode *pSttTextNd = 0, *pEndTextNd = 0;
+ SwTextNode *pSttTextNd = nullptr, *pEndTextNd = nullptr;
if( !bFullPara )
{
pSttTextNd = pStt->nNode.GetNode().GetTextNode();
@@ -351,7 +351,7 @@ SwUndoDelete::SwUndoDelete(
}
if( !rPam.GetNode().IsContentNode() )
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
// is a history necessary here at all?
if( pHistory && !pHistory->Count() )
@@ -681,20 +681,20 @@ SwRewriter SwUndoDelete::GetRewriter() const
{
OUString aStr;
- if (pSttStr != NULL && pEndStr != NULL && pSttStr->isEmpty() &&
+ if (pSttStr != nullptr && pEndStr != nullptr && pSttStr->isEmpty() &&
pEndStr->isEmpty())
{
aStr = SW_RESSTR(STR_PARAGRAPH_UNDO);
}
else
{
- OUString * pStr = NULL;
- if (pSttStr != NULL)
+ OUString * pStr = nullptr;
+ if (pSttStr != nullptr)
pStr = pSttStr;
- else if (pEndStr != NULL)
+ else if (pEndStr != nullptr)
pStr = pEndStr;
- if (pStr != NULL)
+ if (pStr != nullptr)
{
aStr = DenoteSpecialCharacters(*pStr);
}
@@ -772,11 +772,11 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if( pInsNd->IsContentNode() )
aPos.nContent.Assign( static_cast<SwContentNode*>(pInsNd), nSttContent );
if( !bTableDelLastNd )
- pInsNd = 0; // do not delete Node!
+ pInsNd = nullptr; // do not delete Node!
}
}
else
- pInsNd = 0; // do not delete Node!
+ pInsNd = nullptr; // do not delete Node!
bool bNodeMove = 0 != nNode;
@@ -829,7 +829,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
++aPos.nNode;
}
}
- SwNode* pMovedNode = NULL;
+ SwNode* pMovedNode = nullptr;
if( nSectDiff )
{
sal_uLong nMoveIndex = aPos.nNode.GetIndex();
@@ -889,7 +889,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
SwTextNode * pTextNd = aPos.nNode.GetNode().GetTextNode();
// If more than a single Node got deleted, also all "Node"
// attributes were saved
- if (pTextNd != NULL)
+ if (pTextNd != nullptr)
{
if( pTextNd->HasSwAttrSet() && bNodeMove && !pEndStr )
pTextNd->ResetAllAttr();
@@ -964,7 +964,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
"SwUndoDelete::Redo: used to have redline data, but now none?");
if (!bSuccess)
{
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
}
}
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 3f9b25959db0..a603a69c9c3a 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -82,7 +82,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const
else if( bCorrToContent )
rPam.Move( fnMoveForward, fnGoContent );
else
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
if( !nEndNode && COMPLETE_STRING == nEndContent ) // no selection
return ;
@@ -97,7 +97,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const
else if( bCorrToContent )
rPam.Move( fnMoveBackward, fnGoContent );
else
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
}
SwPaM & SwUndRng::AddUndoRedoPaM(
@@ -135,7 +135,7 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext )
if( !rPam.Move( fnMoveBackward ) )
{
rPam.GetPoint()->nNode = rPam.GetDoc()->GetNodes().GetEndOfPostIts();
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
}
}
@@ -155,7 +155,7 @@ void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos )
SwUndo::SwUndo(SwUndoId const nId)
: m_nId(nId), nOrigRedlineMode(nsRedlineMode_t::REDLINE_NONE),
- bCacheComment(true), pComment(NULL)
+ bCacheComment(true), pComment(nullptr)
{
}
@@ -286,7 +286,7 @@ SwRewriter SwUndo::GetRewriter() const
}
SwUndoSaveContent::SwUndoSaveContent()
- : pHistory( 0 )
+ : pHistory( nullptr )
{}
SwUndoSaveContent::~SwUndoSaveContent()
@@ -380,7 +380,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
( aPaM.GetPoint()->nNode++ && // still empty Nodes at the end?
&rNds.GetEndOfExtras() != &aPaM.GetPoint()->nNode.GetNode() ))
{
- aPaM.GetPoint()->nContent.Assign( 0, 0 );
+ aPaM.GetPoint()->nContent.Assign( nullptr, 0 );
aPaM.SetMark();
rNds.Delete( aPaM.GetPoint()->nNode,
rNds.GetEndOfExtras().GetIndex() -
@@ -394,7 +394,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
SwNodeRange aRg( rNds, nNodeIdx, rNds, (pEndNdIdx
? ((*pEndNdIdx) + 1)
: rNds.GetEndOfExtras().GetIndex() ) );
- rNds._MoveNodes( aRg, rDoc.GetNodes(), rInsPos.nNode, 0 == pEndNdIdx );
+ rNds._MoveNodes( aRg, rDoc.GetNodes(), rInsPos.nNode, nullptr == pEndNdIdx );
}
else {
@@ -415,7 +415,7 @@ bool SwUndoSaveContent::MovePtBackward( SwPaM& rPam )
// If there is no content onwards, set Point simply to the previous position
// (Node and Content, so that Content will be detached!)
--rPam.GetPoint()->nNode;
- rPam.GetPoint()->nContent.Assign( 0, 0 );
+ rPam.GetPoint()->nContent.Assign( nullptr, 0 );
return false;
}
@@ -546,7 +546,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
switch( pAnchor->GetAnchorId() )
{
case FLY_AS_CHAR:
- if( 0 != (pAPos = pAnchor->GetContentAnchor() ) &&
+ if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
(( nsDelContentType::DELCNT_CHKNOCNTNT & nDelContentType )
? ( pStt->nNode <= pAPos->nNode &&
pAPos->nNode < pEnd->nNode )
@@ -613,7 +613,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
}
break;
case FLY_AT_CHAR:
- if( 0 != (pAPos = pAnchor->GetContentAnchor() ) &&
+ if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
( pStt->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) )
{
if( !pHistory )
@@ -644,7 +644,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
break;
case FLY_AT_FLY:
- if( 0 != (pAPos = pAnchor->GetContentAnchor() ) &&
+ if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
pStt->nNode == pAPos->nNode )
{
if( !pHistory )
@@ -785,7 +785,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// save a complete section into UndoNodes array
SwUndoSaveSection::SwUndoSaveSection()
- : pMvStt( 0 ), pRedlSaveData( 0 ), nMvLen( 0 ), nStartPos( ULONG_MAX )
+ : pMvStt( nullptr ), pRedlSaveData( nullptr ), nMvLen( 0 ), nStartPos( ULONG_MAX )
{
}
@@ -825,7 +825,7 @@ void SwUndoSaveSection::SaveSection(
pRedlSaveData = new SwRedlineSaveDatas;
if( !SwUndo::FillSaveData( aPam, *pRedlSaveData ))
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
nStartPos = rRange.aStart.GetIndex();
@@ -835,7 +835,7 @@ void SwUndoSaveSection::SaveSection(
SwContentNode* pCNd = aPam.GetContentNode( false );
if( pCNd )
aPam.GetMark()->nContent.Assign( pCNd, 0 );
- if( 0 != ( pCNd = aPam.GetContentNode()) )
+ if( nullptr != ( pCNd = aPam.GetContentNode()) )
aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
// Keep positions as SwIndex so that this section can be deleted in DTOR
@@ -879,7 +879,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos
if( pRedlSaveData )
{
SwUndo::SetSaveData( *pDoc, *pRedlSaveData );
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
}
}
}
@@ -921,7 +921,7 @@ SwRedlineSaveData::SwRedlineSaveData(
{
// than move section into UndoArray and memorize it
SaveSection( *rRedl.GetContentIdx() );
- rRedl.SetContentIdx( 0 );
+ rRedl.SetContentIdx( nullptr );
}
break;
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index dccacc7f86aa..17b11837a263 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -121,7 +121,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm)
if( bShowSelFrm )
{
- rContext.SetSelections(pFrameFormat, 0);
+ rContext.SetSelections(pFrameFormat, nullptr);
}
if( GetHistory() )
@@ -305,7 +305,7 @@ void SwUndoInsLayFormat::RepeatImpl(::sw::RepeatContext & rContext)
SwPosition aPos( *rContext.GetRepeatPaM().GetPoint() );
if (FLY_AT_PARA == aAnchor.GetAnchorId())
{
- aPos.nContent.Assign( 0, 0 );
+ aPos.nContent.Assign( nullptr, 0 );
}
aAnchor.SetAnchor( &aPos );
}
@@ -497,7 +497,7 @@ void SwUndoSetFlyFormat::GetAnchor( SwFormatAnchor& rAnchor,
static_cast<SwStartNode*>(pNd)->GetStartNodeType() )
: !pNd->IsTextNode() )
{
- pNd = 0; // invalid position
+ pNd = nullptr; // invalid position
}
else
{
@@ -507,7 +507,7 @@ void SwUndoSetFlyFormat::GetAnchor( SwFormatAnchor& rAnchor,
{
if (nContent > pNd->GetTextNode()->GetText().getLength())
{
- pNd = 0; // invalid position
+ pNd = nullptr; // invalid position
}
else
{
@@ -600,7 +600,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
pFrameFormat->MakeFrms();
}
- rContext.SetSelections(pFrameFormat, 0);
+ rContext.SetSelections(pFrameFormat, nullptr);
}
}
@@ -623,7 +623,7 @@ void SwUndoSetFlyFormat::RedoImpl(::sw::UndoRedoContext & rContext)
else
rDoc.SetFrameFormatToFly( *pFrameFormat, *pNewFormat );
- rContext.SetSelections(pFrameFormat, 0);
+ rContext.SetSelections(pFrameFormat, nullptr);
}
}
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index e9dcd742a7cf..e8ee22047b28 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -64,7 +64,7 @@ IMPL_LINK_TYPED( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo, void )
if (GetIDocumentUndoRedo().DoesUndo() &&
GetIDocumentUndoRedo().DoesDrawUndo())
{
- const SdrMarkList* pMarkList = 0;
+ const SdrMarkList* pMarkList = nullptr;
SwViewShell* pSh = getIDocumentLayoutAccess().GetCurrentViewShell();
if( pSh && pSh->HasDrawView() )
pMarkList = &pSh->GetDrawView()->GetMarkedObjectList();
@@ -81,7 +81,7 @@ SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrMarkList* pMrkLst )
if( pMrkLst && pMrkLst->GetMarkCount() )
pMarkList = new SdrMarkList( *pMrkLst );
else
- pMarkList = 0;
+ pMarkList = nullptr;
}
SwSdrUndo::~SwSdrUndo()
@@ -93,13 +93,13 @@ SwSdrUndo::~SwSdrUndo()
void SwSdrUndo::UndoImpl(::sw::UndoRedoContext & rContext)
{
pSdrUndo->Undo();
- rContext.SetSelections(0, pMarkList);
+ rContext.SetSelections(nullptr, pMarkList);
}
void SwSdrUndo::RedoImpl(::sw::UndoRedoContext & rContext)
{
pSdrUndo->Redo();
- rContext.SetSelections(0, pMarkList);
+ rContext.SetSelections(nullptr, pMarkList);
}
OUString SwSdrUndo::GetComment() const
@@ -216,7 +216,7 @@ void SwUndoDrawGroup::UndoImpl(::sw::UndoRedoContext &)
// object will destroy itself
pDrawContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
::lcl_SaveAnchor( pFormat, pObjArr->nNodeIdx );
@@ -270,7 +270,7 @@ void SwUndoDrawGroup::RedoImpl(::sw::UndoRedoContext &)
// object will destroy itself
pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
::lcl_SaveAnchor( rSave.pFormat, rSave.nNodeIdx );
@@ -316,7 +316,7 @@ void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrameFormat* pFormat, SdrOb
void SwUndoDrawGroup::SetGroupFormat( SwDrawFrameFormat* pFormat )
{
- pObjArr->pObj = 0;
+ pObjArr->pObj = nullptr;
pObjArr->pFormat = pFormat;
}
@@ -334,7 +334,7 @@ SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj )
// object will destroy itself
pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
::lcl_SaveAnchor( pFormat, pObjArr->nNodeIdx );
@@ -409,7 +409,7 @@ void SwUndoDrawUnGroup::RedoImpl(::sw::UndoRedoContext &)
// object will destroy itself
pContact->Changed( *pObjArr->pObj, SDRUSERCALL_DELETE,
pObjArr->pObj->GetLastBoundRect() );
- pObjArr->pObj->SetUserCall( 0 );
+ pObjArr->pObj->SetUserCall( nullptr );
::lcl_SaveAnchor( pFormat, pObjArr->nNodeIdx );
@@ -442,7 +442,7 @@ void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrameFormat* pFormat )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
rSave.pFormat = pFormat;
- rSave.pObj = 0;
+ rSave.pObj = nullptr;
}
SwUndoDrawUnGroupConnectToLayout::SwUndoDrawUnGroupConnectToLayout()
@@ -469,7 +469,7 @@ SwUndoDrawUnGroupConnectToLayout::UndoImpl(::sw::UndoRedoContext &)
// deletion of instance <pDrawContact> and thus disconnection from
// the Writer layout.
pDrawContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
}
}
}
@@ -525,7 +525,7 @@ void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
rFlyFormats.push_back( rSave.pFormat );
SdrObject *pObj = rSave.pObj;
SwDrawContact *pContact = new SwDrawContact( rSave.pFormat, pObj );
- pContact->_Changed( *pObj, SDRUSERCALL_INSERTED, NULL );
+ pContact->_Changed( *pObj, SDRUSERCALL_INSERTED, nullptr );
// #i45718# - follow-up of #i35635# move object to visible layer
pContact->MoveObjToVisibleLayer( pObj );
@@ -537,7 +537,7 @@ void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if (pDrawFrameFormat)
pDrawFrameFormat->PosAttrSet();
}
- rContext.SetSelections(0, pMarkLst);
+ rContext.SetSelections(nullptr, pMarkLst);
}
void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext)
@@ -553,7 +553,7 @@ void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext)
// object will destroy itself
pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
- pObj->SetUserCall( 0 );
+ pObj->SetUserCall( nullptr );
// notify UNO objects to decouple
::lcl_SendRemoveToUno( *pFormat );
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 0aa6fca8e03f..aa8de2c3e397 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star;
OUString * SwUndoInsert::GetTextFromDoc() const
{
- OUString * pResult = NULL;
+ OUString * pResult = nullptr;
SwNodeIndex aNd( pDoc->GetNodes(), nNode);
SwContentNode* pCNd = aNd.GetNode().GetContentNode();
@@ -110,7 +110,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt,
sal_Int32 nL,
const SwInsertFlags nInsertFlags,
bool bWDelim )
- : SwUndo(UNDO_TYPING), pText( 0 ), pRedlData( 0 ),
+ : SwUndo(UNDO_TYPING), pText( nullptr ), pRedlData( nullptr ),
nNode( rNd.GetIndex() ), nContent(nCnt), nLen(nL),
bIsWordDelim( bWDelim ), bIsAppend( false )
, m_bWithRsid(false)
@@ -120,8 +120,8 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt,
}
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
- : SwUndo(UNDO_SPLITNODE), pText( 0 ),
- pRedlData( 0 ), nNode( rNd.GetIndex() ), nContent(0), nLen(1),
+ : SwUndo(UNDO_SPLITNODE), pText( nullptr ),
+ pRedlData( nullptr ), nNode( rNd.GetIndex() ), nContent(0), nLen(1),
bIsWordDelim( false ), bIsAppend( true )
, m_bWithRsid(false)
, m_nInsertFlags(SwInsertFlags::EMPTYEXPAND)
@@ -344,7 +344,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
DELETEZ( pText );
if (m_bWithRsid) // re-insert RSID
{
- SwPaM pam(*pPam->GetMark(), 0); // mark -> point
+ SwPaM pam(*pPam->GetMark(), nullptr); // mark -> point
pTmpDoc->UpdateRsid(pam, ins.getLength());
}
}
@@ -421,7 +421,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
rDoc.getIDocumentContentOperations().Insert( rContext.GetRepeatPaM(), sFile, sFilter,
&pGrfNd->GetGrf(),
- 0/* Graphics collection*/, NULL, NULL );
+ nullptr/* Graphics collection*/, nullptr, nullptr );
}
break;
@@ -442,7 +442,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
rDoc.getIDocumentContentOperations().Insert( rContext.GetRepeatPaM(),
svt::EmbeddedObjectRef( aNew,
static_cast<SwOLENode*>(pCNd)->GetAspect() ),
- NULL, NULL, NULL );
+ nullptr, nullptr, nullptr );
}
break;
@@ -453,7 +453,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
SwRewriter SwUndoInsert::GetRewriter() const
{
SwRewriter aResult;
- OUString * pStr = NULL;
+ OUString * pStr = nullptr;
bool bDone = false;
if (pText)
@@ -639,7 +639,7 @@ SwUndoReplace::Impl::Impl(
}
if( !pHistory->Count() )
- delete pHistory, pHistory = 0;
+ delete pHistory, pHistory = nullptr;
const sal_Int32 nECnt = m_bSplitNext ? pNd->GetText().getLength()
: pEnd->nContent.GetIndex();
@@ -663,7 +663,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
SwPosition aPos( *pNd ); aPos.nContent.Assign( pNd, m_nSttCnt );
pACEWord->CheckChar( aPos, m_sOld[ 0 ] );
}
- pDoc->SetAutoCorrExceptWord( 0 );
+ pDoc->SetAutoCorrExceptWord( nullptr );
}
SwIndex aIdx( pNd, m_nSttCnt );
@@ -675,7 +675,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
rPam.GetPoint()->nNode = m_nEndNd - m_nOffset;
rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), m_nEndCnt );
// move it out of the way so it is not registered at deleted node
- aIdx.Assign(0, 0);
+ aIdx.Assign(nullptr, 0);
pDoc->getIDocumentContentOperations().DeleteAndJoin( rPam );
rPam.DeleteMark();
@@ -766,7 +766,7 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
m_nSetPos = pHistory->Count();
if( !m_nSetPos )
- delete pHistory, pHistory = 0;
+ delete pHistory, pHistory = nullptr;
}
rDoc.getIDocumentContentOperations().ReplaceRange( rPam, m_sIns, m_bRegExp );
@@ -824,7 +824,7 @@ void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext)
if( RES_MIRROR_GRAPH_DONT != nOldMirr )
pGrfNd->SetAttr( SwMirrorGrf() );
- rContext.SetSelections(pGrfNd->GetFlyFormat(), 0);
+ rContext.SetSelections(pGrfNd->GetFlyFormat(), nullptr);
}
void SwUndoReRead::UndoImpl(::sw::UndoRedoContext & rContext)
@@ -844,12 +844,12 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd )
pNm = new OUString;
pFltr = new OUString;
rGrfNd.GetFileFilterNms( pNm, pFltr );
- pGrf = 0;
+ pGrf = nullptr;
}
else
{
pGrf = new Graphic( rGrfNd.GetGrf(true) );
- pNm = pFltr = 0;
+ pNm = pFltr = nullptr;
}
nMirr = rGrfNd.GetSwAttrSet().GetMirrorGrf().GetValue();
}
@@ -874,8 +874,8 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
bCpyBrd( bCpyBorder )
{
bUndoKeep = false;
- OBJECT.pUndoFly = 0;
- OBJECT.pUndoAttr = 0;
+ OBJECT.pUndoFly = nullptr;
+ OBJECT.pUndoAttr = nullptr;
}
SwUndoInsertLabel::~SwUndoInsertLabel()
@@ -897,11 +897,11 @@ void SwUndoInsertLabel::UndoImpl(::sw::UndoRedoContext & rContext)
{
OSL_ENSURE( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer not initialized" );
SwFrameFormat* pFormat;
- SdrObject *pSdrObj = 0;
+ SdrObject *pSdrObj = nullptr;
if( OBJECT.pUndoAttr &&
- 0 != (pFormat = static_cast<SwFrameFormat*>(OBJECT.pUndoAttr->GetFormat( rDoc ))) &&
+ nullptr != (pFormat = static_cast<SwFrameFormat*>(OBJECT.pUndoAttr->GetFormat( rDoc ))) &&
( LTYPE_DRAW != eType ||
- 0 != (pSdrObj = pFormat->FindSdrObject()) ) )
+ nullptr != (pSdrObj = pFormat->FindSdrObject()) ) )
{
OBJECT.pUndoAttr->UndoImpl(rContext);
OBJECT.pUndoFly->UndoImpl(rContext);
@@ -936,11 +936,11 @@ void SwUndoInsertLabel::RedoImpl(::sw::UndoRedoContext & rContext)
{
OSL_ENSURE( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer not initialized" );
SwFrameFormat* pFormat;
- SdrObject *pSdrObj = 0;
+ SdrObject *pSdrObj = nullptr;
if( OBJECT.pUndoAttr &&
- 0 != (pFormat = static_cast<SwFrameFormat*>(OBJECT.pUndoAttr->GetFormat( rDoc ))) &&
+ nullptr != (pFormat = static_cast<SwFrameFormat*>(OBJECT.pUndoAttr->GetFormat( rDoc ))) &&
( LTYPE_DRAW != eType ||
- 0 != (pSdrObj = pFormat->FindSdrObject()) ) )
+ nullptr != (pSdrObj = pFormat->FindSdrObject()) ) )
{
OBJECT.pUndoFly->RedoImpl(rContext);
OBJECT.pUndoAttr->RedoImpl(rContext);
@@ -965,7 +965,7 @@ void SwUndoInsertLabel::RedoImpl(::sw::UndoRedoContext & rContext)
pNd->GetTable().GetFrameFormat()->SetFormatAttr( SvxFormatKeepItem(true, RES_KEEP) );
}
NODE.pUndoInsNd->UndoImpl(rContext);
- delete NODE.pUndoInsNd, NODE.pUndoInsNd = 0;
+ delete NODE.pUndoInsNd, NODE.pUndoInsNd = nullptr;
}
}
@@ -993,7 +993,7 @@ void SwUndoInsertLabel::RepeatImpl(::sw::RepeatContext & rContext)
{
SwFlyFrm* pFly;
SwContentFrm *pCnt = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() );
- if( pCnt && 0 != ( pFly = pCnt->FindFlyFrm() ) )
+ if( pCnt && nullptr != ( pFly = pCnt->FindFlyFrm() ) )
nIdx = pFly->GetFormat()->GetContent().GetContentIdx()->GetIndex();
}
break;
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 94cb6f60e373..c66c8a34f6fd 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -74,7 +74,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
}
pTextNd = rMvPos.nNode.GetNode().GetTextNode();
- if (0 != pTextNd)
+ if (nullptr != pTextNd)
{
pHistory->Add( pTextNd->GetTextColl(), nMvDestNode, ND_TEXTNODE );
if ( pTextNd->GetpSwpHints() )
@@ -126,7 +126,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
if( pCNd )
aPtPos.nContent.Assign( pCNd, pCNd->Len() );
SwPosition aMkPos( rRg.aStart );
- if( 0 != ( pCNd = aMkPos.nNode.GetNode().GetContentNode() ))
+ if( nullptr != ( pCNd = aMkPos.nNode.GetNode().GetContentNode() ))
aMkPos.nContent.Assign( pCNd, 0 );
DelContentIndex( aMkPos, aPtPos, nsDelContentType::DELCNT_FTN );
@@ -341,7 +341,7 @@ void SwUndoMove::DelFootnote( const SwPaM& rRange )
nsDelContentType::DELCNT_FTN );
if( pHistory && !pHistory->Count() )
- delete pHistory, pHistory = 0;
+ delete pHistory, pHistory = nullptr;
}
}
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 4758876fcbe3..a93ae0cb6b5b 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -32,23 +32,23 @@ SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule,
const SwNumRule& rNewRule,
SwUndoId nUndoId )
: SwUndo( nUndoId ),
- aNumRule( rNewRule ), pHistory( 0 ), nSttSet( ULONG_MAX ),
+ aNumRule( rNewRule ), pHistory( nullptr ), nSttSet( ULONG_MAX ),
pOldNumRule( new SwNumRule( rOldRule )), nLRSavePos( 0 )
{
}
SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule )
: SwUndo( UNDO_INSNUM ), SwUndRng( rPam ),
- aNumRule( rRule ), pHistory( 0 ),
- nSttSet( ULONG_MAX ), pOldNumRule( 0 ), nLRSavePos( 0 )
+ aNumRule( rRule ), pHistory( nullptr ),
+ nSttSet( ULONG_MAX ), pOldNumRule( nullptr ), nLRSavePos( 0 )
{
}
SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
const OUString& rReplaceRule )
: SwUndo( UNDO_INSNUM ),
- aNumRule( rRule ), pHistory( 0 ),
- nSttSet( ULONG_MAX ), pOldNumRule( 0 ),
+ aNumRule( rRule ), pHistory( nullptr ),
+ nSttSet( ULONG_MAX ), pOldNumRule( nullptr ),
sReplaceRule( rReplaceRule ), nLRSavePos( 0 )
{
// No selection!
@@ -82,10 +82,10 @@ void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwTextNode* pNd;
if( ULONG_MAX != nSttSet &&
- 0 != ( pNd = rDoc.GetNodes()[ nSttSet ]->GetTextNode() ))
+ nullptr != ( pNd = rDoc.GetNodes()[ nSttSet ]->GetTextNode() ))
pNd->SetListRestart( true );
else
- pNd = 0;
+ pNd = nullptr;
if( nLRSavePos )
{
@@ -298,7 +298,7 @@ void SwUndoNumOrNoNum::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aIdx( rContext.GetDoc().GetNodes(), nIdx );
SwTextNode * pTextNd = aIdx.GetNode().GetTextNode();
- if (NULL != pTextNd)
+ if (nullptr != pTextNd)
{
pTextNd->SetCountedInList(mbOldNum);
}
@@ -310,7 +310,7 @@ void SwUndoNumOrNoNum::RedoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aIdx( rContext.GetDoc().GetNodes(), nIdx );
SwTextNode * pTextNd = aIdx.GetNode().GetTextNode();
- if (NULL != pTextNd)
+ if (nullptr != pTextNd)
{
pTextNd->SetCountedInList(mbNewNum);
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index c555cb082ca7..d532c9601f7d 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star::uno;
SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
: SwUndo(UNDO_OVERWRITE),
- pRedlSaveData( 0 ), bGroup( false )
+ pRedlSaveData( nullptr ), bGroup( false )
{
if( !pDoc->getIDocumentRedlineAccess().IsIgnoreRedline() && !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
@@ -51,7 +51,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
rPos.nNode, rPos.nContent.GetIndex()+1 );
pRedlSaveData = new SwRedlineSaveDatas;
if( !FillSaveData( aPam, *pRedlSaveData, false ))
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
}
nSttNode = rPos.nNode.GetIndex();
@@ -188,7 +188,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
{
if( 1 == aInsStr.getLength() && 1 == aDelStr.getLength() )
pACEWord->CheckChar( *pAktPam->GetPoint(), aDelStr[0] );
- pDoc->SetAutoCorrExceptWord( 0 );
+ pDoc->SetAutoCorrExceptWord( nullptr );
}
// If there was not only a overwrite but also an insert, delete the surplus
@@ -329,7 +329,7 @@ struct _UndoTransliterate_Data
sal_Int32 nStart, nLen;
_UndoTransliterate_Data( sal_uLong nNd, sal_Int32 nStt, sal_Int32 nStrLen, const OUString& rText )
- : sText( rText ), pHistory( 0 ), pOffsets( 0 ),
+ : sText( rText ), pHistory( nullptr ), pOffsets( nullptr ),
nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
{}
~_UndoTransliterate_Data() { delete pOffsets; delete pHistory; }
@@ -432,7 +432,7 @@ void SwUndoTransliterate::AddChanges( SwTextNode& rTNd,
{
// same node and have a history?
pNew->pHistory = pD->pHistory;
- pD->pHistory = 0;
+ pD->pHistory = nullptr;
break; // more can't exist
}
}
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 32d67b012d36..5970b44471f3 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -35,7 +35,7 @@
SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
: SwUndo( UNDO_REDLINE ), SwUndRng( rRange ),
- mpRedlData( 0 ), mpRedlSaveData( 0 ), mnUserId( nUsrId ),
+ mpRedlData( nullptr ), mpRedlSaveData( nullptr ), mnUserId( nUsrId ),
mbHiddenRedlines( false )
{
// consider Redline
@@ -58,7 +58,7 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
mpRedlSaveData = new SwRedlineSaveDatas;
if( !FillSaveData( rRange, *mpRedlSaveData, false, UNDO_REJECT_REDLINE != mnUserId ))
- delete mpRedlSaveData, mpRedlSaveData = 0;
+ delete mpRedlSaveData, mpRedlSaveData = nullptr;
else
{
mbHiddenRedlines = HasHiddenRedlines( *mpRedlSaveData );
@@ -145,7 +145,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
const SwTextNode* pTNd;
if( UNDO_DELETE == mnUserId &&
nSttNode == nEndNode && nSttContent + 1 == nEndContent &&
- 0 != (pTNd = rRange.GetNode().GetTextNode()) )
+ nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
{
sal_Unicode const cCh = pTNd->GetText()[nSttContent];
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
@@ -352,8 +352,8 @@ void SwUndoRejectRedline::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
- : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ),
- pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns )
+ : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( nullptr ),
+ pUnDel( nullptr ), pUnDel2( nullptr ), pRedlSaveData( nullptr ), bInsert( bIns )
{
SwDoc* pDoc = rRg.GetDoc();
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
@@ -365,8 +365,8 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
}
SwUndoCompDoc::SwUndoCompDoc( const SwRangeRedline& rRedl )
- : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRedl ), pRedlData( 0 ),
- pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ),
+ : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRedl ), pRedlData( nullptr ),
+ pUnDel( nullptr ), pUnDel2( nullptr ), pRedlSaveData( nullptr ),
// for MergeDoc the corresponding inverse is needed
bInsert( nsRedlineType_t::REDLINE_DELETE == rRedl.GetType() )
{
@@ -379,7 +379,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwRangeRedline& rRedl )
pRedlSaveData = new SwRedlineSaveDatas;
if( !FillSaveData( rRedl, *pRedlSaveData, false ))
- delete pRedlSaveData, pRedlSaveData = 0;
+ delete pRedlSaveData, pRedlSaveData = nullptr;
}
SwUndoCompDoc::~SwUndoCompDoc()
@@ -434,8 +434,8 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
{
rPam.SetMark();
++rPam.GetPoint()->nNode;
- rPam.GetBound().nContent.Assign( 0, 0 );
- rPam.GetBound( false ).nContent.Assign( 0, 0 );
+ rPam.GetBound().nContent.Assign( nullptr, 0 );
+ rPam.GetBound( false ).nContent.Assign( nullptr, 0 );
pUnDel2 = new SwUndoDelete(rPam, true);
}
}
@@ -476,10 +476,10 @@ void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext)
if( pUnDel2 )
{
pUnDel2->UndoImpl(rContext);
- delete pUnDel2, pUnDel2 = 0;
+ delete pUnDel2, pUnDel2 = nullptr;
}
pUnDel->UndoImpl(rContext);
- delete pUnDel, pUnDel = 0;
+ delete pUnDel, pUnDel = nullptr;
SetPaM(rPam);
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 6419d3c577f2..dbbea4a9fbe9 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -45,7 +45,7 @@ static SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
// save attributes of the format (columns, color, ...)
// Content and Protect items are not interesting since they are already
// stored in Section, thus delete them.
- SfxItemSet* pAttr = 0;
+ SfxItemSet* pAttr = nullptr;
if( rSect.GetFormat() )
{
sal_uInt16 nCnt = 1;
@@ -58,7 +58,7 @@ static SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
pAttr->ClearItem( RES_PROTECT );
pAttr->ClearItem( RES_CNTNT );
if( !pAttr->Count() )
- delete pAttr, pAttr = 0;
+ delete pAttr, pAttr = nullptr;
}
}
return pAttr;
@@ -69,8 +69,8 @@ SwUndoInsSection::SwUndoInsSection(
SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase)
: SwUndo( UNDO_INSSECTION ), SwUndRng( rPam )
, m_pSectionData(new SwSectionData(rNewData))
- , m_pTOXBase( (pTOXBase) ? new SwTOXBase(*pTOXBase) : 0 )
- , m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : 0 )
+ , m_pTOXBase( (pTOXBase) ? new SwTOXBase(*pTOXBase) : nullptr )
+ , m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : nullptr )
, m_nSectionNodePos(0)
, m_bSplitAtStart(false)
, m_bSplitAtEnd(false)
@@ -85,7 +85,7 @@ SwUndoInsSection::SwUndoInsSection(
}
m_pRedlineSaveData.reset( new SwRedlineSaveDatas );
if( !FillSaveData( rPam, *m_pRedlineSaveData, false ))
- m_pRedlineSaveData.reset( NULL );
+ m_pRedlineSaveData.reset( nullptr );
if( !rPam.HasMark() )
{
@@ -165,7 +165,7 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
SwPaM & rPam( AddUndoRedoPaM(rContext) );
- const SwTOXBaseSection* pUpdateTOX = 0;
+ const SwTOXBaseSection* pUpdateTOX = nullptr;
if (m_pTOXBase.get())
{
pUpdateTOX = rDoc.InsertTableOf( *rPam.GetPoint(),
@@ -173,7 +173,7 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & rContext)
}
else
{
- rDoc.InsertSwSection(rPam, *m_pSectionData, 0, m_pAttrSet.get());
+ rDoc.InsertSwSection(rPam, *m_pSectionData, nullptr, m_pAttrSet.get());
}
if (m_pHistory.get())
@@ -223,7 +223,7 @@ void SwUndoInsSection::RepeatImpl(::sw::RepeatContext & rContext)
else
{
rDoc.InsertSwSection(rContext.GetRepeatPaM(),
- *m_pSectionData, 0, m_pAttrSet.get());
+ *m_pSectionData, nullptr, m_pAttrSet.get());
}
}
@@ -243,7 +243,7 @@ void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
if (m_pHistory.get())
{
SwIndex aCntIdx( pTextNd, 0 );
- pTextNd->RstTextAttr( aCntIdx, pTextNd->Len(), 0, 0, true );
+ pTextNd->RstTextAttr( aCntIdx, pTextNd->Len(), 0, nullptr, true );
}
}
@@ -304,7 +304,7 @@ SwUndoDelSection::SwUndoDelSection(
, m_pSectionData( new SwSectionData(rSection) )
, m_pTOXBase( dynamic_cast<const SwTOXBaseSection*>( &rSection) != nullptr
? new SwTOXBase(static_cast<SwTOXBaseSection const&>(rSection))
- : 0 )
+ : nullptr )
, m_pAttrSet( ::lcl_GetAttrSet(rSection) )
, m_pMetadataUndo( rSectionFormat.CreateUndo() )
, m_nStartNode( pIndex->GetIndex() )
@@ -329,7 +329,7 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwNodeIndex aStt( rDoc.GetNodes(), m_nStartNode );
SwNodeIndex aEnd( rDoc.GetNodes(), m_nEndNode-2 );
- SwSectionFormat* pFormat = rDoc.MakeSectionFormat( 0 );
+ SwSectionFormat* pFormat = rDoc.MakeSectionFormat( nullptr );
if (m_pAttrSet.get())
{
pFormat->SetFormatAttr( *m_pAttrSet );
@@ -338,7 +338,7 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
/// OD 04.10.2002 #102894#
/// remember inserted section node for further calculations
SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection(
- aStt, *pFormat, *m_pSectionData, 0, & aEnd);
+ aStt, *pFormat, *m_pSectionData, nullptr, & aEnd);
if( SfxItemState::SET == pFormat->GetItemState( RES_FTN_AT_TXTEND ) ||
SfxItemState::SET == pFormat->GetItemState( RES_END_AT_TXTEND ))
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 42b4d81a8f07..f393cfe9de2d 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -44,8 +44,8 @@ SwSortUndoElement::~SwSortUndoElement()
SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
: SwUndo(UNDO_SORT_TXT)
, SwUndRng(rRg)
- , pUndoTableAttr(0)
- , pRedlData(0)
+ , pUndoTableAttr(nullptr)
+ , pRedlData(nullptr)
, nTableNd(0)
{
pSortOpt = new SwSortOptions(rOpt);
@@ -53,7 +53,7 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTableNd,
const SwSortOptions& rOpt, bool bSaveTable )
- : SwUndo(UNDO_SORT_TBL), pUndoTableAttr( 0 ), pRedlData( 0 )
+ : SwUndo(UNDO_SORT_TBL), pUndoTableAttr( nullptr ), pRedlData( nullptr )
{
nSttNode = nStt;
nEndNode = nEnd;
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index acaf483f0d4c..7f6e3a7e0599 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -37,7 +37,7 @@
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
bool bChkTable )
- : SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ),
+ : SwUndo( UNDO_SPLITNODE ), pHistory( nullptr ), pRedlData( nullptr ), nNode( rPos.nNode.GetIndex() ),
nContent( rPos.nContent.GetIndex() ),
bTableFlag( false ), bChkTableStt( bChkTable )
{
@@ -81,7 +81,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
SwNode* pCurrNd = pDoc->GetNodes()[ nNode + 1 ];
SwTableNode* pTableNd = pCurrNd->FindTableNode();
if( pCurrNd->IsContentNode() && pTableNd &&
- 0 != ( pTNd = pDoc->GetNodes()[ pTableNd->GetIndex()-1 ]->GetTextNode() ))
+ nullptr != ( pTNd = pDoc->GetNodes()[ pTableNd->GetIndex()-1 ]->GetTextNode() ))
{
// move break attributes
SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index f593c5f082c9..8acb14a9cfed 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -220,7 +220,7 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt
const std::vector<sal_uInt16> *pColArr,
const OUString & rName)
: SwUndo( UNDO_INSTABLE ),
- aInsTableOpts( rInsTableOpts ), pDDEFieldType( 0 ), pColWidth( 0 ), pRedlData( 0 ), pAutoFormat( 0 ),
+ aInsTableOpts( rInsTableOpts ), pDDEFieldType( nullptr ), pColWidth( nullptr ), pRedlData( nullptr ), pAutoFormat( nullptr ),
nSttNode( rPos.nNode.GetIndex() ), nRows( nRw ), nCols( nCl ), nAdjust( nAdj )
{
if( pColArr )
@@ -309,7 +309,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext)
*pDDEFieldType));
SwDDETable* pDDETable = new SwDDETable( pTableNode->GetTable(), pNewType );
pTableNode->SetNewTable( pDDETable );
- delete pDDEFieldType, pDDEFieldType = 0;
+ delete pDDEFieldType, pDDEFieldType = nullptr;
}
if( (pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) ||
@@ -353,7 +353,7 @@ SwRewriter SwUndoInsTable::GetRewriter() const
}
SwTableToTextSave::SwTableToTextSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, sal_Int32 nCnt )
- : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nContent( nCnt ), m_pHstry( 0 )
+ : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nContent( nCnt ), m_pHstry( nullptr )
{
// keep attributes of the joined node
SwTextNode* pNd = rDoc.GetNodes()[ nNd ]->GetTextNode();
@@ -371,7 +371,7 @@ SwTableToTextSave::SwTableToTextSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEnd
m_pHstry->CopyFormatAttr( *pNd->GetpSwAttrSet(), nNd );
if( !m_pHstry->Count() )
- delete m_pHstry, m_pHstry = 0;
+ delete m_pHstry, m_pHstry = nullptr;
// METADATA: store
m_pMetadataUndoStart = pNd->CreateUndo();
@@ -393,7 +393,7 @@ SwTableToTextSave::SwTableToTextSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEnd
SwUndoTableToText::SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh )
: SwUndo( UNDO_TABLETOTEXT ),
- sTableNm( rTable.GetFrameFormat()->GetName() ), pDDEFieldType( 0 ), pHistory( 0 ),
+ sTableNm( rTable.GetFrameFormat()->GetName() ), pDDEFieldType( nullptr ), pHistory( nullptr ),
nSttNd( 0 ), nEndNd( 0 ),
cTrenner( cCh ), nHdlnRpt( rTable.GetRowsToRepeat() )
{
@@ -427,7 +427,7 @@ SwUndoTableToText::SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh )
}
if( !pHistory->Count() )
- delete pHistory, pHistory = 0;
+ delete pHistory, pHistory = nullptr;
}
SwUndoTableToText::~SwUndoTableToText()
@@ -471,7 +471,7 @@ void SwUndoTableToText::UndoImpl(::sw::UndoRedoContext & rContext)
*pDDEFieldType));
SwDDETable* pDDETable = new SwDDETable( pTableNd->GetTable(), pNewType );
pTableNd->SetNewTable( pDDETable, false );
- delete pDDEFieldType, pDDEFieldType = 0;
+ delete pDDEFieldType, pDDEFieldType = nullptr;
}
if( bCheckNumFormat )
@@ -534,7 +534,7 @@ SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd,
// all boxes. The correct structure is than taken from SaveStruct.
SwTableBoxFormat* pBoxFormat = GetDoc()->MakeTableBoxFormat();
SwTableLineFormat* pLineFormat = GetDoc()->MakeTableLineFormat();
- SwTableLine* pLine = new SwTableLine( pLineFormat, rSavedData.size(), 0 );
+ SwTableLine* pLine = new SwTableLine( pLineFormat, rSavedData.size(), nullptr );
pTableNd->GetTable().GetTabLines().insert( pTableNd->GetTable().GetTabLines().begin(), pLine );
const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
@@ -620,7 +620,7 @@ void SwUndoTableToText::RedoImpl(::sw::UndoRedoContext & rContext)
SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->GetPoint()->nNode = nSttNd;
- pPam->GetPoint()->nContent.Assign( 0, 0 );
+ pPam->GetPoint()->nContent.Assign( nullptr, 0 );
SwNodeIndex aSaveIdx( pPam->GetPoint()->nNode, -1 );
pPam->SetMark(); // log off all indices
@@ -637,8 +637,8 @@ void SwUndoTableToText::RedoImpl(::sw::UndoRedoContext & rContext)
++aSaveIdx;
SwContentNode* pCNd = aSaveIdx.GetNode().GetContentNode();
- if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) &&
- 0 == ( pCNd = SwNodes::GoPrevious( &aSaveIdx )) )
+ if( !pCNd && nullptr == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) &&
+ nullptr == ( pCNd = SwNodes::GoPrevious( &aSaveIdx )) )
{
OSL_FAIL( "Where is the TextNode now?" );
}
@@ -684,8 +684,8 @@ SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg,
sal_Unicode cCh, sal_uInt16 nAdj,
const SwTableAutoFormat* pAFormat )
: SwUndo( UNDO_TEXTTOTABLE ), SwUndRng( rRg ), aInsTableOpts( rInsTableOpts ),
- pDelBoxes( 0 ), pAutoFormat( 0 ),
- pHistory( 0 ), cTrenner( cCh ), nAdjust( nAdj )
+ pDelBoxes( nullptr ), pAutoFormat( nullptr ),
+ pHistory( nullptr ), cTrenner( cCh ), nAdjust( nAdj )
{
if( pAFormat )
pAutoFormat = new SwTableAutoFormat( *pAFormat );
@@ -732,7 +732,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwTableBox* pBox = rTable.GetTableBox( (*pDelBoxes)[ --n ] );
if( pBox )
- ::_DeleteBox( rTable, pBox, 0, false, false );
+ ::_DeleteBox( rTable, pBox, nullptr, false, false );
else {
OSL_ENSURE( false, "Where is my box?" );
}
@@ -768,8 +768,8 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
SwTextNode* pTextNd = rIdx.GetNode().GetTextNode();
if( pTextNd && pTextNd->CanJoinNext() )
{
- aPam.GetMark()->nContent.Assign( 0, 0 );
- aPam.GetPoint()->nContent.Assign( 0, 0 );
+ aPam.GetMark()->nContent.Assign( nullptr, 0 );
+ aPam.GetPoint()->nContent.Assign( nullptr, 0 );
// than move, relatively, the Crsr/etc. again
pPos->nContent.Assign(pTextNd, pTextNd->GetText().getLength());
@@ -867,7 +867,7 @@ _SaveTable::_SaveTable( const SwTable& rTable, sal_uInt16 nLnCnt, bool bSaveForm
m_bModifyBox = false;
m_bNewModel = rTable.IsNewModel();
m_aTableSet.Put(rTable.GetFrameFormat()->GetAttrSet());
- m_pLine = new _SaveLine( 0, *rTable.GetTabLines()[ 0 ], *this );
+ m_pLine = new _SaveLine( nullptr, *rTable.GetTabLines()[ 0 ], *this );
_SaveLine* pLn = m_pLine;
if( USHRT_MAX == nLnCnt )
@@ -876,7 +876,7 @@ _SaveTable::_SaveTable( const SwTable& rTable, sal_uInt16 nLnCnt, bool bSaveForm
pLn = new _SaveLine( pLn, *rTable.GetTabLines()[ n ], *this );
m_aFrameFormats.clear();
- m_pSwTable = 0;
+ m_pSwTable = nullptr;
}
_SaveTable::~_SaveTable()
@@ -907,7 +907,7 @@ sal_uInt16 _SaveTable::AddFormat( SwFrameFormat* pFormat, bool bIsLine )
SwTableBoxFormula* pFormulaItem = const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem));
pFormulaItem->ChgDefinedIn( pFormat );
pFormulaItem->ChangeState( &aMsgHint );
- pFormulaItem->ChgDefinedIn( 0 );
+ pFormulaItem->ChgDefinedIn( nullptr );
}
}
nRet = m_aSets.size();
@@ -943,7 +943,7 @@ void _SaveTable::RestoreAttr( SwTable& rTable, bool bMdfyBox )
}
// fill FrameFormats with defaults (0)
- pFormat = 0;
+ pFormat = nullptr;
for (size_t n = m_aSets.size(); n; --n)
m_aFrameFormats.push_back(pFormat);
@@ -975,7 +975,7 @@ void _SaveTable::SaveContentAttrs( SwDoc* pDoc )
void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms,
bool bRestoreChart )
{
- _FndBox aTmpBox( 0, 0 );
+ _FndBox aTmpBox( nullptr, nullptr );
aTmpBox.DelFrms( rTable );
// first, get back attributes of TableFrmFormat
@@ -992,10 +992,10 @@ void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms,
// SwTableBox must have a format - the SwTableBox takes ownership of it
SwTableBoxFormat *const pNewFormat(pFormat->GetDoc()->MakeTableBoxFormat());
- SwTableBox aParent(pNewFormat, rTable.GetTabLines().size(), 0);
+ SwTableBox aParent(pNewFormat, rTable.GetTabLines().size(), nullptr);
// fill FrameFormats with defaults (0)
- pFormat = 0;
+ pFormat = nullptr;
for( size_t n = m_aSets.size(); n; --n )
m_aFrameFormats.push_back(pFormat);
@@ -1013,7 +1013,7 @@ void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms,
for( ; n < aParent.GetTabLines().size(); ++n )
{
SwTableLine* pLn = aParent.GetTabLines()[ n ];
- pLn->SetUpper( 0 );
+ pLn->SetUpper( nullptr );
if( n < nOldLines )
{
SwTableLine* pOld = rTable.GetTabLines()[ n ];
@@ -1130,14 +1130,14 @@ void _SaveTable::NewFrameFormat( const SwTableLine* pTableLn, const SwTableBox*
}
_SaveLine::_SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rSTable )
- : pNext( 0 )
+ : pNext( nullptr )
{
if( pPrev )
pPrev->pNext = this;
nItemSet = rSTable.AddFormat( rLine.GetFrameFormat(), true );
- pBox = new _SaveBox( 0, *rLine.GetTabBoxes()[ 0 ], rSTable );
+ pBox = new _SaveBox( nullptr, *rLine.GetTabBoxes()[ 0 ], rSTable );
_SaveBox* pBx = pBox;
for( size_t n = 1; n < rLine.GetTabBoxes().size(); ++n )
pBx = new _SaveBox( pBx, *rLine.GetTabBoxes()[ n ], rSTable );
@@ -1151,7 +1151,7 @@ _SaveLine::~_SaveLine()
void _SaveLine::RestoreAttr( SwTableLine& rLine, _SaveTable& rSTable )
{
- rSTable.NewFrameFormat( &rLine, 0, nItemSet, rLine.GetFrameFormat() );
+ rSTable.NewFrameFormat( &rLine, nullptr, nItemSet, rLine.GetFrameFormat() );
_SaveBox* pBx = pBox;
for( size_t n = 0; n < rLine.GetTabBoxes().size(); ++n, pBx = pBx->pNext )
@@ -1193,9 +1193,9 @@ void _SaveLine::CreateNew( SwTable& rTable, SwTableBox& rParent, _SaveTable& rST
}
_SaveBox::_SaveBox( _SaveBox* pPrev, const SwTableBox& rBox, _SaveTable& rSTable )
- : pNext( 0 ), nSttNode( ULONG_MAX ), nRowSpan(0)
+ : pNext( nullptr ), nSttNode( ULONG_MAX ), nRowSpan(0)
{
- Ptrs.pLine = 0;
+ Ptrs.pLine = nullptr;
if( pPrev )
pPrev->pNext = this;
@@ -1209,7 +1209,7 @@ _SaveBox::_SaveBox( _SaveBox* pPrev, const SwTableBox& rBox, _SaveTable& rSTable
}
else
{
- Ptrs.pLine = new _SaveLine( 0, *rBox.GetTabLines()[ 0 ], rSTable );
+ Ptrs.pLine = new _SaveLine( nullptr, *rBox.GetTabLines()[ 0 ], rSTable );
_SaveLine* pLn = Ptrs.pLine;
for( size_t n = 1; n < rBox.GetTabLines().size(); ++n )
@@ -1228,7 +1228,7 @@ _SaveBox::~_SaveBox()
void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTable )
{
- rSTable.NewFrameFormat( 0, &rBox, nItemSet, rBox.GetFrameFormat() );
+ rSTable.NewFrameFormat( nullptr, &rBox, nItemSet, rBox.GetFrameFormat() );
if( ULONG_MAX == nSttNode ) // no EndBox
{
@@ -1550,9 +1550,9 @@ void SwUndoTableNdsChg::SaveNewBoxes( const SwTableNode& rTableNd,
static SwTableLine* lcl_FindTableLine( const SwTable& rTable,
const SwTableBox& rBox )
{
- SwTableLine* pRet = NULL;
+ SwTableLine* pRet = nullptr;
// i63949: For nested cells we have to take nLineNo - 1, too, not 0!
- const SwTableLines &rTableLines = ( rBox.GetUpper()->GetUpper() != NULL ) ?
+ const SwTableLines &rTableLines = ( rBox.GetUpper()->GetUpper() != nullptr ) ?
rBox.GetUpper()->GetUpper()->GetTabLines()
: rTable.GetTabLines();
const SwTableLine* pLine = rBox.GetUpper();
@@ -1566,7 +1566,7 @@ static const SwTableLines& lcl_FindParentLines( const SwTable& rTable,
const SwTableBox& rBox )
{
const SwTableLines& rRet =
- ( rBox.GetUpper()->GetUpper() != NULL ) ?
+ ( rBox.GetUpper()->GetUpper() != nullptr ) ?
rBox.GetUpper()->GetUpper()->GetTabLines() :
rTable.GetTabLines();
@@ -1604,8 +1604,8 @@ void SwUndoTableNdsChg::SaveNewBoxes( const SwTableNode& rTableNd,
// We found the right one if it's in the same column as pBox.
// No, if more than one selected cell in the same column has been splitted,
// we have to look for the nearest one (i65201)!
- const SwTableBox* pSourceBox = NULL;
- const SwTableBox* pCheckBox = NULL;
+ const SwTableBox* pSourceBox = nullptr;
+ const SwTableBox* pCheckBox = nullptr;
const SwTableLine* pBoxLine = pBox->GetUpper();
sal_uInt16 nLineDiff = lcl_FindParentLines(rTable,*pBox).GetPos(pBoxLine);
sal_uInt16 nLineNo = 0;
@@ -1682,7 +1682,7 @@ void SwUndoTableNdsChg::UndoImpl(::sw::UndoRedoContext & rContext)
CHECK_TABLE( pTableNd->GetTable() )
- _FndBox aTmpBox( 0, 0 );
+ _FndBox aTmpBox( nullptr, nullptr );
// ? TL_CHART2: notification or locking of controller required ?
SwChartDataProvider *pPCD = rDoc.getIDocumentChartDataProviderAccess().GetChartDataProvider();
@@ -1866,7 +1866,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
SwTable &rTable = pTableNd->GetTable();
if( nMax > nMin && rTable.IsNewModel() )
rTable.PrepareDeleteCol( nMin, nMax );
- rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, true, true );
+ rTable.DeleteSel( &rDoc, aSelBoxes, nullptr, this, true, true );
}
else
{
@@ -1882,7 +1882,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
// need the SaveSections!
rDoc.GetIDocumentUndoRedo().DoUndo( true );
- SwUndo* pUndo = 0;
+ SwUndo* pUndo = nullptr;
switch( nSetColType & 0xff )
{
@@ -1955,7 +1955,7 @@ void SwUndoTableMerge::UndoImpl(::sw::UndoRedoContext & rContext)
aMsgHint.m_eFlags = TBL_BOXPTR;
rDoc.getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint );
- _FndBox aTmpBox( 0, 0 );
+ _FndBox aTmpBox( nullptr, nullptr );
// ? TL_CHART2: notification or locking of controller required ?
// 1. restore deleted boxes:
@@ -2005,7 +2005,7 @@ CHECKTABLE(pTableNd->GetTable())
// this was the separator -> restore moved ones
for (size_t i = m_pMoves->size(); i; )
{
- SwTextNode* pTextNd = 0;
+ SwTextNode* pTextNd = nullptr;
sal_Int32 nDelPos = 0;
SwUndoMove *const pUndo = (*m_pMoves)[ --i ].get();
if( !pUndo->IsMoveRange() )
@@ -2057,7 +2057,7 @@ CHECKTABLE(pTableNd->GetTable())
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
SwDoc::CorrAbs( SwNodeIndex( aTmpIdx, 1 ),
SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
- SwPosition( aTmpIdx, SwIndex( 0, 0 )), true );
+ SwPosition( aTmpIdx, SwIndex( nullptr, 0 )), true );
}
delete pBox;
@@ -2144,8 +2144,8 @@ void SwUndoTableMerge::SaveCollection( const SwTableBox& rBox )
SwUndoTableNumFormat::SwUndoTableNumFormat( const SwTableBox& rBox,
const SfxItemSet* pNewSet )
: SwUndo(UNDO_TBLNUMFMT)
- , pBoxSet(0)
- , pHistory(0)
+ , pBoxSet(nullptr)
+ , pHistory(nullptr)
, nFormatIdx(css::util::NumberFormat::TEXT)
, nNewFormatIdx(0)
, fNum(0.0)
@@ -2156,7 +2156,7 @@ SwUndoTableNumFormat::SwUndoTableNumFormat( const SwTableBox& rBox,
{
nNode = rBox.GetSttIdx();
- nNdPos = rBox.IsValidNumTextNd( 0 == pNewSet );
+ nNdPos = rBox.IsValidNumTextNd( nullptr == pNewSet );
SwDoc* pDoc = rBox.GetFrameFormat()->GetDoc();
if( ULONG_MAX != nNdPos )
@@ -2405,7 +2405,7 @@ void SwUndoTableNumFormat::SetBox( const SwTableBox& rBox )
_UndoTableCpyTable_Entry::_UndoTableCpyTable_Entry( const SwTableBox& rBox )
: nBoxIdx( rBox.GetSttIdx() ), nOffset( 0 ),
- pBoxNumAttr( 0 ), pUndo( 0 ), bJoin( false )
+ pBoxNumAttr( nullptr ), pUndo( nullptr ), bJoin( false )
{
}
@@ -2433,7 +2433,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
_DEBUG_REDLINE( &rDoc )
- SwTableNode* pTableNd = 0;
+ SwTableNode* pTableNd = nullptr;
for (size_t n = m_pArr->size(); n; )
{
_UndoTableCpyTable_Entry *const pEntry = (*m_pArr)[ --n ].get();
@@ -2450,7 +2450,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
// b62341295: Redline for copying tables
const SwNode *pEndNode = rBox.GetSttNd()->EndOfSectionNode();
SwPaM aPam( aInsIdx.GetNode(), *pEndNode );
- SwUndoDelete* pUndo = 0;
+ SwUndoDelete* pUndo = nullptr;
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) )
{
@@ -2507,7 +2507,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
{
pEntry->pUndo->UndoImpl(rContext);
delete pEntry->pUndo;
- pEntry->pUndo = 0;
+ pEntry->pUndo = nullptr;
}
if( bShiftPam )
{
@@ -2532,7 +2532,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
{
pEntry->pUndo->UndoImpl(rContext);
delete pEntry->pUndo;
- pEntry->pUndo = 0;
+ pEntry->pUndo = nullptr;
}
}
pEntry->pUndo = pUndo;
@@ -2553,7 +2553,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
if( pEntry->pBoxNumAttr )
{
rBox.ClaimFrameFormat()->SetFormatAttr( *pEntry->pBoxNumAttr );
- delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = 0;
+ delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = nullptr;
}
if( aTmpSet.Count() )
@@ -2584,7 +2584,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
pInsRowUndo->RedoImpl(rContext);
}
- SwTableNode* pTableNd = 0;
+ SwTableNode* pTableNd = nullptr;
for (size_t n = 0; n < m_pArr->size(); ++n)
{
_UndoTableCpyTable_Entry *const pEntry = (*m_pArr)[ n ].get();
@@ -2600,7 +2600,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
// b62341295: Redline for copying tables - Start.
rDoc.GetNodes().MakeTextNode( aInsIdx, rDoc.GetDfltTextFormatColl() );
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode());
- SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, true );
+ SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? nullptr : new SwUndoDelete( aPam, true );
if( pEntry->pUndo )
{
pEntry->pUndo->UndoImpl(rContext);
@@ -2624,7 +2624,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
}
}
delete pEntry->pUndo;
- pEntry->pUndo = 0;
+ pEntry->pUndo = nullptr;
}
pEntry->pUndo = pUndo;
// b62341295: Redline for copying tables - End.
@@ -2644,7 +2644,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
if( pEntry->pBoxNumAttr )
{
rBox.ClaimFrameFormat()->SetFormatAttr( *pEntry->pBoxNumAttr );
- delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = 0;
+ delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = nullptr;
}
if( aTmpSet.Count() )
@@ -2685,7 +2685,7 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent
RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
pEntry->pBoxNumAttr->Put( rBox.GetFrameFormat()->GetAttrSet() );
if( !pEntry->pBoxNumAttr->Count() )
- delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = 0;
+ delete pEntry->pBoxNumAttr, pEntry->pBoxNumAttr = nullptr;
_DEBUG_REDLINE( pDoc )
}
@@ -2721,7 +2721,7 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex
SwUndo* SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
const SwPosition& rPos, bool& rJoin, bool bRedo )
{
- SwUndo *pUndo = 0;
+ SwUndo *pUndo = nullptr;
// b62341295: Redline for copying tables
// What's to do?
// Mark the cell content before rIdx as insertion,
@@ -2748,7 +2748,7 @@ SwUndo* SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox
}
}
else
- aInsertEnd.nContent = SwIndex( 0 );
+ aInsertEnd.nContent = SwIndex( nullptr );
}
// For joined (merged) contents the start of deletion and end of insertion are identical
// otherwise adjacent nodes.
@@ -2804,7 +2804,7 @@ bool SwUndoTableCpyTable::InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes,
if( bRet )
pInsRowUndo->SaveNewBoxes( *pTableNd, aTmpLst );
else
- delete pInsRowUndo, pInsRowUndo = 0;
+ delete pInsRowUndo, pInsRowUndo = nullptr;
return bRet;
}
@@ -2814,7 +2814,7 @@ bool SwUndoTableCpyTable::IsEmpty() const
}
SwUndoCpyTable::SwUndoCpyTable()
- : SwUndo( UNDO_CPYTBL ), pDel( 0 ), nTableNode( 0 )
+ : SwUndo( UNDO_CPYTBL ), pDel( nullptr ), nTableNode( 0 )
{
}
@@ -2851,14 +2851,14 @@ void SwUndoCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
void SwUndoCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
{
pDel->UndoImpl(rContext);
- delete pDel, pDel = 0;
+ delete pDel, pDel = nullptr;
}
SwUndoSplitTable::SwUndoSplitTable( const SwTableNode& rTableNd,
SwSaveRowSpan* pRowSp, sal_uInt16 eMode, bool bNewSize )
: SwUndo( UNDO_SPLIT_TABLE ),
- nTableNode( rTableNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTable( 0 ),
- pHistory( 0 ), nMode( eMode ), nFormulaEnd( 0 ), bCalcNewSize( bNewSize )
+ nTableNode( rTableNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTable( nullptr ),
+ pHistory( nullptr ), nMode( eMode ), nFormulaEnd( 0 ), bCalcNewSize( bNewSize )
{
switch( nMode )
{
@@ -2930,10 +2930,10 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext)
SwSelBoxes aSelBoxes;
SwTableBox* pBox = rTable.GetTableBox( nTableNode + nOffset + 1 );
SwTable::SelLineFromBox( pBox, aSelBoxes );
- _FndBox aTmpBox( 0, 0 );
+ _FndBox aTmpBox( nullptr, nullptr );
aTmpBox.SetTableLines( aSelBoxes, rTable );
aTmpBox.DelFrms( rTable );
- rTable.DeleteSel( pDoc, aSelBoxes, 0, 0, false, false );
+ rTable.DeleteSel( pDoc, aSelBoxes, nullptr, nullptr, false, false );
}
break;
}
@@ -2987,8 +2987,8 @@ void SwUndoSplitTable::SaveFormula( SwHistory& rHistory )
SwUndoMergeTable::SwUndoMergeTable( const SwTableNode& rTableNd,
const SwTableNode& rDelTableNd,
bool bWithPrv, sal_uInt16 nMd )
- : SwUndo( UNDO_MERGE_TABLE ), pSavTable( 0 ),
- pHistory( 0 ), nMode( nMd ), bWithPrev( bWithPrv )
+ : SwUndo( UNDO_MERGE_TABLE ), pSavTable( nullptr ),
+ pHistory( nullptr ), nMode( nMd ), bWithPrev( bWithPrv )
{
// memorize end node of the last table cell that'll stay in position
if( bWithPrev )
@@ -2999,7 +2999,7 @@ SwUndoMergeTable::SwUndoMergeTable( const SwTableNode& rTableNd,
aName = rDelTableNd.GetTable().GetFrameFormat()->GetName();
pSavTable = new _SaveTable( rDelTableNd.GetTable() );
- pSavHdl = bWithPrev ? new _SaveTable( rTableNd.GetTable(), 1 ) : 0;
+ pSavHdl = bWithPrev ? new _SaveTable( rTableNd.GetTable(), 1 ) : nullptr;
}
SwUndoMergeTable::~SwUndoMergeTable()
@@ -3026,7 +3026,7 @@ void SwUndoMergeTable::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint );
// get lines for layout update
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
aFndBox.SetTableLines( *pTable );
aFndBox.DelFrms( *pTable );
// ? TL_CHART2: notification or locking of controller required ?
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 1e2505567dff..81f21533f6bf 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -34,7 +34,7 @@
SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
: SwUndo( nUndoId ), SwUndRng( rPam ),
- pTextFormatColl( 0 ), pLastNdColl(0), pFrameFormats( 0 ), pRedlData( 0 ),
+ pTextFormatColl( nullptr ), pLastNdColl(nullptr), pFrameFormats( nullptr ), pRedlData( nullptr ),
bSttWasTextNd( true ), nNdDiff( 0 ), nSetPos( 0 )
{
pHistory = new SwHistory;
@@ -126,7 +126,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
pFrameFormats->erase( it );
}
}
- delete pFrameFormats, pFrameFormats = 0;
+ delete pFrameFormats, pFrameFormats = nullptr;
}
}
@@ -225,7 +225,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
pTextNode->JoinNext();
}
// reset all text attributes in the paragraph!
- pTextNode->RstTextAttr( SwIndex(pTextNode, 0), pTextNode->Len(), 0, 0, true );
+ pTextNode->RstTextAttr( SwIndex(pTextNode, 0), pTextNode->Len(), 0, nullptr, true );
pTextNode->ResetAllAttr();
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 5c6e25683098..bf93a11e6e5c 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -89,8 +89,8 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
SwDocStyleSheet* pStyle =
static_cast<SwDocStyleSheet*>(m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR));
- SwFormatDrop* pDrop = 0;
- SwFormatCharFormat *pCharFormat = 0;
+ SwFormatDrop* pDrop = nullptr;
+ SwFormatCharFormat *pCharFormat = nullptr;
if(pStyle)
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *pStyle ) );
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index ff19fffbac89..b06e726d75b6 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -72,7 +72,7 @@ private:
void lcl_getXMLStringForCell( const /*::chart::*/XMLRangeHelper::Cell & rCell, OUStringBuffer * output )
{
- OSL_ASSERT(output != 0);
+ OSL_ASSERT(output != nullptr);
if( rCell.empty())
return;
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 0dc0b1928710..282502ca221c 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -57,7 +57,7 @@ public:
: SwClient()
, m_EventListeners(m_Mutex)
, m_pDoc(pDoc)
- , m_pRegisteredBookmark(0)
+ , m_pRegisteredBookmark(nullptr)
{
// DO NOT registerInMark here! (because SetXBookmark would delete rThis)
}
@@ -77,8 +77,8 @@ void SwXBookmark::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
return; // core object still alive
}
- m_pRegisteredBookmark = 0;
- m_pDoc = 0;
+ m_pRegisteredBookmark = nullptr;
+ m_pDoc = nullptr;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -131,7 +131,7 @@ SwXBookmark::SwXBookmark(
}
SwXBookmark::SwXBookmark()
- : m_pImpl( new SwXBookmark::Impl(0, 0) )
+ : m_pImpl( new SwXBookmark::Impl(nullptr, nullptr) )
{
}
@@ -175,7 +175,7 @@ uno::Reference<text::XTextContent> SwXBookmark::CreateXBookmark(
{
return pXBkm->m_pImpl->m_pRegisteredBookmark;
}
- return 0;
+ return nullptr;
}
namespace
@@ -206,8 +206,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
const uno::Reference<lang::XUnoTunnel> xRangeTunnel(
xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
@@ -216,7 +216,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
SwDoc *const pDoc =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pDoc)
{
throw lang::IllegalArgumentException();
@@ -289,7 +289,7 @@ throw (uno::RuntimeException, std::exception)
*m_pImpl->m_pDoc,
m_pImpl->m_pRegisteredBookmark->GetMarkPos(),
(m_pImpl->m_pRegisteredBookmark->IsExpanded())
- ? &m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos() : NULL);
+ ? &m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos() : nullptr);
}
void SAL_CALL SwXBookmark::dispose()
@@ -397,9 +397,9 @@ uno::Reference<frame::XModel> SwXBookmark::GetModel()
if (m_pImpl->m_pDoc)
{
SwDocShell const * const pShell( m_pImpl->m_pDoc->GetDocShell() );
- return (pShell) ? pShell->GetModel() : 0;
+ return (pShell) ? pShell->GetModel() : nullptr;
}
- return 0;
+ return nullptr;
}
uno::Reference< beans::XPropertySetInfo > SAL_CALL
@@ -630,13 +630,13 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark *const pMark,
if (!xMark.is())
{
// FIXME: These belong in XTextFieldsSupplier
- SwXFieldmark* pXBkmk = NULL;
+ SwXFieldmark* pXBkmk = nullptr;
if (dynamic_cast< ::sw::mark::TextFieldmark* >(pMark))
pXBkmk = new SwXFieldmark(false, pMark, &rDoc);
else if (dynamic_cast< ::sw::mark::CheckboxFieldmark* >(pMark))
pXBkmk = new SwXFieldmark(true, pMark, &rDoc);
else
- pXBkmk = new SwXFieldmark(isReplacementObject, 0, &rDoc);
+ pXBkmk = new SwXFieldmark(isReplacementObject, nullptr, &rDoc);
xMark.set(pXBkmk);
pXBkmk->registerInMark(*pXBkmk, pMarkBase);
@@ -647,12 +647,12 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark *const pMark,
::sw::mark::ICheckboxFieldmark*
SwXFieldmark::getCheckboxFieldmark()
{
- ::sw::mark::ICheckboxFieldmark* pCheckboxFm = NULL;
+ ::sw::mark::ICheckboxFieldmark* pCheckboxFm = nullptr;
if ( getFieldType() == ODF_FORMCHECKBOX )
{
// evil #TODO #FIXME casting away the const-ness
pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
- OSL_ASSERT( GetBookmark() == 0 || pCheckboxFm != 0 );
+ OSL_ASSERT( GetBookmark() == nullptr || pCheckboxFm != nullptr );
// unclear to me whether GetBookmark() can be null here
}
return pCheckboxFm;
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index f962e82300bc..a97ba36b7f45 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -59,10 +59,10 @@ void SwChartHelper::DoUpdateAllCharts( SwDoc* pDoc )
SwOLENode *pONd;
SwStartNode *pStNd;
SwNodeIndex aIdx( *pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
- if (0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+ if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
pONd->GetOLEObj().GetObject().IsChart() )
{
// Load the object and set modified
@@ -110,7 +110,7 @@ void SwChartLockController_Helper::Disconnect()
{
aUnlockTimer.Stop();
UnlockAllCharts();
- pDoc = 0;
+ pDoc = nullptr;
}
void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
@@ -125,18 +125,18 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
const SwTableNode* pTableNd;
const SwFrameFormat* pFormat = rTableFormats[ n ];
- if( 0 != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
- 0 != ( pTableNd = pTmpTable->GetTableNode() ) &&
+ if( nullptr != ( pTmpTable = SwTable::FindTable( pFormat ) ) &&
+ nullptr != ( pTableNd = pTmpTable->GetTableNode() ) &&
pTableNd->GetNodes().IsDocNodes() )
{
uno::Reference< frame::XModel > xRes;
SwOLENode *pONd;
SwStartNode *pStNd;
SwNodeIndex aIdx( *pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
- if (0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+ if (nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) &&
!pONd->GetChartTableName().isEmpty() /* is chart object? */)
{
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
@@ -227,8 +227,8 @@ static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCrsr &rTable
pUnoTableCrsr->MakeBoxSels();
const SwStartNode* pStart;
- const SwTableBox* pStartBox = 0;
- const SwTableBox* pEndBox = 0;
+ const SwTableBox* pStartBox = nullptr;
+ const SwTableBox* pEndBox = nullptr;
pStart = pUnoTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
if (pStart)
@@ -344,7 +344,7 @@ static bool GetTableAndCellsFromRangeRep(
static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName,
SwFrameFormat **ppTableFormat, SwTable **ppTable)
{
- SwFrameFormat *pTableFormat = NULL;
+ SwFrameFormat *pTableFormat = nullptr;
// find frame format of table
//! see SwXTextTables::getByName
@@ -360,7 +360,7 @@ static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName,
*ppTableFormat = pTableFormat;
if (ppTable)
- *ppTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
+ *ppTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : nullptr;
}
static void GetFormatAndCreateCursorFromRangeRep(
@@ -378,30 +378,30 @@ static void GetFormatAndCreateCursorFromRangeRep(
if (!bNamesFound)
{
if (ppTblFmt)
- *ppTblFmt = NULL;
+ *ppTblFmt = nullptr;
rpUnoCrsr.reset();
}
else
{
- SwFrameFormat *pTableFormat = NULL;
+ SwFrameFormat *pTableFormat = nullptr;
// is the correct table format already provided?
- if (*ppTblFmt != NULL && (*ppTblFmt)->GetName() == aTableName)
+ if (*ppTblFmt != nullptr && (*ppTblFmt)->GetName() == aTableName)
pTableFormat = *ppTblFmt;
else
- GetTableByName( *pDoc, aTableName, &pTableFormat, NULL );
+ GetTableByName( *pDoc, aTableName, &pTableFormat, nullptr );
*ppTblFmt = pTableFormat;
rpUnoCrsr.reset(); // default result in case of failure
- SwTable *pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
+ SwTable *pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : nullptr;
// create new SwUnoCrsr spanning the specified range
//! see also SwXTextTable::GetRangeByName
// #i80314#
// perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTableBox(..)>
const SwTableBox* pTLBox =
- pTable ? pTable->GetTableBox( aStartCell, true ) : 0;
+ pTable ? pTable->GetTableBox( aStartCell, true ) : nullptr;
if(pTLBox)
{
const SwStartNode* pSttNd = pTLBox->GetSttNd();
@@ -670,7 +670,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
#endif
// get table format for that single table from above
- SwFrameFormat *pTableFormat = 0; // pointer to table format
+ SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCrsr> pUnoCrsr; // here required to check if the cells in the range do actually exist
if (aSubRanges.getLength() > 0)
GetFormatAndCreateCursorFromRangeRep( pDoc, pSubRanges[0], &pTableFormat, pUnoCrsr );
@@ -1039,8 +1039,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
return aResult;
}
- SwFrameFormat *pTableFormat = 0;
- SwTable *pTable = 0;
+ SwFrameFormat *pTableFormat = nullptr;
+ SwTable *pTable = nullptr;
OUString aTableName;
sal_Int32 nTableRows = 0;
sal_Int32 nTableCols = 0;
@@ -1366,7 +1366,7 @@ uno::Reference< chart2::data::XDataSequence > SwChartDataProvider::Impl_createDa
if (bDisposed)
throw lang::DisposedException();
- SwFrameFormat *pTableFormat = 0; // pointer to table format
+ SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCrsr> pUnoCrsr; // pointer to new created cursor spanning the cell range
GetFormatAndCreateCursorFromRangeRep( pDoc, rRangeRepresentation,
&pTableFormat, pUnoCrsr );
@@ -1551,7 +1551,7 @@ bool SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox &rB
Set_DataSequenceRef_t::iterator aDelIt; // iterator used for deletion when appropriate
while (aIt != aEndIt)
{
- SwChartDataSequence *pDataSeq = 0;
+ SwChartDataSequence *pDataSeq = nullptr;
bool bNowEmpty = false;
bool bSeqDisposed = false;
@@ -1739,12 +1739,12 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
// multiple ranges are delimited by a ';' like in
// "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges!
sal_Int32 nNumRanges = comphelper::string::getTokenCount(rRangeRepresentation, ';');
- SwTable* pFirstFoundTable = 0; // to check that only one table will be used
+ SwTable* pFirstFoundTable = nullptr; // to check that only one table will be used
sal_Int32 nPos = 0;
for (sal_Int32 i = 0; i < nNumRanges; ++i)
{
const OUString aRange( rRangeRepresentation.getToken(0, ';', nPos) );
- SwFrameFormat *pTableFormat = 0; // pointer to table format
+ SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCrsr> pCrsr;
GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTableFormat, pCrsr );
if (!pTableFormat)
@@ -2035,7 +2035,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
SwRangeDescriptor aDesc;
bool bOk = false;
SwFrameFormat* pTableFormat = GetFrameFormat();
- SwTable* pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : 0;
+ SwTable* pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : nullptr;
if (!pTableFormat || !pTable || pTable->IsTableComplex())
throw uno::RuntimeException();
else
@@ -2360,7 +2360,7 @@ void SAL_CALL SwChartDataSequence::disposing( const lang::EventObject& rSource )
throw lang::DisposedException();
if (rSource.Source == xDataProvider)
{
- pDataProvider = 0;
+ pDataProvider = nullptr;
xDataProvider.clear();
}
}
@@ -2580,9 +2580,9 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol,
if (!pUnoTableCrsr)
return false;
- const SwStartNode *pStartNd = 0;
- const SwTableBox *pStartBox = 0;
- const SwTableBox *pEndBox = 0;
+ const SwStartNode *pStartNd = nullptr;
+ const SwTableBox *pStartBox = nullptr;
+ const SwTableBox *pEndBox = nullptr;
const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
OSL_ENSURE( !pTable->IsTableComplex(), "table too complex" );
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 5c264916331f..39ae82535b1d 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -470,7 +470,7 @@ const SvEventDescription* sw_GetSupportedMacroItems()
{
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
return aMacroDescriptionsImpl;
@@ -526,39 +526,39 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
{
case SW_SERVICE_TYPE_TEXTTABLE:
{
- xRet = SwXTextTable::CreateXTextTable(0);
+ xRet = SwXTextTable::CreateXTextTable(nullptr);
}
break;
case SW_SERVICE_TYPE_TEXTFRAME:
{
- xRet = SwXTextFrame::CreateXTextFrame(rDoc, 0);
+ xRet = SwXTextFrame::CreateXTextFrame(rDoc, nullptr);
}
break;
case SW_SERVICE_TYPE_GRAPHIC :
case SW_SERVICE_TYPE_TEXT_GRAPHIC /* #i47503# */ :
{
- xRet = SwXTextGraphicObject::CreateXTextGraphicObject(rDoc, 0);
+ xRet = SwXTextGraphicObject::CreateXTextGraphicObject(rDoc, nullptr);
}
break;
case SW_SERVICE_TYPE_OLE :
{
- xRet = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(rDoc, 0);
+ xRet = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(rDoc, nullptr);
}
break;
case SW_SERVICE_TYPE_BOOKMARK :
{
- xRet = SwXBookmark::CreateXBookmark(rDoc, 0);
+ xRet = SwXBookmark::CreateXBookmark(rDoc, nullptr);
}
break;
case SW_SERVICE_TYPE_FIELDMARK :
{
- xRet = SwXFieldmark::CreateXFieldmark(rDoc, 0);
+ xRet = SwXFieldmark::CreateXFieldmark(rDoc, nullptr);
}
break;
case SW_SERVICE_TYPE_FORMFIELDMARK :
{
- xRet = SwXFieldmark::CreateXFieldmark(rDoc, 0, true);
+ xRet = SwXFieldmark::CreateXFieldmark(rDoc, nullptr, true);
}
break;
case SW_SERVICE_VBAOBJECTPROVIDER :
@@ -613,10 +613,10 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
break;
case SW_SERVICE_TYPE_FOOTNOTE :
- xRet = SwXFootnote::CreateXFootnote(rDoc, 0);
+ xRet = SwXFootnote::CreateXFootnote(rDoc, nullptr);
break;
case SW_SERVICE_TYPE_ENDNOTE :
- xRet = SwXFootnote::CreateXFootnote(rDoc, 0, true);
+ xRet = SwXFootnote::CreateXFootnote(rDoc, nullptr, true);
break;
case SW_SERVICE_CONTENT_INDEX_MARK :
case SW_SERVICE_USER_INDEX_MARK :
@@ -627,7 +627,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
eType = TOX_CONTENT;
else if(SW_SERVICE_USER_INDEX_MARK == nObjectType)
eType = TOX_USER;
- xRet = SwXDocumentIndexMark::CreateXDocumentIndexMark(rDoc, 0, eType);
+ xRet = SwXDocumentIndexMark::CreateXDocumentIndexMark(rDoc, nullptr, eType);
}
break;
case SW_SERVICE_CONTENT_INDEX :
@@ -659,17 +659,17 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
{
eType = TOX_TABLES;
}
- xRet = SwXDocumentIndex::CreateXDocumentIndex(rDoc, 0, eType);
+ xRet = SwXDocumentIndex::CreateXDocumentIndex(rDoc, nullptr, eType);
}
break;
case SW_SERVICE_INDEX_HEADER_SECTION :
case SW_SERVICE_TEXT_SECTION :
- xRet = SwXTextSection::CreateXTextSection(0,
+ xRet = SwXTextSection::CreateXTextSection(nullptr,
(SW_SERVICE_INDEX_HEADER_SECTION == nObjectType));
break;
case SW_SERVICE_REFERENCE_MARK :
- xRet = SwXReferenceMark::CreateXReferenceMark(rDoc, 0);
+ xRet = SwXReferenceMark::CreateXReferenceMark(rDoc, nullptr);
break;
case SW_SERVICE_STYLE_CHARACTER_STYLE:
case SW_SERVICE_STYLE_PARAGRAPH_STYLE:
@@ -756,10 +756,10 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
case SW_SERVICE_FIELDTYPE_DROPDOWN :
case SW_SERVICE_FIELDTYPE_TABLE_FORMULA:
// NOTE: the sw.SwXAutoTextEntry unoapi test depends on pDoc = 0
- xRet = SwXTextField::CreateXTextField(0, 0, nObjectType);
+ xRet = SwXTextField::CreateXTextField(nullptr, nullptr, nObjectType);
break;
case SW_SERVICE_FIELDTYPE_ANNOTATION:
- xRet = SwXTextField::CreateXTextField(&rDoc, 0, nObjectType);
+ xRet = SwXTextField::CreateXTextField(&rDoc, nullptr, nObjectType);
break;
case SW_SERVICE_FIELDMASTER_USER:
case SW_SERVICE_FIELDMASTER_DDE:
@@ -774,7 +774,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
case SW_SERVICE_FIELDMASTER_SET_EXP : nResId = RES_SETEXPFLD; break;
case SW_SERVICE_FIELDMASTER_DATABASE: nResId = RES_DBFLD; break;
}
- xRet = SwXFieldMaster::CreateXFieldMaster(&rDoc, 0, nResId);
+ xRet = SwXFieldMaster::CreateXFieldMaster(&rDoc, nullptr, nResId);
}
break;
case SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY:
@@ -789,7 +789,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
}
break;
case SW_SERVICE_PARAGRAPH :
- xRet = SwXParagraph::CreateXParagraph(rDoc, 0);
+ xRet = SwXParagraph::CreateXParagraph(rDoc, nullptr);
break;
case SW_SERVICE_NUMBERING_RULES :
xRet = static_cast<cppu::OWeakObject*>(new SwXNumberingRules(rDoc));
@@ -1089,7 +1089,7 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
const size_t nSize = pFormats->size();
::std::insert_iterator<frmcontainer_t> pInserter = ::std::insert_iterator<frmcontainer_t>(m_aFrames, m_aFrames.begin());
// #i104937#
- SwFrameFormat* pFormat( 0 );
+ SwFrameFormat* pFormat( nullptr );
std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
@@ -1261,11 +1261,11 @@ sal_Bool SwXFrames::hasByName(const OUString& rName) throw( uno::RuntimeExceptio
switch(m_eType)
{
case FLYCNTTYPE_GRF:
- return GetDoc()->FindFlyByName(rName, ND_GRFNODE) != NULL;
+ return GetDoc()->FindFlyByName(rName, ND_GRFNODE) != nullptr;
case FLYCNTTYPE_OLE:
- return GetDoc()->FindFlyByName(rName, ND_OLENODE) != NULL;
+ return GetDoc()->FindFlyByName(rName, ND_OLENODE) != nullptr;
default:
- return GetDoc()->FindFlyByName(rName, ND_TEXTNODE) != NULL;
+ return GetDoc()->FindFlyByName(rName, ND_TEXTNODE) != nullptr;
}
}
@@ -1975,7 +1975,7 @@ sal_Bool SwXReferenceMarks::hasByName(const OUString& rName) throw( uno::Runtime
SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return 0 != GetDoc()->GetRefMark( rName);
+ return nullptr != GetDoc()->GetRefMark( rName);
}
uno::Type SAL_CALL SwXReferenceMarks::getElementType() throw(uno::RuntimeException, std::exception)
@@ -1994,7 +1994,7 @@ sal_Bool SwXReferenceMarks::hasElements() throw( uno::RuntimeException, std::exc
void SwUnoCollection::Invalidate()
{
m_bObjectValid = false;
- m_pDoc = 0;
+ m_pDoc = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx
index 590ac66f89f0..d62096c8a3ee 100644
--- a/sw/source/core/unocore/unocrsr.cxx
+++ b/sw/source/core/unocore/unocrsr.cxx
@@ -62,7 +62,7 @@ bool SwUnoCrsr::IsReadOnlyAvailable() const
const SwContentFrm*
SwUnoCrsr::DoSetBidiLevelLeftRight( bool &, bool, bool )
{
- return 0; // not for uno cursor
+ return nullptr; // not for uno cursor
}
void SwUnoCrsr::DoSetBidiLevelUpDown()
@@ -97,7 +97,7 @@ bool SwUnoCrsr::IsSelOvr( int eFlags )
// (only over SwSection's !)
const SwStartNode* pInvalidNode;
do {
- pInvalidNode = 0;
+ pInvalidNode = nullptr;
pNewSttNd = rPtIdx.GetNode().StartOfSectionNode();
const SwStartNode *pSttNd = pNewSttNd, *pEndNd = pOldSttNd;
@@ -157,10 +157,10 @@ bool SwUnoCrsr::IsSelOvr( int eFlags )
}
SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos)
- : SwCursor(rPos, 0, false)
+ : SwCursor(rPos, nullptr, false)
, SwUnoCrsr(rPos)
, SwTableCursor(rPos)
- , m_aTableSel(rPos, 0, false)
+ , m_aTableSel(rPos, nullptr, false)
{
SetRemainInSection(false);
}
@@ -189,8 +189,8 @@ void SwUnoTableCrsr::MakeBoxSels()
const SwContentNode* pCNd;
bool bMakeTableCrsrs = true;
if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
- 0 != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )
+ nullptr != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
+ nullptr != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )
bMakeTableCrsrs = GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCrsrs( *this );
if ( !bMakeTableCrsrs )
@@ -209,8 +209,8 @@ void SwUnoTableCrsr::MakeBoxSels()
{
const SwTableBox* pBox;
const SwNode* pBoxNd = GetPoint()->nNode.GetNode().FindTableBoxStartNode();
- const SwTableNode* pTableNd = pBoxNd ? pBoxNd->FindTableNode() : 0;
- if( pTableNd && 0 != ( pBox = pTableNd->GetTable().GetTableBox( pBoxNd->GetIndex() )) )
+ const SwTableNode* pTableNd = pBoxNd ? pBoxNd->FindTableNode() : nullptr;
+ if( pTableNd && nullptr != ( pBox = pTableNd->GetTable().GetTableBox( pBoxNd->GetIndex() )) )
InsertBox( *pBox );
}
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 9953b6c2066b..17c67ffa5954 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -363,7 +363,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
case FN_UNO_PARA_STYLE :
{
- SwFormatColl* pFormat = 0;
+ SwFormatColl* pFormat = nullptr;
if(pNode)
pFormat = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID
? pNode->GetFormatColl() : &pNode->GetAnyFormatColl();
@@ -513,8 +513,8 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTextNode();
const SwTextAttr* pTextAttr = (pTextNd)
? pTextNd->GetFieldTextAttrAt( pPos->nContent.GetIndex(), true )
- : 0;
- if ( pTextAttr != NULL )
+ : nullptr;
+ if ( pTextAttr != nullptr )
{
if( pAny )
{
@@ -563,7 +563,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
SwStartNodeType eType = pSttNode->GetStartNodeType();
SwFrameFormat* pFormat;
- if(eType == SwFlyStartNode && 0 != (pFormat = pSttNode->GetFlyFormat()))
+ if(eType == SwFlyStartNode && nullptr != (pFormat = pSttNode->GetFlyFormat()))
{
if( pAny )
{
@@ -596,7 +596,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
SwTextAttr *const pTextAttr = rPam.GetNode().IsTextNode() ?
rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) : 0;
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) : nullptr;
if(pTextAttr)
{
const SwFormatFootnote& rFootnote = pTextAttr->GetFootnote();
@@ -646,7 +646,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
uno::Reference<XTextContent> const xRet(rPam.GetNode().IsTextNode()
? GetNestedTextContent(*rPam.GetNode().GetTextNode(),
rPam.GetPoint()->nContent.GetIndex(), false)
- : 0);
+ : nullptr);
if (xRet.is())
{
if (pAny)
@@ -750,7 +750,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
uno::Reference<XIndexReplace> xIndexReplace;
if(rValue >>= xIndexReplace)
{
- SwXNumberingRules* pSwNum = 0;
+ SwXNumberingRules* pSwNum = nullptr;
uno::Reference<XUnoTunnel> xNumTunnel(xIndexReplace, UNO_QUERY);
if(xNumTunnel.is())
@@ -779,14 +779,14 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
// FIXME
// Is something missing/wrong here?
// if condition is always false due to outer check!
- aFormat.SetCharFormat(0);
+ aFormat.SetCharFormat(nullptr);
}
else
{
// get CharStyle and set the rule
const size_t nChCount = pDoc->GetCharFormats()->size();
- SwCharFormat* pCharFormat = 0;
+ SwCharFormat* pCharFormat = nullptr;
for(size_t nCharFormat = 0; nCharFormat < nChCount; ++nCharFormat)
{
SwCharFormat& rChFormat = *((*(pDoc->GetCharFormats()))[nCharFormat]);
@@ -834,7 +834,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for ( size_t n = 0; n < aRangeArr.Count(); ++n )
@@ -842,7 +842,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
// no start of a new list
pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule, false );
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
{
@@ -924,12 +924,12 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
pDoc->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), 1 );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
pDoc->SetNodeNumStart( *rPam.GetPoint(), 0 );
@@ -955,7 +955,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
throw (lang::IllegalArgumentException, io::IOException,
uno::RuntimeException, std::exception)
{
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
SwDoc* pDoc = pUnoCrsr->GetDoc();
SwDocShell* pDocSh = pDoc->GetDocShell();
utl::MediaDescriptor aMediaDescriptor( rOptions );
@@ -1008,8 +1008,8 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
}
else
pMed = xReadStorage.is() ?
- new SfxMedium(xReadStorage, sBaseURL, 0 ) :
- new SfxMedium(sFileName, StreamMode::READ, 0, 0 );
+ new SfxMedium(xReadStorage, sBaseURL, nullptr ) :
+ new SfxMedium(sFileName, StreamMode::READ, nullptr, nullptr );
if( !sBaseURL.isEmpty() )
pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
@@ -1034,11 +1034,11 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
{
if( xReadStorage.is() )
{
- pMed = new SfxMedium(xReadStorage, sBaseURL, 0 );
+ pMed = new SfxMedium(xReadStorage, sBaseURL, nullptr );
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(sFileName, StreamMode::READ, pFilter, 0);
+ pMed = new SfxMedium(sFileName, StreamMode::READ, pFilter, nullptr);
}
}
if(!sFilterOptions.isEmpty())
@@ -1061,7 +1061,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL,
pSet->Put(SfxBoolItem(FN_API_CALL, true));
if(!sPassword.isEmpty())
pSet->Put(SfxStringItem(SID_PASSWORD, sPassword));
- Reader *pRead = pDocSh->StartConvertFrom( *pMed, &pRdr, 0, pUnoCrsr);
+ Reader *pRead = pDocSh->StartConvertFrom( *pMed, &pRdr, nullptr, pUnoCrsr);
if( pRead )
{
@@ -1204,7 +1204,7 @@ void makeRedline( SwPaM& rPaM,
DateTime( Date( aStamp.Day, aStamp.Month, aStamp.Year ), tools::Time( aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
}
- SwRedlineExtraData_FormattingChanges* pRedlineExtraData = NULL;
+ SwRedlineExtraData_FormattingChanges* pRedlineExtraData = nullptr;
// Read the 'Redline Revert Properties' from the parameters
uno::Sequence< beans::PropertyValue > aRevertProperties;
@@ -1332,7 +1332,7 @@ void makeTableRowRedline( SwTableLine& rTableLine,
SwTableRowRedline* pRedline = new SwTableRowRedline( aRedlineData, rTableLine );
RedlineMode_t nPrevMode = pRedlineAccess->GetRedlineMode( );
- pRedline->SetExtraData( NULL );
+ pRedline->SetExtraData( nullptr );
pRedlineAccess->SetRedlineMode_intern(nsRedlineMode_t::REDLINE_ON);
bool bRet = pRedlineAccess->AppendTableRowRedline( pRedline, false );
@@ -1389,7 +1389,7 @@ void makeTableCellRedline( SwTableBox& rTableBox,
SwTableCellRedline* pRedline = new SwTableCellRedline( aRedlineData, rTableBox );
RedlineMode_t nPrevMode = pRedlineAccess->GetRedlineMode( );
- pRedline->SetExtraData( NULL );
+ pRedline->SetExtraData( nullptr );
pRedlineAccess->SetRedlineMode_intern(nsRedlineMode_t::REDLINE_ON);
bool bRet = pRedlineAccess->AppendTableCellRedline( pRedline, false );
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index fb99025e305d..5577eb249738 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -92,12 +92,12 @@ public:
SwShapeDescriptor_Impl() :
// #i32349# - no defaults, in order to determine on
// adding a shape, if positioning attributes are set or not.
- pHOrient( 0L ),
- pVOrient( 0L ),
- pAnchor(0),
- pSurround(0),
- pULSpace(0),
- pLRSpace(0),
+ pHOrient( nullptr ),
+ pVOrient( nullptr ),
+ pAnchor(nullptr),
+ pSurround(nullptr),
+ pULSpace(nullptr),
+ pLRSpace(nullptr),
bOpaque(false),
// #i26791#
mpFollowTextFlow( new SwFormatFollowTextFlow( false ) ),
@@ -240,7 +240,7 @@ public:
};
SwFmDrawPage::SwFmDrawPage( SdrPage* pPage ) :
- SvxFmDrawPage( pPage ), pPageView(0)
+ SvxFmDrawPage( pPage ), pPageView(nullptr)
{
}
@@ -273,7 +273,7 @@ void SwFmDrawPage::RemovePageView()
{
if(pPageView && mpView)
mpView->HideSdrPage();
- pPageView = 0;
+ pPageView = nullptr;
}
uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj )
@@ -313,7 +313,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
SwDoc* pDoc = pFlyFormat->GetDoc();
const SwNodeIndex* pIdx;
if( RES_FLYFRMFMT == pFlyFormat->Which()
- && 0 != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
+ && nullptr != ( pIdx = pFlyFormat->GetContent().GetContentIdx() )
&& pIdx->GetNodes().IsDocNodes()
)
{
@@ -350,15 +350,15 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
}
uno::Reference< XUnoTunnel > xShapeTunnel(xRet, uno::UNO_QUERY);
//don't create an SwXShape if it already exists
- SwXShape* pShape = 0;
+ SwXShape* pShape = nullptr;
if(xShapeTunnel.is())
pShape = reinterpret_cast< SwXShape * >(
sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething(SwXShape::getUnoTunnelId()) ));
if(!pShape)
{
- xShapeTunnel = 0;
+ xShapeTunnel = nullptr;
uno::Reference< uno::XInterface > xCreate(xRet, uno::UNO_QUERY);
- xRet = 0;
+ xRet = nullptr;
uno::Reference< beans::XPropertySet > xPrSet;
if ( pObj->IsGroupObject() && (!pObj->Is3DObj() || (dynamic_cast<const E3dScene*>( pObj) != nullptr)) )
xPrSet = new SwXGroupShape( xCreate );
@@ -466,7 +466,7 @@ uno::Sequence< OUString > SwXDrawPage::getSupportedServiceNames() throw( uno::Ru
SwXDrawPage::SwXDrawPage(SwDoc* pDc) :
pDoc(pDc),
- pDrawPage(0)
+ pDrawPage(nullptr)
{
}
@@ -542,7 +542,7 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException, std::exception )
{
- return getByIndex(nIndex, 0);
+ return getByIndex(nIndex, nullptr);
}
uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex, std::set<const SwFrameFormat*>* pTextBoxes)
@@ -591,8 +591,8 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
if(!pDoc)
throw uno::RuntimeException();
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
- SwXShape* pShape = 0;
- SvxShape* pSvxShape = 0;
+ SwXShape* pShape = nullptr;
+ SvxShape* pSvxShape = nullptr;
if(xShapeTunnel.is())
{
pShape = reinterpret_cast< SwXShape * >(
@@ -701,7 +701,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pObj->SetLayer(pDoc->getIDocumentDrawModelAccess().GetInvisibleControlsId());
SwPaM* pPam = new SwPaM(pDoc->GetNodes().GetEndOfContent());
- SwUnoInternalPaM* pInternalPam = 0;
+ SwUnoInternalPaM* pInternalPam = nullptr;
uno::Reference< text::XTextRange > xRg;
if( pDesc && (xRg = pDesc->GetTextRange()).is() )
{
@@ -794,7 +794,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
if( !bFlyInCnt )
{
UnoActionContext aContext(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor(
@@ -808,7 +808,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
uno::Reference< uno::XInterface > xInt = SwFmDrawPage::GetInterface( pContact->GetMaster() );
xRet.set(xInt, uno::UNO_QUERY);
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
}
pPage->RemovePageView();
@@ -829,13 +829,13 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeG
{
pPage->PreUnGroup(rShapeGroup);
UnoActionContext aContext(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
pDoc->UnGroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
FLY_AT_PARA,
true, false );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
pPage->RemovePageView();
}
}
@@ -870,7 +870,7 @@ SwFmDrawPage* SwXDrawPage::GetSvxPage()
*/
void SwXDrawPage::InvalidateSwDoc()
{
- pDoc = 0;
+ pDoc = nullptr;
}
SwDoc* SwXDrawPage::GetDoc()
@@ -945,19 +945,19 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
"<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
}
}
- xShape = 0;
+ xShape = nullptr;
m_refCount++;
if( xShapeAgg.is() )
xShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
m_refCount--;
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShapeAgg, uno::UNO_QUERY);
- SvxShape* pShape = 0;
+ SvxShape* pShape = nullptr;
if(xShapeTunnel.is())
pShape = reinterpret_cast< SvxShape * >(
sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething(SvxShape::getUnoTunnelId()) ));
- SdrObject* pObj = pShape ? pShape->GetSdrObject() : 0;
+ SdrObject* pObj = pShape ? pShape->GetSdrObject() : nullptr;
if(pObj)
{
SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
@@ -980,7 +980,7 @@ void SwXShape::AddExistingShapeToFormat( SdrObject& _rObj )
if ( !pCurrent )
continue;
- SwXShape* pSwShape = NULL;
+ SwXShape* pSwShape = nullptr;
uno::Reference< lang::XUnoTunnel > xShapeTunnel( pCurrent->getWeakUnoShape(), uno::UNO_QUERY );
if ( xShapeTunnel.is() )
pSwShape = reinterpret_cast< SwXShape * >(
@@ -1118,7 +1118,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SwXFrame* pFrame = xTunnel.is() ?
reinterpret_cast< SwXFrame * >(
sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXFrame::getUnoTunnelId()) ))
- : 0;
+ : nullptr;
if(pFrame && pFrame->GetFrameFormat() &&
pFrame->GetFrameFormat()->GetDoc() == pDoc)
{
@@ -1394,7 +1394,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
}
else
{
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
switch(pEntry->nWID)
{
case RES_ANCHOR:
@@ -1554,7 +1554,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
= SwXTextRange::CreateXTextRange(
*pFormat->GetDoc(),
*aAnchor.GetContentAnchor(),
- 0L );
+ nullptr );
aRet.setValue(&xTextRange, cppu::UnoType<text::XTextRange>::get());
}
else
@@ -1645,7 +1645,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else
{
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
switch(pEntry->nWID)
{
case RES_ANCHOR:
@@ -1827,10 +1827,10 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
SvxShape* pSvxShape = GetSvxShape();
bool bGroupMember = false;
bool bFormControl = false;
- SdrObject* pObject = pSvxShape ? pSvxShape->GetSdrObject() : NULL;
+ SdrObject* pObject = pSvxShape ? pSvxShape->GetSdrObject() : nullptr;
if(pObject)
{
- bGroupMember = pObject->GetUpGroup() != 0;
+ bGroupMember = pObject->GetUpGroup() != nullptr;
bFormControl = pObject->GetObjInventor() == FmFormInventor;
}
const OUString* pNames = aPropertyNames.getConstArray();
@@ -1876,7 +1876,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
}
else
{
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
switch(pEntry->nWID)
{
case RES_ANCHOR:
@@ -2087,15 +2087,15 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
// get access to SwDoc
// (see also SwXTextRange::XTextRangeToSwPaM)
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
if(xRangeTunnel.is())
{
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- SwXTextPortion* pPortion = 0;
- SwXText* pText = 0;
- SwXParagraph* pParagraph = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
+ SwXTextPortion* pPortion = nullptr;
+ SwXText* pText = nullptr;
+ SwXParagraph* pParagraph = nullptr;
pRange = reinterpret_cast< SwXTextRange * >(
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) ));
@@ -2162,7 +2162,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor() throw( uno::RuntimeExc
(rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
- aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, 0);
+ aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, nullptr);
}
}
else
@@ -2178,7 +2178,7 @@ void SwXShape::dispose() throw( uno::RuntimeException, std::exception )
{
// determine correct <SdrObject>
SvxShape* pSvxShape = GetSvxShape();
- SdrObject* pObj = pSvxShape ? pSvxShape->GetSdrObject() : NULL;
+ SdrObject* pObj = pSvxShape ? pSvxShape->GetSdrObject() : nullptr;
// safety assertion:
// <pObj> must be the same as <pFormat->FindSdrObject()>, if <pObj> isn't
// a 'virtual' drawing object.
@@ -2267,7 +2267,7 @@ uno::Sequence< OUString > SwXShape::getSupportedServiceNames() throw( uno::Runti
SvxShape* SwXShape::GetSvxShape()
{
- SvxShape* pSvxShape = 0;
+ SvxShape* pSvxShape = nullptr;
if(xShapeAgg.is())
{
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShapeAgg, uno::UNO_QUERY);
@@ -2444,7 +2444,7 @@ OUString SAL_CALL SwXShape::getShapeType() throw ( uno::RuntimeException, std::e
*/
SdrObject* SwXShape::_GetTopGroupObj( SvxShape* _pSvxShape )
{
- SdrObject* pTopGroupObj( 0L );
+ SdrObject* pTopGroupObj( nullptr );
SvxShape* pSvxShape = _pSvxShape ? _pSvxShape : GetSvxShape();
if ( pSvxShape )
@@ -2837,7 +2837,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
throw uno::RuntimeException();
uno::Reference<lang::XUnoTunnel> xTunnel(xShape, uno::UNO_QUERY);
- SwXShape* pSwShape = 0;
+ SwXShape* pSwShape = nullptr;
if(xShape.is())
pSwShape = reinterpret_cast< SwXShape * >(
sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXShape::getUnoTunnelId()) ));
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 791cad3e7556..d3652c61c8ac 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -51,7 +51,7 @@ const struct SvEventDescription aGraphicEvents[] =
{ SVX_EVENT_IMAGE_LOAD, "OnLoadDone" },
{ SVX_EVENT_IMAGE_ABORT, "OnLoadCancel" },
{ SVX_EVENT_IMAGE_ERROR, "OnLoadError" },
- { 0, NULL }
+ { 0, nullptr }
};
const struct SvEventDescription aFrameEvents[] =
@@ -64,7 +64,7 @@ const struct SvEventDescription aFrameEvents[] =
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSECLICK_OBJECT, "OnClick" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
const struct SvEventDescription aOLEEvents[] =
@@ -73,7 +73,7 @@ const struct SvEventDescription aOLEEvents[] =
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSECLICK_OBJECT, "OnClick" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
const struct SvEventDescription aHyperlinkEvents[] =
@@ -81,7 +81,7 @@ const struct SvEventDescription aHyperlinkEvents[] =
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSECLICK_OBJECT, "OnClick" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
const struct SvEventDescription aFrameStyleEvents[] =
@@ -97,7 +97,7 @@ const struct SvEventDescription aFrameStyleEvents[] =
{ SVX_EVENT_IMAGE_LOAD, "OnLoadDone" },
{ SVX_EVENT_IMAGE_ABORT, "OnLoadCancel" },
{ SVX_EVENT_IMAGE_ERROR, "OnLoadError" },
- { 0, NULL }
+ { 0, nullptr }
};
SwHyperlinkEventDescriptor::SwHyperlinkEventDescriptor() :
@@ -123,7 +123,7 @@ void SwHyperlinkEventDescriptor::copyMacrosFromINetFormat(
{
const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
const SvxMacro* aMacro = aFormat.GetMacro(nEvent);
- if (NULL != aMacro)
+ if (nullptr != aMacro)
replaceByName(nEvent, *aMacro);
}
}
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a9dde64b999a..258b4f1de1f1 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -810,7 +810,7 @@ SwFieldType* SwXFieldMaster::GetFieldType(bool const bDontCreate) const
}
#endif
if (m_pImpl->m_bIsDescriptor)
- return 0;
+ return nullptr;
else
return static_cast<SwFieldType*>(m_pImpl->GetRegisteredIn());
}
@@ -880,7 +880,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
aRet >>= aDataSource;
aRet <<= OUString();
- OUString *pStr = 0; // only one of this properties will return
+ OUString *pStr = nullptr; // only one of this properties will return
// a non-empty string.
INetURLObject aObj;
aObj.SetURL( aDataSource );
@@ -1033,7 +1033,7 @@ void SwXFieldMaster::Impl::Modify(
return; // core object still alive
}
- m_pDoc = 0;
+ m_pDoc = nullptr;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -1109,7 +1109,7 @@ struct SwFieldProperties_Impl
SwFieldProperties_Impl():
aDate( Date::EMPTY ),
fDouble(0.),
- pDateTime(0),
+ pDateTime(nullptr),
nSubType(0),
nFormat(0),
nUSHORT1(0),
@@ -1155,13 +1155,13 @@ public:
, m_EventListeners(m_Mutex)
, m_pFormatField(pFormat)
, m_pDoc(pDoc)
- , m_pTextObject(0)
- , m_bIsDescriptor(pFormat == 0)
+ , m_pTextObject(nullptr)
+ , m_bIsDescriptor(pFormat == nullptr)
, m_bCallUpdate(false)
, m_nServiceId((pFormat)
? lcl_GetServiceForField(*pFormat->GetField())
: nServiceId)
- , m_pProps((pFormat) ? 0 : new SwFieldProperties_Impl)
+ , m_pProps((pFormat) ? nullptr : new SwFieldProperties_Impl)
{ }
virtual ~Impl()
@@ -1202,7 +1202,7 @@ throw (uno::RuntimeException, std::exception)
SwXTextField::SwXTextField(
sal_uInt16 nServiceId,
SwDoc* pDoc)
- : m_pImpl(new Impl(pDoc, 0, nServiceId))
+ : m_pImpl(new Impl(pDoc, nullptr, nServiceId))
{
//Set visible as default!
if ( SW_SERVICE_FIELDTYPE_SET_EXP == nServiceId
@@ -1278,7 +1278,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwXFieldMaster* pMaster = reinterpret_cast< SwXFieldMaster * >(
sal::static_int_cast< sal_IntPtr >( xMasterTunnel->getSomething( SwXFieldMaster::getUnoTunnelId()) ));
- SwFieldType* pFieldType = pMaster ? pMaster->GetFieldType() : 0;
+ SwFieldType* pFieldType = pMaster ? pMaster->GetFieldType() : nullptr;
if (!pFieldType ||
pFieldType->Which() != lcl_ServiceIdToResId(m_pImpl->m_nServiceId))
{
@@ -1292,7 +1292,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL
SwXTextField::getTextFieldMaster() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
if (m_pImpl->m_bIsDescriptor && m_pImpl->m_FieldTypeClient.GetRegisteredIn())
{
pType = static_cast<SwFieldType*>(
@@ -1331,8 +1331,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_bIsDescriptor)
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = reinterpret_cast< SwXTextRange * >(
@@ -1341,7 +1341,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
}
- SwDoc* pDoc = pRange ? &pRange->GetDoc() : pCursor ? pCursor->GetDoc() : 0;
+ SwDoc* pDoc = pRange ? &pRange->GetDoc() : pCursor ? pCursor->GetDoc() : nullptr;
// if a FieldMaster was attached, then the document is already fixed!
// NOTE: sw.SwXAutoTextEntry unoapi test depends on m_pDoc = 0 being valid
if (!pDoc || (m_pImpl->m_pDoc && m_pImpl->m_pDoc != pDoc))
@@ -1350,7 +1350,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwUnoInternalPaM aPam(*pDoc);
// this now needs to return TRUE
::sw::XTextRangeToSwPaM(aPam, xTextRange);
- SwField* pField = 0;
+ SwField* pField = nullptr;
switch (m_pImpl->m_nServiceId)
{
case SW_SERVICE_FIELDTYPE_ANNOTATION:
@@ -1974,8 +1974,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
// create annotation mark
const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTextAttr->GetFormatField().GetField());
- OSL_ENSURE( pPostItField != NULL, "<SwXTextField::attachToRange(..)> - annotation field missing!" );
- if ( pPostItField != NULL )
+ OSL_ENSURE( pPostItField != nullptr, "<SwXTextField::attachToRange(..)> - annotation field missing!" );
+ if ( pPostItField != nullptr )
{
IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess();
pMarksAccess->makeAnnotationMark( aPam, pPostItField->GetName() );
@@ -2000,8 +2000,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
if (m_pImpl->m_bCallUpdate)
update();
}
- else if ( m_pImpl->m_pFormatField != NULL
- && m_pImpl->m_pDoc != NULL
+ else if ( m_pImpl->m_pFormatField != nullptr
+ && m_pImpl->m_pDoc != nullptr
&& m_pImpl->m_nServiceId == SW_SERVICE_FIELDTYPE_ANNOTATION )
{
SwUnoInternalPaM aIntPam( *m_pImpl->m_pDoc );
@@ -2030,7 +2030,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
// keep inserted annotation
{
SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
- if ( pTextAttr != NULL )
+ if ( pTextAttr != nullptr )
{
m_pImpl->m_pFormatField = &pTextAttr->GetFormatField();
@@ -2038,8 +2038,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
// create annotation mark
const SwPostItField* pField = dynamic_cast< const SwPostItField* >(pTextAttr->GetFormatField().GetField());
- OSL_ENSURE( pField != NULL, "<SwXTextField::attach(..)> - annotation field missing!" );
- if ( pField != NULL )
+ OSL_ENSURE( pField != nullptr, "<SwXTextField::attach(..)> - annotation field missing!" );
+ if ( pField != nullptr )
{
IDocumentMarkAccess* pMarksAccess = aIntPam.GetDoc()->getIDocumentMarkAccess();
pMarksAccess->makeAnnotationMark( aIntPam, pField->GetName() );
@@ -2063,7 +2063,7 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
SwField const*const pField = m_pImpl->GetField();
if (!pField)
- return 0;
+ return nullptr;
const SwTextField* pTextField = m_pImpl->m_pFormatField->GetTextField();
if (!pTextField)
@@ -2071,8 +2071,8 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
std::shared_ptr< SwPaM > pPamForTextField;
SwTextField::GetPamForTextField(*pTextField, pPamForTextField);
- if (pPamForTextField.get() == NULL)
- return 0;
+ if (pPamForTextField.get() == nullptr)
+ return nullptr;
// If this is a postit field, then return the range of its annotation mark if it has one.
if (pField->Which() == RES_POSTITFLD)
@@ -2110,7 +2110,7 @@ void SAL_CALL SwXTextField::dispose() throw (uno::RuntimeException, std::excepti
{
m_pImpl->m_pTextObject->DisposeEditSource();
m_pImpl->m_pTextObject->release();
- m_pImpl->m_pTextObject = 0;
+ m_pImpl->m_pTextObject = nullptr;
}
}
@@ -2200,7 +2200,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
if (RES_POSTITFLD == nWhich && m_pImpl->m_pFormatField)
{
const_cast<SwFormatField*>(m_pImpl->m_pFormatField)->Broadcast(
- SwFormatFieldHint( 0, SwFormatFieldHintWhich::CHANGED ));
+ SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::CHANGED ));
}
// fdo#42073 notify SwTextField about changes of the expanded string
@@ -2217,7 +2217,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else if (m_pImpl->m_pProps)
{
- bool* pBool = 0;
+ bool* pBool = nullptr;
switch(pEntry->nWID)
{
case FIELD_PROP_PAR1:
@@ -2355,8 +2355,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
// correctly evaluated the document needs a layout
// (has to be already formatted)
SwDoc *pDoc = m_pImpl->m_pDoc;
- SwViewShell *pViewShell = 0;
- SwEditShell *pEditShell = 0;
+ SwViewShell *pViewShell = nullptr;
+ SwEditShell *pEditShell = nullptr;
if( pDoc )
{
pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -2372,9 +2372,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
// get text node for the text field
const SwFormatField *pFieldFormat =
- (m_pImpl->GetField()) ? m_pImpl->m_pFormatField : 0;
+ (m_pImpl->GetField()) ? m_pImpl->m_pFormatField : nullptr;
const SwTextField* pTextField = (pFieldFormat)
- ? m_pImpl->m_pFormatField->GetTextField() : 0;
+ ? m_pImpl->m_pFormatField->GetTextField() : nullptr;
if(!pTextField)
throw uno::RuntimeException();
const SwTextNode& rTextNode = pTextField->GetTextNode();
@@ -2568,7 +2568,7 @@ void SAL_CALL SwXTextField::update() throw (uno::RuntimeException, std::exceptio
break;
}
// Text formatting has to be triggered.
- const_cast<SwFormatField*>(m_pImpl->m_pFormatField)->ModifyNotification(0, 0);
+ const_cast<SwFormatField*>(m_pImpl->m_pFormatField)->ModifyNotification(nullptr, nullptr);
}
else
m_pImpl->m_bCallUpdate = true;
@@ -2627,8 +2627,8 @@ void SwXTextField::Impl::Invalidate()
if (GetRegisteredIn())
{
GetRegisteredInNonConst()->Remove(this);
- m_pFormatField = 0;
- m_pDoc = 0;
+ m_pFormatField = nullptr;
+ m_pDoc = nullptr;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -2665,7 +2665,7 @@ const SwField* SwXTextField::Impl::GetField() const
{
return m_pFormatField->GetField();
}
- return 0;
+ return nullptr;
}
OUString SwXTextFieldMasters::getImplementationName() throw( uno::RuntimeException, std::exception )
@@ -2849,7 +2849,7 @@ sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::Runti
if( USHRT_MAX != nResId )
{
sName = sName.copy(std::min(sTypeName.getLength()+1, sName.getLength()));
- bRet = USHRT_MAX != nResId && 0 != GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true);
+ bRet = USHRT_MAX != nResId && nullptr != GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true);
}
return bRet;
}
@@ -2944,7 +2944,7 @@ void SAL_CALL SwXTextFieldTypes::refresh() throw (uno::RuntimeException, std::ex
throw uno::RuntimeException();
UnoActionContext aContext(GetDoc());
GetDoc()->getIDocumentStatistics().UpdateDocStat( false, true );
- GetDoc()->getIDocumentFieldsAccess().UpdateFields(0, false);
+ GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
}
// call refresh listeners (without SolarMutex locked)
lang::EventObject const event(static_cast< ::cppu::OWeakObject*>(this));
@@ -3097,7 +3097,7 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
m_pImpl->m_Items.getArray()[ m_pImpl->m_nNextIndex++ ];
uno::Any aRet;
aRet <<= rxField;
- rxField = 0; // free memory for item that is not longer used
+ rxField = nullptr; // free memory for item that is not longer used
return aRet;
}
@@ -3106,7 +3106,7 @@ void SwXFieldEnumeration::Impl::Modify(
{
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
- m_pDoc = 0;
+ m_pDoc = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 62f77d861c97..8f9db59d9fdb 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -235,7 +235,7 @@ sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType ) throw (uno::R
sal_Bool SAL_CALL SwXFlatParagraph::isModified() throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return 0 == GetTextNode();
+ return nullptr == GetTextNode();
}
// text::XFlatParagraph:
@@ -373,7 +373,7 @@ void SwXFlatParagraphIterator::Modify( const SfxPoolItem* pOld, const SfxPoolIte
if(!GetRegisteredIn())
{
SolarMutexGuard aGuard;
- mpDoc = 0;
+ mpDoc = nullptr;
}
}
@@ -392,14 +392,14 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
if (!mpDoc)
return xRet;
- SwTextNode* pRet = 0;
+ SwTextNode* pRet = nullptr;
if ( mbAutomatic )
{
SwViewShell* pViewShell = mpDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
- SwPageFrm* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : 0;
+ SwPageFrm* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : nullptr;
SwPageFrm* pStartPage = pCurrentPage;
- SwPageFrm* pStopPage = 0;
+ SwPageFrm* pStopPage = nullptr;
while ( pCurrentPage && pCurrentPage != pStopPage )
{
@@ -512,7 +512,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
if ( !pCurrentNode )
return xRet;
- SwTextNode* pNextTextNode = 0;
+ SwTextNode* pNextTextNode = nullptr;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
@@ -558,7 +558,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
if ( !pCurrentNode )
return xRet;
- SwTextNode* pPrevTextNode = 0;
+ SwTextNode* pPrevTextNode = nullptr;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 28eb646c804c..feed9a498431 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -200,14 +200,14 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
rToSet.Put(aAnchor);
//UUUU check for SvxBrushItem (RES_BACKGROUND) properties
- const ::uno::Any* pCol = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR, pCol );
- const ::uno::Any* pRGBCol = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_R_G_B, pRGBCol );
- const ::uno::Any* pColTrans = 0; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_TRANSPARENCY, pColTrans);
- const ::uno::Any* pTrans = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENT, pTrans );
- const ::uno::Any* pGrLoc = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_POSITION, pGrLoc );
- const ::uno::Any* pGrURL = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_URL, pGrURL );
- const ::uno::Any* pGrFilter = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_FILTER, pGrFilter );
- const ::uno::Any* pGrTranparency = 0; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENCY, pGrTranparency );
+ const ::uno::Any* pCol = nullptr; GetProperty(RES_BACKGROUND, MID_BACK_COLOR, pCol );
+ const ::uno::Any* pRGBCol = nullptr; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_R_G_B, pRGBCol );
+ const ::uno::Any* pColTrans = nullptr; GetProperty(RES_BACKGROUND, MID_BACK_COLOR_TRANSPARENCY, pColTrans);
+ const ::uno::Any* pTrans = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENT, pTrans );
+ const ::uno::Any* pGrLoc = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_POSITION, pGrLoc );
+ const ::uno::Any* pGrURL = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_URL, pGrURL );
+ const ::uno::Any* pGrFilter = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_FILTER, pGrFilter );
+ const ::uno::Any* pGrTranparency = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENCY, pGrTranparency );
const bool bSvxBrushItemPropertiesUsed(
pCol ||
pTrans ||
@@ -219,40 +219,40 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
pRGBCol);
//UUUU check for FillStyle properties in the range XATTR_FILL_FIRST, XATTR_FILL_LAST
- const uno::Any* pXFillStyleItem = 0; GetProperty(XATTR_FILLSTYLE, 0, pXFillStyleItem);
- const uno::Any* pXFillColorItem = 0; GetProperty(XATTR_FILLCOLOR, 0, pXFillColorItem);
+ const uno::Any* pXFillStyleItem = nullptr; GetProperty(XATTR_FILLSTYLE, 0, pXFillStyleItem);
+ const uno::Any* pXFillColorItem = nullptr; GetProperty(XATTR_FILLCOLOR, 0, pXFillColorItem);
// XFillGradientItem: two possible slots supported in UNO API
- const uno::Any* pXFillGradientItem = 0; GetProperty(XATTR_FILLGRADIENT, MID_FILLGRADIENT, pXFillGradientItem);
- const uno::Any* pXFillGradientNameItem = 0; GetProperty(XATTR_FILLGRADIENT, MID_NAME, pXFillGradientNameItem);
+ const uno::Any* pXFillGradientItem = nullptr; GetProperty(XATTR_FILLGRADIENT, MID_FILLGRADIENT, pXFillGradientItem);
+ const uno::Any* pXFillGradientNameItem = nullptr; GetProperty(XATTR_FILLGRADIENT, MID_NAME, pXFillGradientNameItem);
// XFillHatchItem: two possible slots supported in UNO API
- const uno::Any* pXFillHatchItem = 0; GetProperty(XATTR_FILLHATCH, MID_FILLHATCH, pXFillHatchItem);
- const uno::Any* pXFillHatchNameItem = 0; GetProperty(XATTR_FILLHATCH, MID_NAME, pXFillHatchNameItem);
+ const uno::Any* pXFillHatchItem = nullptr; GetProperty(XATTR_FILLHATCH, MID_FILLHATCH, pXFillHatchItem);
+ const uno::Any* pXFillHatchNameItem = nullptr; GetProperty(XATTR_FILLHATCH, MID_NAME, pXFillHatchNameItem);
// XFillBitmapItem: three possible slots supported in UNO API
- const uno::Any* pXFillBitmapItem = 0; GetProperty(XATTR_FILLBITMAP, MID_BITMAP, pXFillBitmapItem);
- const uno::Any* pXFillBitmapNameItem = 0; GetProperty(XATTR_FILLBITMAP, MID_NAME, pXFillBitmapNameItem);
- const uno::Any* pXFillBitmapURLItem = 0; GetProperty(XATTR_FILLBITMAP, MID_GRAFURL, pXFillBitmapURLItem);
+ const uno::Any* pXFillBitmapItem = nullptr; GetProperty(XATTR_FILLBITMAP, MID_BITMAP, pXFillBitmapItem);
+ const uno::Any* pXFillBitmapNameItem = nullptr; GetProperty(XATTR_FILLBITMAP, MID_NAME, pXFillBitmapNameItem);
+ const uno::Any* pXFillBitmapURLItem = nullptr; GetProperty(XATTR_FILLBITMAP, MID_GRAFURL, pXFillBitmapURLItem);
- const uno::Any* pXFillTransparenceItem = 0; GetProperty(XATTR_FILLTRANSPARENCE, 0, pXFillTransparenceItem);
- const uno::Any* pXGradientStepCountItem = 0; GetProperty(XATTR_GRADIENTSTEPCOUNT, 0, pXGradientStepCountItem);
- const uno::Any* pXFillBmpPosItem = 0; GetProperty(XATTR_FILLBMP_POS, 0, pXFillBmpPosItem);
- const uno::Any* pXFillBmpSizeXItem = 0; GetProperty(XATTR_FILLBMP_SIZEX, 0, pXFillBmpSizeXItem);
- const uno::Any* pXFillBmpSizeYItem = 0; GetProperty(XATTR_FILLBMP_SIZEY, 0, pXFillBmpSizeYItem);
+ const uno::Any* pXFillTransparenceItem = nullptr; GetProperty(XATTR_FILLTRANSPARENCE, 0, pXFillTransparenceItem);
+ const uno::Any* pXGradientStepCountItem = nullptr; GetProperty(XATTR_GRADIENTSTEPCOUNT, 0, pXGradientStepCountItem);
+ const uno::Any* pXFillBmpPosItem = nullptr; GetProperty(XATTR_FILLBMP_POS, 0, pXFillBmpPosItem);
+ const uno::Any* pXFillBmpSizeXItem = nullptr; GetProperty(XATTR_FILLBMP_SIZEX, 0, pXFillBmpSizeXItem);
+ const uno::Any* pXFillBmpSizeYItem = nullptr; GetProperty(XATTR_FILLBMP_SIZEY, 0, pXFillBmpSizeYItem);
// XFillFloatTransparenceItem: two possible slots supported in UNO API
- const uno::Any* pXFillFloatTransparenceItem = 0; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT, pXFillFloatTransparenceItem);
- const uno::Any* pXFillFloatTransparenceNameItem = 0; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_NAME, pXFillFloatTransparenceNameItem);
-
- const uno::Any* pXSecondaryFillColorItem = 0; GetProperty(XATTR_SECONDARYFILLCOLOR, 0, pXSecondaryFillColorItem);
- const uno::Any* pXFillBmpSizeLogItem = 0; GetProperty(XATTR_FILLBMP_SIZELOG, 0, pXFillBmpSizeLogItem);
- const uno::Any* pXFillBmpTileOffsetXItem = 0; GetProperty(XATTR_FILLBMP_TILEOFFSETX, 0, pXFillBmpTileOffsetXItem);
- const uno::Any* pXFillBmpTileOffsetYItem = 0; GetProperty(XATTR_FILLBMP_TILEOFFSETY, 0, pXFillBmpTileOffsetYItem);
- const uno::Any* pXFillBmpPosOffsetXItem = 0; GetProperty(XATTR_FILLBMP_POSOFFSETX, 0, pXFillBmpPosOffsetXItem);
- const uno::Any* pXFillBmpPosOffsetYItem = 0; GetProperty(XATTR_FILLBMP_POSOFFSETY, 0, pXFillBmpPosOffsetYItem);
- const uno::Any* pXFillBackgroundItem = 0; GetProperty(XATTR_FILLBACKGROUND, 0, pXFillBackgroundItem);
- const uno::Any* pOwnAttrFillBmpItem = 0; GetProperty(OWN_ATTR_FILLBMP_MODE, 0, pOwnAttrFillBmpItem);
+ const uno::Any* pXFillFloatTransparenceItem = nullptr; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT, pXFillFloatTransparenceItem);
+ const uno::Any* pXFillFloatTransparenceNameItem = nullptr; GetProperty(XATTR_FILLFLOATTRANSPARENCE, MID_NAME, pXFillFloatTransparenceNameItem);
+
+ const uno::Any* pXSecondaryFillColorItem = nullptr; GetProperty(XATTR_SECONDARYFILLCOLOR, 0, pXSecondaryFillColorItem);
+ const uno::Any* pXFillBmpSizeLogItem = nullptr; GetProperty(XATTR_FILLBMP_SIZELOG, 0, pXFillBmpSizeLogItem);
+ const uno::Any* pXFillBmpTileOffsetXItem = nullptr; GetProperty(XATTR_FILLBMP_TILEOFFSETX, 0, pXFillBmpTileOffsetXItem);
+ const uno::Any* pXFillBmpTileOffsetYItem = nullptr; GetProperty(XATTR_FILLBMP_TILEOFFSETY, 0, pXFillBmpTileOffsetYItem);
+ const uno::Any* pXFillBmpPosOffsetXItem = nullptr; GetProperty(XATTR_FILLBMP_POSOFFSETX, 0, pXFillBmpPosOffsetXItem);
+ const uno::Any* pXFillBmpPosOffsetYItem = nullptr; GetProperty(XATTR_FILLBMP_POSOFFSETY, 0, pXFillBmpPosOffsetYItem);
+ const uno::Any* pXFillBackgroundItem = nullptr; GetProperty(XATTR_FILLBACKGROUND, 0, pXFillBackgroundItem);
+ const uno::Any* pOwnAttrFillBmpItem = nullptr; GetProperty(OWN_ATTR_FILLBMP_MODE, 0, pOwnAttrFillBmpItem);
// tdf#91140: ignore SOLID fill style for determining if fill style is used
// but there is a GraphicURL
@@ -627,11 +627,11 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
}
{
- const ::uno::Any* pCont = 0;
+ const ::uno::Any* pCont = nullptr;
GetProperty(RES_PROTECT, MID_PROTECT_CONTENT, pCont );
- const ::uno::Any* pPos = 0;
+ const ::uno::Any* pPos = nullptr;
GetProperty(RES_PROTECT,MID_PROTECT_POSITION, pPos );
- const ::uno::Any* pName = 0;
+ const ::uno::Any* pName = nullptr;
GetProperty(RES_PROTECT, MID_PROTECT_SIZE, pName );
if(pCont||pPos||pName)
{
@@ -646,13 +646,13 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
}
{
- const ::uno::Any* pHori = 0;
+ const ::uno::Any* pHori = nullptr;
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_ORIENT, pHori );
- const ::uno::Any* pHoriP = 0;
+ const ::uno::Any* pHoriP = nullptr;
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_POSITION|CONVERT_TWIPS, pHoriP );
- const ::uno::Any* pHoriR = 0;
+ const ::uno::Any* pHoriR = nullptr;
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_RELATION, pHoriR );
- const ::uno::Any* pPageT = 0;
+ const ::uno::Any* pPageT = nullptr;
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_PAGETOGGLE, pPageT);
if(pHori||pHoriP||pHoriR||pPageT)
{
@@ -670,11 +670,11 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
{
- const ::uno::Any* pVert = 0;
+ const ::uno::Any* pVert = nullptr;
GetProperty(RES_VERT_ORIENT, MID_VERTORIENT_ORIENT, pVert);
- const ::uno::Any* pVertP = 0;
+ const ::uno::Any* pVertP = nullptr;
GetProperty(RES_VERT_ORIENT, MID_VERTORIENT_POSITION|CONVERT_TWIPS, pVertP );
- const ::uno::Any* pVertR = 0;
+ const ::uno::Any* pVertR = nullptr;
GetProperty(RES_VERT_ORIENT, MID_VERTORIENT_RELATION, pVertR );
if(pVert||pVertP||pVertR)
{
@@ -689,13 +689,13 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
}
{
- const ::uno::Any* pURL = 0;
+ const ::uno::Any* pURL = nullptr;
GetProperty(RES_URL, MID_URL_URL, pURL );
- const ::uno::Any* pTarget = 0;
+ const ::uno::Any* pTarget = nullptr;
GetProperty(RES_URL, MID_URL_TARGET, pTarget );
- const ::uno::Any* pHyLNm = 0;
+ const ::uno::Any* pHyLNm = nullptr;
GetProperty(RES_URL, MID_URL_HYPERLINKNAME, pHyLNm );
- const ::uno::Any* pHySMp = 0;
+ const ::uno::Any* pHySMp = nullptr;
GetProperty(RES_URL, MID_URL_SERVERMAP, pHySMp );
if(pURL||pTarget||pHyLNm||pHySMp)
{
@@ -711,9 +711,9 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
rToSet.Put(aURL);
}
}
- const ::uno::Any* pL = 0;
+ const ::uno::Any* pL = nullptr;
GetProperty(RES_LR_SPACE, MID_L_MARGIN|CONVERT_TWIPS, pL );
- const ::uno::Any* pR = 0;
+ const ::uno::Any* pR = nullptr;
GetProperty(RES_LR_SPACE, MID_R_MARGIN|CONVERT_TWIPS, pR );
if(pL||pR)
{
@@ -724,9 +724,9 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bRet &= ((SfxPoolItem&)aLR).PutValue(*pR, MID_R_MARGIN|CONVERT_TWIPS);
rToSet.Put(aLR);
}
- const ::uno::Any* pT = 0;
+ const ::uno::Any* pT = nullptr;
GetProperty(RES_UL_SPACE, MID_UP_MARGIN|CONVERT_TWIPS, pT );
- const ::uno::Any* pB = 0;
+ const ::uno::Any* pB = nullptr;
GetProperty(RES_UL_SPACE, MID_LO_MARGIN|CONVERT_TWIPS, pB );
if(pT||pB)
{
@@ -765,9 +765,9 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bRet &= aSh.PutValue(*pShTr, MID_SHADOW_TRANSPARENCE);
rToSet.Put(aSh);
}
- const ::uno::Any* pSur = 0;
+ const ::uno::Any* pSur = nullptr;
GetProperty(RES_SURROUND, MID_SURROUND_SURROUNDTYPE, pSur);
- const ::uno::Any* pSurAnch = 0;
+ const ::uno::Any* pSurAnch = nullptr;
GetProperty(RES_SURROUND, MID_SURROUND_ANCHORONLY, pSurAnch);
if(pSur || pSurAnch)
{
@@ -778,27 +778,27 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bRet &= ((SfxPoolItem&)aSrnd).PutValue(*pSurAnch, MID_SURROUND_ANCHORONLY);
rToSet.Put(aSrnd);
}
- const ::uno::Any* pLeft = 0;
+ const ::uno::Any* pLeft = nullptr;
GetProperty(RES_BOX, LEFT_BORDER |CONVERT_TWIPS, pLeft );
- const ::uno::Any* pRight = 0;
+ const ::uno::Any* pRight = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|RIGHT_BORDER , pRight );
- const ::uno::Any* pTop = 0;
+ const ::uno::Any* pTop = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|TOP_BORDER , pTop );
- const ::uno::Any* pBottom = 0;
+ const ::uno::Any* pBottom = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|BOTTOM_BORDER, pBottom);
- const ::uno::Any* pDistance = 0;
+ const ::uno::Any* pDistance = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|BORDER_DISTANCE, pDistance);
- const ::uno::Any* pLeftDistance = 0;
+ const ::uno::Any* pLeftDistance = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|LEFT_BORDER_DISTANCE, pLeftDistance);
- const ::uno::Any* pRightDistance = 0;
+ const ::uno::Any* pRightDistance = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|RIGHT_BORDER_DISTANCE, pRightDistance);
- const ::uno::Any* pTopDistance = 0;
+ const ::uno::Any* pTopDistance = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|TOP_BORDER_DISTANCE, pTopDistance);
- const ::uno::Any* pBottomDistance = 0;
+ const ::uno::Any* pBottomDistance = nullptr;
GetProperty(RES_BOX, CONVERT_TWIPS|BOTTOM_BORDER_DISTANCE, pBottomDistance);
- const ::uno::Any* pLineStyle = 0;
+ const ::uno::Any* pLineStyle = nullptr;
GetProperty(RES_BOX, LINE_STYLE, pLineStyle);
- const ::uno::Any* pLineWidth = 0;
+ const ::uno::Any* pLineWidth = nullptr;
GetProperty(RES_BOX, LINE_WIDTH, pLineWidth);
if( pLeft || pRight || pTop || pBottom || pDistance ||
pLeftDistance || pRightDistance || pTopDistance || pBottomDistance ||
@@ -830,27 +830,27 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
rToSet.Put(aBox);
}
{
- const ::uno::Any* pRelH = 0;
+ const ::uno::Any* pRelH = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_HEIGHT, pRelH);
- const ::uno::Any* pRelHRelation = 0;
+ const ::uno::Any* pRelHRelation = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_HEIGHT_RELATION, pRelHRelation);
- const ::uno::Any* pRelW = 0;
+ const ::uno::Any* pRelW = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_WIDTH, pRelW);
- const ::uno::Any* pRelWRelation = 0;
+ const ::uno::Any* pRelWRelation = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_WIDTH_RELATION, pRelWRelation);
- const ::uno::Any* pSyncWidth = 0;
+ const ::uno::Any* pSyncWidth = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT, pSyncWidth);
- const ::uno::Any* pSyncHeight = 0;
+ const ::uno::Any* pSyncHeight = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH, pSyncHeight);
- const ::uno::Any* pWidth = 0;
+ const ::uno::Any* pWidth = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_WIDTH|CONVERT_TWIPS, pWidth);
- const ::uno::Any* pHeight = 0;
+ const ::uno::Any* pHeight = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS, pHeight);
- const ::uno::Any* pSize = 0;
+ const ::uno::Any* pSize = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_SIZE|CONVERT_TWIPS, pSize);
- const ::uno::Any* pSizeType = 0;
+ const ::uno::Any* pSizeType = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_SIZE_TYPE, pSizeType);
- const ::uno::Any* pWidthType = 0;
+ const ::uno::Any* pWidthType = nullptr;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_WIDTH_TYPE, pWidthType);
if( pWidth || pHeight ||pRelH || pRelHRelation || pRelW || pRelWRelation || pSize ||pSizeType ||
pWidthType ||pSyncWidth || pSyncHeight )
@@ -898,7 +898,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
rToSet.Put(aFrmSz);
}
}
- const ::uno::Any* pFrameDirection = 0;
+ const ::uno::Any* pFrameDirection = nullptr;
GetProperty(RES_FRAMEDIR, 0, pFrameDirection);
if(pFrameDirection)
{
@@ -906,7 +906,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
aAttr.PutValue(*pFrameDirection, 0);
rToSet.Put(aAttr);
}
- const ::uno::Any* pUnknown = 0;
+ const ::uno::Any* pUnknown = nullptr;
GetProperty(RES_UNKNOWNATR_CONTAINER, 0, pUnknown);
if(pUnknown)
{
@@ -916,7 +916,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
// #i18732#
- const ::uno::Any* pFollowTextFlow = 0;
+ const ::uno::Any* pFollowTextFlow = nullptr;
GetProperty(RES_FOLLOW_TEXT_FLOW, 0, pFollowTextFlow);
if ( pFollowTextFlow )
{
@@ -926,7 +926,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
// #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
- const ::uno::Any* pWrapInfluenceOnObjPos = 0;
+ const ::uno::Any* pWrapInfluenceOnObjPos = nullptr;
GetProperty(RES_WRAP_INFLUENCE_ON_OBJPOS, MID_WRAP_INFLUENCE, pWrapInfluenceOnObjPos);
if ( pWrapInfluenceOnObjPos )
{
@@ -936,7 +936,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
}
{
- const ::uno::Any* pTextVertAdjust = 0;
+ const ::uno::Any* pTextVertAdjust = nullptr;
GetProperty(RES_TEXT_VERT_ADJUST, 0, pTextVertAdjust);
if ( pTextVertAdjust )
{
@@ -977,7 +977,7 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem
{
//Properties fuer alle Frames
const ::uno::Any *pStyleName;
- SwDocStyleSheet* pStyle = NULL;
+ SwDocStyleSheet* pStyle = nullptr;
bool bRet;
if ( GetProperty ( FN_UNO_FRAME_STYLE_NAME, 0, pStyleName ) )
@@ -989,7 +989,7 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem
SFX_STYLE_FAMILY_FRAME));
}
- const ::uno::Any* pColumns = NULL;
+ const ::uno::Any* pColumns = nullptr;
GetProperty (RES_COL, MID_COLUMNS, pColumns);
if ( pStyle )
{
@@ -1052,7 +1052,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
//Properties fuer alle Frames
bool bRet;
const ::uno::Any *pStyleName;
- SwDocStyleSheet* pStyle = NULL;
+ SwDocStyleSheet* pStyle = nullptr;
if ( GetProperty ( FN_UNO_FRAME_STYLE_NAME, 0, pStyleName ) )
{
@@ -1063,9 +1063,9 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
SFX_STYLE_FAMILY_FRAME));
}
- const ::uno::Any* pHEvenMirror = 0;
- const ::uno::Any* pHOddMirror = 0;
- const ::uno::Any* pVMirror = 0;
+ const ::uno::Any* pHEvenMirror = nullptr;
+ const ::uno::Any* pHOddMirror = nullptr;
+ const ::uno::Any* pVMirror = nullptr;
GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_HORZ_EVEN_PAGES, pHEvenMirror);
GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_HORZ_ODD_PAGES, pHOddMirror);
GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_VERT, pVMirror);
@@ -1198,7 +1198,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const ::SfxItemPropertySet* pSet, SwDoc *pDo
, m_pDoc(pDoc)
, eType(eSet)
, bIsDescriptor(true)
- , m_pCopySource(0)
+ , m_pCopySource(nullptr)
{
// Register ourselves as a listener to the document (via the page descriptor)
pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
@@ -1239,7 +1239,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const ::SfxItemPropertySet* pSet, SwDoc *pDo
break;
default:
- pProps = NULL;
+ pProps = nullptr;
;
}
}
@@ -1249,11 +1249,11 @@ SwXFrame::SwXFrame(SwFrameFormat& rFrameFormat, FlyCntType eSet, const ::SfxItem
, m_pImpl(new Impl)
,
m_pPropSet(pSet),
- m_pDoc( 0 ),
+ m_pDoc( nullptr ),
eType(eSet),
- pProps(0),
+ pProps(nullptr),
bIsDescriptor(false),
- m_pCopySource(0)
+ m_pCopySource(nullptr)
{
}
@@ -1384,7 +1384,7 @@ SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrameFormat &rFormat)
static SwFrameFormat *lcl_GetFrameFormat( const ::uno::Any& rValue, SwDoc *pDoc )
{
- SwFrameFormat *pRet = 0;
+ SwFrameFormat *pRet = nullptr;
SwDocShell* pDocSh = pDoc->GetDocShell();
if(pDocSh)
{
@@ -1468,7 +1468,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
drawing::PointSequenceSequence aParam;
if(!aValue.hasValue())
- pNoText->SetContour(0);
+ pNoText->SetContour(nullptr);
else if(aValue >>= aParam)
{
tools::PolyPolygon aPoly((sal_uInt16)aParam.getLength());
@@ -1543,14 +1543,14 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
UnoActionContext aAction(pFormat->GetDoc());
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
// #i31771#, #i25798# - No adjustment of
// anchor ( no call of method <sw_ChkAndSetNewAnchor(..)> ),
// if document is currently in reading mode.
if ( !pFormat->GetDoc()->IsInReading() )
{
// see SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos )
- SwFlyFrm *pFly = 0;
+ SwFlyFrm *pFly = nullptr;
{
const SwFrameFormat* pFormatXX = pFormat;
if (dynamic_cast<const SwFlyFrameFormat*>( pFormatXX) )
@@ -1563,9 +1563,9 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrameFormatSetRange );
pSet->Put( *pItem );
- if ( pFormat->GetDoc()->GetEditShell() != NULL
+ if ( pFormat->GetDoc()->GetEditShell() != nullptr
&& !sw_ChkAndSetNewAnchor( *pFly, *pSet ) )
- delete pSet, pSet = 0;
+ delete pSet, pSet = nullptr;
}
}
}
@@ -1581,7 +1581,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
OUString sGrfName;
OUString sFltName;
- GraphicObject *pGrfObj = 0;
+ GraphicObject *pGrfObj = nullptr;
SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), &sGrfName, &sFltName );
OUString sTmp;
aValue >>= sTmp;
@@ -1623,7 +1623,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
throw uno::RuntimeException();
}
SwPaM aGrfPaM(*pGrfNode);
- pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, sGrfName, sFltName, 0,
+ pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, sGrfName, sFltName, nullptr,
pGrfObj );
}
delete pGrfObj;
@@ -1645,7 +1645,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
}
SwPaM aGrfPaM(*pGrfNode);
Graphic aGraphic( xGraphic );
- pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, 0 );
+ pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, nullptr );
}
}
}
@@ -1656,7 +1656,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
Graphic aGraphic;
if( bURL )
{
- GraphicObject *pGrfObj = 0;
+ GraphicObject *pGrfObj = nullptr;
OUString aGrfUrl;
aValue >>= aGrfUrl;
@@ -1722,7 +1722,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
const size_t nCount = pDoc->GetFlyCount(FLYCNTTYPE_FRM);
- SwFrameFormat* pChain = 0;
+ SwFrameFormat* pChain = nullptr;
for( size_t i = 0; i < nCount; ++i )
{
SwFrameFormat* pFormat2 = pDoc->GetFlyNum(i, FLYCNTTYPE_FRM);
@@ -1765,7 +1765,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
uno::Reference<lang::XUnoTunnel> xTunnel(xFrame, uno::UNO_QUERY);
SwXFrame* pFrame = xTunnel.is() ?
reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXFrame::getUnoTunnelId()) ))
- : 0;
+ : nullptr;
if(pFrame && this != pFrame && pFrame->GetFrameFormat() && pFrame->GetFrameFormat()->GetDoc() == pDoc)
{
SfxItemSet aSet( pDoc->GetAttrPool(),
@@ -1908,7 +1908,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if(aAnchor.GetAnchorId() == FLY_AT_FLY)
{
const ::SwPosition* pPosition = aAnchor.GetContentAnchor();
- SwFrameFormat* pFlyFormat = pPosition ? pPosition->nNode.GetNode().GetFlyFormat() : 0;
+ SwFrameFormat* pFlyFormat = pPosition ? pPosition->nNode.GetNode().GetFlyFormat() : nullptr;
if(!pFlyFormat || pFlyFormat->Which() == RES_DRAWFRMFMT)
{
lang::IllegalArgumentException aExcept;
@@ -1939,7 +1939,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if ( !pFormat->GetDoc()->IsInReading() )
{
// see SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
- SwFlyFrm *pFly = 0;
+ SwFlyFrm *pFly = nullptr;
if (dynamic_cast<SwFlyFrameFormat*>( pFormat) )
pFly = static_cast<SwFlyFrameFormat*>(pFormat)->GetFrm();
if (pFly)
@@ -1948,7 +1948,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if( SfxItemState::SET == aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
aSet.Put( *pItem );
- if ( pFormat->GetDoc()->GetEditShell() != NULL )
+ if ( pFormat->GetDoc()->GetEditShell() != nullptr )
{
sw_ChkAndSetNewAnchor( *pFly, aSet );
}
@@ -2081,7 +2081,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
if( pGrfNode->IsGrfLink() )
{
- SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), &sGrfName, 0 );
+ SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), &sGrfName, nullptr );
}
else
{
@@ -2119,7 +2119,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_GRAPHIC_FILTER == pEntry->nWID )
{
OUString sFltName;
- SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), 0, &sFltName );
+ SwDoc::GetGrfNms( *static_cast<SwFlyFrameFormat*>(pFormat), nullptr, &sFltName );
aAny <<= sFltName;
}
else if( FN_UNO_GRAPHIC == pEntry->nWID )
@@ -2175,7 +2175,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if(FN_UNO_Z_ORDER == pEntry->nWID)
{
const SdrObject* pObj = pFormat->FindRealSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
pObj = pFormat->FindSdrObject();
if( pObj )
{
@@ -2301,7 +2301,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
if(WID_LAYOUT_SIZE != pEntry->nWID) // there is no LayoutSize in a descriptor
{
- const uno::Any* pAny = 0;
+ const uno::Any* pAny = nullptr;
if( !pProps->GetProperty( pEntry->nWID, nMemberId, pAny ) )
aAny = mxStyleData->getPropertyValue( rPropertyName );
else if ( pAny )
@@ -2624,7 +2624,7 @@ void SwXFrame::Modify(const SfxPoolItem* pOld, const SfxPoolItem *pNew)
}
mxStyleData.clear();
mxStyleFamily.clear();
- m_pDoc = 0;
+ m_pDoc = nullptr;
uno::Reference<uno::XInterface> const xThis(m_pImpl->m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -2677,7 +2677,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor() throw( uno::RuntimeExc
(rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(rAnchor.GetContentAnchor());
- aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, 0);
+ aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), rPos, nullptr);
}
}
else
@@ -2700,8 +2700,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if(!IsDescriptor())
throw uno::RuntimeException();
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = reinterpret_cast< SwXTextRange * >(
@@ -2710,7 +2710,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
}
- SwDoc* pDoc = pRange ? &pRange->GetDoc() : pCursor ? pCursor->GetDoc() : 0;
+ SwDoc* pDoc = pRange ? &pRange->GetDoc() : pCursor ? pCursor->GetDoc() : nullptr;
if(pDoc)
{
SwUnoInternalPaM aIntPam(*pDoc);
@@ -2777,17 +2777,17 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
const ::uno::Any* pStyle;
- SwFrameFormat *pParentFrameFormat = 0;
+ SwFrameFormat *pParentFrameFormat = nullptr;
if(pProps->GetProperty(FN_UNO_FRAME_STYLE_NAME, 0, pStyle))
pParentFrameFormat = lcl_GetFrameFormat( *pStyle, pDoc );
- SwFlyFrameFormat* pFormat = 0;
+ SwFlyFrameFormat* pFormat = nullptr;
if( eType == FLYCNTTYPE_FRM)
{
UnoActionContext aCont(pDoc);
if(m_pCopySource)
{
- SwFormatAnchor* pAnchorItem = 0;
+ SwFormatAnchor* pAnchorItem = nullptr;
// the frame is inserted bound to page
// to prevent conflicts if the to-be-anchored position is part of the to-be-copied text
if (eAnchorId != FLY_AT_PAGE)
@@ -2799,7 +2799,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
aPam.DeleteMark(); // mark position node will be deleted!
aIntPam.DeleteMark(); // mark position node will be deleted!
pFormat = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet,
- 0,
+ nullptr,
pParentFrameFormat );
if(pAnchorItem && pFormat)
{
@@ -2831,7 +2831,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
UnoActionContext aCont(pDoc);
const ::uno::Any* pGraphicURL;
OUString sGraphicURL;
- GraphicObject *pGrfObj = 0;
+ GraphicObject *pGrfObj = nullptr;
if(pProps->GetProperty(FN_UNO_GRAPHIC_U_R_L, 0, pGraphicURL))
{
(*pGraphicURL) >>= sGraphicURL;
@@ -2901,9 +2901,9 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
else
{
- const ::uno::Any* pCLSID = 0;
- const ::uno::Any* pStreamName = 0;
- const ::uno::Any* pEmbeddedObject = 0;
+ const ::uno::Any* pCLSID = nullptr;
+ const ::uno::Any* pStreamName = nullptr;
+ const ::uno::Any* pEmbeddedObject = nullptr;
if(!pProps->GetProperty(FN_UNO_CLSID, 0, pCLSID)
&& !pProps->GetProperty( FN_UNO_STREAM_NAME, 0, pStreamName )
&& !pProps->GetProperty( FN_EMBEDDED_OBJECT, 0, pEmbeddedObject ))
@@ -2930,7 +2930,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if ( xIPObj.is() )
{
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
if(!bSizeFound)
{
//TODO/LATER: from where do I get a ViewAspect? And how do I transport it to the OLENode?
@@ -2969,15 +2969,15 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
aFrmSz.SetSize(aSz);
aFrmSet.Put(aFrmSz);
}
- SwFlyFrameFormat* pFormat2 = 0;
+ SwFlyFrameFormat* pFormat2 = nullptr;
// TODO/LATER: Is it the only possible aspect here?
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
::svt::EmbeddedObjectRef xObjRef( xIPObj, nAspect );
- pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrmSet, NULL, NULL );
+ pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrmSet, nullptr, nullptr );
assert(pFormat2 && "Doc->Insert(notxt) failed.");
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
pFormat2->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFormat2, m_sName);
@@ -2987,11 +2987,11 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
OUString sStreamName;
(*pStreamName) >>= sStreamName;
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
- SwFlyFrameFormat* pFrameFormat = 0;
- pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, NULL, NULL );
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ SwFlyFrameFormat* pFrameFormat = nullptr;
+ pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, nullptr, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
pFrameFormat->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
@@ -3003,7 +3003,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
svt::EmbeddedObjectRef xObj;
xObj.Assign( obj, embed::Aspects::MSOLE_CONTENT );
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
// Not sure if these setParent() and InsertEmbeddedObject() calls are really
// needed, it seems to work without, but logic from code elsewhere suggests
@@ -3015,9 +3015,9 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
OUString rName;
mrPers.GetEmbeddedObjectContainer().InsertEmbeddedObject( obj, rName );
- SwFlyFrameFormat* pFrameFormat = 0;
- pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrmSet, NULL, NULL );
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ SwFlyFrameFormat* pFrameFormat = nullptr;
+ pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrmSet, nullptr, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
pFrameFormat->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
@@ -3063,7 +3063,7 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
SwFrameFormat* pFormat;
if(IsDescriptor())
attachToRange(xTextRange);
- else if(0 != (pFormat = GetFrameFormat()))
+ else if(nullptr != (pFormat = GetFrameFormat()))
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
SwDoc* pDoc = pFormat->GetDoc();
@@ -3118,7 +3118,7 @@ OUString SwXFrame::getShapeType() throw( uno::RuntimeException, std::exception )
}
SwXTextFrame::SwXTextFrame( SwDoc *_pDoc ) :
- SwXText(0, CURSOR_FRAME),
+ SwXText(nullptr, CURSOR_FRAME),
SwXFrame(FLYCNTTYPE_FRM, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_FRAME), _pDoc )
{
}
@@ -3198,7 +3198,7 @@ uno::Reference< text::XText > SwXTextFrame::getText() throw( uno::RuntimeExcept
const SwStartNode *SwXTextFrame::GetStartNode() const
{
- const SwStartNode *pSttNd = 0;
+ const SwStartNode *pSttNd = nullptr;
const SwFrameFormat* pFormat = GetFrameFormat();
if(pFormat)
@@ -3232,7 +3232,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() throw( uno
SwPaM aPam(rNode);
aPam.Move(fnMoveForward, fnGoNode);
SwTableNode* pTableNode = aPam.GetNode().FindTableNode();
- SwContentNode* pCont = 0;
+ SwContentNode* pCont = nullptr;
while( pTableNode )
{
aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
@@ -3764,7 +3764,7 @@ void SwXOLEListener::modified( const lang::EventObject& /*rEvent*/ )
{
SolarMutexGuard aGuard;
- SwOLENode* pNd = 0;
+ SwOLENode* pNd = nullptr;
SwFormat* pFormat = GetFormat();
if(pFormat)
{const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
@@ -3816,7 +3816,7 @@ void SwXOLEListener::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
- xOLEModel = 0;
+ xOLEModel = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 4f98988933c3..640efc8cae9a 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -68,20 +68,20 @@ public:
, m_rThis(rThis)
, m_bIsEndnote(bIsEndnote)
, m_EventListeners(m_Mutex)
- , m_bIsDescriptor(0 == pFootnote)
+ , m_bIsDescriptor(nullptr == pFootnote)
, m_pFormatFootnote(pFootnote)
{
}
const SwFormatFootnote* GetFootnoteFormat() const {
- return m_rThis.GetDoc() ? m_pFormatFootnote : 0;
+ return m_rThis.GetDoc() ? m_pFormatFootnote : nullptr;
}
SwFormatFootnote const& GetFootnoteFormatOrThrow() {
SwFormatFootnote const*const pFootnote( GetFootnoteFormat() );
if (!pFootnote) {
throw uno::RuntimeException(OUString(
- "SwXFootnote: disposed or invalid"), 0);
+ "SwXFootnote: disposed or invalid"), nullptr);
}
return *pFootnote;
}
@@ -99,8 +99,8 @@ void SwXFootnote::Impl::Invalidate()
{
GetRegisteredIn()->Remove(this);
}
- m_pFormatFootnote = 0;
- m_rThis.SetDoc(0);
+ m_pFormatFootnote = nullptr;
+ m_rThis.SetDoc(nullptr);
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -121,8 +121,8 @@ void SwXFootnote::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
}
SwXFootnote::SwXFootnote(const bool bEndnote)
- : SwXText(0, CURSOR_FOOTNOTE)
- , m_pImpl( new SwXFootnote::Impl(*this, 0, bEndnote) )
+ : SwXText(nullptr, CURSOR_FOOTNOTE)
+ , m_pImpl( new SwXFootnote::Impl(*this, nullptr, bEndnote) )
{
}
@@ -305,7 +305,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
OTextCursorHelper *const pCursor =
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
SwDoc *const pNewDoc =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pNewDoc)
{
throw lang::IllegalArgumentException();
@@ -416,7 +416,7 @@ const SwStartNode *SwXFootnote::GetStartNode() const
return pTextFootnote->GetStartNode()->GetNode().GetStartNode();
}
}
- return 0;
+ return nullptr;
}
uno::Reference< text::XTextCursor >
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index a3ba68e2e36f..8de8f1f35aa2 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -119,7 +119,7 @@ static void
lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
{
const sal_uInt16 nUserCount = pDoc->GetTOXTypeCount( TOX_USER );
- const SwTOXType* pNewType = 0;
+ const SwTOXType* pNewType = nullptr;
for(sal_uInt16 nUser = 0; nUser < nUserCount; nUser++)
{
const SwTOXType* pType = pDoc->GetTOXType( TOX_USER, nUser );
@@ -334,16 +334,16 @@ public:
Impl( SwDoc & rDoc,
const TOXTypes eType,
SwTOXBaseSection *const pBaseSection)
- : SwClient((pBaseSection) ? pBaseSection->GetFormat() : 0)
+ : SwClient((pBaseSection) ? pBaseSection->GetFormat() : nullptr)
, m_Listeners(m_Mutex)
, m_rPropSet(
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
, m_eTOXType(eType)
- , m_bIsDescriptor(0 == pBaseSection)
+ , m_bIsDescriptor(nullptr == pBaseSection)
, m_pDoc(&rDoc)
, m_pProps((m_bIsDescriptor)
? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0))
- : 0)
+ : nullptr)
{
}
@@ -359,11 +359,11 @@ public:
? &m_pProps->GetTOXBase()
: ((pSectionFormat)
? static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection())
- : 0));
+ : nullptr));
if (!pTOXSection)
{
throw uno::RuntimeException(
- "SwXDocumentIndex: disposed or invalid", 0);
+ "SwXDocumentIndex: disposed or invalid", nullptr);
}
return *pTOXSection;
}
@@ -406,7 +406,7 @@ SwXDocumentIndex::SwXDocumentIndex(
}
SwXDocumentIndex::SwXDocumentIndex(const TOXTypes eType, SwDoc& rDoc)
- : m_pImpl( new SwXDocumentIndex::Impl(rDoc, eType, 0) )
+ : m_pImpl( new SwXDocumentIndex::Impl(rDoc, eType, nullptr) )
{
}
@@ -902,7 +902,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
- SwTOXBase* pTOXBase = 0;
+ SwTOXBase* pTOXBase = nullptr;
if (pSectionFormat)
{
pTOXBase = static_cast<SwTOXBaseSection*>(pSectionFormat->GetSection());
@@ -1258,8 +1258,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
void lcl_CalcLayout(SwDoc *pDoc)
{
- SwViewShell *pViewShell = 0;
- SwEditShell* pEditShell = 0;
+ SwViewShell *pViewShell = nullptr;
+ SwEditShell* pEditShell = nullptr;
if( pDoc )
{
pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -1284,7 +1284,7 @@ void SAL_CALL SwXDocumentIndex::refresh() throw (uno::RuntimeException, std::exc
SwSectionFormat *const pFormat = m_pImpl->GetSectionFormat();
SwTOXBaseSection *const pTOXBase = (pFormat) ?
- static_cast<SwTOXBaseSection*>(pFormat->GetSection()) : 0;
+ static_cast<SwTOXBaseSection*>(pFormat->GetSection()) : nullptr;
if (!pTOXBase)
{
throw uno::RuntimeException(
@@ -1345,7 +1345,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
SwDoc *const pDoc =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pDoc)
{
throw lang::IllegalArgumentException();
@@ -1513,9 +1513,9 @@ uno::Reference<frame::XModel> SwXDocumentIndex::GetModel()
if (pSectionFormat)
{
SwDocShell const*const pShell( pSectionFormat->GetDoc()->GetDocShell() );
- return (pShell) ? pShell->GetModel() : 0;
+ return (pShell) ? pShell->GetModel() : nullptr;
}
- return 0;
+ return nullptr;
}
static sal_uInt16
@@ -1575,7 +1575,7 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
, m_eTOXType(eType)
, m_EventListeners(m_Mutex)
- , m_bIsDescriptor(0 == pMark)
+ , m_bIsDescriptor(nullptr == pMark)
, m_TypeDepend(this, pType)
, m_pTOXMark(pMark)
, m_pDoc(pDoc)
@@ -1592,7 +1592,7 @@ public:
void DeleteTOXMark()
{
m_pDoc->DeleteTOXMark(m_pTOXMark); // calls Invalidate() via Modify!
- m_pTOXMark = 0;
+ m_pTOXMark = nullptr;
}
void InsertTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam,
@@ -1604,7 +1604,7 @@ public:
DeleteTOXMark();
m_bInReplaceMark = false;
try {
- InsertTOXMark(rTOXType, rMark, rPam, 0);
+ InsertTOXMark(rTOXType, rMark, rPam, nullptr);
} catch (...) {
OSL_FAIL("ReplaceTOXMark() failed!");
lang::EventObject const ev(
@@ -1641,8 +1641,8 @@ void SwXDocumentIndexMark::Impl::Invalidate()
m_EventListeners.disposeAndClear(ev);
}
}
- m_pDoc = 0;
- m_pTOXMark = 0;
+ m_pDoc = nullptr;
+ m_pTOXMark = nullptr;
}
void SwXDocumentIndexMark::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
@@ -1656,7 +1656,7 @@ void SwXDocumentIndexMark::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolIt
}
SwXDocumentIndexMark::SwXDocumentIndexMark(const TOXTypes eToxType)
- : m_pImpl( new SwXDocumentIndexMark::Impl(*this, 0, eToxType, 0, 0) )
+ : m_pImpl( new SwXDocumentIndexMark::Impl(*this, nullptr, eToxType, nullptr, nullptr) )
{
}
@@ -1839,13 +1839,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
OTextCursorHelper *const pCursor =
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
SwDoc *const pDoc =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pDoc)
{
throw lang::IllegalArgumentException();
}
- const SwTOXType* pTOXType = 0;
+ const SwTOXType* pTOXType = nullptr;
switch (m_pImpl->m_eTOXType)
{
case TOX_INDEX:
@@ -2000,7 +2000,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
}
// rMark was copied into the document pool; now retrieve real format...
- SwTextAttr * pTextAttr(0);
+ SwTextAttr * pTextAttr(nullptr);
if (bMark)
{
// #i107672#
@@ -2027,7 +2027,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
{
throw uno::RuntimeException(
"SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute",
- 0);
+ nullptr);
}
m_pDoc = pDoc;
@@ -2806,7 +2806,7 @@ static const struct TokenType_ g_TokenTypes[] =
{ "TokenHyperlinkStart", TOKEN_LINK_START },
{ "TokenHyperlinkEnd", TOKEN_LINK_END },
{ "TokenBibliographyDataField", TOKEN_AUTHORITY },
- { 0, static_cast<enum FormTokenType>(0) }
+ { nullptr, static_cast<enum FormTokenType>(0) }
};
void SAL_CALL
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index fef82ee6b90d..882bd700d6c1 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -104,8 +104,8 @@ SwUnoPropertyMapProvider::SwUnoPropertyMapProvider()
{
for( sal_uInt16 i = 0; i < PROPERTY_MAP_END; i++ )
{
- m_aMapEntriesArr[i] = 0;
- m_aPropertySetArr[i] = 0;
+ m_aMapEntriesArr[i] = nullptr;
+ m_aPropertySetArr[i] = nullptr;
}
}
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 5309a624c6e7..57666238ef0d 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -281,13 +281,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwTextFormatColl *const pLocal = pStyle->GetCollection();
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPaM *pTmpCrsr = &rPaM;
do {
pDoc->SetTextFormatColl(*pTmpCrsr, pLocal);
pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
} while ( pTmpCrsr != &rPaM );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
bool
@@ -351,7 +351,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
if( rCrsr.GetNext() != &rCrsr ) // MultiSelection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
SwPamRanges aRangeArr( rCrsr );
SwPaM aPam( *rCrsr.GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
@@ -360,7 +360,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
pDoc->SetNodeNumStart(*aRangeArr.SetPam( n, aPam ).GetPoint(),
nStt );
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
else
{
@@ -381,7 +381,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++)
{
uno::Any aStyle;
- rPam.GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
+ rPam.GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
aStyle <<= aCharStyles.getConstArray()[nStyle];
// create a local set and apply each format directly
SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(),
@@ -392,7 +392,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
SwUnoCursorHelper::SetCrsrAttr(rPam, aSet, (nStyle)
? SetAttrMode::DONTREPLACE
: SetAttrMode::DEFAULT);
- rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, NULL);
+ rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, nullptr);
}
return true;
}
@@ -421,7 +421,7 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet,
throw lang::IllegalArgumentException();
}
::std::unique_ptr<SwFormatDrop> pDrop;
- SfxPoolItem const* pItem(0);
+ SfxPoolItem const* pItem(nullptr);
if (SfxItemState::SET ==
rItemSet.GetItemState(RES_PARATR_DROP, true, &pItem))
{
@@ -527,7 +527,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException,
if (nLevel < 0 || MAXLEVEL <= nLevel)
{
throw lang::IllegalArgumentException(
- "invalid NumberingLevel", 0, 0);
+ "invalid NumberingLevel", nullptr, 0);
}
pTextNd->SetAttrListLevel(nLevel);
}
@@ -615,7 +615,7 @@ SwFormatColl *
SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional)
{
static const sal_uLong nMaxLookup = 1000;
- SwFormatColl *pFormat = 0;
+ SwFormatColl *pFormat = nullptr;
bool bError = false;
SwPaM *pTmpCrsr = &rPaM;
do
@@ -625,7 +625,7 @@ SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional)
if( nEndNd - nSttNd >= nMaxLookup )
{
- pFormat = 0;
+ pFormat = nullptr;
break;
}
@@ -651,7 +651,7 @@ SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional)
pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
} while ( pTmpCrsr != &rPaM );
- return (bError) ? 0 : pFormat;
+ return (bError) ? nullptr : pFormat;
}
class SwXTextCursor::Impl
@@ -681,7 +681,7 @@ public:
SwUnoCrsr& GetCursorOrThrow() {
if(!m_pUnoCursor)
- throw uno::RuntimeException("SwXTextCursor: disposed or invalid", 0);
+ throw uno::RuntimeException("SwXTextCursor: disposed or invalid", nullptr);
return *m_pUnoCursor;
}
};
@@ -715,7 +715,7 @@ SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > const& xParent,
SwPaM const& rSourceCursor, const enum CursorType eType)
: m_pImpl( new Impl(*rSourceCursor.GetDoc(), eType,
xParent, *rSourceCursor.GetPoint(),
- rSourceCursor.HasMark() ? rSourceCursor.GetMark() : 0) )
+ rSourceCursor.HasMark() ? rSourceCursor.GetMark() : nullptr) )
{
}
@@ -733,7 +733,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
SwDoc* pDoc = pUnoCrsr->GetDoc();
UnoActionContext aAction(pDoc);
const sal_Int32 nTextLen = rText.getLength();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
auto pCurrent = static_cast<SwCursor*>(pUnoCrsr);
do
{
@@ -755,7 +755,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
}
pCurrent = static_cast<SwCursor*>(pCurrent->GetNext());
} while (pCurrent != pUnoCrsr);
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
}
}
@@ -982,12 +982,12 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc
rUnoCursor.Move( fnMoveBackward, fnGoDoc );
//check, that the cursor is not in a table
SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode();
- SwContentNode * pCNode = 0;
+ SwContentNode * pCNode = nullptr;
while (pTableNode)
{
rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
pCNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
- pTableNode = (pCNode) ? pCNode->FindTableNode() : 0;
+ pTableNode = (pCNode) ? pCNode->FindTableNode() : nullptr;
}
if (pCNode)
{
@@ -1067,8 +1067,8 @@ throw (uno::RuntimeException, std::exception)
SwUnoCrsr & rOwnCursor( m_pImpl->GetCursorOrThrow() );
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
@@ -1082,7 +1082,7 @@ throw (uno::RuntimeException, std::exception)
}
SwPaM aPam(GetDoc()->GetNodes());
- const SwPaM * pPam(0);
+ const SwPaM * pPam(nullptr);
if (pCursor)
{
pPam = pCursor->GetPaM();
@@ -1116,7 +1116,7 @@ throw (uno::RuntimeException, std::exception)
}
const SwStartNode* pOwnStartNode = rOwnCursor.GetNode().FindSttNodeByType(eSearchNodeType);
- while ( pOwnStartNode != NULL
+ while ( pOwnStartNode != nullptr
&& pOwnStartNode->IsSectionNode())
{
pOwnStartNode = pOwnStartNode->StartOfSectionNode();
@@ -1124,7 +1124,7 @@ throw (uno::RuntimeException, std::exception)
const SwStartNode* pTmp =
pPam->GetNode().FindSttNodeByType(eSearchNodeType);
- while ( pTmp != NULL
+ while ( pTmp != nullptr
&& pTmp->IsSectionNode() )
{
pTmp = pTmp->StartOfSectionNode();
@@ -1394,7 +1394,7 @@ SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException, std::exception)
if (!bRet && (!rUnoCursor.HasMark() ||
*rUnoCursor.GetPoint() == *rUnoCursor.GetMark()))
{
- SwCursor aCrsr(*rUnoCursor.GetPoint(),0,false);
+ SwCursor aCrsr(*rUnoCursor.GetPoint(),nullptr,false);
SwPosition aOrigPos = *aCrsr.GetPoint();
aCrsr.GoSentence(SwCursor::START_SENT );
bRet = aOrigPos == *aCrsr.GetPoint();
@@ -1418,7 +1418,7 @@ SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException, std::exception)
if (!bRet && (!rUnoCursor.HasMark() ||
*rUnoCursor.GetPoint() == *rUnoCursor.GetMark()))
{
- SwCursor aCrsr(*rUnoCursor.GetPoint(), 0, false);
+ SwCursor aCrsr(*rUnoCursor.GetPoint(), nullptr, false);
SwPosition aOrigPos = *aCrsr.GetPoint();
aCrsr.GoSentence(SwCursor::END_SENT);
bRet = aOrigPos == *aCrsr.GetPoint();
@@ -1743,7 +1743,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
- static_cast<cppu::OWeakObject *>(0));
+ static_cast<cppu::OWeakObject *>(nullptr));
}
beans::PropertyState eTemp;
@@ -1866,9 +1866,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
if (!aUnknownExMsg.isEmpty())
- throw beans::UnknownPropertyException(aUnknownExMsg, static_cast<cppu::OWeakObject *>(0));
+ throw beans::UnknownPropertyException(aUnknownExMsg, static_cast<cppu::OWeakObject *>(nullptr));
if (!aPropertyVetoExMsg.isEmpty())
- throw beans::PropertyVetoException(aPropertyVetoExMsg, static_cast<cppu::OWeakObject *>(0));
+ throw beans::PropertyVetoException(aPropertyVetoExMsg, static_cast<cppu::OWeakObject *>(nullptr));
}
uno::Sequence< beans::PropertyState >
@@ -1908,7 +1908,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
throw beans::UnknownPropertyException(
"Unknown property: " + pNames[i],
- static_cast<cppu::OWeakObject *>(0));
+ static_cast<cppu::OWeakObject *>(nullptr));
}
}
if (((SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION == eCaller) ||
@@ -1926,7 +1926,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
pEntry->nWID <= FN_UNO_RANGE_END )
{
(void)SwUnoCursorHelper::getCrsrPropertyValue(
- *pEntry, rPaM, 0, pStates[i] );
+ *pEntry, rPaM, nullptr, pStates[i] );
}
else
{
@@ -2029,14 +2029,14 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
- static_cast<cppu::OWeakObject *>(0));
+ static_cast<cppu::OWeakObject *>(nullptr));
}
if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
{
throw uno::RuntimeException(
"setPropertyToDefault: property is read-only: "
- + rPropertyName, 0);
+ + rPropertyName, nullptr);
}
if (pEntry->nWID < RES_FRMATR_END)
@@ -2069,7 +2069,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject *>(0));
+ "Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject *>(nullptr));
}
uno::Any aRet;
@@ -2486,7 +2486,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
throw beans::UnknownPropertyException(
"Unknown property: " + pNames[i],
- static_cast<cppu::OWeakObject *>(0));
+ static_cast<cppu::OWeakObject *>(nullptr));
}
if (pEntry->nWID < RES_FRMATR_END)
{
@@ -2510,31 +2510,31 @@ throw (uno::RuntimeException, std::exception)
SwTextNode* txtNode = node.GetTextNode();
- if (txtNode == 0) return;
+ if (txtNode == nullptr) return;
if ( text::TextMarkupType::SPELLCHECK == nType )
{
txtNode->SetWrongDirty(SwTextNode::WrongState::TODO);
- txtNode->SetWrong(0);
+ txtNode->SetWrong(nullptr);
}
else if( text::TextMarkupType::PROOFREADING == nType )
{
txtNode->SetGrammarCheckDirty(true);
- txtNode->SetGrammarCheck(0);
+ txtNode->SetGrammarCheck(nullptr);
}
else if ( text::TextMarkupType::SMARTTAG == nType )
{
txtNode->SetSmartTagDirty(true);
- txtNode->SetSmartTags(0);
+ txtNode->SetSmartTags(nullptr);
}
else return;
SwFormatColl* fmtColl=txtNode->GetFormatColl();
- if (fmtColl == 0) return;
+ if (fmtColl == nullptr) return;
SwFormatChg aNew( fmtColl );
- txtNode->NotifyClients( 0, &aNew );
+ txtNode->NotifyClients( nullptr, &aNew );
}
void SAL_CALL
@@ -2951,7 +2951,7 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException, std::exception)
const uno::Reference<lang::XUnoTunnel> xTunnel(
m_pImpl->m_xParentText, uno::UNO_QUERY);
- SwXText* pParentText = 0;
+ SwXText* pParentText = nullptr;
if (xTunnel.is())
{
pParentText = ::sw::UnoTunnelGetImplementation<SwXText>(xTunnel);
@@ -2972,9 +2972,9 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException, std::exception)
? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION;
SwTableNode const*const pStartNode( (CURSOR_TBLTEXT == m_pImpl->m_eType)
? rUnoCursor.GetPoint()->nNode.GetNode().FindTableNode()
- : 0);
+ : nullptr);
SwTable const*const pTable(
- (pStartNode) ? & pStartNode->GetTable() : 0 );
+ (pStartNode) ? & pStartNode->GetTable() : nullptr );
return SwXParagraphEnumeration::Create(pParentText, pNewCrsr, eSetType, pStartNode, pTable);
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index cd7b2d7f63d5..a80c428477e0 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -209,8 +209,8 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
const SwContentFrm* pCFrm;
const SwContentNode* pCNd;
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
- 0 != (pCNd = rIdx.GetNode().GetContentNode()) &&
- 0 != (pCFrm = pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())) )
+ nullptr != (pCNd = rIdx.GetNode().GetContentNode()) &&
+ nullptr != (pCFrm = pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())) )
{
lcl_CollectFrameAtNodeWithLayout(pDoc, pCFrm, rFrames, nChkType);
}
@@ -224,7 +224,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
const SwPosition* pAnchorPos;
if( rAnchor.GetAnchorId() == nChkType &&
- 0 != (pAnchorPos = rAnchor.GetContentAnchor()) &&
+ nullptr != (pAnchorPos = rAnchor.GetContentAnchor()) &&
pAnchorPos->nNode == rIdx )
{
@@ -340,7 +340,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
UnoActionContext aAction(pDoc);
if (rPam.GetNext() != &rPam) // Ring of Cursors
{
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
for(SwPaM& rCurrent : rPam.GetRingContainer())
{
@@ -352,7 +352,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
}
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
}
else
{
@@ -540,7 +540,7 @@ lcl_FindTopLevelTable(
SwTableNode * pLast = pTableNode;
for (SwTableNode* pTmp = pLast;
- pTmp != NULL && &pTmp->GetTable() != pOwnTable; /* we must not go up higher than the own table! */
+ pTmp != nullptr && &pTmp->GetTable() != pOwnTable; /* we must not go up higher than the own table! */
pTmp = pTmp->StartOfSectionNode()->FindTableNode() )
{
pLast = pTmp;
@@ -599,7 +599,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE
}
if (m_nEndIndex < aNewCrsr->Start()->nNode.GetIndex())
{
- return 0;
+ return nullptr;
}
}
@@ -616,7 +616,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE
rUnoCrsr.GetPoint()->nNode = pTableNode->EndOfSectionIndex();
if (!rUnoCrsr.Move(fnMoveForward, fnGoNode))
{
- return 0;
+ return nullptr;
}
bInTable = true;
}
@@ -691,15 +691,15 @@ public:
::sw::mark::IMark * m_pMark;
Impl( SwDoc & rDoc, const enum RangePosition eRange,
- SwFrameFormat *const pTableFormat = 0,
- const uno::Reference< text::XText > & xParent = 0)
+ SwFrameFormat *const pTableFormat = nullptr,
+ const uno::Reference< text::XText > & xParent = nullptr)
: SwClient()
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
, m_eRangePosition(eRange)
, m_rDoc(rDoc)
, m_xParentText(xParent)
, m_ObjectDepend(this, pTableFormat)
- , m_pMark(0)
+ , m_pMark(nullptr)
{
}
@@ -714,7 +714,7 @@ public:
if (m_pMark)
{
m_rDoc.getIDocumentMarkAccess()->deleteMark(m_pMark);
- m_pMark = 0;
+ m_pMark = nullptr;
}
}
@@ -727,7 +727,7 @@ protected:
void SwXTextRange::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
{
- const bool bAlreadyRegistered = 0 != GetRegisteredIn();
+ const bool bAlreadyRegistered = nullptr != GetRegisteredIn();
ClientModify(this, pOld, pNew);
if (m_ObjectDepend.GetRegisteredIn())
{
@@ -748,14 +748,14 @@ void SwXTextRange::Impl::Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew
}
if (!GetRegisteredIn())
{
- m_pMark = 0;
+ m_pMark = nullptr;
}
}
SwXTextRange::SwXTextRange(SwPaM& rPam,
const uno::Reference< text::XText > & xParent,
const enum RangePosition eRange)
- : m_pImpl( new SwXTextRange::Impl(*rPam.GetDoc(), eRange, 0, xParent) )
+ : m_pImpl( new SwXTextRange::Impl(*rPam.GetDoc(), eRange, nullptr, xParent) )
{
SetPositions(rPam);
}
@@ -811,11 +811,11 @@ throw (uno::RuntimeException)
}
const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent());
- SwCursor aCursor(aPos, 0, false);
+ SwCursor aCursor(aPos, nullptr, false);
if (GetPositions(aCursor))
{
UnoActionContext aAction(& m_pImpl->m_rDoc);
- m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
if (aCursor.HasMark())
{
m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor);
@@ -830,7 +830,7 @@ throw (uno::RuntimeException)
aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, false, false);
}
SetPositions(aCursor);
- m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
}
}
@@ -1015,11 +1015,11 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill,
bool bRet = false;
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- SwXTextPortion* pPortion = 0;
- SwXText* pText = 0;
- SwXParagraph* pPara = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
+ SwXTextPortion* pPortion = nullptr;
+ SwXText* pText = nullptr;
+ SwXParagraph* pPara = nullptr;
if(xRangeTunnel.is())
{
pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
@@ -1057,9 +1057,9 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill,
else
{
SwDoc* const pDoc = (pCursor) ? pCursor->GetDoc()
- : ((pPortion) ? pPortion->GetCursor().GetDoc() : 0);
+ : ((pPortion) ? pPortion->GetCursor().GetDoc() : nullptr);
const SwPaM* const pUnoCrsr = (pCursor) ? pCursor->GetPaM()
- : ((pPortion) ? &pPortion->GetCursor() : 0);
+ : ((pPortion) ? &pPortion->GetCursor() : nullptr);
if (pUnoCrsr && pDoc == rToFill.GetDoc())
{
OSL_ENSURE(!pUnoCrsr->IsMultiSelection(),
@@ -1160,7 +1160,7 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
case SwFlyStartNode:
{
SwFrameFormat *const pFormat = pSttNode->GetFlyFormat();
- if (0 != pFormat)
+ if (nullptr != pFormat)
{
xParentText.set(SwXTextFrame::CreateXTextFrame(rDoc, pFormat),
uno::UNO_QUERY);
@@ -1178,7 +1178,7 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
const SwFrameFormat* pFrameFormatMaster = &rDesc.GetMaster();
const SwFrameFormat* pFrameFormatLeft = &rDesc.GetLeft();
- SwFrameFormat* pHeadFootFormat = 0;
+ SwFrameFormat* pHeadFootFormat = nullptr;
if (!lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrameFormatMaster,
pHeadFootFormat))
{
@@ -1580,7 +1580,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
// Start/EndAction
SwDoc *const pDoc = rCursor.GetDoc();
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
if (rCursor.HasMark())
{
pDoc->getIDocumentContentOperations().DeleteAndJoin(rCursor);
@@ -1594,7 +1594,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
SwUnoCursorHelper::SelectPam(rCursor, true);
rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, false, false);
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
}
struct SwXParaFrameEnumerationImpl final : public SwXParaFrameEnumeration
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index bb11345b36e1..91e8cf1b6838 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -119,14 +119,14 @@ public:
uno::Reference<text::XText> m_xParentText;
Impl( SwXParagraph & rThis,
- SwTextNode *const pTextNode = 0,
- uno::Reference< text::XText > const & xParent = 0,
+ SwTextNode *const pTextNode = nullptr,
+ uno::Reference< text::XText > const & xParent = nullptr,
const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = -1)
: SwClient(pTextNode)
, m_rThis(rThis)
, m_EventListeners(m_Mutex)
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
- , m_bIsDescriptor(0 == pTextNode)
+ , m_bIsDescriptor(nullptr == pTextNode)
, m_nSelectionStartPos(nSelStart)
, m_nSelectionEndPos(nSelEnd)
, m_xParentText(xParent)
@@ -140,7 +140,7 @@ public:
SwTextNode & GetTextNodeOrThrow() {
SwTextNode *const pTextNode( GetTextNode() );
if (!pTextNode) {
- throw uno::RuntimeException("SwXParagraph: disposed or invalid", 0);
+ throw uno::RuntimeException("SwXParagraph: disposed or invalid", nullptr);
}
return *pTextNode;
}
@@ -398,7 +398,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
SwTextNode & rTextNode(GetTextNodeOrThrow());
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
const OUString* pPropertyNames = rPropertyNames.getConstArray();
const uno::Any* pValues = rValues.getConstArray();
const SfxItemPropertyMap &rMap = m_rPropSet.getPropertyMap();
@@ -667,7 +667,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
m_pImpl->m_rPropSet.getPropertyMap();
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
SwParaSelection aParaSel( aCursor );
for (sal_Int32 i = 0; i < nProps; ++i)
{
@@ -970,7 +970,7 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
case FN_UNO_NUM_RULES:
{
// if numbering is set, return it; else do nothing
- SwUnoCursorHelper::getNumberingProperty(aPam,eRet,NULL);
+ SwUnoCursorHelper::getNumberingProperty(aPam,eRet,nullptr);
bDone = true;
break;
}
@@ -1060,7 +1060,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
- const SwAttrSet* pSet = 0;
+ const SwAttrSet* pSet = nullptr;
SfxItemPropertySimpleEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
@@ -1088,7 +1088,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
const SfxItemPropertyMap &rMap = m_pImpl->m_rPropSet.getPropertyMap();
- const SwAttrSet* pSet = 0;
+ const SwAttrSet* pSet = nullptr;
bool bAttrSetFetched = false;
for (sal_Int32 i = 0, nEnd = PropertyNames.getLength(); i < nEnd;
@@ -1126,7 +1126,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
if (rPropertyName == UNO_NAME_ANCHOR_TYPE ||
rPropertyName == UNO_NAME_ANCHOR_TYPES ||
rPropertyName == UNO_NAME_TEXT_WRAP)
@@ -1262,7 +1262,7 @@ SwXParagraph::getAnchor() throw (uno::RuntimeException, std::exception)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
// select paragraph
SwParaSelection aParaSel( aCursor );
const uno::Reference< text::XTextRange > xRet =
@@ -1277,7 +1277,7 @@ void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException, std::excepti
SwTextNode *const pTextNode( m_pImpl->GetTextNode() );
if (pTextNode)
{
- SwCursor aCursor( SwPosition( *pTextNode ), 0, false );
+ SwCursor aCursor( SwPosition( *pTextNode ), nullptr, false );
pTextNode->GetDoc()->getIDocumentContentOperations().DelFullPara(aCursor);
lang::EventObject const ev(static_cast< ::cppu::OWeakObject&>(*this));
m_pImpl->m_EventListeners.disposeAndClear(ev);
@@ -1342,7 +1342,7 @@ SwXParagraph::getStart() throw (uno::RuntimeException, std::exception)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
SwParaSelection aParaSel( aCursor );
SwPaM aPam( *aCursor.Start() );
uno::Reference< text::XText > xParent = getText();
@@ -1359,7 +1359,7 @@ SwXParagraph::getEnd() throw (uno::RuntimeException, std::exception)
SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow());
SwPosition aPos( rTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
SwParaSelection aParaSel( aCursor );
SwPaM aPam( *aCursor.End() );
uno::Reference< text::XText > xParent = getText();
@@ -1376,7 +1376,7 @@ OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException, std::e
if (pTextNode)
{
SwPosition aPos( *pTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
SwParaSelection aParaSel( aCursor );
SwUnoCursorHelper::GetTextFromPam(aCursor, aRet);
}
@@ -1400,7 +1400,7 @@ throw (uno::RuntimeException, std::exception)
if (pTextNode)
{
SwPosition aPos( *pTextNode );
- SwCursor aCursor( aPos, 0, false );
+ SwCursor aCursor( aPos, nullptr, false );
if (!SwUnoCursorHelper::IsStartOfPara(aCursor)) {
aCursor.MovePara(fnParaCurr, fnParaStart);
}
@@ -1463,9 +1463,9 @@ uno::Reference<frame::XModel> SwXParagraph::GetModel()
if (pTextNode)
{
SwDocShell const*const pShell( pTextNode->GetDoc()->GetDocShell() );
- return (pShell) ? pShell->GetModel() : 0;
+ return (pShell) ? pShell->GetModel() : nullptr;
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 732dcc9a651c..c2044f36ebb8 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -82,8 +82,8 @@ SwXTextPortion::SwXTextPortion(
? PROPERTY_MAP_REDLINE_PORTION
: PROPERTY_MAP_TEXTPORTION_EXTENSIONS))
, m_xParentText(rParent)
- , m_FrameDepend(this, 0)
- , m_pFrameFormat(0)
+ , m_FrameDepend(this, nullptr)
+ , m_pFrameFormat(nullptr)
, m_ePortionType(eType)
, m_bIsCollapsed(false)
{
@@ -115,12 +115,12 @@ SwXTextPortion::SwXTextPortion(
, m_pPropSet(aSwMapProvider.GetPropertySet(
PROPERTY_MAP_TEXTPORTION_EXTENSIONS))
, m_xParentText(xParent)
- , m_pRubyText ( bIsEnd ? 0 : new uno::Any )
- , m_pRubyStyle ( bIsEnd ? 0 : new uno::Any )
- , m_pRubyAdjust ( bIsEnd ? 0 : new uno::Any )
- , m_pRubyIsAbove( bIsEnd ? 0 : new uno::Any )
- , m_FrameDepend(this, 0)
- , m_pFrameFormat(0)
+ , m_pRubyText ( bIsEnd ? nullptr : new uno::Any )
+ , m_pRubyStyle ( bIsEnd ? nullptr : new uno::Any )
+ , m_pRubyAdjust ( bIsEnd ? nullptr : new uno::Any )
+ , m_pRubyIsAbove( bIsEnd ? nullptr : new uno::Any )
+ , m_FrameDepend(this, nullptr)
+ , m_pFrameFormat(nullptr)
, m_ePortionType( bIsEnd ? PORTION_RUBY_END : PORTION_RUBY_START )
, m_bIsCollapsed(false)
{
@@ -278,7 +278,7 @@ void SwXTextPortion::GetPropertyValue(
pRet = "AnnotationEnd";
break;
default:
- pRet = 0;
+ pRet = nullptr;
}
OUString sRet;
@@ -360,7 +360,7 @@ void SwXTextPortion::GetPropertyValue(
break;
case RES_TXTATR_CJK_RUBY:
{
- const uno::Any* pToSet = 0;
+ const uno::Any* pToSet = nullptr;
switch(rEntry.nMemberId)
{
case MID_RUBY_TEXT : pToSet = m_pRubyText.get(); break;
@@ -404,7 +404,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl(
SwUnoCrsr& rUnoCrsr = GetCursor();
{
- SfxItemSet *pSet = 0;
+ SfxItemSet *pSet = nullptr;
// get starting point for the look-up, either the provided one or else
// from the beginning of the map
const SfxItemPropertyMap& rMap = m_pPropSet->getPropertyMap();
@@ -621,7 +621,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
sal_Int32 nProps = rPropertyNames.getLength();
const OUString *pProp = rPropertyNames.getConstArray();
- SfxItemSet *pSet = 0;
+ SfxItemSet *pSet = nullptr;
const SfxItemPropertyMap& rPropMap = m_pPropSet->getPropertyMap();
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 7af952afd233..890f4d50af80 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -153,7 +153,7 @@ namespace
if(rEndPos.nNode == nOwnNode)
{
unique_ptr<SwPosition> pCrossRefEndPos;
- const SwPosition* pEndPos = NULL;
+ const SwPosition* pEndPos = nullptr;
::sw::mark::CrossRefBookmark *const pCrossRefMark(dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk));
if(hasOther)
{
@@ -290,7 +290,7 @@ namespace
::sw::mark::AnnotationMark* const pAnnotationMark =
dynamic_cast< ::sw::mark::AnnotationMark* >(ppMark->get());
- if ( pAnnotationMark == NULL )
+ if ( pAnnotationMark == nullptr )
{
continue;
}
@@ -299,8 +299,8 @@ namespace
if ( rStartPos.nNode == nOwnNode )
{
const SwFormatField* pAnnotationFormatField = pAnnotationMark->GetAnnotationFormatField();
- OSL_ENSURE( pAnnotationFormatField != NULL, "<lcl_FillAnnotationStartArray(..)> - annotation fmt fld instance missing!" );
- if ( pAnnotationFormatField != NULL )
+ OSL_ENSURE( pAnnotationFormatField != nullptr, "<lcl_FillAnnotationStartArray(..)> - annotation fmt fld instance missing!" );
+ if ( pAnnotationFormatField != nullptr )
{
rAnnotationStartArr.insert(
SwAnnotationStartPortion_ImplSharedPtr(
@@ -449,13 +449,13 @@ lcl_ExportFieldMark(
if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
{
OSL_FAIL("cannot move cursor?");
- return 0;
+ return nullptr;
}
const sal_Unicode Char = pTextNode->GetText()[start];
if (CH_TXT_ATR_FIELDSTART == Char)
{
- ::sw::mark::IFieldmark* pFieldmark = NULL;
+ ::sw::mark::IFieldmark* pFieldmark = nullptr;
if (pDoc)
{
pFieldmark = pDoc->getIDocumentMarkAccess()->
@@ -472,7 +472,7 @@ lcl_ExportFieldMark(
}
else if (CH_TXT_ATR_FIELDEND == Char)
{
- ::sw::mark::IFieldmark* pFieldmark = NULL;
+ ::sw::mark::IFieldmark* pFieldmark = nullptr;
if (pDoc)
{
pFieldmark = pDoc->getIDocumentMarkAccess()->
@@ -489,7 +489,7 @@ lcl_ExportFieldMark(
}
else if (CH_TXT_ATR_FORMELEMENT == Char)
{
- ::sw::mark::IFieldmark* pFieldmark = NULL;
+ ::sw::mark::IFieldmark* pFieldmark = nullptr;
if (pDoc)
{
pFieldmark = pDoc->getIDocumentMarkAccess()->getFieldmarkFor(*pUnoCrsr->GetMark());
@@ -525,7 +525,7 @@ lcl_CreateRefMarkPortion(
xContent = SwXReferenceMark::CreateXReferenceMark(*pDoc, &rRefMark);
}
- SwXTextPortion* pPortion = 0;
+ SwXTextPortion* pPortion = nullptr;
if (!bEnd)
{
pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_START);
@@ -566,7 +566,7 @@ lcl_CreateTOXMarkPortion(
SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, & rTOXMark),
uno::UNO_QUERY);
- SwXTextPortion* pPortion = 0;
+ SwXTextPortion* pPortion = nullptr;
if (!bEnd)
{
pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_TOXMARK_START);
@@ -590,7 +590,7 @@ lcl_CreateMetaPortion(
const uno::Reference<rdf::XMetadatable> xMeta( SwXMeta::CreateXMeta(
*static_cast<SwFormatMeta &>(rAttr.GetAttr()).GetMeta(),
xParent, std::move(pPortions)));
- SwXTextPortion * pPortion(0);
+ SwXTextPortion * pPortion(nullptr);
if (RES_TXTATR_META == rAttr.Which())
{
const uno::Reference<text::XTextContent> xContent(xMeta,
@@ -625,7 +625,7 @@ static void lcl_ExportBookmark(
if ( nIndex < pPtr->getIndex() )
break;
- SwXTextPortion* pPortion = 0;
+ SwXTextPortion* pPortion = nullptr;
if ((BKM_TYPE_START == pPtr->nBkmType) ||
(BKM_TYPE_START_END == pPtr->nBkmType))
{
@@ -846,8 +846,8 @@ lcl_ExportHints(
break;
const SwTextAnnotationField* pTextAnnotationField = dynamic_cast<const SwTextAnnotationField*>( pAttr );
- ::sw::mark::IMark* pAnnotationMark = pTextAnnotationField ? pTextAnnotationField->GetAnnotationMark() : NULL;
- if ( pAnnotationMark != NULL )
+ ::sw::mark::IMark* pAnnotationMark = pTextAnnotationField ? pTextAnnotationField->GetAnnotationMark() : nullptr;
+ if ( pAnnotationMark != nullptr )
{
SwXTextPortion* pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION_END );
pPortion->SetBookmark(SwXBookmark::CreateXBookmark(
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 13161e32fb82..7c705789a212 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -119,15 +119,15 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
// skip all tables at the beginning
SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode();
- SwContentNode* pContentNode = NULL;
- bool bTable = pTableNode != NULL;
- while( pTableNode != NULL )
+ SwContentNode* pContentNode = nullptr;
+ bool bTable = pTableNode != nullptr;
+ while( pTableNode != nullptr )
{
rUnoCursor.GetPoint()->nNode = *(pTableNode->EndOfSectionNode());
pContentNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode);
pTableNode = pContentNode->FindTableNode();
}
- if( pContentNode != NULL )
+ if( pContentNode != nullptr )
rUnoCursor.GetPoint()->nContent.Assign( pContentNode, 0 );
if( bTable && rUnoCursor.GetNode().FindSttNodeByType( SwNormalStartNode )
!= GetStartNode() )
@@ -454,13 +454,13 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
break;
case ND_TEXTNODE :
{
- SwPosition* pPoint = 0;
+ SwPosition* pPoint = nullptr;
if(bStart || !pRedline->HasMark())
pPoint = pRedline->GetPoint();
else
pPoint = pRedline->GetMark();
const uno::Reference<text::XTextRange> xRange =
- SwXTextRange::CreateXTextRange(*pDoc, *pPoint, 0);
+ SwXTextRange::CreateXTextRange(*pDoc, *pPoint, nullptr);
xRet = xRange.get();
}
break;
@@ -519,8 +519,8 @@ void SwXRedline::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
{
- pDoc = 0;
- pRedline = 0;
+ pDoc = nullptr;
+ pRedline = nullptr;
}
}
@@ -549,7 +549,7 @@ sal_Bool SwXRedline::hasElements( ) throw(uno::RuntimeException, std::exception
{
if(!pDoc)
throw uno::RuntimeException();
- return 0 != pRedline->GetContentIdx();
+ return nullptr != pRedline->GetContentIdx();
}
uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() throw( uno::RuntimeException, std::exception )
@@ -570,7 +570,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() throw( uno::
// is here a table?
SwTableNode* pTableNode = rUnoCrsr.GetNode().FindTableNode();
- SwContentNode* pCont = 0;
+ SwContentNode* pCont = nullptr;
while( pTableNode )
{
rUnoCrsr.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index fab95a23cc27..452386f2a209 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -180,7 +180,7 @@ void SwXRedlineEnumeration::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
{
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
- pDoc = 0;
+ pDoc = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index fe78e9b12e76..39650a219497 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -59,7 +59,7 @@ public:
Impl( SwDoc *const pDoc, SwFormatRefMark *const pRefMark)
: SwClient(pRefMark)
, m_EventListeners(m_Mutex)
- , m_bIsDescriptor(0 == pRefMark)
+ , m_bIsDescriptor(nullptr == pRefMark)
, m_pDoc(pDoc)
, m_pMarkFormat(pRefMark)
{
@@ -69,7 +69,7 @@ public:
}
}
- bool IsValid() const { return 0 != GetRegisteredIn(); }
+ bool IsValid() const { return nullptr != GetRegisteredIn(); }
void InsertRefMark( SwPaM & rPam, SwXTextCursor const*const pCursor );
void Invalidate();
protected:
@@ -84,8 +84,8 @@ void SwXReferenceMark::Impl::Invalidate()
{
GetRegisteredIn()->Remove(this);
}
- m_pDoc = 0;
- m_pMarkFormat = 0;
+ m_pDoc = nullptr;
+ m_pMarkFormat = nullptr;
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
@@ -230,7 +230,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
}
// aRefMark was copied into the document pool; now retrieve real format...
- SwTextAttr * pTextAttr(0);
+ SwTextAttr * pTextAttr(nullptr);
if (bMark)
{
// #i107672#
@@ -252,13 +252,13 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
SwTextNode *pTextNd = rPam.GetNode().GetTextNode();
OSL_ASSERT(pTextNd);
pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : NULL;
+ rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : nullptr;
}
if (!pTextAttr)
{
throw uno::RuntimeException(
- "SwXReferenceMark::InsertRefMark(): cannot insert attribute", 0);
+ "SwXReferenceMark::InsertRefMark(): cannot insert attribute", nullptr);
}
m_pMarkFormat = &pTextAttr->GetRefMark();
@@ -277,8 +277,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
@@ -286,7 +286,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
}
SwDoc *const pDocument =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pDocument)
{
throw lang::IllegalArgumentException();
@@ -328,7 +328,7 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException, std::exception)
}
}
}
- return 0;
+ return nullptr;
}
void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException, std::exception)
@@ -432,7 +432,7 @@ throw (uno::RuntimeException, std::exception)
m_pImpl->m_sMarkName = rName;
//create a new one
- m_pImpl->InsertRefMark( aPam, 0 );
+ m_pImpl->InsertRefMark( aPam, nullptr );
m_pImpl->m_pDoc = aPam.GetDoc();
}
}
@@ -568,7 +568,7 @@ const SwStartNode *SwXMetaText::GetStartNode() const
{
SwXText const * const pParent(
dynamic_cast<SwXText*>(m_rMeta.GetParentText().get()));
- return (pParent) ? pParent->GetStartNode() : 0;
+ return (pParent) ? pParent->GetStartNode() : nullptr;
}
void SwXMetaText::PrepareForAttach( uno::Reference<text::XTextRange> & xRange,
@@ -577,7 +577,7 @@ void SwXMetaText::PrepareForAttach( uno::Reference<text::XTextRange> & xRange,
// create a new cursor to prevent modifying SwXTextRange
xRange = static_cast<text::XWordCursor*>(
new SwXTextCursor(*GetDoc(), &m_rMeta, CURSOR_META, *rPam.GetPoint(),
- (rPam.HasMark()) ? rPam.GetMark() : 0));
+ (rPam.HasMark()) ? rPam.GetMark() : nullptr));
}
bool SwXMetaText::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
@@ -657,7 +657,7 @@ public:
, m_EventListeners(m_Mutex)
, m_pTextPortions( pPortions )
, m_bIsDisposed( false )
- , m_bIsDescriptor(0 == pMeta)
+ , m_bIsDescriptor(nullptr == pMeta)
, m_xParentText(xParentText)
, m_xText(new SwXMetaText(rDoc, rThis))
{
@@ -713,7 +713,7 @@ SwXMeta::SwXMeta(SwDoc *const pDoc, ::sw::Meta *const pMeta,
}
SwXMeta::SwXMeta(SwDoc *const pDoc)
- : m_pImpl( new SwXMeta::Impl(*this, *pDoc, 0, 0, 0) )
+ : m_pImpl( new SwXMeta::Impl(*this, *pDoc, nullptr, nullptr, nullptr) )
{
}
@@ -766,17 +766,17 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
// create new SwXMeta
SwTextNode * const pTextNode( rMeta.GetTextNode() );
SAL_WARN_IF(!pTextNode, "sw.uno", "CreateXMeta: no text node?");
- if (!pTextNode) { return 0; }
+ if (!pTextNode) { return nullptr; }
uno::Reference<text::XText> xParentText(i_xParent);
if (!xParentText.is())
{
SwTextMeta * const pTextAttr( rMeta.GetTextAttr() );
SAL_WARN_IF(!pTextAttr, "sw.uno", "CreateXMeta: no text attr?");
- if (!pTextAttr) { return 0; }
+ if (!pTextAttr) { return nullptr; }
const SwPosition aPos(*pTextNode, pTextAttr->GetStart());
xParentText.set( ::sw::CreateParentXText(*pTextNode->GetDoc(), aPos) );
}
- if (!xParentText.is()) { return 0; }
+ if (!xParentText.is()) { return nullptr; }
SwXMeta *const pXMeta( (RES_TXTATR_META == rMeta.GetFormatMeta()->Which())
? new SwXMeta (pTextNode->GetDoc(), &rMeta, xParentText,
pPortions.release()) // temporarily un-unique_ptr :-(
@@ -830,7 +830,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but start "
"of text range not in same paragraph as text content",
- 0, 0);
+ nullptr, 0);
}
bool bForceExpandHints(false);
const sal_Int32 nStartPos(pStartPos->nContent.GetIndex());
@@ -841,7 +841,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but start "
"of text range not inside text content",
- 0, 0);
+ nullptr, 0);
}
else if (nStartPos == nMetaEnd)
{
@@ -855,7 +855,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but end "
"of text range not in same paragraph as text content",
- 0, 0);
+ nullptr, 0);
}
const sal_Int32 nEndPos(pEndPos->nContent.GetIndex());
// not <= but < because nMetaStart is behind dummy char!
@@ -865,7 +865,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
throw lang::IllegalArgumentException(
"trying to insert into a nesting text content, but end "
"of text range not inside text content",
- 0, 0);
+ nullptr, 0);
}
else if (nEndPos == nMetaEnd)
{
@@ -1001,7 +1001,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
SwXTextRange *const pRange(
::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel));
- OTextCursorHelper *const pCursor( (pRange) ? 0 :
+ OTextCursorHelper *const pCursor( (pRange) ? nullptr :
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel));
if (!pRange && !pCursor)
{
@@ -1288,10 +1288,10 @@ uno::Reference<frame::XModel> SwXMeta::GetModel()
if (pTextNode)
{
SwDocShell const * const pShell(pTextNode->GetDoc()->GetDocShell());
- return (pShell) ? pShell->GetModel() : 0;
+ return (pShell) ? pShell->GetModel() : nullptr;
}
}
- return 0;
+ return nullptr;
}
inline const ::sw::MetaField * SwXMeta::Impl::GetMetaField() const
@@ -1532,7 +1532,7 @@ lcl_getPrefixOrSuffix(
uno::Reference<rdf::XURI> const & xPredicate)
{
const uno::Reference<container::XEnumeration> xEnum(
- xRepository->getStatements(xMetaField, xPredicate, 0),
+ xRepository->getStatements(xMetaField, xPredicate, nullptr),
uno::UNO_SET_THROW);
while (xEnum->hasMoreElements()) {
rdf::Statement stmt;
@@ -1576,7 +1576,7 @@ getPrefixAndSuffix(
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"getPrefixAndSuffix: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 150a0ef821e1..2179c688d785 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -121,8 +121,8 @@ public:
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
, m_EventListeners(m_Mutex)
, m_bIndexHeader(bIndexHeader)
- , m_bIsDescriptor(0 == pFormat)
- , m_pProps((pFormat) ? 0 : new SwTextSectionProperties_Impl())
+ , m_bIsDescriptor(nullptr == pFormat)
+ , m_pProps((pFormat) ? nullptr : new SwTextSectionProperties_Impl())
{
}
@@ -135,7 +135,7 @@ public:
SwSectionFormat & GetSectionFormatOrThrow() const {
SwSectionFormat *const pFormat( GetSectionFormat() );
if (!pFormat) {
- throw uno::RuntimeException("SwXTextSection: disposed or invalid", 0);
+ throw uno::RuntimeException("SwXTextSection: disposed or invalid", nullptr);
}
return *pFormat;
}
@@ -240,7 +240,7 @@ SwXTextSection::getParentSection() throw (uno::RuntimeException, std::exception)
SwSectionFormat *const pParentFormat = rSectionFormat.GetParent();
const uno::Reference< text::XTextSection > xRet =
- (pParentFormat) ? CreateXTextSection(pParentFormat) : 0;
+ (pParentFormat) ? CreateXTextSection(pParentFormat) : nullptr;
return xRet;
}
@@ -275,8 +275,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel);
@@ -285,7 +285,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
SwDoc *const pDoc =
- (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0);
+ (pRange) ? &pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : nullptr);
if (!pDoc)
{
throw lang::IllegalArgumentException();
@@ -295,7 +295,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
//das muss jetzt true liefern
::sw::XTextRangeToSwPaM(aPam, xTextRange);
UnoActionContext aCont(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr );
if (m_pImpl->m_sName.isEmpty())
{
@@ -395,11 +395,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
SwSection *const pRet =
- pDoc->InsertSwSection( aPam, aSect, 0, aSet.Count() ? &aSet : 0 );
+ pDoc->InsertSwSection( aPam, aSect, nullptr, aSet.Count() ? &aSet : nullptr );
if (!pRet) // fdo#42450 text range could partially overlap existing section
{
// shouldn't have created an undo object yet
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
throw lang::IllegalArgumentException(
"SwXTextSection::attach(): invalid TextRange",
static_cast< ::cppu::OWeakObject*>(this), 0);
@@ -426,7 +426,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
// Undo-Klammerung hier beenden
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
m_pImpl->m_pProps.reset();
m_pImpl->m_bIsDescriptor = false;
}
@@ -441,8 +441,8 @@ SwXTextSection::getAnchor() throw (uno::RuntimeException, std::exception)
if(pSectFormat)
{
const SwNodeIndex* pIdx;
- if( 0 != ( pSectFormat->GetSection() ) &&
- 0 != ( pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
+ if( nullptr != ( pSectFormat->GetSection() ) &&
+ nullptr != ( pIdx = pSectFormat->GetContent().GetContentIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
SwPaM aPaM(*pIdx);
@@ -564,7 +564,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
::std::unique_ptr<SwSectionData> const pSectionData(
- (pFormat) ? new SwSectionData(*pFormat->GetSection()) : 0);
+ (pFormat) ? new SwSectionData(*pFormat->GetSection()) : nullptr);
OUString const*const pPropertyNames = rPropertyNames.getConstArray();
uno::Any const*const pValues = rValues.getConstArray();
@@ -821,7 +821,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- SfxPoolItem* pPutItem = 0;
+ SfxPoolItem* pPutItem = nullptr;
if (RES_COL == pEntry->nWID)
{
if (!m_pProps->m_pColItem.get())
@@ -960,7 +960,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
uno::Any* pRet = aRet.getArray();
- SwSection *const pSect = (pFormat) ? pFormat->GetSection() : 0;
+ SwSection *const pSect = (pFormat) ? pFormat->GetSection() : nullptr;
const OUString* pPropertyNames = rPropertyNames.getConstArray();
for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
@@ -1093,13 +1093,13 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
// search enclosing index
SwSection* pEnclosingSection = pSect;
- while ((pEnclosingSection != NULL) &&
+ while ((pEnclosingSection != nullptr) &&
(TOX_CONTENT_SECTION != pEnclosingSection->GetType()))
{
pEnclosingSection = pEnclosingSection->GetParent();
}
SwTOXBaseSection* const pTOXBaseSect = pEnclosingSection ?
- dynamic_cast<SwTOXBaseSection*>( pEnclosingSection ) : NULL;
+ dynamic_cast<SwTOXBaseSection*>( pEnclosingSection ) : nullptr;
if (pTOXBaseSect)
{
// convert section to TOXBase and get SwXDocumentIndex
@@ -1113,7 +1113,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
break;
case WID_SECT_IS_GLOBAL_DOC_SECTION:
{
- const bool bRet = pFormat && (NULL != pFormat->GetGlobalDocSection());
+ const bool bRet = pFormat && (nullptr != pFormat->GetGlobalDocSection());
pRet[nProperty] <<= bRet;
}
break;
@@ -1171,7 +1171,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
else
{
- const SfxPoolItem* pQueryItem = 0;
+ const SfxPoolItem* pQueryItem = nullptr;
if (RES_COL == pEntry->nWID)
{
if (!m_pProps->m_pColItem.get())
@@ -1478,7 +1478,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
}
::std::unique_ptr<SwSectionData> const pSectionData(
- (pFormat) ? new SwSectionData(*pFormat->GetSection()) : 0);
+ (pFormat) ? new SwSectionData(*pFormat->GetSection()) : nullptr);
::std::unique_ptr<SfxItemSet> pNewAttrSet;
bool bLinkModeChanged = false;
@@ -1758,9 +1758,9 @@ uno::Reference<frame::XModel> SwXTextSection::GetModel()
if (pSectionFormat)
{
SwDocShell const*const pShell( pSectionFormat->GetDoc()->GetDocShell() );
- return (pShell) ? pShell->GetModel() : 0;
+ return (pShell) ? pShell->GetModel() : nullptr;
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 6ec34a4fc57a..903e47074ae3 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -186,7 +186,7 @@ const SfxItemPropertySet* GetLineNumberingSet()
static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
{
- SwCharFormat* pRet = 0;
+ SwCharFormat* pRet = nullptr;
OUString uTmp;
aValue >>= uTmp;
OUString sCharFormat;
@@ -492,7 +492,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_CHARACTER_STYLE:
{
OUString aString;
- const SwCharFormat* pCharFormat = 0;
+ const SwCharFormat* pCharFormat = nullptr;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
if( rFootnoteInfo.GetAnchorCharFormatDep()->GetRegisteredIn() )
@@ -731,7 +731,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_CHARACTER_STYLE:
{
OUString aString;
- const SwCharFormat* pCharFormat = 0;
+ const SwCharFormat* pCharFormat = nullptr;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
if( rEndInfo.GetAnchorCharFormatDep()->GetRegisteredIn() )
@@ -1103,7 +1103,7 @@ Sequence< OUString > SwXNumberingRules::getSupportedServiceNames() throw( Runtim
SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc) :
pDoc(doc),
- pDocShell(0),
+ pDocShell(nullptr),
pNumRule(new SwNumRule(rRule)),
m_pPropertySet(GetNumberingRulesSet()),
bOwnNumRuleCreated(true)
@@ -1130,9 +1130,9 @@ SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc) :
}
SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
- pDoc(0),
+ pDoc(nullptr),
pDocShell(&rDocSh),
- pNumRule(0),
+ pNumRule(nullptr),
m_pPropertySet(GetNumberingRulesSet()),
bOwnNumRuleCreated(false)
{
@@ -1141,8 +1141,8 @@ SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
pDoc(&rDoc),
- pDocShell(0),
- pNumRule(0),
+ pDocShell(nullptr),
+ pNumRule(nullptr),
m_pPropertySet(GetNumberingRulesSet()),
bOwnNumRuleCreated(false)
{
@@ -1151,7 +1151,7 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
#if OSL_DEBUG_LEVEL > 1
const sal_uInt16 nIndex =
#endif
- rDoc.MakeNumRule( m_sCreatedNumRuleName, 0, false,
+ rDoc.MakeNumRule( m_sCreatedNumRuleName, nullptr, false,
// #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
#if OSL_DEBUG_LEVEL > 1
@@ -1180,7 +1180,7 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
throw lang::IllegalArgumentException();
const uno::Sequence<beans::PropertyValue>& rProperties =
*static_cast<const uno::Sequence<beans::PropertyValue>*>(rElement.getValue());
- SwNumRule* pRule = 0;
+ SwNumRule* pRule = nullptr;
if(pNumRule)
SwXNumberingRules::SetNumberingRuleByIndex( *pNumRule,
rProperties, nIndex);
@@ -1200,7 +1200,7 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
m_sNewCharStyleNames[i] != UNO_NAME_CHARACTER_FORMAT_NONE &&
(!aFormat.GetCharFormat() || aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
{
- SwCharFormat* pCharFormat = 0;
+ SwCharFormat* pCharFormat = nullptr;
for(size_t j = 0; j< nChCount; ++j)
{
SwCharFormat* pTmp = (*pFormats)[j];
@@ -1227,7 +1227,7 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
pDocShell->GetDoc()->SetOutlineNumRule( aNumRule );
}
else if(!pNumRule && pDoc && !m_sCreatedNumRuleName.isEmpty() &&
- 0 != (pRule = pDoc->FindNumRulePtr( m_sCreatedNumRuleName )))
+ nullptr != (pRule = pDoc->FindNumRulePtr( m_sCreatedNumRuleName )))
{
SwXNumberingRules::SetNumberingRuleByIndex( *pRule,
rProperties, nIndex);
@@ -1335,7 +1335,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
SwStyleNameMapper::FillProgName(sValue, aUString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
}
- return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : 0);
+ return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr);
}
@@ -1343,7 +1343,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
const SwNumFormat& rFormat, OUString const& rCharFormatName,
OUString const*const pHeadingStyleName)
{
- bool bChapterNum = pHeadingStyleName != 0;
+ bool bChapterNum = pHeadingStyleName != nullptr;
::std::vector<PropertyValue> aPropertyValues;
aPropertyValues.reserve(32);
@@ -1472,7 +1472,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_URL, aUString));
//graphicbitmap
- const Graphic* pGraphic = 0;
+ const Graphic* pGraphic = nullptr;
if(pBrush )
pGraphic = pBrush->GetGraphic();
if(pGraphic)
@@ -1515,7 +1515,7 @@ static PropertyValue const* lcl_FindProperty(
if (sCmp == pTemp->Name)
return pTemp;
}
- return 0;
+ return nullptr;
}
void SwXNumberingRules::SetNumberingRuleByIndex(
@@ -1655,9 +1655,9 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
bool bWrongArg = false;
if(!bExcept)
{
- SvxBrushItem* pSetBrush = 0;
- Size* pSetSize = 0;
- SwFormatVertOrient* pSetVOrient = 0;
+ SvxBrushItem* pSetBrush = nullptr;
+ Size* pSetSize = nullptr;
+ SwFormatVertOrient* pSetVOrient = nullptr;
bool bCharStyleNameSet = false;
for(size_t i = 0; i < SAL_N_ELEMENTS( aNumPropertyNames ) && !bExcept && !bWrongArg; ++i)
@@ -1714,7 +1714,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
{
rCharStyleName = aInvalidStyle;
- aFormat.SetCharFormat(0);
+ aFormat.SetCharFormat(nullptr);
}
else if(pDocShell || pDoc)
{
@@ -1722,7 +1722,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
const size_t nChCount = pFormats->size();
- SwCharFormat* pCharFormat = 0;
+ SwCharFormat* pCharFormat = nullptr;
if (!sCharFormatName.isEmpty())
{
for(size_t j = 0; j< nChCount; ++j)
@@ -1916,7 +1916,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
assert( !pDocShell );
OUString sBulletFontName;
pProp->Value >>= sBulletFontName;
- SwDocShell* pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : 0;
+ SwDocShell* pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
if( !sBulletFontName.isEmpty() && pLclDocShell )
{
const SvxFontListItem* pFontListItem =
@@ -2060,12 +2060,12 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
const Graphic* pGraphic = pSetBrush->GetGraphic();
if(pGraphic)
- *pSetSize = ::GetGraphicSizeTwip(*pGraphic, 0);
+ *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
}
}
sal_Int16 eOrient = pSetVOrient ?
(sal_Int16)pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
- aFormat.SetGraphicBrush( pSetBrush, pSetSize, text::VertOrientation::NONE == eOrient ? 0 : &eOrient );
+ aFormat.SetGraphicBrush( pSetBrush, pSetSize, text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
}
}
if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
@@ -2100,8 +2100,8 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwNumRule* pDocRule = 0;
- SwNumRule* pCreatedRule = 0;
+ SwNumRule* pDocRule = nullptr;
+ SwNumRule* pCreatedRule = nullptr;
if(!pNumRule)
{
if(!pNumRule && pDocShell)
@@ -2264,8 +2264,8 @@ void SwXNumberingRules::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew
{
if(bOwnNumRuleCreated)
delete pNumRule;
- pNumRule = 0;
- pDoc = 0;
+ pNumRule = nullptr;
+ pDoc = nullptr;
}
}
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index adc767a484cb..b192e5541b81 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -60,7 +60,7 @@ SwSearchProperties_Impl::SwSearchProperties_Impl() :
nArrLen = aPropertyEntries.size();
pValueArr = new beans::PropertyValue*[nArrLen];
for(sal_uInt32 i = 0; i < nArrLen; i++)
- pValueArr[i] = 0;
+ pValueArr[i] = nullptr;
}
SwSearchProperties_Impl::~SwSearchProperties_Impl()
@@ -79,7 +79,7 @@ void SwSearchProperties_Impl::SetProperties(const uno::Sequence< beans::Prope
for(sal_uInt32 i = 0; i < nArrLen; ++i)
{
delete pValueArr[i];
- pValueArr[i] = 0;
+ pValueArr[i] = nullptr;
}
const sal_uInt32 nLen = aSearchAttribs.getLength();
@@ -122,60 +122,60 @@ const uno::Sequence< beans::PropertyValue > SwSearchProperties_Impl::GetProperti
void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch) const
{
- SfxPoolItem* pBoxItem = 0,
- *pCharBoxItem = 0,
- *pBreakItem = 0,
- *pAutoKernItem = 0,
- *pWLineItem = 0,
- *pTabItem = 0,
- *pSplitItem = 0,
- *pRegItem = 0,
- *pLineSpaceItem = 0,
- *pLineNumItem = 0,
- *pKeepItem = 0,
- *pLRItem = 0,
- *pULItem = 0,
- *pBackItem = 0,
- *pAdjItem = 0,
- *pDescItem = 0,
- *pInetItem = 0,
- *pDropItem = 0,
- *pWeightItem = 0,
- *pULineItem = 0,
- *pOLineItem = 0,
- *pCharFormatItem = 0,
- *pShadItem = 0,
- *pPostItem = 0,
- *pNHyphItem = 0,
- *pLangItem = 0,
- *pKernItem = 0,
- *pFontSizeItem = 0,
- *pFontItem = 0,
- *pBlinkItem = 0,
- *pEscItem = 0,
- *pCrossedOutItem = 0,
- *pContourItem = 0,
- *pCharColorItem = 0,
- *pCasemapItem = 0,
- *pBrushItem = 0,
- *pFontCJKItem = 0,
- *pFontSizeCJKItem = 0,
- *pCJKLangItem = 0,
- *pCJKPostureItem = 0,
- *pCJKWeightItem = 0,
- *pFontCTLItem = 0,
- *pFontSizeCTLItem = 0,
- *pCTLLangItem = 0,
- *pCTLPostureItem = 0,
- *pCTLWeightItem = 0,
- *pShadowItem = 0;
+ SfxPoolItem* pBoxItem = nullptr,
+ *pCharBoxItem = nullptr,
+ *pBreakItem = nullptr,
+ *pAutoKernItem = nullptr,
+ *pWLineItem = nullptr,
+ *pTabItem = nullptr,
+ *pSplitItem = nullptr,
+ *pRegItem = nullptr,
+ *pLineSpaceItem = nullptr,
+ *pLineNumItem = nullptr,
+ *pKeepItem = nullptr,
+ *pLRItem = nullptr,
+ *pULItem = nullptr,
+ *pBackItem = nullptr,
+ *pAdjItem = nullptr,
+ *pDescItem = nullptr,
+ *pInetItem = nullptr,
+ *pDropItem = nullptr,
+ *pWeightItem = nullptr,
+ *pULineItem = nullptr,
+ *pOLineItem = nullptr,
+ *pCharFormatItem = nullptr,
+ *pShadItem = nullptr,
+ *pPostItem = nullptr,
+ *pNHyphItem = nullptr,
+ *pLangItem = nullptr,
+ *pKernItem = nullptr,
+ *pFontSizeItem = nullptr,
+ *pFontItem = nullptr,
+ *pBlinkItem = nullptr,
+ *pEscItem = nullptr,
+ *pCrossedOutItem = nullptr,
+ *pContourItem = nullptr,
+ *pCharColorItem = nullptr,
+ *pCasemapItem = nullptr,
+ *pBrushItem = nullptr,
+ *pFontCJKItem = nullptr,
+ *pFontSizeCJKItem = nullptr,
+ *pCJKLangItem = nullptr,
+ *pCJKPostureItem = nullptr,
+ *pCJKWeightItem = nullptr,
+ *pFontCTLItem = nullptr,
+ *pFontSizeCTLItem = nullptr,
+ *pCTLLangItem = nullptr,
+ *pCTLPostureItem = nullptr,
+ *pCTLWeightItem = nullptr,
+ *pShadowItem = nullptr;
PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin();
for(sal_uInt32 i = 0; i < nArrLen; i++, ++aIt)
{
if(pValueArr[i])
{
- SfxPoolItem* pTempItem = 0;
+ SfxPoolItem* pTempItem = nullptr;
switch(aIt->nWID)
{
case RES_BOX:
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f615d0dad9ba..24134bf53801 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -570,7 +570,7 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
sal_Int32 SwXStyleFamily::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- return lcl_GetCountOrName ( *m_pDocShell->GetDoc(), m_eFamily, NULL );
+ return lcl_GetCountOrName ( *m_pDocShell->GetDoc(), m_eFamily, nullptr );
}
uno::Any SwXStyleFamily::getByIndex(sal_Int32 nIndex)
@@ -785,7 +785,7 @@ sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeExc
SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( m_eFamily ), true );
m_pBasePool->SetSearchMask(m_eFamily);
SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName);
- bRet = 0 != pBase;
+ bRet = nullptr != pBase;
}
else
throw uno::RuntimeException();
@@ -829,7 +829,7 @@ void SwXStyleFamily::insertByName(const OUString& rName, const uno::Any& rElemen
uno::Reference<lang::XUnoTunnel> xStyleTunnel( *pxRef, uno::UNO_QUERY);
- SwXStyle* pNewStyle = 0;
+ SwXStyle* pNewStyle = nullptr;
if(xStyleTunnel.is())
{
pNewStyle = reinterpret_cast< SwXStyle * >(
@@ -995,8 +995,8 @@ void SwXStyleFamily::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const SfxSimpleHint *pHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if( pHint && ( pHint->GetId() & SFX_HINT_DYING ) )
{
- m_pBasePool = 0;
- m_pDocShell = 0;
+ m_pBasePool = nullptr;
+ m_pDocShell = nullptr;
EndListening(rBC);
}
}
@@ -1013,7 +1013,7 @@ SwXStyle* SwXStyleFamily::_FindStyle(const OUString& rStyleName)const
return pTempStyle;
}
}
- return 0;
+ return nullptr;
}
class SwStyleProperties_Impl
@@ -1044,7 +1044,7 @@ SwStyleProperties_Impl::SwStyleProperties_Impl(const SfxItemPropertyMap& rMap) :
pAnyArr = new uno::Any* [nArrLen];
for ( sal_uInt32 i =0 ; i < nArrLen; i++ )
- pAnyArr[i] = 0;
+ pAnyArr[i] = nullptr;
}
SwStyleProperties_Impl::~SwStyleProperties_Impl()
@@ -1084,7 +1084,7 @@ bool SwStyleProperties_Impl::ClearProperty( const OUString& rName )
if( rName == aIt->sName )
{
delete pAnyArr[nPos];
- pAnyArr[ nPos ] = 0;
+ pAnyArr[ nPos ] = nullptr;
bRet = true;
break;
}
@@ -1099,7 +1099,7 @@ void SwStyleProperties_Impl::ClearAllProperties( )
for ( sal_uInt32 i = 0; i < nArrLen; i++ )
{
delete pAnyArr[i];
- pAnyArr[ i ] = 0;
+ pAnyArr[ i ] = nullptr;
}
}
@@ -1207,7 +1207,7 @@ uno::Sequence< OUString > SwXStyle::getSupportedServiceNames() throw( uno::Runti
SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, bool bConditional) :
m_pDoc( pDoc ),
- m_pBasePool(0),
+ m_pBasePool(nullptr),
m_eFamily(eFam),
m_bIsDescriptor(true),
m_bIsConditional(bConditional)
@@ -1279,7 +1279,7 @@ SwXStyle::SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
m_eFamily(eFam),
m_bIsDescriptor(false),
m_bIsConditional(false),
- m_pPropertiesImpl(0)
+ m_pPropertiesImpl(nullptr)
{
StartListening(rPool);
if(eFam == SFX_STYLE_FAMILY_PARA)
@@ -1313,7 +1313,7 @@ void SwXStyle::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
{
- m_pDoc = 0;
+ m_pDoc = nullptr;
mxStyleData.clear();
mxStyleFamily.clear();
}
@@ -1541,7 +1541,7 @@ void SwXStyle::ApplyDescriptorProperties()
PropertyEntryVector_t::const_iterator aIt = rPropertyVector.begin();
while(aIt != rPropertyVector.end())
{
- uno::Any* pAny(0);
+ uno::Any* pAny(nullptr);
m_pPropertiesImpl->GetProperty(aIt->sName, pAny);
if (pAny)
setPropertyValue(aIt->sName, *pAny);
@@ -1562,8 +1562,8 @@ private:
public:
SwStyleBase_Impl(SwDoc& rSwDoc, const OUString& rName, const SwAttrSet* pParentStyle)
: mrDoc(rSwDoc)
- , mpOldPageDesc(0)
- , mpItemSet(0)
+ , mpOldPageDesc(nullptr)
+ , mpItemSet(nullptr)
, mrStyleName(rName)
, mpParentStyle(pParentStyle)
{
@@ -1837,7 +1837,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
uno::Reference<lang::XUnoTunnel> xNumberTunnel( *pxRulesRef, uno::UNO_QUERY);
- SwXNumberingRules* pSwXRules = 0;
+ SwXNumberingRules* pSwXRules = nullptr;
if(xNumberTunnel.is())
{
pSwXRules = reinterpret_cast< SwXNumberingRules * >(
@@ -1863,7 +1863,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
(!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharStyleNames[i]) )
{
- SwCharFormat* pCharFormat = 0;
+ SwCharFormat* pCharFormat = nullptr;
for(size_t j = 0; j< nChCount; ++j)
{
SwCharFormat* pTmp = (*pFormats)[j];
@@ -1944,7 +1944,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFormatPageDesc* pNewDesc = 0;
+ SwFormatPageDesc* pNewDesc = nullptr;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
@@ -2126,7 +2126,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(aValue >>= sTmp)
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFormatRuby* pRuby = 0;
+ SwFormatRuby* pRuby = nullptr;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) )
pRuby = new SwFormatRuby(*static_cast<const SwFormatRuby*>(pItem));
@@ -2157,7 +2157,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
SfxItemSet& rStyleSet = rBase.GetItemSet();
- SwFormatDrop* pDrop = 0;
+ SwFormatDrop* pDrop = nullptr;
const SfxPoolItem* pItem;
if(SfxItemState::SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) )
pDrop = new SwFormatDrop(*static_cast<const SwFormatDrop*>(pItem));
@@ -2328,7 +2328,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(FN_UNO_IS_PHYSICAL == rEntry.nWID)
{
- bool bPhys = pBase != 0;
+ bool bPhys = pBase != nullptr;
if(pBase)
{
bPhys = static_cast<SwDocStyleSheet*>(pBase)->IsPhysical();
@@ -2473,10 +2473,10 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
OUString aStyleName;
- const SwCollCondition* pCond = 0;
+ const SwCollCondition* pCond = nullptr;
if( pFormat && RES_CONDTXTFMTCOLL == pFormat->Which() &&
- 0 != ( pCond = static_cast<SwConditionTextFormatColl*>(pFormat)->
- HasCondition( SwCollCondition( 0, pCmds[n].nCnd, pCmds[n].nSubCond ) ) )
+ nullptr != ( pCond = static_cast<SwConditionTextFormatColl*>(pFormat)->
+ HasCondition( SwCollCondition( nullptr, pCmds[n].nCnd, pCmds[n].nSubCond ) ) )
&& pCond->GetTextFormatColl() )
{
// get programmatic style name from UI style name
@@ -2526,7 +2526,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
case SID_SWREGISTER_COLLECTION:
{
const SwPageDesc *pPageDesc = rBase.getNewBase()->GetPageDesc();
- const SwTextFormatColl* pCol = 0;
+ const SwTextFormatColl* pCol = nullptr;
OUString aString;
if( pPageDesc )
pCol = pPageDesc->GetRegisterFormatColl();
@@ -2657,7 +2657,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
uno::Any* pRet = aRet.getArray();
SwStyleBase_Impl aBase(*m_pDoc, m_sStyleName, &GetDoc()->GetDfltTextFormatColl()->GetAttrSet()); //UUUU add pDfltTextFormatColl as parent
- SfxStyleSheetBase* pBase = 0;
+ SfxStyleSheetBase* pBase = nullptr;
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
@@ -2680,7 +2680,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
}
else if(m_bIsDescriptor)
{
- uno::Any *pAny = 0;
+ uno::Any *pAny = nullptr;
m_pPropertiesImpl->GetProperty ( pNames[nProp], pAny );
if( !pAny )
{
@@ -2994,7 +2994,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- SwFormat *pTargetFormat = 0;
+ SwFormat *pTargetFormat = nullptr;
if(m_pBasePool)
{
@@ -3115,7 +3115,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
if(pBase)
{
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *static_cast<SwDocStyleSheet*>(pBase) ) );
- SwFormat *pTargetFormat = 0;
+ SwFormat *pTargetFormat = nullptr;
size_t nPgDscPos = SIZE_MAX;
switch(m_eFamily)
{
@@ -3317,7 +3317,7 @@ void SwXStyle::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if(( pHint->GetId() & SFX_HINT_DYING ) || ( pHint->GetId() & SfxStyleSheetHintId::ERASED))
{
- m_pBasePool = 0;
+ m_pBasePool = nullptr;
EndListening(rBC);
}
else if( pHint->GetId() &(SfxStyleSheetHintId::CHANGED|SfxStyleSheetHintId::ERASED) )
@@ -3336,8 +3336,8 @@ void SwXStyle::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SwXStyle::Invalidate()
{
m_sStyleName.clear();
- m_pBasePool = 0;
- m_pDoc = 0;
+ m_pBasePool = nullptr;
+ m_pDoc = nullptr;
mxStyleData.clear();
mxStyleFamily.clear();
}
@@ -3376,7 +3376,7 @@ static void lcl_putItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySe
rBaseImpl.replaceItemSet(pRememberItemSet);
// reset paret at ItemSet from SetItem
- rSetSet.SetParent(0);
+ rSetSet.SetParent(nullptr);
// set the new SvxSetItem at the real target and delete it
rBaseImpl.GetItemSet().Put(*pNewSetItem);
@@ -3457,7 +3457,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
{
// it is a Header/Footer entry, access the SvxSetItem containing it's information
- const SvxSetItem* pSetItem = 0;
+ const SvxSetItem* pSetItem = nullptr;
if (lcl_GetHeaderFooterItem(aBaseImpl.GetItemSet(),
rPropName, bFooter, pSetItem))
{
@@ -3561,7 +3561,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
if (bHeader || bFooter)
{
- const SvxSetItem* pSetItem = 0;
+ const SvxSetItem* pSetItem = nullptr;
if(SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, reinterpret_cast<const SfxPoolItem**>(&pSetItem)))
{
@@ -3579,7 +3579,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
aBaseImpl.replaceItemSet(pRememberItemSet);
// reset paret at ItemSet from SetItem
- rSetSet.SetParent(0);
+ rSetSet.SetParent(nullptr);
// set the new SvxSetItem at the real target and delete it
aBaseImpl.GetItemSet().Put(*pNewSetItem);
@@ -3675,7 +3675,7 @@ static uno::Reference<text::XText>
lcl_makeHeaderFooter(
const sal_uInt16 nRes, const bool bHeader, SwFrameFormat const*const pFrameFormat)
{
- if (!pFrameFormat) { return 0; }
+ if (!pFrameFormat) { return nullptr; }
const SfxItemSet& rSet = pFrameFormat->GetAttrSet();
const SfxPoolItem* pItem;
@@ -3691,7 +3691,7 @@ lcl_makeHeaderFooter(
return SwXHeadFootText::CreateXHeadFootText(*pHeadFootFormat, bHeader);
}
}
- return 0;
+ return nullptr;
}
uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
@@ -3710,7 +3710,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PAGE_STYLE);
const SfxItemPropertyMap& rMap = pPropSet->getPropertyMap();
SwStyleBase_Impl aBase(*GetDoc(), GetStyleName(), &GetDoc()->GetDfltFrameFormat()->GetAttrSet()); //UUUU add pDfltFrameFormat as parent
- SfxStyleSheetBase* pBase = 0;
+ SfxStyleSheetBase* pBase = nullptr;
for(sal_Int32 nProp = 0; nProp < nLength; nProp++)
{
@@ -3878,7 +3878,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
const SwPageDesc* pDesc = aBase.GetOldPageDesc();
assert(pDesc);
- const SwFrameFormat* pFrameFormat = 0;
+ const SwFrameFormat* pFrameFormat = nullptr;
bool bShare = (bHeader && pDesc->IsHeaderShared()) || (!bHeader && pDesc->IsFooterShared());
bool bShareFirst = pDesc->IsFirstShared();
// TextLeft returns the left content if there is one,
@@ -3926,7 +3926,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
}
else if(IsDescriptor())
{
- uno::Any* pAny = 0;
+ uno::Any* pAny = nullptr;
GetPropImpl()->GetProperty(rPropName, pAny);
if ( !pAny )
@@ -4147,7 +4147,7 @@ void SwXAutoStyleFamily::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNe
{
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
- m_pDocShell = 0;
+ m_pDocShell = nullptr;
}
uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
@@ -4159,8 +4159,8 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
throw uno::RuntimeException();
}
- const sal_uInt16* pRange = 0;
- const SfxItemPropertySet* pPropSet = 0;
+ const sal_uInt16* pRange = nullptr;
+ const SfxItemPropertySet* pPropSet = nullptr;
switch( m_eFamily )
{
case IStyleAccess::AUTO_STYLE_CHAR:
@@ -4171,7 +4171,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
}
case IStyleAccess::AUTO_STYLE_RUBY:
{
- pRange = 0;//aTextNodeSetRange;
+ pRange = nullptr;//aTextNodeSetRange;
pPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_RUBY_AUTO_STYLE);
break;
}
@@ -4366,7 +4366,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
}
//UUUU clear parent again
- aSet.SetParent(0);
+ aSet.SetParent(nullptr);
}
//UUUU need to ensure uniqueness of evtl. added NameOrIndex items
@@ -4453,7 +4453,7 @@ void SwXAutoStylesEnumerator::Modify( const SfxPoolItem* pOld, const SfxPoolItem
if(!GetRegisteredIn())
{
delete m_pImpl;
- m_pImpl = 0;
+ m_pImpl = nullptr;
}
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index ea8983ce0bbc..d3f8f718b43c 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -241,7 +241,7 @@ static void lcl_SetSpecialProperty(SwFrameFormat* pFormat,
{
OUString sPageStyle;
aValue >>= sPageStyle;
- const SwPageDesc* pDesc = 0;
+ const SwPageDesc* pDesc = nullptr;
if (!sPageStyle.isEmpty())
{
SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
@@ -1532,7 +1532,7 @@ sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool bExpand) throw( uno:
SwUnoCrsr& rUnoCrsr = GetCrsr();
SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr);
lcl_CrsrSelect(rTableCrsr, bExpand);
- return rTableCrsr.UpDown(true, Count, 0, 0);
+ return rTableCrsr.UpDown(true, Count, nullptr, 0);
}
sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1541,7 +1541,7 @@ sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool bExpand) throw( un
SwUnoCrsr& rUnoCrsr = GetCrsr();
SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr);
lcl_CrsrSelect(rTableCrsr, bExpand);
- return rTableCrsr.UpDown(false, Count, 0, 0);
+ return rTableCrsr.UpDown(false, Count, nullptr, 0);
}
void SwXTextTableCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException, std::exception )
@@ -1955,7 +1955,7 @@ SwXTextTable::SwXTextTable(SwFrameFormat& rFrameFormat)
, m_pImpl(new Impl)
,
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE)),
- pTableProps(0),
+ pTableProps(nullptr),
bIsDescriptor(false),
nRows(0),
nColumns(0),
@@ -2085,7 +2085,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
{
UnoActionContext aCont(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
const SwTable* pTable(nullptr);
if( 0 != aPam.Start()->nContent.GetIndex() )
{
@@ -2127,7 +2127,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
bIsDescriptor = false;
DELETEZ(pTableProps);
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
}
}
@@ -2599,22 +2599,22 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
SvxBoxItem aBox( RES_BOX );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBox.SetLine(aTopLine.isEmpty() ? 0 : &aTopLine, SvxBoxItemLine::TOP);
+ aBox.SetLine(aTopLine.isEmpty() ? nullptr : &aTopLine, SvxBoxItemLine::TOP);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::TOP, aBorder.IsTopLineValid);
- aBox.SetLine(aBottomLine.isEmpty() ? 0 : &aBottomLine, SvxBoxItemLine::BOTTOM);
+ aBox.SetLine(aBottomLine.isEmpty() ? nullptr : &aBottomLine, SvxBoxItemLine::BOTTOM);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::BOTTOM, aBorder.IsBottomLineValid);
- aBox.SetLine(aLeftLine.isEmpty() ? 0 : &aLeftLine, SvxBoxItemLine::LEFT);
+ aBox.SetLine(aLeftLine.isEmpty() ? nullptr : &aLeftLine, SvxBoxItemLine::LEFT);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::LEFT, aBorder.IsLeftLineValid);
- aBox.SetLine(aRightLine.isEmpty() ? 0 : &aRightLine, SvxBoxItemLine::RIGHT);
+ aBox.SetLine(aRightLine.isEmpty() ? nullptr : &aRightLine, SvxBoxItemLine::RIGHT);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::RIGHT, aBorder.IsRightLineValid);
- aBoxInfo.SetLine(aHoriLine.isEmpty() ? 0 : &aHoriLine, SvxBoxInfoItemLine::HORI);
+ aBoxInfo.SetLine(aHoriLine.isEmpty() ? nullptr : &aHoriLine, SvxBoxInfoItemLine::HORI);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::HORI, aBorder.IsHorizontalLineValid);
- aBoxInfo.SetLine(aVertLine.isEmpty() ? 0 : &aVertLine, SvxBoxInfoItemLine::VERT);
+ aBoxInfo.SetLine(aVertLine.isEmpty() ? nullptr : &aVertLine, SvxBoxInfoItemLine::VERT);
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::VERT, aBorder.IsVerticalLineValid);
aBox.SetDistance((sal_uInt16)convertMm100ToTwip(aBorder.Distance));
@@ -2644,7 +2644,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
SwDoc* pDoc = pFormat->GetDoc();
SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLines &rLines = pTable->GetTabLines();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
for(size_t i = 0; i < rLines.size(); ++i)
{
SwTableLine* pLine = rLines[i];
@@ -2674,7 +2674,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
}
}
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
break;
@@ -2937,7 +2937,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
}
else if(bIsDescriptor)
{
- const uno::Any* pAny = 0;
+ const uno::Any* pAny = nullptr;
if(!pTableProps->GetProperty(pEntry->nWID, pEntry->nMemberId, pAny))
throw lang::IllegalArgumentException();
else if(pAny)
@@ -3002,7 +3002,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException,
SwStartNode *pStNd;
SwNodeIndex aIdx( *pFormat->GetDoc()->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
- while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while ( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwNode *const pNd = & aIdx.GetNode();
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index addbaf396c98..ae52adfba05d 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -89,7 +89,7 @@ public:
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT))
, m_eType(eType)
, m_pDoc(pDoc)
- , m_bIsValid(0 != pDoc)
+ , m_bIsValid(nullptr != pDoc)
{
}
@@ -150,7 +150,7 @@ void SwXText::SetDoc(SwDoc *const pDoc)
OSL_ENSURE(!m_pImpl->m_pDoc || !pDoc,
"SwXText::SetDoc: already have a doc?");
m_pImpl->m_pDoc = pDoc;
- m_pImpl->m_bIsValid = (0 != pDoc);
+ m_pImpl->m_bIsValid = (nullptr != pDoc);
}
void
@@ -307,7 +307,7 @@ throw (uno::RuntimeException, std::exception)
const SwStartNode *const pOwnStartNode = GetStartNode();
SwPaM aPam(GetDoc()->GetNodes());
- const SwPaM * pPam(0);
+ const SwPaM * pPam(nullptr);
if (pCursor)
{
pPam = pCursor->GetPaM();
@@ -344,7 +344,7 @@ throw (uno::RuntimeException, std::exception)
catch (const lang::IllegalArgumentException& iae)
{
// stupid method not allowed to throw iae
- throw uno::RuntimeException(iae.Message, 0);
+ throw uno::RuntimeException(iae.Message, nullptr);
}
}
if (bAbsorb)
@@ -469,7 +469,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
OTextCursorHelper *const pCursor =
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel);
- SwCursor aCrsr(*aPam.GetPoint(), 0, false);
+ SwCursor aCrsr(*aPam.GetPoint(), nullptr, false);
SwUnoCursorHelper::SelectPam(aCrsr, true);
aCrsr.Left(1, CRSR_SKIP_CHARS, false, false);
// here, the PaM needs to be moved:
@@ -592,7 +592,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwXTextField* pTextField =
::sw::UnoTunnelGetImplementation<SwXTextField>(xContentTunnel);
if (pTextField && pTextField->GetServiceId() != SW_SERVICE_FIELDTYPE_ANNOTATION)
- pTextField = 0;
+ pTextField = nullptr;
const bool bAttribute = pBookmark || pDocumentIndexMark
|| pSection || pReferenceMark || pMeta || pTextField;
@@ -642,8 +642,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xSuccTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xSuccTunnel);
- SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
- SwTextNode * pTextNode = 0;
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : nullptr;
+ SwTextNode * pTextNode = nullptr;
if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
SwTable *const pTable = SwTable::FindTable( pTableFormat );
@@ -700,9 +700,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xPredTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xPredTunnel);
- SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : nullptr;
bool bRet = false;
- SwTextNode * pTextNode = 0;
+ SwTextNode * pTextNode = nullptr;
if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
SwTable *const pTable = SwTable::FindTable( pTableFormat );
@@ -751,7 +751,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xSuccTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xSuccTunnel);
- SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : nullptr;
if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
SwTable *const pTable = SwTable::FindTable( pTableFormat );
@@ -804,7 +804,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
::sw::UnoTunnelGetImplementation<SwXTextSection>(xPredTunnel);
SwXTextTable *const pXTable =
::sw::UnoTunnelGetImplementation<SwXTextTable>(xPredTunnel);
- SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : 0;
+ SwFrameFormat *const pTableFormat = (pXTable) ? pXTable->GetFrameFormat() : nullptr;
if(pTableFormat && pTableFormat->GetDoc() == GetDoc())
{
SwTable *const pTable = SwTable::FindTable( pTableFormat );
@@ -928,7 +928,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException, std::e
throw uno::RuntimeException();
}
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
//insert an empty paragraph at the start and at the end to ensure that
//all tables and sections can be removed by the selecting text::XTextCursor
if (CURSOR_META != m_pImpl->m_eType)
@@ -966,14 +966,14 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException, std::e
const uno::Reference< text::XTextCursor > xRet = CreateCursor();
if(!xRet.is())
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
uno::RuntimeException aRuntime;
aRuntime.Message = cInvalidObject;
throw aRuntime;
}
xRet->gotoEnd(sal_True);
xRet->setString(rString);
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
//FIXME why is CheckForOwnMember duplicated in some insert methods?
@@ -1275,7 +1275,7 @@ SwXText::Impl::finishOrAppendParagraph(
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
- m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START , NULL);
+ m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START , nullptr);
// find end node, go backward - don't skip tables because the new
// paragraph has to be the last node
//aPam.Move( fnMoveBackward, fnGoNode );
@@ -1324,7 +1324,7 @@ SwXText::Impl::finishOrAppendParagraph(
bRuntimeException = true;
}
- m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
+ m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pDoc->GetIDocumentUndoRedo().Undo();
@@ -1380,7 +1380,7 @@ SwXText::insertTextPortion(
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
auto& rCursor(pTextCursor->GetCursor());
m_pImpl->m_pDoc->DontExpandFormat( *rCursor.Start() );
@@ -1412,7 +1412,7 @@ SwXText::insertTextPortion(
sMessage = rRuntime.Message;
bRuntimeException = true;
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
@@ -1466,7 +1466,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
// now attach the text content here
insertTextContent( xInsertPosition, xTextContent, false );
@@ -1490,13 +1490,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
catch (const uno::Exception& e)
{
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
lang::WrappedTargetRuntimeException wrapped;
wrapped.TargetException <<= e;
throw wrapped;
}
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
return xInsertPosition;
}
@@ -1557,7 +1557,7 @@ SwXText::convertToTextFrame(
pEndRange->Invalidate();
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
@@ -1581,7 +1581,7 @@ SwXText::convertToTextFrame(
// todo: if the start/end is in a table then insert a paragraph
// before/after, move the start/end nodes, then convert and
// remove the additional paragraphs in the end
- SwTableNode * pStartTableNode(0);
+ SwTableNode * pStartTableNode(nullptr);
if (pStartStartNode->GetStartNodeType() == SwTableBoxStartNode)
{
pStartTableNode = pStartStartNode->FindTableNode();
@@ -1620,7 +1620,7 @@ SwXText::convertToTextFrame(
// if not - remove the additional paragraphs and throw
if (bParaBeforeInserted)
{
- SwCursor aDelete(*aStartPam.GetPoint(), 0, false);
+ SwCursor aDelete(*aStartPam.GetPoint(), nullptr, false);
*aStartPam.GetPoint() = // park it because node is deleted
SwPosition(GetDoc()->GetNodes().GetEndOfContent());
aDelete.MovePara(fnParaCurr, fnParaStart);
@@ -1630,7 +1630,7 @@ SwXText::convertToTextFrame(
}
if (bParaAfterInserted)
{
- SwCursor aDelete(*pEndPam->GetPoint(), 0, false);
+ SwCursor aDelete(*pEndPam->GetPoint(), nullptr, false);
*pEndPam->GetPoint() = // park it because node is deleted
SwPosition(GetDoc()->GetNodes().GetEndOfContent());
aDelete.MovePara(fnParaCurr, fnParaStart);
@@ -1656,7 +1656,7 @@ SwXText::convertToTextFrame(
}
aStartPam.SetMark();
*aStartPam.End() = *pEndPam->End();
- pEndPam.reset(0);
+ pEndPam.reset(nullptr);
// see if there are frames already anchored to this node
std::set<OUString> aAnchoredFrames;
@@ -1678,7 +1678,7 @@ SwXText::convertToTextFrame(
}
const uno::Reference<text::XTextFrame> xNewFrame(
- SwXTextFrame::CreateXTextFrame(*m_pImpl->m_pDoc, 0));
+ SwXTextFrame::CreateXTextFrame(*m_pImpl->m_pDoc, nullptr));
SwXTextFrame& rNewFrame = dynamic_cast<SwXTextFrame&>(*xNewFrame.get());
rNewFrame.SetSelection( aStartPam );
try
@@ -1771,7 +1771,7 @@ SwXText::convertToTextFrame(
}
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
@@ -1847,14 +1847,14 @@ void SwXText::Impl::ConvertCell(
SwNodeRange * pCorrectedRange =
SwNodes::ExpandRangeForTableBox(aTmpRange);
- if (pCorrectedRange != NULL)
+ if (pCorrectedRange != nullptr)
{
SwPaM aNewStartPaM(pCorrectedRange->aStart, 0);
aStartCellPam = aNewStartPaM;
sal_Int32 nEndLen = 0;
SwTextNode * pTextNode = pCorrectedRange->aEnd.GetNode().GetTextNode();
- if (pTextNode != NULL)
+ if (pTextNode != nullptr)
nEndLen = pTextNode->Len();
SwPaM aNewEndPaM(pCorrectedRange->aEnd, nEndLen);
@@ -2463,7 +2463,7 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
{
if(!IsValid())
{
- return 0;
+ return nullptr;
}
// the cursor has to skip tables contained in this text
@@ -2472,7 +2472,7 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
if (!bIgnoreTables)
{
SwTableNode * pTableNode = aPam.GetNode().FindTableNode();
- SwContentNode * pCont = 0;
+ SwContentNode * pCont = nullptr;
while (pTableNode)
{
aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
@@ -2613,7 +2613,7 @@ public:
SwFrameFormat & GetHeadFootFormatOrThrow() {
SwFrameFormat *const pFormat( GetHeadFootFormat() );
if (!pFormat) {
- throw uno::RuntimeException("SwXHeadFootText: disposed or invalid", 0);
+ throw uno::RuntimeException("SwXHeadFootText: disposed or invalid", nullptr);
}
return *pFormat;
}
@@ -2689,7 +2689,7 @@ SwXHeadFootText::getSupportedServiceNames() throw (uno::RuntimeException, std::e
const SwStartNode *SwXHeadFootText::GetStartNode() const
{
- const SwStartNode *pSttNd = 0;
+ const SwStartNode *pSttNd = nullptr;
SwFrameFormat *const pHeadFootFormat = m_pImpl->GetHeadFootFormat();
if(pHeadFootFormat)
{
@@ -2754,7 +2754,7 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception
(m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode);
// is there a table here?
SwTableNode* pTableNode = rUnoCrsr.GetNode().FindTableNode();
- SwContentNode* pCont = 0;
+ SwContentNode* pCont = nullptr;
while (pTableNode)
{
rUnoCrsr.GetPoint()->nNode = *pTableNode->EndOfSectionNode();
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index ac213148556a..e6f4d44fcc50 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -99,8 +99,8 @@ void SAL_CALL SwXTextMarkup::commitTextRangeMarkup(::sal_Int32 nType, const OUSt
if(!xRangeTunnel.is()) return;
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
@@ -151,7 +151,7 @@ void SAL_CALL SwXTextMarkup::commitStringMarkup(
return;
// get appropriate list to use...
- SwWrongList* pWList = 0;
+ SwWrongList* pWList = nullptr;
bool bRepaint = false;
if ( nType == text::TextMarkupType::SPELLCHECK )
{
@@ -423,7 +423,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
return;
// get appropriate list to use...
- SwGrammarMarkUp* pWList = 0;
+ SwGrammarMarkUp* pWList = nullptr;
bool bRepaint = false;
IGrammarContact *pGrammarContact = getGrammarContact(*m_pImpl->m_pTextNode);
if( pGrammarContact )
@@ -484,7 +484,7 @@ void SwXTextMarkup::Impl::Modify( const SfxPoolItem* /*pOld*/, const SfxPoolItem
if ( GetRegisteredIn() )
GetRegisteredInNonConst()->Remove( this );
- m_pTextNode = 0;
+ m_pTextNode = nullptr;
}
SwXStringKeyMap::SwXStringKeyMap()
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 0444596eab82..37cf0b5f4add 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1356,7 +1356,7 @@ const PreviewPage* SwPagePreviewLayout::_GetPreviewPageByPageNum( const sal_uInt
EqualsPageNumPred( _nPageNum ) );
if ( aFoundPreviewPageIter == maPreviewPages.end() )
- return 0;
+ return nullptr;
return (*aFoundPreviewPageIter);
}
@@ -1468,7 +1468,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR
}
const SwPageFrm* pTmpPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower());
- const SwPageFrm* pRet = 0;
+ const SwPageFrm* pRet = nullptr;
sal_uInt16 i = 0;
while( pTmpPage && i != _nRelPageNum )
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 93d52a94fd0b..cabd06f8b901 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -57,7 +57,7 @@ void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt,
SwViewOption aViewOpt( *pViewOpt );
aViewOpt.SetOnlineSpell( false );
- m_pPostItShell.reset(new SwViewShell(*new SwDoc, 0, &aViewOpt, pOutDev));
+ m_pPostItShell.reset(new SwViewShell(*new SwDoc, nullptr, &aViewOpt, pOutDev));
}
void SwRenderData::DeletePostItData()
@@ -65,7 +65,7 @@ void SwRenderData::DeletePostItData()
if (HasPostItData())
{
// printer needs to remain at the real document
- m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( 0, false, false );
+ m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, false, false );
m_pPostItShell.reset();
m_pPostItFields.reset();
}
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 5b15ff010d7d..36a9d9d8fb43 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -88,21 +88,21 @@ void SwViewShellImp::Init( const SwViewOption *pNewOpt )
/// CTor for the core internals
SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) :
m_pShell( pParent ),
- m_pDrawView( 0 ),
- m_pSdrPageView( 0 ),
- m_pFirstVisiblePage( 0 ),
- m_pRegion( 0 ),
- m_pLayAction( 0 ),
- m_pIdleAct( 0 ),
- m_pAccessibleMap( 0 ),
- m_pSdrObjectCached(NULL),
+ m_pDrawView( nullptr ),
+ m_pSdrPageView( nullptr ),
+ m_pFirstVisiblePage( nullptr ),
+ m_pRegion( nullptr ),
+ m_pLayAction( nullptr ),
+ m_pIdleAct( nullptr ),
+ m_pAccessibleMap( nullptr ),
+ m_pSdrObjectCached(nullptr),
m_bFirstPageInvalid( true ),
m_bResetHdlHiddenPaint( false ),
m_bSmoothUpdate( false ),
m_bStopSmooth( false ),
m_nRestoreActions( 0 ),
// OD 12.12.2002 #103492#
- m_pPagePreviewLayout( 0 )
+ m_pPagePreviewLayout( nullptr )
{
}
@@ -311,7 +311,7 @@ void SwViewShellImp::DisposeAccessible( const SwFrm *pFrm,
for(SwViewShell& rTmp : GetShell()->GetRingContainer())
{
if( rTmp.Imp()->IsAccessible() )
- rTmp.Imp()->GetAccessibleMap().Dispose( pFrm, pObj, 0, bRecursive );
+ rTmp.Imp()->GetAccessibleMap().Dispose( pFrm, pObj, nullptr, bRecursive );
}
}
@@ -322,7 +322,7 @@ void SwViewShellImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
for(SwViewShell& rTmp : GetShell()->GetRingContainer())
{
if( rTmp.Imp()->IsAccessible() )
- rTmp.Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, 0,
+ rTmp.Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, nullptr,
rOldFrm );
}
}
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 3a3749be97e5..5ce9b9bae458 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -100,7 +100,7 @@ void SwViewShell::PrintProspect(
OSL_ENSURE( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
// create a new shell for the printer
- SwViewShell aShell( *this, 0, pPrinter );
+ SwViewShell aShell( *this, nullptr, pPrinter );
SET_CURR_SHELL( &aShell );
@@ -113,8 +113,8 @@ void SwViewShell::PrintProspect(
SwTwips nMaxRowSz, nMaxColSz;
- const SwPageFrm *pStPage = 0;
- const SwPageFrm *pNxtPage = 0;
+ const SwPageFrm *pStPage = nullptr;
+ const SwPageFrm *pNxtPage = nullptr;
if (rPagesToPrint.first > 0)
{
pStPage = sw_getPage(*aShell.GetLayout(), rPagesToPrint.first);
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ea989c0c92da..c1cb98e1f96b 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -86,10 +86,10 @@
#endif
bool SwViewShell::mbLstAct = false;
-ShellResource *SwViewShell::mpShellRes = 0;
+ShellResource *SwViewShell::mpShellRes = nullptr;
VclPtr<vcl::Window> SwViewShell::mpCareWindow = nullptr;
-BitmapEx* SwViewShell::mpErrorBmp = NULL;
-BitmapEx* SwViewShell::mpReplaceBmp = NULL;
+BitmapEx* SwViewShell::mpErrorBmp = nullptr;
+BitmapEx* SwViewShell::mpReplaceBmp = nullptr;
bool bInSizeNotify = false;
@@ -238,7 +238,7 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer)
return;
}
mPrePostPaintRegions.pop(); // clear
- if(0 != mpTargetPaintWindow)
+ if(nullptr != mpTargetPaintWindow)
{
// #i74769# restore buffered OutDev
if(mpTargetPaintWindow->GetPreRenderDevice())
@@ -248,7 +248,7 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer)
// #i74769# use SdrPaintWindow now direct
Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
- mpTargetPaintWindow = 0;
+ mpTargetPaintWindow = nullptr;
}
}
// end of Pre/PostPaints
@@ -337,7 +337,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
{
SwRootFrm* pCurrentLayout = GetLayout();
- Imp()->m_pRegion = NULL;
+ Imp()->m_pRegion = nullptr;
//First Invert then Compress, never the other way round!
pRegion->Invert();
@@ -620,12 +620,12 @@ vcl::Window* SwViewShell::CareChildWin(SwViewShell& rVSh)
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = rVSh.mpSfxViewShell->GetViewFrame();
const SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
- vcl::Window *pWin = pChWin ? pChWin->GetWindow() : NULL;
+ vcl::Window *pWin = pChWin ? pChWin->GetWindow() : nullptr;
if ( pWin && pWin->IsVisible() )
return pWin;
#endif
}
- return NULL;
+ return nullptr;
}
Point SwViewShell::GetPagePos( sal_uInt16 nPageNum ) const
@@ -661,7 +661,7 @@ void SwViewShell::UpdateFields(bool bCloseDB)
else
StartAction();
- GetDoc()->getIDocumentFieldsAccess().UpdateFields(0, bCloseDB);
+ GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, bCloseDB);
if ( bCrsr )
static_cast<SwCrsrShell*>(this)->EndAction();
@@ -956,7 +956,7 @@ void SwViewShell::CalcLayout()
SwTextFrm::GetTextCache()->GetCurMax() - 50 );
//switch on Progress when none is running yet.
- const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
+ const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == nullptr;
if ( bEndProgress )
{
long nEndPage = GetLayout()->GetPageNum();
@@ -984,7 +984,7 @@ void SwViewShell::CalcLayout()
SwDocPosUpdate aMsgHint( 0 );
GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
- GetDoc()->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ GetDoc()->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
aAction.Action(GetOut());
}
@@ -1016,7 +1016,7 @@ void SwViewShell::SizeChgNotify()
{
const SwFrm *pCnt = static_cast<SwCrsrShell*>(this)->GetCurrFrm( false );
const SwPageFrm *pPage;
- if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
+ if ( pCnt && nullptr != (pPage = pCnt->FindPageFrm()) )
{
const sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
@@ -1172,7 +1172,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
{
bScrolled = true;
maVisArea.Pos() = aPrevArea.Pos();
- if ( SmoothScroll( nXDiff, nYDiff, 0 ) )
+ if ( SmoothScroll( nXDiff, nYDiff, nullptr ) )
return;
maVisArea.Pos() = rRect.Pos();
}
@@ -1294,13 +1294,13 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
if(!HasDrawView())
MakeDrawView();
SdrView* pDrawView = GetDrawView();
- pDrawView->AddWindowToPaintView(pVout, 0);
+ pDrawView->AddWindowToPaintView(pVout, nullptr);
// clear mpWin during DLPrePaint2 to get paint preparation for mpOut, but set it again
// immediately afterwards. There are many decisions in SW which imply that Printing
// is used when mpWin == 0 (wrong but widely used).
vcl::Window* pOldWin = mpWin;
- mpWin = 0;
+ mpWin = nullptr;
DLPrePaint2(vcl::Region(aRect.SVRect()));
mpWin = pOldWin;
@@ -1629,7 +1629,7 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect )
if ( bStop )
{
Imp()->DelRegion();
- pRegion = 0;
+ pRegion = nullptr;
}
}
@@ -2002,7 +2002,7 @@ SwRootFrm *SwViewShell::GetLayout() const
OutputDevice& SwViewShell::GetRefDev() const
{
- OutputDevice* pTmpOut = 0;
+ OutputDevice* pTmpOut = nullptr;
if ( GetWin() &&
GetViewOptions()->getBrowseMode() &&
!GetViewOptions()->IsPrtFormat() )
@@ -2101,7 +2101,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( pFieldType && pFieldType->HasWriterListeners() )
{
SwMsgPoolItem aHint( RES_HIDDENPARA_PRINT );
- pFieldType->ModifyNotification( &aHint, 0);
+ pFieldType->ModifyNotification( &aHint, nullptr);
}
bReformat = true;
}
@@ -2340,7 +2340,7 @@ uno::Reference< css::accessibility::XAccessible > SwViewShell::CreateAccessibleP
GetLayout()->GetPageByPageNum( PagePreviewLayout()->mnSelectedPageNum ),
PagePreviewLayout()->maWinSize );
}
- return NULL;
+ return nullptr;
}
void SwViewShell::InvalidateAccessibleFocus()
@@ -2390,7 +2390,7 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap()
return &(Imp()->GetAccessibleMap());
}
- return 0;
+ return nullptr;
}
void SwViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
@@ -2509,11 +2509,11 @@ void SwViewShell::DeleteReplacementBitmaps()
SwPostItMgr* SwViewShell::GetPostItMgr()
{
- SwView* pView = GetDoc()->GetDocShell() ? GetDoc()->GetDocShell()->GetView() : 0;
+ SwView* pView = GetDoc()->GetDocShell() ? GetDoc()->GetDocShell()->GetView() : nullptr;
if ( pView )
return pView->GetPostItMgr();
- return 0;
+ return nullptr;
}
/*
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 4533b13212f4..dd702b51593e 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -83,7 +83,7 @@ void SwViewShell::Init( const SwViewOption *pNewOpt )
SAL_INFO( "sw.core", "View::Init - before InitPrt" );
// --> FME 2007-11-06 #i82967#
- OutputDevice* pPDFOut = 0;
+ OutputDevice* pPDFOut = nullptr;
if ( mpOut && mpOut->GetPDFWriter() )
pPDFOut = mpOut;
@@ -151,27 +151,27 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
long nFlags )
:
maBrowseBorder(),
- mpSfxViewShell( 0 ),
+ mpSfxViewShell( nullptr ),
mpImp( new SwViewShellImp( this ) ),
mpWin( pWindow ),
mpOut( pOutput ? pOutput
: pWindow ? static_cast<OutputDevice*>(pWindow)
: static_cast<OutputDevice*>(rDocument.getIDocumentDeviceAccess().getPrinter( true ))),
- mpTmpRef( 0 ),
- mpOpt( 0 ),
+ mpTmpRef( nullptr ),
+ mpOpt( nullptr ),
mpAccOptions( new SwAccessibilityOptions ),
mbShowHeaderSeparator( false ),
mbShowFooterSeparator( false ),
mbHeaderFooterEdit( false ),
- mpTargetPaintWindow(0), // #i74769#
- mpBufferedOut(0), // #i74769#
+ mpTargetPaintWindow(nullptr), // #i74769#
+ mpBufferedOut(nullptr), // #i74769#
mpDoc( &rDocument ),
mnStartAction( 0 ),
mnLockPaint( 0 ),
mbSelectAll(false),
mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
- mpPrePostOutDev(0), // #i72754#
+ mpPrePostOutDev(nullptr), // #i72754#
maPrePostMapMode()
{
// OD 2004-06-01 #i26791# - in order to suppress event handling in
@@ -228,27 +228,27 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
OutputDevice *pOutput, long nFlags ) :
Ring( &rShell ),
maBrowseBorder( rShell.maBrowseBorder ),
- mpSfxViewShell( 0 ),
+ mpSfxViewShell( nullptr ),
mpImp( new SwViewShellImp( this ) ),
mpWin( pWindow ),
mpOut( pOutput ? pOutput
: pWindow ? static_cast<OutputDevice*>(pWindow)
: static_cast<OutputDevice*>(rShell.GetDoc()->getIDocumentDeviceAccess().getPrinter( true ))),
- mpTmpRef( 0 ),
- mpOpt( 0 ),
+ mpTmpRef( nullptr ),
+ mpOpt( nullptr ),
mpAccOptions( new SwAccessibilityOptions ),
mbShowHeaderSeparator( false ),
mbShowFooterSeparator( false ),
mbHeaderFooterEdit( false ),
- mpTargetPaintWindow(0), // #i74769#
- mpBufferedOut(0), // #i74769#
+ mpTargetPaintWindow(nullptr), // #i74769#
+ mpBufferedOut(nullptr), // #i74769#
mpDoc( rShell.GetDoc() ),
mnStartAction( 0 ),
mnLockPaint( 0 ),
mbSelectAll(false),
mbInLibreOfficeKitCallback(false),
mbOutputToWindow(false),
- mpPrePostOutDev(0), // #i72754#
+ mpPrePostOutDev(nullptr), // #i72754#
maPrePostMapMode()
{
// OD 2004-06-01 #i26791# - in order to suppress event handling in
@@ -311,11 +311,11 @@ SwViewShell::~SwViewShell()
SwStartNode *pStNd;
SwNodeIndex aIdx( *rNds.GetEndOfAutotext().StartOfSectionNode(), 1 );
- while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ while ( nullptr != (pStNd = aIdx.GetNode().GetStartNode()) )
{
++aIdx;
SwGrfNode *pGNd = aIdx.GetNode().GetGrfNode();
- if ( 0 != pGNd )
+ if ( nullptr != pGNd )
{
if( pGNd->IsAnimated() )
{
@@ -334,12 +334,12 @@ SwViewShell::~SwViewShell()
}
delete mpImp; // Delete first, so that the LayoutViews are destroyed.
- mpImp = 0; // Set to zero, because ~SwFrm relies on it.
+ mpImp = nullptr; // Set to zero, because ~SwFrm relies on it.
if ( mpDoc )
{
if( !mpDoc->release() )
- delete mpDoc, mpDoc = 0;
+ delete mpDoc, mpDoc = nullptr;
else
GetLayout()->ResetNewLayout();
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 841ff6aba6ec..34d2aa22daee 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -85,13 +85,13 @@ public:
SwRect aRect;
SwQueuedPaint( SwViewShell *pNew, const SwRect &rRect ) :
- pNext( 0 ),
+ pNext( nullptr ),
pSh( pNew ),
aRect( rRect )
{}
};
-SwQueuedPaint *SwPaintQueue::pQueue = 0;
+SwQueuedPaint *SwPaintQueue::pQueue = nullptr;
// saves some settings from the draw view
class SwDrawViewSave
@@ -106,7 +106,7 @@ public:
void SwPaintQueue::Add( SwViewShell *pNew, const SwRect &rNew )
{
SwQueuedPaint *pPt;
- if ( 0 != (pPt = pQueue) )
+ if ( nullptr != (pPt = pQueue) )
{
while ( pPt->pSh != pNew && pPt->pNext )
pPt = pPt->pNext;
@@ -156,9 +156,9 @@ void SwPaintQueue::Repaint()
void SwPaintQueue::Remove( SwViewShell *pSh )
{
SwQueuedPaint *pPt;
- if ( 0 != (pPt = pQueue) )
+ if ( nullptr != (pPt = pQueue) )
{
- SwQueuedPaint *pPrev = 0;
+ SwQueuedPaint *pPrev = nullptr;
while ( pPt && pPt->pSh != pSh )
{
pPrev = pPt;
@@ -169,7 +169,7 @@ void SwPaintQueue::Remove( SwViewShell *pSh )
if ( pPrev )
pPrev->pNext = pPt->pNext;
else if ( pPt == pQueue )
- pQueue = 0;
+ pQueue = nullptr;
delete pPt;
}
}
@@ -337,7 +337,7 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
{
const SfxPoolItem* pCpyItem = rPool.GetPoolDefaultItem( nWh );
- if( 0 != pCpyItem )
+ if( nullptr != pCpyItem )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
}
@@ -359,7 +359,7 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
SwShellTableCrsr* pShellTableCrsr = pFESh->GetTableCrsr();
const SwContentNode* pContentNode = pShellTableCrsr->GetNode().GetContentNode();
- const SwContentFrm *pContentFrm = pContentNode ? pContentNode->getLayoutFrm( GetLayout(), 0, pShellTableCrsr->Start() ) : 0;
+ const SwContentFrm *pContentFrm = pContentNode ? pContentNode->getLayoutFrm( GetLayout(), nullptr, pShellTableCrsr->Start() ) : nullptr;
if( pContentFrm )
{
SwRect aCharRect;
@@ -440,7 +440,7 @@ sw_getPage(SwRootFrm const& rLayout, sal_Int32 const nPage)
}
OSL_ENSURE(pPage, "ERROR: SwPageFrm expected");
OSL_FAIL("non-existent page requested");
- return 0;
+ return nullptr;
}
bool SwViewShell::PrintOrPDFExport(
@@ -463,14 +463,14 @@ bool SwViewShell::PrintOrPDFExport(
// and then scale that metafile down so that the comments
// will fit on the real page, and replay that scaled
// output to the real outputdevice
- GDIMetaFile *pOrigRecorder(NULL);
- GDIMetaFile *pMetaFile(NULL);
+ GDIMetaFile *pOrigRecorder(nullptr);
+ GDIMetaFile *pMetaFile(nullptr);
SwPostItMode nPostItMode = rPrintData.GetPrintPostIts();
if (nPostItMode == SwPostItMode::InMargins)
{
//get and disable the existing recorder
pOrigRecorder = pOutDev->GetConnectMetaFile();
- pOutDev->SetConnectMetaFile(NULL);
+ pOutDev->SetConnectMetaFile(nullptr);
// turn off output to the device
pOutDev->EnableOutput(false);
// just record the rendering commands to the metafile
@@ -487,7 +487,7 @@ bool SwViewShell::PrintOrPDFExport(
// It is implemented this way because PDF export calls this Prt function
// once per page and we do not like to always have the temporary document
// to be created that often here.
- SwViewShell *pShell = new SwViewShell(*this, 0, pOutDev);
+ SwViewShell *pShell = new SwViewShell(*this, nullptr, pOutDev);
SdrView *pDrawView = pShell->GetDrawView();
if (pDrawView)
@@ -538,7 +538,7 @@ bool SwViewShell::PrintOrPDFExport(
SwPaintQueue::Repaint();
SwPostItMgr *pPostItManager = (nPostItMode == SwPostItMode::InMargins) ?
- pShell->GetPostItMgr() : NULL;
+ pShell->GetPostItMgr() : nullptr;
if (pPostItManager)
{
pPostItManager->CalcRects();
@@ -589,9 +589,9 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
// create a new view, or it has none, than we create the first view.
SwViewShell *pSh;
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
- pSh = new SwViewShell( *pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(), 0, &rRenderContext,VSHELLFLAG_SHARELAYOUT );
+ pSh = new SwViewShell( *pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(), nullptr, &rRenderContext,VSHELLFLAG_SHARELAYOUT );
else
- pSh = new SwViewShell( *pDoc, 0, pOpt, &rRenderContext);
+ pSh = new SwViewShell( *pDoc, nullptr, pOpt, &rRenderContext);
{
SET_CURR_SHELL( pSh );
@@ -631,7 +631,7 @@ bool SwViewShell::IsAnyFieldInDoc() const
sal_uInt32 nMaxItems = mpDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pItem = mpDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
+ if( nullptr != (pItem = mpDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
{
const SwFormatField* pFormatField = static_cast<const SwFormatField*>(pItem);
const SwTextField* pTextField = pFormatField->GetTextField();
@@ -645,7 +645,7 @@ bool SwViewShell::IsAnyFieldInDoc() const
nMaxItems = mpDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INPUTFIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pItem = mpDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n )))
+ if( nullptr != (pItem = mpDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n )))
{
const SwFormatField* pFormatField = static_cast<const SwFormatField*>(pItem);
const SwTextField* pTextField = pFormatField->GetTextField();
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 918051dad19a..8fa82a85d96f 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -232,8 +232,8 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode )
SwNodeFnTab aASCNodeFnTab = {
/* RES_TXTNODE */ OutASC_SwTextNode,
-/* RES_GRFNODE */ 0,
-/* RES_OLENODE */ 0
+/* RES_GRFNODE */ nullptr,
+/* RES_OLENODE */ nullptr
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 98b78c36cbc3..db16166a2a02 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -143,7 +143,7 @@ sal_uLong SwASCIIParser::CallParser()
::StartProgress( STR_STATSTR_W4WREAD, 0, nFileSize, pDoc->GetDocShell() );
- SwPaM* pInsPam = 0;
+ SwPaM* pInsPam = nullptr;
sal_Int32 nSttContent = 0;
if (!bNewDoc)
{
@@ -152,7 +152,7 @@ sal_uLong SwASCIIParser::CallParser()
nSttContent = pPam->GetPoint()->nContent.GetIndex();
}
- SwTextFormatColl *pColl = 0;
+ SwTextFormatColl *pColl = nullptr;
if (bNewDoc)
{
@@ -234,7 +234,7 @@ sal_uLong SwASCIIParser::CallParser()
pDoc->getIDocumentContentOperations().InsertItemSet( *pInsPam, *pItemSet );
}
}
- delete pItemSet, pItemSet = 0;
+ delete pItemSet, pItemSet = nullptr;
}
delete pInsPam;
@@ -245,7 +245,7 @@ sal_uLong SwASCIIParser::CallParser()
sal_uLong SwASCIIParser::ReadChars()
{
- sal_Unicode *pStt = 0, *pEnd = 0, *pLastStt = 0;
+ sal_Unicode *pStt = nullptr, *pEnd = nullptr, *pLastStt = nullptr;
long nReadCnt = 0, nLineLen = 0;
sal_Unicode cLastCR = 0;
bool bSwapUnicode = false;
@@ -273,8 +273,8 @@ sal_uLong SwASCIIParser::ReadChars()
pUseMe=&aEmpty;
}
- rtl_TextToUnicodeConverter hConverter=0;
- rtl_TextToUnicodeContext hContext=0;
+ rtl_TextToUnicodeConverter hConverter=nullptr;
+ rtl_TextToUnicodeContext hContext=nullptr;
rtl_TextEncoding currentCharSet = pUseMe->GetCharSet();
if (RTL_TEXTENCODING_UCS2 != currentCharSet)
{
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 545a34f211cc..7e785aa9966e 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -61,7 +61,7 @@ using namespace utl;
using namespace com::sun::star::uno;
using namespace com::sun::star;
-SwRead ReadAscii = 0, ReadHTML = 0, ReadXML = 0;
+SwRead ReadAscii = nullptr, ReadHTML = nullptr, ReadXML = nullptr;
Reader* GetRTFReader();
Reader* GetWW8Reader();
@@ -71,15 +71,15 @@ Reader* GetWW8Reader();
SwReaderWriterEntry aReaderWriter[] =
{
SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, true ),
- SwReaderWriterEntry( 0, &::GetASCWriter, false ),
+ SwReaderWriterEntry( nullptr, &::GetASCWriter, false ),
SwReaderWriterEntry( &::GetWW8Reader, nullptr, true ),
SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, true ),
SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, true ),
- SwReaderWriterEntry( 0, &::GetHTMLWriter, true ),
- SwReaderWriterEntry( &::GetWW8Reader, 0, true ),
- SwReaderWriterEntry( 0, &::GetXMLWriter, true ),
- SwReaderWriterEntry( 0, &::GetASCWriter, false ),
- SwReaderWriterEntry( 0, &::GetASCWriter, true )
+ SwReaderWriterEntry( nullptr, &::GetHTMLWriter, true ),
+ SwReaderWriterEntry( &::GetWW8Reader, nullptr, true ),
+ SwReaderWriterEntry( nullptr, &::GetXMLWriter, true ),
+ SwReaderWriterEntry( nullptr, &::GetASCWriter, false ),
+ SwReaderWriterEntry( nullptr, &::GetASCWriter, true )
};
Reader* SwReaderWriterEntry::GetReader()
@@ -91,7 +91,7 @@ Reader* SwReaderWriterEntry::GetReader()
pReader = (*fnGetReader)();
return pReader;
}
- return NULL;
+ return nullptr;
}
void SwReaderWriterEntry::GetWriter( const OUString& rNm, const OUString& rBaseURL, WriterRef& xWrt ) const
@@ -99,7 +99,7 @@ void SwReaderWriterEntry::GetWriter( const OUString& rNm, const OUString& rBaseU
if ( fnGetWriter )
(*fnGetWriter)( rNm, rBaseURL, xWrt );
else
- xWrt = WriterRef(0);
+ xWrt = WriterRef(nullptr);
}
SwRead SwGetReaderXML() // SW_DLLPUBLIC
@@ -130,7 +130,7 @@ Filters::~Filters()
{
SwReaderWriterEntry& rEntry = aReaderWriter[n];
if( rEntry.bDelReader && rEntry.pReader )
- delete rEntry.pReader, rEntry.pReader = NULL;
+ delete rEntry.pReader, rEntry.pReader = nullptr;
}
}
@@ -147,7 +147,7 @@ oslGenericFunction Filters::GetMswordLibSymbol( const char *pSymbol )
}
if (msword_.is())
return msword_.getFunctionSymbol( OUString::createFromAscii( pSymbol ) );
- return NULL;
+ return nullptr;
}
#endif
@@ -173,7 +173,7 @@ void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& x
SwRead GetReader( const OUString& rFltName )
{
- SwRead pRead = 0;
+ SwRead pRead = nullptr;
for( int n = 0; n < MAXFILTER; ++n )
{
if ( aFilterDetect[n].IsFilter( rFltName ) )
@@ -296,7 +296,7 @@ SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
SwTwips nPageWidth)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) ||
MINFLY > static_cast<const SwFormatFrmSize*>(pItem)->GetWidth() )
{
@@ -320,7 +320,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
bool bOnlyOneNode = true;
sal_uLong nMinFrm = 0;
sal_uLong nMaxFrm = 0;
- SwTextNode* pFirstTextNd = 0;
+ SwTextNode* pFirstTextNd = nullptr;
SwNodeIndex aIdx( *pSttNd, 1 );
SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
while( aIdx < aEnd )
@@ -509,7 +509,7 @@ const CharSetNameMap *GetCharSetNameMap()
IMPLENTRY(UCS4),
IMPLENTRY(UCS2),
IMPLENTRY(UNICODE),
- {0,0} //Last
+ {0,nullptr} //Last
};
return &aMapArr[0];
}
@@ -655,7 +655,7 @@ Reader* GetRTFReader()
if ( pFunction )
return (*pFunction)();
- return NULL;
+ return nullptr;
#else
return ImportRTF();
#endif
@@ -670,7 +670,7 @@ void GetRTFWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef
if ( pFunction )
(*pFunction)( rFltName, rBaseURL, xRet );
else
- xRet = WriterRef(0);
+ xRet = WriterRef(nullptr);
#else
ExportRTF( rFltName, rBaseURL, xRet );
#endif
@@ -684,7 +684,7 @@ Reader* GetWW8Reader()
if ( pFunction )
return (*pFunction)();
- return NULL;
+ return nullptr;
#else
return ImportDOC();
#endif
@@ -698,7 +698,7 @@ void GetWW8Writer( const OUString& rFltName, const OUString& rBaseURL, WriterRef
if ( pFunction )
(*pFunction)( rFltName, rBaseURL, xRet );
else
- xRet = WriterRef(0);
+ xRet = WriterRef(nullptr);
#else
ExportDOC( rFltName, rBaseURL, xRet );
#endif
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 9c563341ff45..8218236081c3 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -70,7 +70,7 @@ using namespace com::sun::star;
static SwContentNode* GetContentNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext)
{
SwContentNode * pCNd = rIdx.GetNode().GetContentNode();
- if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx)
+ if(!pCNd && nullptr == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx)
: SwNodes::GoPrevious(&rIdx)))
{
pCNd = bNext ? SwNodes::GoPrevious(&rIdx)
@@ -329,7 +329,7 @@ SwFltStackEntry* SwFltControlStack::SetAttr(const SwPosition& rPos,
sal_uInt16 nAttrId, bool bTstEnde, long nHand,
bool consumedByField)
{
- SwFltStackEntry *pRet = NULL;
+ SwFltStackEntry *pRet = nullptr;
SwFltPosition aFltPos(rPos);
@@ -516,7 +516,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
case RES_FLTR_ANCHOR:
{
SwFrameFormat* pFormat = static_cast<SwFltAnchor*>(rEntry.pAttr)->GetFrameFormat();
- if (pFormat != NULL)
+ if (pFormat != nullptr)
{
MakePoint(rEntry, pDoc, aRegion);
SwFormatAnchor aAnchor(pFormat->GetAnchor());
@@ -621,7 +621,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
// test if on this node there had been a pagebreak BEFORE the
// tox attribute was put on the stack
SfxItemSet aBkSet( pDoc->GetAttrPool(), RES_PAGEDESC, RES_BREAK );
- SwContentNode* pNd = 0;
+ SwContentNode* pNd = nullptr;
if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() )
{
pNd = pPoint->nNode.GetNode().GetContentNode();
@@ -669,7 +669,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
rFltRedline.nAutorNoPrev,
rFltRedline.aStampPrev,
OUString(),
- 0
+ nullptr
);
pDoc->getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(aData, aRegion), true);
}
@@ -677,7 +677,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
rFltRedline.nAutorNo,
rFltRedline.aStamp,
OUString(),
- 0
+ nullptr
);
pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline(aData, aRegion), true );
pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_NONE
@@ -742,7 +742,7 @@ SfxPoolItem* SwFltControlStack::GetFormatStackAttr(sal_uInt16 nWhich, sal_uInt16
return rEntry.pAttr; // Ok, so stop
}
}
- return 0;
+ return nullptr;
}
const SfxPoolItem* SwFltControlStack::GetOpenStackAttr(const SwPosition& rPos, sal_uInt16 nWhich)
@@ -759,7 +759,7 @@ const SfxPoolItem* SwFltControlStack::GetOpenStackAttr(const SwPosition& rPos, s
return rEntry.pAttr;
}
}
- return 0;
+ return nullptr;
}
void SwFltControlStack::Delete(const SwPaM &rPam)
@@ -896,11 +896,11 @@ void SwFltAnchorClient::Modify(const SfxPoolItem *, const SfxPoolItem * pNew)
{
const SwFormatChg * pFormatChg = dynamic_cast<const SwFormatChg *> (pNew);
- if (pFormatChg != NULL)
+ if (pFormatChg != nullptr)
{
SwFrameFormat * pFrameFormat = dynamic_cast<SwFrameFormat *> (pFormatChg->pChangedFormat);
- if (pFrameFormat != NULL)
+ if (pFrameFormat != nullptr)
m_pFltAnchor->SetFrameFormat(pFrameFormat);
}
}
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 6b9819ef7a2b..ac2752d8adfc 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -84,7 +84,7 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const OUString& rFormatNm,
break;
pFltCnt = &aCntSwWeb;
} while( true );
- return 0;
+ return nullptr;
}
bool SwIoSystem::IsValidStgFilter( const css::uno::Reference < css::embed::XStorage >& rStg, const SfxFilter& rFilter)
@@ -151,7 +151,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName)
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFilter = aIter.First();
if ( !pFilter )
- return 0;
+ return nullptr;
if (SotStorage::IsStorageFile(rFileName))
{
@@ -163,7 +163,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName)
SfxMedium aMedium(aObj.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ);
// templates should not get precedence over "normal" filters (#i35508, #i33168)
- const SfxFilter* pTemplateFilter = 0;
+ const SfxFilter* pTemplateFilter = nullptr;
if (aMedium.IsStorage())
{
uno::Reference<embed::XStorage> const xStor = aMedium.GetStorage();
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 500150427326..7c098122b840 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -68,11 +68,11 @@ sal_uLong SwReader::Read( const Reader& rOptions )
po->pStrm = pStrm;
po->pStg = pStg;
po->xStg = xStg;
- po->bInsertMode = 0 != pCrsr;
+ po->bInsertMode = nullptr != pCrsr;
po->bSkipImages = mbSkipImages;
// if a Medium is selected, get its Stream
- if( 0 != (po->pMedium = pMedium ) &&
+ if( nullptr != (po->pMedium = pMedium ) &&
!po->SetStrmStgPtr() )
{
po->SetReadUTF8( false );
@@ -110,7 +110,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
// Pams are connected like rings; stop when we return to the 1st element
SwPaM *pEnd = pPam;
- SwUndoInsDoc* pUndo = 0;
+ SwUndoInsDoc* pUndo = nullptr;
bool bReadPageDescs = false;
bool const bDocUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
@@ -126,7 +126,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
else
{
pDoc->GetIDocumentUndoRedo().ClearRedo();
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, nullptr );
}
}
pDoc->GetIDocumentUndoRedo().DoUndo(false);
@@ -148,7 +148,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
- SwPaM* pUndoPam = 0;
+ SwPaM* pUndoPam = nullptr;
if( bDocUndo || pCrsr )
{
// set Pam to the previous node, so that it is not also moved
@@ -183,7 +183,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
--aEndPos;
pCNd = aEndPos.GetNode().GetContentNode();
- if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &aEndPos ) ))
+ if( !pCNd && nullptr == ( pCNd = SwNodes::GoPrevious( &aEndPos ) ))
pCNd = pDoc->GetNodes().GoNext( &aEndPos );
pPam->GetPoint()->nNode = aEndPos;
@@ -214,7 +214,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
pUndoPam->GetPoint()->nContent.Assign(
static_cast<SwContentNode*>(&rNd), nSttContent );
else
- pUndoPam->GetPoint()->nContent.Assign( 0, 0 );
+ pUndoPam->GetPoint()->nContent.Assign( nullptr, 0 );
bool bChkHeaderFooter = rNd.FindHeaderStartNode() ||
rNd.FindFooterStartNode();
@@ -351,7 +351,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, nullptr );
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
}
@@ -370,7 +370,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
eOld = static_cast<RedlineMode_t>(
ePostReadRedlineMode & ~nsRedlineMode_t::REDLINE_IGNORE);
- pDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, NULL, 0);
+ pDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0);
}
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
@@ -397,7 +397,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument)
- : SwDocFac(pDocument), pStrm(0), pMedium(&rMedium), pCrsr(0),
+ : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCrsr(nullptr),
aFileName(rFileName), mbSkipImages(false)
{
SetBaseURL( rMedium.GetBaseURL() );
@@ -407,30 +407,30 @@ SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocume
// Read into an existing document
SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam)
- : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(0), pCrsr(&rPam),
+ : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCrsr(&rPam),
aFileName(rFileName), mbSkipImages(false)
{
SetBaseURL( rBaseURL );
}
SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam)
- : SwDocFac(rPam.GetDoc()), pStrm(0), pMedium(&rMedium),
+ : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium),
pCrsr(&rPam), aFileName(rFileName), mbSkipImages(false)
{
SetBaseURL( rMedium.GetBaseURL() );
}
SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam )
- : SwDocFac(rPam.GetDoc()), pStrm(0), xStg( rStg ), pMedium(0), pCrsr(&rPam), aFileName(rFilename), mbSkipImages(false)
+ : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCrsr(&rPam), aFileName(rFilename), mbSkipImages(false)
{
}
Reader::Reader()
- : pTemplate(0),
+ : pTemplate(nullptr),
aDStamp( Date::EMPTY ),
aTStamp( tools::Time::EMPTY ),
aChkDateTime( DateTime::EMPTY ),
- pStrm(0), pMedium(0), bInsertMode(false),
+ pStrm(nullptr), pMedium(nullptr), bInsertMode(false),
bTmplBrowseMode(false), bReadUTF8(false), bBlockMode(false), bOrganizerMode(false),
bHasAskTemplateName(false), bIgnoreHTMLComments(false), bSkipImages(false)
{
@@ -536,7 +536,7 @@ bool Reader::SetTemplate( SwDoc& rDoc )
{
rDoc.RemoveAllFormatLanguageDependencies();
rDoc.ReplaceStyles( *pTemplate );
- rDoc.getIDocumentFieldsAccess().SetFixFields(false, NULL);
+ rDoc.getIDocumentFieldsAccess().SetFixFields(false, nullptr);
bRet = true;
}
@@ -549,7 +549,7 @@ void Reader::ClearTemplate()
{
if( 0 == pTemplate->release() )
delete pTemplate;
- pTemplate = 0;
+ pTemplate = nullptr;
}
}
@@ -594,11 +594,11 @@ bool Reader::SetStrmStgPtr()
if ( pStrm && SotStorage::IsStorageFile(pStrm) && (SW_STORAGE_READER & GetReaderType()) )
{
pStg = new SotStorage( *pStrm );
- pStrm = NULL;
+ pStrm = nullptr;
}
else if ( !(SW_STREAM_READER & GetReaderType()) )
{
- pStrm = NULL;
+ pStrm = nullptr;
return false;
}
@@ -655,7 +655,7 @@ bool SwReader::HasGlossaries( const Reader& rOptions )
// if a Medium is selected, get its Stream
bool bRet = false;
- if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
+ if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->HasGlossaries();
return bRet;
}
@@ -671,7 +671,7 @@ bool SwReader::ReadGlossaries( const Reader& rOptions,
// if a Medium is selected, get its Stream
bool bRet = false;
- if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
+ if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
return bRet;
}
@@ -700,36 +700,36 @@ int StgReader::GetReaderType()
*/
SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, bool bInWriteAll)
- : pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(&rShell),
+ : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
}
SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument)
- : pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(0), rDoc(rDocument),
+ : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
bWriteAll(true)
{
}
SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool bInWriteAll)
- : pStrm(&rStrm), pMedium(0), pOutPam(&rPam), pShell(0),
+ : pStrm(&rStrm), pMedium(nullptr), pOutPam(&rPam), pShell(nullptr),
rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
{
}
SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocument)
- : pStrm(0), xStg( rStg ), pMedium(0), pOutPam(0), pShell(0), rDoc(rDocument), bWriteAll(true)
+ : pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true)
{
}
SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, bool bInWriteAll)
- : pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(&rShell),
+ : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
}
SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
- : pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(0), rDoc(rDocument),
+ : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument),
bWriteAll(true)
{
}
@@ -742,7 +742,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName )
bool bHasMark = false;
SwPaM * pPam;
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
if ( pShell && !bWriteAll && pShell->IsTableMode() )
{
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index a8e9502e78d7..0d1399a7f085 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -126,7 +126,7 @@ static Writer& OutCSS1_SwFootnoteInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
SwDoc *pDoc, bool bHasNotes, bool bEndNote );
static void OutCSS1_SwFormatDropAttrs( SwHTMLWriter& rHWrt,
const SwFormatDrop& rDrop,
- const SfxItemSet *pCharFormatItemSet=0 );
+ const SfxItemSet *pCharFormatItemSet=nullptr );
static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt,
const SvxUnderlineItem *pUItem,
const SvxOverlineItem *pOItem,
@@ -193,7 +193,7 @@ class SwCSS1OutMode
public:
SwCSS1OutMode( SwHTMLWriter& rHWrt, sal_uInt16 nMode, bool bStartFirst=true,
- const OUString *pSelector=0 ) :
+ const OUString *pSelector=nullptr ) :
rWrt( rHWrt ),
nOldMode( rHWrt.m_nCSS1OutMode )
{
@@ -480,25 +480,25 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
Out_SfxItemSet( aCSS1AttrFnTab, *this, rItemSet, bDeep );
// some Attributes require special treatment
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
// Underline, Overline, CrossedOut and Blink form together a CSS1-Property
// (doesn't work of course for Hints)
if( !IsCSS1Source(CSS1_OUTMODE_HINT) )
{
- const SvxUnderlineItem *pUnderlineItem = 0;
+ const SvxUnderlineItem *pUnderlineItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem ))
pUnderlineItem = static_cast<const SvxUnderlineItem *>(pItem);
- const SvxOverlineItem *pOverlineItem = 0;
+ const SvxOverlineItem *pOverlineItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem ))
pOverlineItem = static_cast<const SvxOverlineItem *>(pItem);
- const SvxCrossedOutItem *pCrossedOutItem = 0;
+ const SvxCrossedOutItem *pCrossedOutItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem ))
pCrossedOutItem = static_cast<const SvxCrossedOutItem *>(pItem);
- const SvxBlinkItem *pBlinkItem = 0;
+ const SvxBlinkItem *pBlinkItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem ))
pBlinkItem = static_cast<const SvxBlinkItem *>(pItem);
@@ -542,7 +542,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed )
// Feature: PrintExt
if( IsHTMLMode(HTMLMODE_PRINT_EXT) )
{
- const SwPageDesc *pFirstPageDesc = 0;
+ const SwPageDesc *pFirstPageDesc = nullptr;
sal_uInt16 nFirstRefPoolId = RES_POOLPAGE_HTML;
m_bCSS1IgnoreFirstPageDesc = true;
@@ -1002,7 +1002,7 @@ static sal_uInt16 GetCSS1Selector( const SwFormat *pFormat, OUString& rSelector,
const SwFormat *SwHTMLWriter::GetTemplateFormat( sal_uInt16 nPoolFormatId,
IDocumentStylePoolAccess* pTemplate /*SwDoc *pTemplate*/)
{
- const SwFormat *pRefFormat = 0;
+ const SwFormat *pRefFormat = nullptr;
if( pTemplate )
{
@@ -1020,7 +1020,7 @@ const SwFormat *SwHTMLWriter::GetTemplateFormat( sal_uInt16 nPoolFormatId,
const SwFormat *SwHTMLWriter::GetParentFormat( const SwFormat& rFormat, sal_uInt16 nDeep )
{
OSL_ENSURE( nDeep != USHRT_MAX, "Called GetParent for HTML-template!" );
- const SwFormat *pRefFormat = 0;
+ const SwFormat *pRefFormat = nullptr;
if( nDeep > 0 )
{
@@ -1030,7 +1030,7 @@ const SwFormat *SwHTMLWriter::GetParentFormat( const SwFormat& rFormat, sal_uInt
pRefFormat = pRefFormat->DerivedFrom();
if( pRefFormat && pRefFormat->IsDefault() )
- pRefFormat = 0;
+ pRefFormat = nullptr;
}
return pRefFormat;
@@ -1184,7 +1184,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !bContainsKeyword && bGeneric )
{
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( rFontItem.GetFamily() )
{
case FAMILY_ROMAN: pStr = sCSS1_PV_serif; break;
@@ -1220,7 +1220,7 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
for( int i=0; aWhichIds[i]; i += 3 )
{
- const SfxPoolItem *pItem = 0, *pItemCJK = 0, *pItemCTL = 0, *pTmp;
+ const SfxPoolItem *pItem = nullptr, *pItemCJK = nullptr, *pItemCTL = nullptr, *pTmp;
int nItemCount = 0;
if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
&pTmp ) )
@@ -1557,8 +1557,8 @@ static Writer& OutCSS1_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// not make a difference for any other
bool bSetDefaults = true, bClearSame = true;
- const SwFormat *pRefFormat = 0;
- const SwFormat *pRefFormatScript = 0;
+ const SwFormat *pRefFormat = nullptr;
+ const SwFormat *pRefFormatScript = nullptr;
switch( nDeep )
{
case CSS1_FMT_ISTAG:
@@ -1583,7 +1583,7 @@ static Writer& OutCSS1_SwFormat( Writer& rWrt, const SwFormat& rFormat,
bSetDefaults, bClearSame,
pRefFormatScript
? &pRefFormatScript->GetAttrSet()
- : 0 );
+ : nullptr );
if( !bCharFormat )
{
@@ -1685,7 +1685,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
{
SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
- const SwPageDesc* pRefPageDesc = 0;
+ const SwPageDesc* pRefPageDesc = nullptr;
if( !bExtRef )
pRefPageDesc = pDoc->GetPageDescFromPool( nRefPoolId, false );
else if( pTemplate )
@@ -1695,7 +1695,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
if( bPseudo )
{
- const sal_Char *pPseudo = 0;
+ const sal_Char *pPseudo = nullptr;
switch( rPageDesc.GetPoolFormatId() )
{
case RES_POOLPAGE_FIRST: pPseudo = sCSS1_first; break;
@@ -2124,8 +2124,8 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat
if( (nFrmOpts & HTML_FRMOPT_S_SPACE) &&
IsHTMLMode( HTMLMODE_FLY_MARGINS) )
{
- const SvxLRSpaceItem *pLRItem = 0;
- const SvxULSpaceItem *pULItem = 0;
+ const SvxLRSpaceItem *pLRItem = nullptr;
+ const SvxULSpaceItem *pULItem = nullptr;
if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE ) )
pLRItem = &aLRItem;
if( SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE ) )
@@ -2215,7 +2215,7 @@ static bool OutCSS1_FrameFormatBrush( SwHTMLWriter& rWrt,
/// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic.
if( rBrushItem.GetColor() != COL_TRANSPARENT ||
- 0 != rBrushItem.GetGraphicLink() ||
+ nullptr != rBrushItem.GetGraphicLink() ||
0 != rBrushItem.GetGraphicPos() )
{
OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY );
@@ -2266,7 +2266,7 @@ void SwHTMLWriter::OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFor
pLine->GetFrameFormat()->makeBackgroundBrushItem() ) )
return;
pBox = pLine->GetUpper();
- pLine = pBox ? pBox->GetUpper() : 0;
+ pLine = pBox ? pBox->GetUpper() : nullptr;
}
// If there was none either, we use the background of the table.
@@ -2319,7 +2319,7 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt,
SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
bool bNone = false;
- const sal_Char *pUStr = 0;
+ const sal_Char *pUStr = nullptr;
if( pUItem )
{
switch( pUItem->GetLineStyle() )
@@ -2342,7 +2342,7 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt,
}
}
- const sal_Char *pOStr = 0;
+ const sal_Char *pOStr = nullptr;
if( pOItem )
{
switch( pOItem->GetLineStyle() )
@@ -2365,7 +2365,7 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt,
}
}
- const sal_Char *pCOStr = 0;
+ const sal_Char *pCOStr = nullptr;
if( pCOItem )
{
switch( pCOItem->GetStrikeout() )
@@ -2388,7 +2388,7 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt,
}
}
- const sal_Char *pBStr = 0;
+ const sal_Char *pBStr = nullptr;
if( pBItem )
{
if( !pBItem->GetValue() )
@@ -2493,7 +2493,7 @@ static Writer& OutCSS1_SvxCrossedOut( Writer& rWrt, const SfxPoolItem& rHt )
if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) )
OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt,
- 0, 0, static_cast<const SvxCrossedOutItem *>(&rHt), 0 );
+ nullptr, nullptr, static_cast<const SvxCrossedOutItem *>(&rHt), nullptr );
return rWrt;
}
@@ -2569,7 +2569,7 @@ static Writer& OutCSS1_SvxPosture( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( static_cast<const SvxPostureItem&>(rHt).GetPosture() )
{
case ITALIC_NONE: pStr = sCSS1_PV_normal; break;
@@ -2663,7 +2663,7 @@ static Writer& OutCSS1_SvxUnderline( Writer& rWrt, const SfxPoolItem& rHt )
if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) )
OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt,
- static_cast<const SvxUnderlineItem *>(&rHt), 0, 0, 0 );
+ static_cast<const SvxUnderlineItem *>(&rHt), nullptr, nullptr, nullptr );
return rWrt;
}
@@ -2675,7 +2675,7 @@ static Writer& OutCSS1_SvxOverline( Writer& rWrt, const SfxPoolItem& rHt )
if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) )
OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt,
- 0, static_cast<const SvxOverlineItem *>(&rHt), 0, 0 );
+ nullptr, static_cast<const SvxOverlineItem *>(&rHt), nullptr, nullptr );
return rWrt;
}
@@ -2703,7 +2703,7 @@ static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( static_cast<const SvxWeightItem&>(rHt).GetWeight() )
{
case WEIGHT_ULTRALIGHT: pStr = sCSS1_PV_extra_light; break;
@@ -2739,7 +2739,7 @@ static Writer& OutCSS1_SvxBlink( Writer& rWrt, const SfxPoolItem& rHt )
if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) )
OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt,
- 0, 0, 0, static_cast<const SvxBlinkItem *>(&rHt) );
+ nullptr, nullptr, nullptr, static_cast<const SvxBlinkItem *>(&rHt) );
return rWrt;
}
@@ -2807,7 +2807,7 @@ static Writer& OutCSS1_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
!rHTMLWrt.m_bNoAlign)
return rWrt;
- const sal_Char* pStr = 0;
+ const sal_Char* pStr = nullptr;
switch( static_cast<const SvxAdjustItem&>(rHt).GetAdjust() )
{
case SVX_ADJUST_LEFT: pStr = sCSS1_PV_left; break;
@@ -3082,8 +3082,8 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
bool bDeep )
{
- const SvxULSpaceItem *pULSpace = 0;
- const SvxLRSpaceItem *pLRSpace = 0;
+ const SvxULSpaceItem *pULSpace = nullptr;
+ const SvxLRSpaceItem *pLRSpace = nullptr;
const SfxPoolItem *pItem;
if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, bDeep, &pItem ) )
pLRSpace = static_cast<const SvxLRSpaceItem *>(pItem);
@@ -3107,8 +3107,8 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt,
if( !rHTMLWrt.IsHTMLMode(HTMLMODE_PRINT_EXT) )
return rWrt;
- const sal_Char *pBreakBefore = 0;
- const sal_Char *pBreakAfter = 0;
+ const sal_Char *pBreakBefore = nullptr;
+ const sal_Char *pBreakAfter = nullptr;
if( pKeepItem )
{
@@ -3170,11 +3170,11 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt,
{
SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
const SfxPoolItem *pItem;
- const SvxFormatBreakItem *pBreakItem = 0;
+ const SvxFormatBreakItem *pBreakItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem ))
pBreakItem = static_cast<const SvxFormatBreakItem *>(pItem);
- const SwFormatPageDesc *pPDescItem = 0;
+ const SwFormatPageDesc *pPDescItem = nullptr;
if( ( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ||
!rHTMLWrt.m_bCSS1IgnoreFirstPageDesc ||
rHTMLWrt.m_pStartNdIdx->GetIndex() !=
@@ -3182,7 +3182,7 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt,
SfxItemState::SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem ))
pPDescItem = static_cast<const SwFormatPageDesc*>(pItem);
- const SvxFormatKeepItem *pKeepItem = 0;
+ const SvxFormatKeepItem *pKeepItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem ))
pKeepItem = static_cast<const SvxFormatKeepItem *>(pItem);
@@ -3245,7 +3245,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
return rWrt;
// if necessary, add the orientation of the Graphic
- const sal_Char *pRepeat = 0, *pHori = 0, *pVert = 0;
+ const sal_Char *pRepeat = nullptr, *pHori = nullptr, *pVert = nullptr;
if( pGrf )
{
if( GPOS_TILED==ePos )
@@ -3513,7 +3513,7 @@ static Writer& OutCSS1_SvxFrameDirection( Writer& rWrt, const SfxPoolItem& rHt )
sal_uInt16 nDir =
static_cast< const SvxFrameDirectionItem& >( rHt ).GetValue();
- const sal_Char* pStr = NULL;
+ const sal_Char* pStr = nullptr;
switch( nDir )
{
case FRMDIR_HORI_LEFT_TOP:
@@ -3543,25 +3543,25 @@ static Writer& OutCSS1_SvxFrameDirection( Writer& rWrt, const SfxPoolItem& rHt )
SwAttrFnTab aCSS1AttrFnTab = {
/* RES_CHRATR_CASEMAP */ OutCSS1_SvxCaseMap,
-/* RES_CHRATR_CHARSETCOLOR */ 0,
+/* RES_CHRATR_CHARSETCOLOR */ nullptr,
/* RES_CHRATR_COLOR */ OutCSS1_SvxColor,
-/* RES_CHRATR_CONTOUR */ 0,
+/* RES_CHRATR_CONTOUR */ nullptr,
/* RES_CHRATR_CROSSEDOUT */ OutCSS1_SvxCrossedOut,
-/* RES_CHRATR_ESCAPEMENT */ 0,
+/* RES_CHRATR_ESCAPEMENT */ nullptr,
/* RES_CHRATR_FONT */ OutCSS1_SvxFont,
/* RES_CHRATR_FONTSIZE */ OutCSS1_SvxFontHeight,
/* RES_CHRATR_KERNING */ OutCSS1_SvxKerning,
/* RES_CHRATR_LANGUAGE */ OutCSS1_SvxLanguage,
/* RES_CHRATR_POSTURE */ OutCSS1_SvxPosture,
-/* RES_CHRATR_PROPORTIONALFONTSIZE*/0,
-/* RES_CHRATR_SHADOWED */ 0,
+/* RES_CHRATR_PROPORTIONALFONTSIZE*/nullptr,
+/* RES_CHRATR_SHADOWED */ nullptr,
/* RES_CHRATR_UNDERLINE */ OutCSS1_SvxUnderline,
/* RES_CHRATR_WEIGHT */ OutCSS1_SvxFontWeight,
-/* RES_CHRATR_WORDLINEMODE */ 0,
-/* RES_CHRATR_AUTOKERN */ 0,
+/* RES_CHRATR_WORDLINEMODE */ nullptr,
+/* RES_CHRATR_AUTOKERN */ nullptr,
/* RES_CHRATR_BLINK */ OutCSS1_SvxBlink,
-/* RES_CHRATR_NOHYPHEN */ 0, // Neu: nicht trennen
-/* RES_CHRATR_NOLINEBREAK */ 0, // Neu: nicht umbrechen
+/* RES_CHRATR_NOHYPHEN */ nullptr, // Neu: nicht trennen
+/* RES_CHRATR_NOLINEBREAK */ nullptr, // Neu: nicht umbrechen
/* RES_CHRATR_BACKGROUND */ OutCSS1_SvxBrush, // Neu: Zeichenhintergrund
/* RES_CHRATR_CJK_FONT */ OutCSS1_SvxFont,
/* RES_CHRATR_CJK_FONTSIZE */ OutCSS1_SvxFontHeight,
@@ -3573,131 +3573,131 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_CHRATR_CTL_LANGUAGE */ OutCSS1_SvxLanguage,
/* RES_CHRATR_CTL_POSTURE */ OutCSS1_SvxPosture,
/* RES_CHRATR_CTL_WEIGHT */ OutCSS1_SvxFontWeight,
-/* RES_CHRATR_ROTATE */ 0,
-/* RES_CHRATR_EMPHASIS_MARK */ 0,
-/* RES_CHRATR_TWO_LINES */ 0,
-/* RES_CHRATR_SCALEW */ 0,
-/* RES_CHRATR_RELIEF */ 0,
+/* RES_CHRATR_ROTATE */ nullptr,
+/* RES_CHRATR_EMPHASIS_MARK */ nullptr,
+/* RES_CHRATR_TWO_LINES */ nullptr,
+/* RES_CHRATR_SCALEW */ nullptr,
+/* RES_CHRATR_RELIEF */ nullptr,
/* RES_CHRATR_HIDDEN */ OutCSS1_SvxHidden,
/* RES_CHRATR_OVERLINE */ OutCSS1_SvxOverline,
-/* RES_CHRATR_RSID */ 0,
+/* RES_CHRATR_RSID */ nullptr,
/* RES_CHRATR_BOX */ OutCSS1_SvxBox,
-/* RES_CHRATR_SHADOW */ 0,
-/* RES_CHRATR_HIGHLIGHT */ 0,
-/* RES_CHRATR_GRABBAG */ 0,
-/* RES_CHRATR_BIDIRTL */ 0,
-/* RES_CHRATR_IDCTHINT */ 0,
-
-/* RES_TXTATR_REFMARK */ 0,
-/* RES_TXTATR_TOXMARK */ 0,
-/* RES_TXTATR_META */ 0,
-/* RES_TXTATR_METAFIELD */ 0,
-/* RES_TXTATR_AUTOFMT */ 0,
-/* RES_TXTATR_INETFMT */ 0,
-/* RES_TXTATR_CHARFMT */ 0,
-/* RES_TXTATR_CJK_RUBY */ 0,
-/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
-/* RES_TXTATR_INPUTFIELD */ 0,
-
-/* RES_TXTATR_FIELD */ 0,
-/* RES_TXTATR_FLYCNT */ 0,
-/* RES_TXTATR_FTN */ 0,
-/* RES_TXTATR_ANNOTATION */ 0,
-/* RES_TXTATR_DUMMY3 */ 0,
-/* RES_TXTATR_DUMMY1 */ 0, // Dummy:
-/* RES_TXTATR_DUMMY2 */ 0, // Dummy:
+/* RES_CHRATR_SHADOW */ nullptr,
+/* RES_CHRATR_HIGHLIGHT */ nullptr,
+/* RES_CHRATR_GRABBAG */ nullptr,
+/* RES_CHRATR_BIDIRTL */ nullptr,
+/* RES_CHRATR_IDCTHINT */ nullptr,
+
+/* RES_TXTATR_REFMARK */ nullptr,
+/* RES_TXTATR_TOXMARK */ nullptr,
+/* RES_TXTATR_META */ nullptr,
+/* RES_TXTATR_METAFIELD */ nullptr,
+/* RES_TXTATR_AUTOFMT */ nullptr,
+/* RES_TXTATR_INETFMT */ nullptr,
+/* RES_TXTATR_CHARFMT */ nullptr,
+/* RES_TXTATR_CJK_RUBY */ nullptr,
+/* RES_TXTATR_UNKNOWN_CONTAINER */ nullptr,
+/* RES_TXTATR_INPUTFIELD */ nullptr,
+
+/* RES_TXTATR_FIELD */ nullptr,
+/* RES_TXTATR_FLYCNT */ nullptr,
+/* RES_TXTATR_FTN */ nullptr,
+/* RES_TXTATR_ANNOTATION */ nullptr,
+/* RES_TXTATR_DUMMY3 */ nullptr,
+/* RES_TXTATR_DUMMY1 */ nullptr, // Dummy:
+/* RES_TXTATR_DUMMY2 */ nullptr, // Dummy:
/* RES_PARATR_LINESPACING */ OutCSS1_SvxLineSpacing,
/* RES_PARATR_ADJUST */ OutCSS1_SvxAdjust,
/* RES_PARATR_SPLIT */ OutCSS1_SvxFormatSplit,
/* RES_PARATR_ORPHANS */ OutCSS1_SvxOrphans,
/* RES_PARATR_WIDOWS */ OutCSS1_SvxWidows,
-/* RES_PARATR_TABSTOP */ 0,
-/* RES_PARATR_HYPHENZONE*/ 0,
+/* RES_PARATR_TABSTOP */ nullptr,
+/* RES_PARATR_HYPHENZONE*/ nullptr,
/* RES_PARATR_DROP */ OutCSS1_SwFormatDrop,
-/* RES_PARATR_REGISTER */ 0, // neu: Registerhaltigkeit
-/* RES_PARATR_NUMRULE */ 0,
-/* RES_PARATR_SCRIPTSPACE */ 0,
-/* RES_PARATR_HANGINGPUNCTUATION */ 0,
-/* RES_PARATR_FORBIDDEN_RULES */ 0, // new
-/* RES_PARATR_VERTALIGN */ 0, // new
-/* RES_PARATR_SNAPTOGRID*/ 0, // new
-/* RES_PARATR_CONNECT_TO_BORDER */ 0, // new
-/* RES_PARATR_OUTLINELEVEL */ 0, // new since cws outlinelevel
-/* RES_PARATR_RSID */ 0, // new
-/* RES_PARATR_GRABBAG */ 0,
-
-/* RES_PARATR_LIST_ID */ 0, // new
-/* RES_PARATR_LIST_LEVEL */ 0, // new
-/* RES_PARATR_LIST_ISRESTART */ 0, // new
-/* RES_PARATR_LIST_RESTARTVALUE */ 0, // new
-/* RES_PARATR_LIST_ISCOUNTED */ 0, // new
-
-/* RES_FILL_ORDER */ 0,
-/* RES_FRM_SIZE */ 0,
-/* RES_PAPER_BIN */ 0,
+/* RES_PARATR_REGISTER */ nullptr, // neu: Registerhaltigkeit
+/* RES_PARATR_NUMRULE */ nullptr,
+/* RES_PARATR_SCRIPTSPACE */ nullptr,
+/* RES_PARATR_HANGINGPUNCTUATION */ nullptr,
+/* RES_PARATR_FORBIDDEN_RULES */ nullptr, // new
+/* RES_PARATR_VERTALIGN */ nullptr, // new
+/* RES_PARATR_SNAPTOGRID*/ nullptr, // new
+/* RES_PARATR_CONNECT_TO_BORDER */ nullptr, // new
+/* RES_PARATR_OUTLINELEVEL */ nullptr, // new since cws outlinelevel
+/* RES_PARATR_RSID */ nullptr, // new
+/* RES_PARATR_GRABBAG */ nullptr,
+
+/* RES_PARATR_LIST_ID */ nullptr, // new
+/* RES_PARATR_LIST_LEVEL */ nullptr, // new
+/* RES_PARATR_LIST_ISRESTART */ nullptr, // new
+/* RES_PARATR_LIST_RESTARTVALUE */ nullptr, // new
+/* RES_PARATR_LIST_ISCOUNTED */ nullptr, // new
+
+/* RES_FILL_ORDER */ nullptr,
+/* RES_FRM_SIZE */ nullptr,
+/* RES_PAPER_BIN */ nullptr,
/* RES_LR_SPACE */ OutCSS1_SvxLRSpace,
/* RES_UL_SPACE */ OutCSS1_SvxULSpace,
-/* RES_PAGEDESC */ 0,
-/* RES_BREAK */ 0,
-/* RES_CNTNT */ 0,
-/* RES_HEADER */ 0,
-/* RES_FOOTER */ 0,
-/* RES_PRINT */ 0,
-/* RES_OPAQUE */ 0,
-/* RES_PROTECT */ 0,
-/* RES_SURROUND */ 0,
-/* RES_VERT_ORIENT */ 0,
-/* RES_HORI_ORIENT */ 0,
-/* RES_ANCHOR */ 0,
+/* RES_PAGEDESC */ nullptr,
+/* RES_BREAK */ nullptr,
+/* RES_CNTNT */ nullptr,
+/* RES_HEADER */ nullptr,
+/* RES_FOOTER */ nullptr,
+/* RES_PRINT */ nullptr,
+/* RES_OPAQUE */ nullptr,
+/* RES_PROTECT */ nullptr,
+/* RES_SURROUND */ nullptr,
+/* RES_VERT_ORIENT */ nullptr,
+/* RES_HORI_ORIENT */ nullptr,
+/* RES_ANCHOR */ nullptr,
/* RES_BACKGROUND */ OutCSS1_SvxBrush,
/* RES_BOX */ OutCSS1_SvxBox,
-/* RES_SHADOW */ 0,
-/* RES_FRMMACRO */ 0,
-/* RES_COL */ 0,
-/* RES_KEEP */ 0,
-/* RES_URL */ 0,
-/* RES_EDIT_IN_READONLY */ 0,
-/* RES_LAYOUT_SPLIT */ 0,
-/* RES_CHAIN */ 0,
-/* RES_TEXTGRID */ 0,
-/* RES_LINENUMBER */ 0,
-/* RES_FTN_AT_TXTEND */ 0,
-/* RES_END_AT_TXTEND */ 0,
-/* RES_COLUMNBALANCE */ 0,
+/* RES_SHADOW */ nullptr,
+/* RES_FRMMACRO */ nullptr,
+/* RES_COL */ nullptr,
+/* RES_KEEP */ nullptr,
+/* RES_URL */ nullptr,
+/* RES_EDIT_IN_READONLY */ nullptr,
+/* RES_LAYOUT_SPLIT */ nullptr,
+/* RES_CHAIN */ nullptr,
+/* RES_TEXTGRID */ nullptr,
+/* RES_LINENUMBER */ nullptr,
+/* RES_FTN_AT_TXTEND */ nullptr,
+/* RES_END_AT_TXTEND */ nullptr,
+/* RES_COLUMNBALANCE */ nullptr,
/* RES_FRAMEDIR */ OutCSS1_SvxFrameDirection,
-/* RES_HEADER_FOOTER_EAT_SPACING */ 0,
-/* RES_ROW_SPLIT */ 0,
-/* RES_FOLLOW_TEXT_FLOW */ 0,
-/* RES_COLLAPSING_BORDERS */ 0,
-/* RES_WRAP_INFLUENCE_ON_OBJPOS */ 0,
-/* RES_AUTO_STYLE */ 0,
-/* RES_FRMATR_STYLE_NAME */ 0,
-/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ 0,
-/* RES_FRMATR_GRABBAG */ 0,
-/* RES_TEXT_VERT_ADJUST */ 0,
-
-/* RES_GRFATR_MIRRORGRF */ 0,
-/* RES_GRFATR_CROPGRF */ 0,
-/* RES_GRFATR_ROTATION */ 0,
-/* RES_GRFATR_LUMINANCE */ 0,
-/* RES_GRFATR_CONTRAST */ 0,
-/* RES_GRFATR_CHANNELR */ 0,
-/* RES_GRFATR_CHANNELG */ 0,
-/* RES_GRFATR_CHANNELB */ 0,
-/* RES_GRFATR_GAMMA */ 0,
-/* RES_GRFATR_INVERT */ 0,
-/* RES_GRFATR_TRANSPARENCY */ 0,
-/* RES_GRFATR_DRWAMODE */ 0,
-/* RES_GRFATR_DUMMY1 */ 0,
-/* RES_GRFATR_DUMMY2 */ 0,
-/* RES_GRFATR_DUMMY3 */ 0,
-/* RES_GRFATR_DUMMY4 */ 0,
-/* RES_GRFATR_DUMMY5 */ 0,
-
-/* RES_BOXATR_FORMAT */ 0,
-/* RES_BOXATR_FORMULA */ 0,
-/* RES_BOXATR_VALUE */ 0
+/* RES_HEADER_FOOTER_EAT_SPACING */ nullptr,
+/* RES_ROW_SPLIT */ nullptr,
+/* RES_FOLLOW_TEXT_FLOW */ nullptr,
+/* RES_COLLAPSING_BORDERS */ nullptr,
+/* RES_WRAP_INFLUENCE_ON_OBJPOS */ nullptr,
+/* RES_AUTO_STYLE */ nullptr,
+/* RES_FRMATR_STYLE_NAME */ nullptr,
+/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ nullptr,
+/* RES_FRMATR_GRABBAG */ nullptr,
+/* RES_TEXT_VERT_ADJUST */ nullptr,
+
+/* RES_GRFATR_MIRRORGRF */ nullptr,
+/* RES_GRFATR_CROPGRF */ nullptr,
+/* RES_GRFATR_ROTATION */ nullptr,
+/* RES_GRFATR_LUMINANCE */ nullptr,
+/* RES_GRFATR_CONTRAST */ nullptr,
+/* RES_GRFATR_CHANNELR */ nullptr,
+/* RES_GRFATR_CHANNELG */ nullptr,
+/* RES_GRFATR_CHANNELB */ nullptr,
+/* RES_GRFATR_GAMMA */ nullptr,
+/* RES_GRFATR_INVERT */ nullptr,
+/* RES_GRFATR_TRANSPARENCY */ nullptr,
+/* RES_GRFATR_DRWAMODE */ nullptr,
+/* RES_GRFATR_DUMMY1 */ nullptr,
+/* RES_GRFATR_DUMMY2 */ nullptr,
+/* RES_GRFATR_DUMMY3 */ nullptr,
+/* RES_GRFATR_DUMMY4 */ nullptr,
+/* RES_GRFATR_DUMMY5 */ nullptr,
+
+/* RES_BOXATR_FORMAT */ nullptr,
+/* RES_BOXATR_FORMULA */ nullptr,
+/* RES_BOXATR_VALUE */ nullptr
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 5aa30dda24d2..c053eb298b77 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -87,7 +87,7 @@ HTMLOutEvent aAnchorEventTable[] =
{ OOO_STRING_SVTOOLS_HTML_O_SDonclick, OOO_STRING_SVTOOLS_HTML_O_onclick, SFX_EVENT_MOUSECLICK_OBJECT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseover, OOO_STRING_SVTOOLS_HTML_O_onmouseover, SFX_EVENT_MOUSEOVER_OBJECT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseout, OOO_STRING_SVTOOLS_HTML_O_onmouseout, SFX_EVENT_MOUSEOUT_OBJECT },
- { 0, 0, 0 }
+ { nullptr, nullptr, 0 }
};
static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
@@ -232,8 +232,8 @@ SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, SwDoc *pDoc, SwDoc *pTem
LanguageType eDfltLang,
sal_uInt16 nCSS1Script, bool bHardDrop )
: pFormat(pF)
- , pRefFormat(0)
- , pItemSet(0)
+ , pRefFormat(nullptr)
+ , pItemSet(nullptr)
, nLeftMargin(0)
, nRightMargin(0)
, nFirstLineIndent(0)
@@ -253,7 +253,7 @@ SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, SwDoc *pDoc, SwDoc *pTem
bool bTextColl = pFormat->Which() == RES_TXTFMTCOLL ||
pFormat->Which() == RES_CONDTXTFMTCOLL;
- const SwFormat *pReferenceFormat = 0; // Vergleichs-Format
+ const SwFormat *pReferenceFormat = nullptr; // Vergleichs-Format
if( nDeep != 0 )
{
// Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer
@@ -316,7 +316,7 @@ SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, SwDoc *pDoc, SwDoc *pTem
if( !pItemSet->Count() )
{
delete pItemSet;
- pItemSet = 0;
+ pItemSet = nullptr;
}
}
@@ -649,7 +649,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
// soll ein ALIGN=... geschrieben werden?
- const SfxPoolItem* pAdjItem = 0;
+ const SfxPoolItem* pAdjItem = nullptr;
const SfxPoolItem* pItem;
if( rInfo.pItemSet &&
@@ -821,7 +821,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rHWrt.m_bOutOpts = true;
OutHTML_SvxAdjust( rWrt, *pAdjItem );
rWrt.Strm().WriteChar( '>' );
- pAdjItem = 0;
+ pAdjItem = nullptr;
rHWrt.m_bNoAlign = false;
rInfo.bOutDiv = true;
rHWrt.IncIndentLevel();
@@ -1017,7 +1017,7 @@ void OutHTML_SwFormatOff( Writer& rWrt, const SwHTMLTextCollOutputInfo& rInfo )
rHWrt.ChangeParaToken( 0 );
OutHTML_NumBulListEnd( rHWrt, rNextInfo );
}
- else if( rNextInfo.GetNumRule() != 0 )
+ else if( rNextInfo.GetNumRule() != nullptr )
rHWrt.ChangeParaToken( 0 );
return;
@@ -1177,9 +1177,9 @@ public:
sal_uInt16 nWeak=CSS1_OUTMODE_ANY_SCRIPT );
void OutStartAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos,
- HTMLOutContext *pContext = 0 );
+ HTMLOutContext *pContext = nullptr );
void OutEndAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos,
- HTMLOutContext *pContext = 0 );
+ HTMLOutContext *pContext = nullptr );
bool IsHTMLMode( sal_uLong nMode ) const { return (nHTMLMode & nMode) != 0; }
};
@@ -1935,7 +1935,7 @@ void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos,
// die Attribute in der Start-Liste sind aufsteigend sortiert
for( HTMLStartEndPositions::size_type i=0; i< aStartLst.size(); ++i )
{
- HTMLStartEndPos *pPos = 0;
+ HTMLStartEndPos *pPos = nullptr;
if( nCharBoxIndex < aStartLst.size() )
{
if( i == 0 )
@@ -1968,7 +1968,7 @@ void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos,
if( pContext )
{
HTMLOutFuncs::FlushToAscii( rHWrt.Strm(), *pContext );
- pContext = 0; // one time ony
+ pContext = nullptr; // one time ony
}
Out( aHTMLAttrFnTab, *pPos->GetItem(), rHWrt );
rHWrt.m_nCSS1Script = nCSS1Script;
@@ -1993,7 +1993,7 @@ void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos,
if( pContext )
{
HTMLOutFuncs::FlushToAscii( rHWrt.Strm(), *pContext );
- pContext = 0; // one time ony
+ pContext = nullptr; // one time ony
}
// Skip closing span if next character span has the same border (border merge)
bool bSkipOut = false;
@@ -2330,7 +2330,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
{
rHTMLWrt.OutFootEndNoteSym( *rHTMLWrt.m_pFormatFootnote, aFootEndNoteSym,
aEndPosLst.GetScriptAtPos( aOutlineText.getLength(), rHTMLWrt.m_nCSS1Script ) );
- rHTMLWrt.m_pFormatFootnote = 0;
+ rHTMLWrt.m_pFormatFootnote = nullptr;
}
}
@@ -2340,7 +2340,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
size_t nAttrPos = 0;
sal_Int32 nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex();
- const SwTextAttr * pHt = 0;
+ const SwTextAttr * pHt = nullptr;
const size_t nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
if( nCntAttr && nStrPos > ( pHt = pNd->GetSwpHints().Get(0) )->GetStart() )
{
@@ -2409,7 +2409,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
}
bool bOutChar = true;
- const SwTextAttr * pTextHt = 0;
+ const SwTextAttr * pTextHt = nullptr;
if( nAttrPos < nCntAttr && pHt->GetStart() == nStrPos
&& nStrPos != nEnd )
{
@@ -2851,7 +2851,7 @@ static Writer& OutHTML_SvxEscapement( Writer& rWrt, const SfxPoolItem& rHt )
const SvxEscapement eEscape =
(const SvxEscapement)static_cast<const SvxEscapementItem&>(rHt).GetEnumValue();
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( eEscape )
{
case SVX_ESCAPEMENT_SUPERSCRIPT: pStr = OOO_STRING_SVTOOLS_HTML_superscript; break;
@@ -2899,7 +2899,7 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt )
const SwFormatFlyCnt& rFlyCnt = static_cast<const SwFormatFlyCnt&>(rHt);
const SwFrameFormat& rFormat = *rFlyCnt.GetFrameFormat();
- const SdrObject *pSdrObj = 0;
+ const SdrObject *pSdrObj = nullptr;
SwHTMLFrmType eType =
(SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFormat, pSdrObj );
@@ -2935,7 +2935,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
OUString aURL( rINetFormat.GetValue() );
const SvxMacroTableDtor *pMacTable = rINetFormat.GetMacroTable();
- bool bEvents = pMacTable != 0 && !pMacTable->empty();
+ bool bEvents = pMacTable != nullptr && !pMacTable->empty();
// Anything to output at all?
if( aURL.isEmpty() && !bEvents && rINetFormat.GetName().isEmpty() )
@@ -2976,7 +2976,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
if( bScriptDependent )
{
sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"";
- const sal_Char* pStr = 0;
+ const sal_Char* pStr = nullptr;
switch( rHTMLWrt.m_nCSS1Script )
{
case CSS1_OUTMODE_WESTERN:
@@ -3177,7 +3177,7 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
const SvxAdjustItem& rAdjust = static_cast<const SvxAdjustItem&>(rHt);
- const sal_Char* pStr = 0;
+ const sal_Char* pStr = nullptr;
switch( rAdjust.GetAdjust() )
{
case SVX_ADJUST_CENTER: pStr = OOO_STRING_SVTOOLS_HTML_AL_center; break;
@@ -3206,9 +3206,9 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
SwAttrFnTab aHTMLAttrFnTab = {
/* RES_CHRATR_CASEMAP */ OutHTML_CSS1Attr,
-/* RES_CHRATR_CHARSETCOLOR */ 0,
+/* RES_CHRATR_CHARSETCOLOR */ nullptr,
/* RES_CHRATR_COLOR */ OutHTML_SvxColor,
-/* RES_CHRATR_CONTOUR */ 0,
+/* RES_CHRATR_CONTOUR */ nullptr,
/* RES_CHRATR_CROSSEDOUT */ OutHTML_SwCrossedOut,
/* RES_CHRATR_ESCAPEMENT */ OutHTML_SvxEscapement,
/* RES_CHRATR_FONT */ OutHTML_SvxFont,
@@ -3216,15 +3216,15 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_CHRATR_KERNING */ OutHTML_CSS1Attr,
/* RES_CHRATR_LANGUAGE */ OutHTML_SvxLanguage,
/* RES_CHRATR_POSTURE */ OutHTML_SwPosture,
-/* RES_CHRATR_PROPORTIONALFONTSIZE*/0,
-/* RES_CHRATR_SHADOWED */ 0,
+/* RES_CHRATR_PROPORTIONALFONTSIZE*/nullptr,
+/* RES_CHRATR_SHADOWED */ nullptr,
/* RES_CHRATR_UNDERLINE */ OutHTML_SwUnderline,
/* RES_CHRATR_WEIGHT */ OutHTML_SwWeight,
-/* RES_CHRATR_WORDLINEMODE */ 0,
-/* RES_CHRATR_AUTOKERN */ 0,
+/* RES_CHRATR_WORDLINEMODE */ nullptr,
+/* RES_CHRATR_AUTOKERN */ nullptr,
/* RES_CHRATR_BLINK */ OutHTML_SwBlink,
-/* RES_CHRATR_NOHYPHEN */ 0, // Neu: nicht trennen
-/* RES_CHRATR_NOLINEBREAK */ 0, // Neu: nicht umbrechen
+/* RES_CHRATR_NOHYPHEN */ nullptr, // Neu: nicht trennen
+/* RES_CHRATR_NOLINEBREAK */ nullptr, // Neu: nicht umbrechen
/* RES_CHRATR_BACKGROUND */ OutHTML_CSS1Attr, // Neu: Zeichenhintergrund
/* RES_CHRATR_CJK_FONT */ OutHTML_SvxFont,
/* RES_CHRATR_CJK_FONTSIZE */ OutHTML_SvxFontHeight,
@@ -3236,131 +3236,131 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_CHRATR_CTL_LANGUAGE */ OutHTML_SvxLanguage,
/* RES_CHRATR_CTL_POSTURE */ OutHTML_SwPosture,
/* RES_CHRATR_CTL_WEIGHT */ OutHTML_SwWeight,
-/* RES_CHRATR_ROTATE */ 0,
-/* RES_CHRATR_EMPHASIS_MARK */ 0,
-/* RES_CHRATR_TWO_LINES */ 0,
-/* RES_CHRATR_SCALEW */ 0,
-/* RES_CHRATR_RELIEF */ 0,
+/* RES_CHRATR_ROTATE */ nullptr,
+/* RES_CHRATR_EMPHASIS_MARK */ nullptr,
+/* RES_CHRATR_TWO_LINES */ nullptr,
+/* RES_CHRATR_SCALEW */ nullptr,
+/* RES_CHRATR_RELIEF */ nullptr,
/* RES_CHRATR_HIDDEN */ OutHTML_CSS1Attr,
/* RES_CHRATR_OVERLINE */ OutHTML_CSS1Attr,
-/* RES_CHRATR_RSID */ 0,
+/* RES_CHRATR_RSID */ nullptr,
/* RES_CHRATR_BOX */ OutHTML_CSS1Attr,
-/* RES_CHRATR_SHADOW */ 0,
-/* RES_CHRATR_HIGHLIGHT */ 0,
-/* RES_CHRATR_GRABBAG */ 0,
-/* RES_CHRATR_BIDIRTL */ 0,
-/* RES_CHRATR_IDCTHINT */ 0,
-
-/* RES_TXTATR_REFMARK */ 0,
-/* RES_TXTATR_TOXMARK */ 0,
-/* RES_TXTATR_META */ 0,
-/* RES_TXTATR_METAFIELD */ 0,
-/* RES_TXTATR_AUTOFMT */ 0,
+/* RES_CHRATR_SHADOW */ nullptr,
+/* RES_CHRATR_HIGHLIGHT */ nullptr,
+/* RES_CHRATR_GRABBAG */ nullptr,
+/* RES_CHRATR_BIDIRTL */ nullptr,
+/* RES_CHRATR_IDCTHINT */ nullptr,
+
+/* RES_TXTATR_REFMARK */ nullptr,
+/* RES_TXTATR_TOXMARK */ nullptr,
+/* RES_TXTATR_META */ nullptr,
+/* RES_TXTATR_METAFIELD */ nullptr,
+/* RES_TXTATR_AUTOFMT */ nullptr,
/* RES_TXTATR_INETFMT */ OutHTML_SwFormatINetFormat,
/* RES_TXTATR_CHARFMT */ OutHTML_SwTextCharFormat,
-/* RES_TXTATR_CJK_RUBY */ 0,
-/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
+/* RES_TXTATR_CJK_RUBY */ nullptr,
+/* RES_TXTATR_UNKNOWN_CONTAINER */ nullptr,
/* RES_TXTATR_INPUTFIELD */ OutHTML_SwFormatField,
/* RES_TXTATR_FIELD */ OutHTML_SwFormatField,
/* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt,
/* RES_TXTATR_FTN */ OutHTML_SwFormatFootnote,
/* RES_TXTATR_ANNOTATION */ OutHTML_SwFormatField,
-/* RES_TXTATR_DUMMY3 */ 0,
-/* RES_TXTATR_DUMMY1 */ 0, // Dummy:
-/* RES_TXTATR_DUMMY2 */ 0, // Dummy:
+/* RES_TXTATR_DUMMY3 */ nullptr,
+/* RES_TXTATR_DUMMY1 */ nullptr, // Dummy:
+/* RES_TXTATR_DUMMY2 */ nullptr, // Dummy:
-/* RES_PARATR_LINESPACING */ 0,
+/* RES_PARATR_LINESPACING */ nullptr,
/* RES_PARATR_ADJUST */ OutHTML_SvxAdjust,
-/* RES_PARATR_SPLIT */ 0,
-/* RES_PARATR_WIDOWS */ 0,
-/* RES_PARATR_ORPHANS */ 0,
-/* RES_PARATR_TABSTOP */ 0,
-/* RES_PARATR_HYPHENZONE*/ 0,
+/* RES_PARATR_SPLIT */ nullptr,
+/* RES_PARATR_WIDOWS */ nullptr,
+/* RES_PARATR_ORPHANS */ nullptr,
+/* RES_PARATR_TABSTOP */ nullptr,
+/* RES_PARATR_HYPHENZONE*/ nullptr,
/* RES_PARATR_DROP */ OutHTML_CSS1Attr,
-/* RES_PARATR_REGISTER */ 0, // neu: Registerhaltigkeit
-/* RES_PARATR_NUMRULE */ 0, // Dummy:
-/* RES_PARATR_SCRIPTSPACE */ 0, // Dummy:
-/* RES_PARATR_HANGINGPUNCTUATION */ 0, // Dummy:
-/* RES_PARATR_FORBIDDEN_RULES */ 0, // new
-/* RES_PARATR_VERTALIGN */ 0, // new
-/* RES_PARATR_SNAPTOGRID*/ 0, // new
-/* RES_PARATR_CONNECT_TO_BORDER */ 0, // new
-/* RES_PARATR_OUTLINELEVEL */ 0,
-/* RES_PARATR_RSID */ 0,
-/* RES_PARATR_GRABBAG */ 0,
-
-/* RES_PARATR_LIST_ID */ 0, // new
-/* RES_PARATR_LIST_LEVEL */ 0, // new
-/* RES_PARATR_LIST_ISRESTART */ 0, // new
-/* RES_PARATR_LIST_RESTARTVALUE */ 0, // new
-/* RES_PARATR_LIST_ISCOUNTED */ 0, // new
-
-/* RES_FILL_ORDER */ 0,
-/* RES_FRM_SIZE */ 0,
-/* RES_PAPER_BIN */ 0,
-/* RES_LR_SPACE */ 0,
-/* RES_UL_SPACE */ 0,
-/* RES_PAGEDESC */ 0,
-/* RES_BREAK */ 0,
-/* RES_CNTNT */ 0,
-/* RES_HEADER */ 0,
-/* RES_FOOTER */ 0,
-/* RES_PRINT */ 0,
-/* RES_OPAQUE */ 0,
-/* RES_PROTECT */ 0,
-/* RES_SURROUND */ 0,
-/* RES_VERT_ORIENT */ 0,
-/* RES_HORI_ORIENT */ 0,
-/* RES_ANCHOR */ 0,
-/* RES_BACKGROUND */ 0,
-/* RES_BOX */ 0,
-/* RES_SHADOW */ 0,
-/* RES_FRMMACRO */ 0,
-/* RES_COL */ 0,
-/* RES_KEEP */ 0,
-/* RES_URL */ 0,
-/* RES_EDIT_IN_READONLY */ 0,
-/* RES_LAYOUT_SPLIT */ 0,
-/* RES_CHAIN */ 0,
-/* RES_TEXTGRID */ 0,
-/* RES_LINENUMBER */ 0,
-/* RES_FTN_AT_TXTEND */ 0,
-/* RES_END_AT_TXTEND */ 0,
-/* RES_COLUMNBALANCE */ 0,
-/* RES_FRAMEDIR */ 0,
-/* RES_HEADER_FOOTER_EAT_SPACING */ 0,
-/* RES_ROW_SPLIT */ 0,
-/* RES_FOLLOW_TEXT_FLOW */ 0,
-/* RES_COLLAPSING_BORDERS */ 0,
-/* RES_WRAP_INFLUENCE_ON_OBJPOS */ 0,
-/* RES_AUTO_STYLE */ 0,
-/* RES_FRMATR_STYLE_NAME */ 0,
-/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ 0,
-/* RES_FRMATR_GRABBAG */ 0,
-/* RES_TEXT_VERT_ADJUST */ 0,
-
-/* RES_GRFATR_MIRRORGRF */ 0,
-/* RES_GRFATR_CROPGRF */ 0,
-/* RES_GRFATR_ROTATION */ 0,
-/* RES_GRFATR_LUMINANCE */ 0,
-/* RES_GRFATR_CONTRAST */ 0,
-/* RES_GRFATR_CHANNELR */ 0,
-/* RES_GRFATR_CHANNELG */ 0,
-/* RES_GRFATR_CHANNELB */ 0,
-/* RES_GRFATR_GAMMA */ 0,
-/* RES_GRFATR_INVERT */ 0,
-/* RES_GRFATR_TRANSPARENCY */ 0,
-/* RES_GRFATR_DRWAMODE */ 0,
-/* RES_GRFATR_DUMMY1 */ 0,
-/* RES_GRFATR_DUMMY2 */ 0,
-/* RES_GRFATR_DUMMY3 */ 0,
-/* RES_GRFATR_DUMMY4 */ 0,
-/* RES_GRFATR_DUMMY5 */ 0,
-
-/* RES_BOXATR_FORMAT */ 0,
-/* RES_BOXATR_FORMULA */ 0,
-/* RES_BOXATR_VALUE */ 0
+/* RES_PARATR_REGISTER */ nullptr, // neu: Registerhaltigkeit
+/* RES_PARATR_NUMRULE */ nullptr, // Dummy:
+/* RES_PARATR_SCRIPTSPACE */ nullptr, // Dummy:
+/* RES_PARATR_HANGINGPUNCTUATION */ nullptr, // Dummy:
+/* RES_PARATR_FORBIDDEN_RULES */ nullptr, // new
+/* RES_PARATR_VERTALIGN */ nullptr, // new
+/* RES_PARATR_SNAPTOGRID*/ nullptr, // new
+/* RES_PARATR_CONNECT_TO_BORDER */ nullptr, // new
+/* RES_PARATR_OUTLINELEVEL */ nullptr,
+/* RES_PARATR_RSID */ nullptr,
+/* RES_PARATR_GRABBAG */ nullptr,
+
+/* RES_PARATR_LIST_ID */ nullptr, // new
+/* RES_PARATR_LIST_LEVEL */ nullptr, // new
+/* RES_PARATR_LIST_ISRESTART */ nullptr, // new
+/* RES_PARATR_LIST_RESTARTVALUE */ nullptr, // new
+/* RES_PARATR_LIST_ISCOUNTED */ nullptr, // new
+
+/* RES_FILL_ORDER */ nullptr,
+/* RES_FRM_SIZE */ nullptr,
+/* RES_PAPER_BIN */ nullptr,
+/* RES_LR_SPACE */ nullptr,
+/* RES_UL_SPACE */ nullptr,
+/* RES_PAGEDESC */ nullptr,
+/* RES_BREAK */ nullptr,
+/* RES_CNTNT */ nullptr,
+/* RES_HEADER */ nullptr,
+/* RES_FOOTER */ nullptr,
+/* RES_PRINT */ nullptr,
+/* RES_OPAQUE */ nullptr,
+/* RES_PROTECT */ nullptr,
+/* RES_SURROUND */ nullptr,
+/* RES_VERT_ORIENT */ nullptr,
+/* RES_HORI_ORIENT */ nullptr,
+/* RES_ANCHOR */ nullptr,
+/* RES_BACKGROUND */ nullptr,
+/* RES_BOX */ nullptr,
+/* RES_SHADOW */ nullptr,
+/* RES_FRMMACRO */ nullptr,
+/* RES_COL */ nullptr,
+/* RES_KEEP */ nullptr,
+/* RES_URL */ nullptr,
+/* RES_EDIT_IN_READONLY */ nullptr,
+/* RES_LAYOUT_SPLIT */ nullptr,
+/* RES_CHAIN */ nullptr,
+/* RES_TEXTGRID */ nullptr,
+/* RES_LINENUMBER */ nullptr,
+/* RES_FTN_AT_TXTEND */ nullptr,
+/* RES_END_AT_TXTEND */ nullptr,
+/* RES_COLUMNBALANCE */ nullptr,
+/* RES_FRAMEDIR */ nullptr,
+/* RES_HEADER_FOOTER_EAT_SPACING */ nullptr,
+/* RES_ROW_SPLIT */ nullptr,
+/* RES_FOLLOW_TEXT_FLOW */ nullptr,
+/* RES_COLLAPSING_BORDERS */ nullptr,
+/* RES_WRAP_INFLUENCE_ON_OBJPOS */ nullptr,
+/* RES_AUTO_STYLE */ nullptr,
+/* RES_FRMATR_STYLE_NAME */ nullptr,
+/* RES_FRMATR_CONDITIONAL_STYLE_NAME */ nullptr,
+/* RES_FRMATR_GRABBAG */ nullptr,
+/* RES_TEXT_VERT_ADJUST */ nullptr,
+
+/* RES_GRFATR_MIRRORGRF */ nullptr,
+/* RES_GRFATR_CROPGRF */ nullptr,
+/* RES_GRFATR_ROTATION */ nullptr,
+/* RES_GRFATR_LUMINANCE */ nullptr,
+/* RES_GRFATR_CONTRAST */ nullptr,
+/* RES_GRFATR_CHANNELR */ nullptr,
+/* RES_GRFATR_CHANNELG */ nullptr,
+/* RES_GRFATR_CHANNELB */ nullptr,
+/* RES_GRFATR_GAMMA */ nullptr,
+/* RES_GRFATR_INVERT */ nullptr,
+/* RES_GRFATR_TRANSPARENCY */ nullptr,
+/* RES_GRFATR_DRWAMODE */ nullptr,
+/* RES_GRFATR_DUMMY1 */ nullptr,
+/* RES_GRFATR_DUMMY2 */ nullptr,
+/* RES_GRFATR_DUMMY3 */ nullptr,
+/* RES_GRFATR_DUMMY4 */ nullptr,
+/* RES_GRFATR_DUMMY5 */ nullptr,
+
+/* RES_BOXATR_FORMAT */ nullptr,
+/* RES_BOXATR_FORMULA */ nullptr,
+/* RES_BOXATR_VALUE */ nullptr
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 303d8e1e22d3..748985992dde 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -55,7 +55,7 @@ static HTMLOutEvent aBodyEventTable[] =
{ OOO_STRING_SVTOOLS_HTML_O_SDonunload, OOO_STRING_SVTOOLS_HTML_O_onunload, SFX_EVENT_PREPARECLOSEDOC },
{ OOO_STRING_SVTOOLS_HTML_O_SDonfocus, OOO_STRING_SVTOOLS_HTML_O_onfocus, SFX_EVENT_ACTIVATEDOC },
{ OOO_STRING_SVTOOLS_HTML_O_SDonblur, OOO_STRING_SVTOOLS_HTML_O_onblur, SFX_EVENT_DEACTIVATEDOC },
- { 0, 0, 0 }
+ { nullptr, nullptr, 0 }
};
void SwHTMLParser::NewScript()
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index de9604d2005d..addae9ddf749 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -133,7 +133,7 @@ bool SwCSS1Parser::SetFormatBreak( SfxItemSet& rItemSet,
SvxBreak eBreak = SVX_BREAK_NONE;
bool bKeep = false;
bool bSetKeep = false, bSetBreak = false, bSetPageDesc = false;
- const SwPageDesc *pPageDesc = 0;
+ const SwPageDesc *pPageDesc = nullptr;
switch( rPropInfo.ePageBreakBefore )
{
case SVX_CSS1_PBREAK_ALWAYS:
@@ -225,7 +225,7 @@ void SwCSS1Parser::SetLinkCharFormats()
SvxCSS1MapEntry *pStyleEntry =
GetTag( OOO_STRING_SVTOOLS_HTML_anchor );
- SwCharFormat *pUnvisited = 0, *pVisited = 0;
+ SwCharFormat *pUnvisited = nullptr, *pVisited = nullptr;
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
@@ -353,7 +353,7 @@ void SwCSS1Parser::SetTableTextColl( bool bHeader )
sTag = OOO_STRING_SVTOOLS_HTML_tabledata;
}
- SwTextFormatColl *pColl = 0;
+ SwTextFormatColl *pColl = nullptr;
// The following entries will never be used again and may be changed.
SvxCSS1MapEntry *pStyleEntry = GetTag( sTag );
@@ -386,13 +386,13 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
SvxBrushItem aBrushItem( RES_BACKGROUND );
SvxBoxItem aBoxItem( RES_BOX );
SvxFrameDirectionItem aFrmDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR);
- bool bSetBrush = pBrush!=0, bSetBox = false, bSetFrmDir = false;
+ bool bSetBrush = pBrush!=nullptr, bSetBox = false, bSetFrmDir = false;
if( pBrush )
aBrushItem = *pBrush;
if( pItemSet2 )
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if( SfxItemState::SET == pItemSet2->GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
@@ -640,7 +640,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector,
}
static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
- const SfxItemSet *pParentItemSet = 0 )
+ const SfxItemSet *pParentItemSet = nullptr )
{
static const sal_uInt16 aWhichIds[3][5] =
{
@@ -730,7 +730,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( pNext )
aName = pNext->GetString();
InsertPage( aName,
- pNext != 0,
+ pNext != nullptr,
rItemSet, rPropInfo );
}
}
@@ -825,7 +825,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Ein par Attribute muessen an der Seitenvorlage gesetzt werden,
// und zwar die, die nicht vererbt werden
- SetPageDescAttrs( 0, &rItemSet );
+ SetPageDescAttrs( nullptr, &rItemSet );
// alle noch uebrigen Optionen koennen an der Standard-Vorlage
// gesetzt werden und gelten dann automatisch als defaults
@@ -986,7 +986,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Die Vorlage Suchen bzw. Anlegen
SwTextFormatColl *pColl = GetTextFormatColl( nPoolCollId, aEmptyOUStr );
- SwTextFormatColl* pParentColl = 0;
+ SwTextFormatColl* pParentColl = nullptr;
if( !aClass.isEmpty() )
{
OUString aName( pColl->GetName() );
@@ -1001,7 +1001,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
// nur die Attribute an der Vorlage setzen
const SfxPoolItem *pItem;
- const SvxBoxItem *pBoxItem = 0;
+ const SvxBoxItem *pBoxItem = nullptr;
if( SfxItemState::SET ==
pColl->GetAttrSet().GetItemState(RES_BOX,true,&pItem) )
pBoxItem = static_cast<const SvxBoxItem *>(pItem);
@@ -1014,7 +1014,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
SfxItemSet aScriptItemSet( rItemSet );
RemoveScriptItems( aScriptItemSet, nScript,
- pParentColl ? &pParentColl->GetAttrSet() : 0 );
+ pParentColl ? &pParentColl->GetAttrSet() : nullptr );
SetTextCollAttrs( pColl, aScriptItemSet, rPropInfo, this );
}
}
@@ -1084,7 +1084,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SwCharFormat *pCFormat = GetChrFormat( static_cast< sal_uInt16 >(nToken2), aEmptyOUStr );
if( pCFormat )
{
- SwCharFormat *pParentCFormat = 0;
+ SwCharFormat *pParentCFormat = nullptr;
if( !aClass.isEmpty() )
{
OUString aName( pCFormat->GetName() );
@@ -1107,7 +1107,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
SfxItemSet aScriptItemSet( rItemSet );
RemoveScriptItems( aScriptItemSet, nScript,
- pParentCFormat ? &pParentCFormat->GetAttrSet() : 0 );
+ pParentCFormat ? &pParentCFormat->GetAttrSet() : nullptr );
SetCharFormatAttrs( pCFormat, aScriptItemSet );
}
return false;
@@ -1123,7 +1123,7 @@ sal_uInt32 SwCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
const FontList *SwCSS1Parser::GetFontList() const
{
- const FontList *pFList = 0;
+ const FontList *pFList = nullptr;
SwDocShell *pDocSh = pDoc->GetDocShell();
if( pDocSh )
{
@@ -1140,7 +1140,7 @@ SwCharFormat* SwCSS1Parser::GetChrFormat( sal_uInt16 nToken2, const OUString& rC
{
// die entsprechende Vorlage suchen
sal_uInt16 nPoolId = 0;
- const sal_Char* sName = 0;
+ const sal_Char* sName = nullptr;
switch( nToken2 )
{
case HTML_EMPHASIS_ON: nPoolId = RES_POOLCHR_HTML_EMPHASIS; break;
@@ -1165,10 +1165,10 @@ SwCharFormat* SwCSS1Parser::GetChrFormat( sal_uInt16 nToken2, const OUString& rC
// die Vorlage suchen oder anlegen (geht nur mit Namen)
if( !nPoolId && !sName )
- return 0;
+ return nullptr;
// Die Vorlage (ohne Class) suchen oder anlegen
- SwCharFormat *pCFormat = 0;
+ SwCharFormat *pCFormat = nullptr;
if( nPoolId )
{
pCFormat = GetCharFormatFromPool( nPoolId );
@@ -1253,7 +1253,7 @@ SwCharFormat *SwCSS1Parser::GetCharFormatFromPool( sal_uInt16 nPoolId ) const
SwTextFormatColl *SwCSS1Parser::GetTextFormatColl( sal_uInt16 nTextColl,
const OUString& rClass )
{
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
OUString aClass( rClass );
GetScriptFromClass( aClass, false );
@@ -1345,7 +1345,7 @@ static SwPageDesc *FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
pDoc->GetPageDesc(nPage).GetPoolFormatId() != nPoolId; ++nPage)
;
- return nPage < nPageDescs ? &pDoc->GetPageDesc(nPage) : 0;
+ return nPage < nPageDescs ? &pDoc->GetPageDesc(nPage) : nullptr;
}
const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
@@ -1358,7 +1358,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
{
// Die erste Seite wird aus der rechten Seite erzeugt, wenn es die
// gibt.
- SwPageDesc *pMasterPageDesc = 0;
+ SwPageDesc *pMasterPageDesc = nullptr;
if( RES_POOLPAGE_FIRST == nPoolId )
pMasterPageDesc = FindPageDesc(pDoc, RES_POOLPAGE_RIGHT);
if( !pMasterPageDesc )
@@ -1374,7 +1374,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, false );
// Die Vorlagen an ihren neuen Zweck anpassen.
- const SwPageDesc *pFollow = 0;
+ const SwPageDesc *pFollow = nullptr;
bool bSetFollowFollow = false;
switch( nPoolId )
{
@@ -1509,7 +1509,7 @@ void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop,
// Fuer alle anderen Attribute eine Zeichen-Vorlage anlegen
if( rItemSet.Count() )
{
- SwCharFormat *pCFormat = 0;
+ SwCharFormat *pCFormat = nullptr;
OUString aName;
if( pName )
{
@@ -1545,7 +1545,7 @@ void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop,
_HTMLAttr **SwHTMLParser::GetAttrTabEntry( sal_uInt16 nWhich )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
- _HTMLAttr **ppAttr = 0;
+ _HTMLAttr **ppAttr = nullptr;
switch( nWhich )
{
case RES_CHRATR_BLINK:
@@ -1721,7 +1721,7 @@ bool SwHTMLParser::FileDownload( const OUString& rURL,
{
// wurde der Import vom SFX abgebrochen?
eState = SVPAR_ERROR;
- pStream = 0;
+ pStream = nullptr;
}
// recreate View
@@ -1729,7 +1729,7 @@ bool SwHTMLParser::FileDownload( const OUString& rURL,
OSL_ENSURE( pOldVSh == pVSh, "FileDownload: SwViewShell changed on us" );
(void) pVSh;
- return pStream!=0;
+ return pStream!=nullptr;
}
void SwHTMLParser::InsertLink()
@@ -2131,7 +2131,7 @@ _HTMLAttrContext *SwHTMLParser::PopContext( sal_uInt16 nToken, sal_uInt16 nLimit
{
_HTMLAttrContexts::size_type nPos = m_aContexts.size();
if( nPos <= m_nContextStMin )
- return 0;
+ return nullptr;
bool bFound = 0==nToken;
if( nToken )
@@ -2156,7 +2156,7 @@ _HTMLAttrContext *SwHTMLParser::PopContext( sal_uInt16 nToken, sal_uInt16 nLimit
nPos--;
}
- _HTMLAttrContext *pCntxt = 0;
+ _HTMLAttrContext *pCntxt = nullptr;
if( bFound )
{
pCntxt = m_aContexts[nPos];
@@ -2287,7 +2287,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
if( RES_PARATR_BEGIN > nWhich )
(*ppAttr)->SetLikePara();
m_aParaAttrs.push_back( *ppAttr );
- bool bSuccess = EndAttr( *ppAttr, 0, false );
+ bool bSuccess = EndAttr( *ppAttr, nullptr, false );
if (!bSuccess)
m_aParaAttrs.pop_back();
}
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index e333bb78c52c..669a46862d44 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -62,7 +62,7 @@ class _HTMLAttrContext_SaveDoc
public:
_HTMLAttrContext_SaveDoc() :
- pPos( 0 ), pAttrTab( 0 ),
+ pPos( nullptr ), pAttrTab( nullptr ),
nContextStMin( SIZE_MAX ), nContextStAttrMin( SIZE_MAX ),
bStripTrailingPara( false ), bKeepNumRules( false ),
bFixHeaderDist( false ), bFixFooterDist( false )
@@ -120,7 +120,7 @@ _HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( bool bCreate )
void _HTMLAttrContext::ClearSaveDocContext()
{
delete pSaveDocContext;
- pSaveDocContext = 0;
+ pSaveDocContext = nullptr;
}
void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
@@ -212,7 +212,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pAttr->nEndPara = rNewSttPara;
pAttr->nSttContent = nNewSttCnt;
pAttr->nEndContent = nNewSttCnt;
- pAttr->pPrev = 0;
+ pAttr->pPrev = nullptr;
pAttr = pNext;
}
@@ -522,7 +522,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
const SfxPoolItem *pItem = aIter.FirstItem();
while( pItem )
{
- _HTMLAttr **ppAttr = 0;
+ _HTMLAttr **ppAttr = nullptr;
switch( pItem->Which() )
{
@@ -589,7 +589,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
aLRItem.SetTextLeft( nLeft );
aLRItem.SetRight( nRight );
NewAttr( &m_aAttrTab.pLRSpace, aLRItem );
- EndAttr( m_aAttrTab.pLRSpace, 0, false );
+ EndAttr( m_aAttrTab.pLRSpace, nullptr, false );
}
break;
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 4f47da9e8055..b6fa8fddc5b0 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -60,14 +60,14 @@ static HTMLOptionEnum aHTMLMarqBehaviorTable[] =
{ OOO_STRING_SVTOOLS_HTML_BEHAV_scroll, SDRTEXTANI_SCROLL },
{ OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SDRTEXTANI_ALTERNATE },
{ OOO_STRING_SVTOOLS_HTML_BEHAV_slide, SDRTEXTANI_SLIDE },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLMarqDirectionTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_AL_left, SDRTEXTANI_LEFT },
{ OOO_STRING_SVTOOLS_HTML_AL_right, SDRTEXTANI_RIGHT },
- { 0, 0 }
+ { nullptr, 0 }
};
void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
@@ -561,7 +561,7 @@ void SwHTMLParser::EndMarquee()
}
m_aContents.clear();
- m_pMarquee = 0;
+ m_pMarquee = nullptr;
}
void SwHTMLParser::InsertMarqueeText()
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 0a84e1dc3ffd..f879cf3c7b17 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -66,7 +66,7 @@ const sal_uInt32 HTML_FRMOPTS_MARQUEE_CSS1 =
const SdrObject *SwHTMLWriter::GetMarqueeTextObj( const SwDrawFrameFormat& rFormat )
{
const SdrObject* pObj = rFormat.FindSdrObject();
- return (pObj && ::IsMarqueeTextObj( *pObj )) ? pObj : 0;
+ return (pObj && ::IsMarqueeTextObj( *pObj )) ? pObj : nullptr;
}
void SwHTMLWriter::GetEEAttrsFromDrwObj( SfxItemSet& rItemSet,
@@ -158,7 +158,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
SDRTEXTANI_SLIDE==eAniKind,
"Text-Draw-Objekt nicht fuer Marquee geeignet" );
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( eAniKind )
{
case SDRTEXTANI_SCROLL: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_scroll; break;
@@ -175,7 +175,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
}
// DIRECTION
- pStr = 0;
+ pStr = nullptr;
SdrTextAniDirection eAniDir = pTextObj->GetTextAniDirection();
switch( eAniDir )
{
@@ -293,7 +293,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
rWrt.Strm().WriteChar( '>' );
// Was jetzt kommt ist das Gegenstueck zu SdrTextObjectt::SetText()
- Outliner aOutliner(0, OUTLINERMODE_TEXTOBJECT);
+ Outliner aOutliner(nullptr, OUTLINERMODE_TEXTOBJECT);
aOutliner.SetUpdateMode( false );
aOutliner.SetText( *pOutlinerParaObj );
OUString aText( aOutliner.GetText( aOutliner.GetParagraph(0),
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index f6fcb5d261e0..b4930b16ceaa 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -54,7 +54,7 @@ static HTMLOptionEnum aHTMLFieldTypeTable[] =
{ OOO_STRING_SW_HTML_FT_docinfo, RES_DOCINFOFLD },
{ OOO_STRING_SW_HTML_FT_docstat, RES_DOCSTATFLD },
{ OOO_STRING_SW_HTML_FT_filename,RES_FILENAMEFLD },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLNumFormatTableEntry aHTMLDateFieldFormatTable[] =
@@ -76,7 +76,7 @@ static HTMLNumFormatTableEntry aHTMLDateFieldFormatTable[] =
{ "MD", NF_DATE_DIN_MMDD },
{ "YMD", NF_DATE_DIN_YYMMDD },
{ "YYMD", NF_DATE_DIN_YYYYMMDD },
- { 0, NF_NUMERIC_START }
+ { nullptr, NF_NUMERIC_START }
};
static HTMLNumFormatTableEntry aHTMLTimeFieldFormatTable[] =
@@ -84,7 +84,7 @@ static HTMLNumFormatTableEntry aHTMLTimeFieldFormatTable[] =
{ "SYS", NF_TIME_HHMMSS },
{ "SSMM24", NF_TIME_HHMM },
{ "SSMM12", NF_TIME_HHMMAMPM },
- { 0, NF_NUMERIC_START }
+ { nullptr, NF_NUMERIC_START }
};
static HTMLOptionEnum aHTMLPageNumFieldFormatTable[] =
@@ -99,7 +99,7 @@ static HTMLOptionEnum aHTMLPageNumFieldFormatTable[] =
{ OOO_STRING_SW_HTML_FF_page, SVX_NUM_PAGEDESC },
{ OOO_STRING_SW_HTML_FF_ulettern, SVX_NUM_CHARS_UPPER_LETTER_N },
{ OOO_STRING_SW_HTML_FF_llettern, SVX_NUM_CHARS_LOWER_LETTER_N },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLExtUsrFieldSubTable[] =
@@ -119,14 +119,14 @@ static HTMLOptionEnum aHTMLExtUsrFieldSubTable[] =
{ OOO_STRING_SW_HTML_FS_fax, EU_FAX },
{ OOO_STRING_SW_HTML_FS_email, EU_EMAIL },
{ OOO_STRING_SW_HTML_FS_state, EU_STATE },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLAuthorFieldFormatTable[] =
{
{ OOO_STRING_SW_HTML_FF_name, AF_NAME },
{ OOO_STRING_SW_HTML_FF_shortcut, AF_SHORTCUT },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLPageNumFieldSubTable[] =
@@ -134,7 +134,7 @@ static HTMLOptionEnum aHTMLPageNumFieldSubTable[] =
{ OOO_STRING_SW_HTML_FS_random, PG_RANDOM },
{ OOO_STRING_SW_HTML_FS_next, PG_NEXT },
{ OOO_STRING_SW_HTML_FS_prev, PG_PREV },
- { 0, 0 }
+ { nullptr, 0 }
};
// UGLY: these are extensions of nsSwDocInfoSubType (in inc/docufld.hxx)
@@ -158,7 +158,7 @@ static HTMLOptionEnum aHTMLDocInfoFieldSubTable[] =
{ OOO_STRING_SW_HTML_FS_custom, DI_CUSTOM },
{ OOO_STRING_SW_HTML_FS_create, DI_CREATE },
{ OOO_STRING_SW_HTML_FS_change, DI_CHANGE },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLDocInfoFieldFormatTable[] =
@@ -166,7 +166,7 @@ static HTMLOptionEnum aHTMLDocInfoFieldFormatTable[] =
{ OOO_STRING_SW_HTML_FF_author, DI_SUB_AUTHOR },
{ OOO_STRING_SW_HTML_FF_time, DI_SUB_TIME },
{ OOO_STRING_SW_HTML_FF_date, DI_SUB_DATE },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLDocStatFieldSubTable[] =
@@ -178,7 +178,7 @@ static HTMLOptionEnum aHTMLDocStatFieldSubTable[] =
{ OOO_STRING_SW_HTML_FS_tbl, DS_TBL },
{ OOO_STRING_SW_HTML_FS_grf, DS_GRF },
{ OOO_STRING_SW_HTML_FS_ole, DS_OLE },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] =
@@ -187,7 +187,7 @@ static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] =
{ OOO_STRING_SW_HTML_FF_pathname, FF_PATHNAME },
{ OOO_STRING_SW_HTML_FF_path, FF_PATH },
{ OOO_STRING_SW_HTML_FF_name_noext, FF_NAME_NOEXT },
- { 0, 0 }
+ { nullptr, 0 }
};
sal_uInt16 SwHTMLParser::GetNumType( const OUString& rStr, sal_uInt16 nDfltType )
@@ -212,7 +212,7 @@ void SwHTMLParser::NewField()
bHasNumFormat = false, bHasNumValue = false;
sal_uInt16 nType = 0;
OUString aValue, aNumFormat, aNumValue, aName;
- const HTMLOption *pSubOption=0, *pFormatOption=0;
+ const HTMLOption *pSubOption=nullptr, *pFormatOption=nullptr;
const HTMLOptions& rHTMLOptions = GetOptions();
size_t i;
@@ -285,7 +285,7 @@ void SwHTMLParser::NewField()
nWhich = RES_DATETIMEFLD;
SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( nWhich );
- SwField *pNewField = 0;
+ SwField *pNewField = nullptr;
bool bInsOnEndTag = false;
switch( (RES_FIELDS)nType )
@@ -564,7 +564,7 @@ void SwHTMLParser::EndField()
m_pDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatField(*m_pField) );
delete m_pField;
- m_pField = 0;
+ m_pField = nullptr;
}
m_bInField = false;
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index d1847c56d26a..30c822fbdd3e 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -39,7 +39,7 @@ using namespace nsSwDocInfoSubType;
const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFormat )
{
- const sal_Char *pFormatStr = 0;
+ const sal_Char *pFormatStr = nullptr;
switch( (SvxExtNumType)nFormat )
{
@@ -69,9 +69,9 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
sal_uInt16 nField = pFieldTyp->Which();
sal_uLong nFormat = pField->GetFormat();
- const sal_Char *pTypeStr=0, // TYPE
- *pSubStr=0, // SUBTYPE
- *pFormatStr=0; // FORMAT (SW)
+ const sal_Char *pTypeStr=nullptr, // TYPE
+ *pSubStr=nullptr, // SUBTYPE
+ *pFormatStr=nullptr; // FORMAT (SW)
OUString aValue; // VALUE (SW)
bool bNumFormat=false; // SDNUM (Number-Formatter-Format)
bool bNumValue=false; // SDVAL (Number-Formatter-Value)
@@ -174,7 +174,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
case DI_CREATE: pSubStr = OOO_STRING_SW_HTML_FS_create; break;
case DI_CHANGE: pSubStr = OOO_STRING_SW_HTML_FS_change; break;
case DI_CUSTOM: pSubStr = OOO_STRING_SW_HTML_FS_custom; break;
- default: pTypeStr = 0; break;
+ default: pTypeStr = nullptr; break;
}
if( DI_CUSTOM == nSubType ) {
@@ -232,7 +232,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
case DS_TBL: pSubStr = OOO_STRING_SW_HTML_FS_tbl; break;
case DS_GRF: pSubStr = OOO_STRING_SW_HTML_FS_grf; break;
case DS_OLE: pSubStr = OOO_STRING_SW_HTML_FS_ole; break;
- default: pTypeStr = 0; break;
+ default: pTypeStr = nullptr; break;
}
pFormatStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFormat) );
}
@@ -343,7 +343,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
{ RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONTSIZE,
RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT };
- sal_uInt16 *pRefWhichIds = 0;
+ sal_uInt16 *pRefWhichIds = nullptr;
switch( rHTMLWrt.m_nCSS1Script )
{
case CSS1_OUTMODE_WESTERN:
@@ -369,7 +369,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
if( nScript != CSS1_OUTMODE_ANY_SCRIPT &&
/* #108791# */ nScript != rHTMLWrt.m_nCSS1Script )
{
- sal_uInt16 *pWhichIds = 0;
+ sal_uInt16 *pWhichIds = nullptr;
switch( nScript )
{
case CSS1_OUTMODE_WESTERN: pWhichIds = aWesternWhichIds; break;
@@ -523,7 +523,7 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt )
// sonst ist es der Script-Inhalt selbst. Da nur noh JavaScript
// in Feldern landet, muss es sich um JavaSrript handeln ...:)
HTMLOutFuncs::OutScript( rWrt.Strm(), rWrt.GetBaseURL(), aContents, rType, JAVASCRIPT,
- aURL, 0, 0, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
+ aURL, nullptr, nullptr, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
if( rHTMLWrt.m_bLFPossible )
rHTMLWrt.OutNewLine( true );
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 084bd97f6752..2defd045c41e 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -148,14 +148,14 @@ static HTMLOutEvent aImageEventTable[] =
{ OOO_STRING_SVTOOLS_HTML_O_SDonload, OOO_STRING_SVTOOLS_HTML_O_onload, SVX_EVENT_IMAGE_LOAD },
{ OOO_STRING_SVTOOLS_HTML_O_SDonabort, OOO_STRING_SVTOOLS_HTML_O_onabort, SVX_EVENT_IMAGE_ABORT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonerror, OOO_STRING_SVTOOLS_HTML_O_onerror, SVX_EVENT_IMAGE_ERROR },
- { 0, 0, 0 }
+ { nullptr, nullptr, 0 }
};
static HTMLOutEvent aIMapEventTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseover, OOO_STRING_SVTOOLS_HTML_O_onmouseover, SFX_EVENT_MOUSEOVER_OBJECT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseout, OOO_STRING_SVTOOLS_HTML_O_onmouseout, SFX_EVENT_MOUSEOUT_OBJECT },
- { 0, 0, 0 }
+ { nullptr, nullptr, 0 }
};
sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat,
@@ -293,12 +293,12 @@ void SwHTMLWriter::CollectFlyFrms()
OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS,
"number of browser configurations has changed" );
- SwPosFlyFrms aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? 0 : pCurPam, true));
+ SwPosFlyFrms aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? nullptr : pCurPam, true));
for(SwPosFlyFrms::const_iterator aIter(aFlyPos.begin()); aIter != aFlyPos.end(); ++aIter)
{
const SwFrameFormat& rFrameFormat = (*aIter)->GetFormat();
- const SdrObject *pSdrObj = 0;
+ const SdrObject *pSdrObj = nullptr;
const SwPosition *pAPos;
const SwContentNode *pACNd;
SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrameFormat, pSdrObj );
@@ -318,8 +318,8 @@ void SwHTMLWriter::CollectFlyFrms()
// Absatz geschrieben, wenn der Absatz einen Abstand
// hat.
if( text::RelOrientation::FRAME == eHoriRel &&
- (pAPos = rAnchor.GetContentAnchor()) != 0 &&
- (pACNd = pAPos->nNode.GetNode().GetContentNode()) != 0 )
+ (pAPos = rAnchor.GetContentAnchor()) != nullptr &&
+ (pACNd = pAPos->nNode.GetNode().GetContentNode()) != nullptr )
{
const SvxLRSpaceItem& rLRItem =
static_cast<const SvxLRSpaceItem&>(pACNd->GetAttr(RES_LR_SPACE));
@@ -387,7 +387,7 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8
if( m_pHTMLPosFlyFrms->empty() )
{
delete m_pHTMLPosFlyFrms;
- m_pHTMLPosFlyFrms = 0;
+ m_pHTMLPosFlyFrms = nullptr;
bRestart = true; // nicht wirklich, nur raus
// aus der Schleife
}
@@ -395,7 +395,7 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8
if( pContext )
{
HTMLOutFuncs::FlushToAscii(Strm(), *pContext );
- pContext = 0; // one time only
+ pContext = nullptr; // one time only
}
OutFrameFormat( pPosFly->GetOutMode(), pPosFly->GetFormat(),
@@ -426,7 +426,7 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF
{
sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
sal_uInt8 nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
- const sal_Char *pCntnrStr = 0;
+ const sal_Char *pCntnrStr = nullptr;
if( HTML_CNTNR_NONE != nCntnrMode )
{
@@ -468,13 +468,13 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF
OutHTML_FrameFormatTableNode( *this, rFrameFormat );
break;
case HTML_OUT_GRFNODE: // OK
- OutHTML_FrameFormatGrfNode( *this, rFrameFormat, pCntnrStr != 0 );
+ OutHTML_FrameFormatGrfNode( *this, rFrameFormat, pCntnrStr != nullptr );
break;
case HTML_OUT_OLENODE: // OK
- OutHTML_FrameFormatOLENode( *this, rFrameFormat, pCntnrStr != 0 );
+ OutHTML_FrameFormatOLENode( *this, rFrameFormat, pCntnrStr != nullptr );
break;
case HTML_OUT_OLEGRF: // OK
- OutHTML_FrameFormatOLENodeGrf( *this, rFrameFormat, pCntnrStr != 0 );
+ OutHTML_FrameFormatOLENodeGrf( *this, rFrameFormat, pCntnrStr != nullptr );
break;
case HTML_OUT_DIV:
case HTML_OUT_SPAN:
@@ -482,7 +482,7 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF
OutHTML_FrameFormatAsDivOrSpan( *this, rFrameFormat, HTML_OUT_SPAN==nOutMode );
break;
case HTML_OUT_MULTICOL: // OK
- OutHTML_FrameFormatAsMulticol( *this, rFrameFormat, pCntnrStr != 0 );
+ OutHTML_FrameFormatAsMulticol( *this, rFrameFormat, pCntnrStr != nullptr );
break;
case HTML_OUT_SPACER: // OK
OSL_ENSURE( !pCntnrStr, "Spacer: Container ist hier nicht vorgesehen" );
@@ -491,7 +491,7 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF
case HTML_OUT_CONTROL: // OK
OutHTML_DrawFrameFormatAsControl( *this,
static_cast<const SwDrawFrameFormat &>(rFrameFormat), dynamic_cast<const SdrUnoObj&>(*pSdrObject),
- pCntnrStr != 0 );
+ pCntnrStr != nullptr );
break;
case HTML_OUT_AMARQUEE:
OutHTML_FrameFormatAsMarquee( *this, rFrameFormat, *pSdrObject );
@@ -502,7 +502,7 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF
static_cast<const SwDrawFrameFormat &>(rFrameFormat), *pSdrObject );
break;
case HTML_OUT_GRFFRM:
- OutHTML_FrameFormatAsImage( *this, rFrameFormat, pCntnrStr != 0 );
+ OutHTML_FrameFormatAsImage( *this, rFrameFormat, pCntnrStr != nullptr );
break;
}
@@ -560,7 +560,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
}
// ALIGN
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId();
if( (nFrmOpts & HTML_FRMOPT_ALIGN) &&
((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) )
@@ -745,7 +745,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem);
sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient();
- pStr = 0;
+ pStr = nullptr;
SwSurround eSurround = pSurround->GetSurround();
bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
@@ -832,7 +832,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
}
// align
- const sal_Char* pAlignString = 0;
+ const sal_Char* pAlignString = nullptr;
RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId();
if( (nFrameOptions & HTML_FRMOPT_ALIGN) &&
((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) )
@@ -1005,7 +1005,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
(FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId())) &&
SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem ))
{
- const sal_Char* pSurroundString = 0;
+ const sal_Char* pSurroundString = nullptr;
const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem);
sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient();
@@ -1164,7 +1164,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con
rHTMLWrt.m_aImgMapNames.push_back(aIMapName);
OString aIndMap, aIndArea;
- const sal_Char *pIndArea = 0, *pIndMap = 0;
+ const sal_Char *pIndArea = nullptr, *pIndMap = nullptr;
if (rHTMLWrt.m_bLFPossible)
{
@@ -1222,7 +1222,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet();
- const SwFormatURL* pURLItem = 0;
+ const SwFormatURL* pURLItem = nullptr;
OUString aIMapName = lclWriteOutImap(rHTMLWrt, rItemSet, rFrameFormat, rRealSize, pAltImgMap, pURLItem);
// put img into new line
@@ -1238,7 +1238,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
}
// URL -> <a>...<img ... >...</a>
- const SvxMacroItem *pMacItem = 0;
+ const SvxMacroItem *pMacItem = nullptr;
if (SfxItemState::SET == rItemSet.GetItemState(RES_FRMMACRO, true, &pItem))
{
pMacItem = static_cast<const SvxMacroItem *>(pItem);
@@ -1298,7 +1298,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
Size aTwipBorder( 0, 0 );
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
- const ::editeng::SvxBorderLine *pColBorderLine = 0;
+ const ::editeng::SvxBorderLine *pColBorderLine = nullptr;
const ::editeng::SvxBorderLine *pBorderLine = pBoxItem->GetLeft();
if( pBorderLine )
{
@@ -1609,7 +1609,7 @@ static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt,
{
SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
if( !bSpan )
{
rHTMLWrt.ChangeParaToken( 0 );
@@ -1682,7 +1682,7 @@ static Writer & OutHTML_FrameFormatAsImage( Writer& rWrt, const SwFrameFormat& r
Size aSz( 0, 0 );
OutHTML_Image( rWrt, rFrameFormat, aGraphic, rFrameFormat.GetName(), aSz,
HTML_FRMOPTS_GENIMG, "frame",
- aIMap.GetIMapObjectCount() ? &aIMap : 0 );
+ aIMap.GetIMapObjectCount() ? &aIMap : nullptr );
return rWrt;
}
@@ -1916,10 +1916,10 @@ void SwHTMLWriter::CollectLinkTargets()
{
const SwTextNode* pTextNd;
- if( 0 != (pINetFormat = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2(
+ if( nullptr != (pINetFormat = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) ) &&
- 0 != ( pTextAttr = pINetFormat->GetTextINetFormat()) &&
- 0 != ( pTextNd = pTextAttr->GetpTextNode() ) &&
+ nullptr != ( pTextAttr = pINetFormat->GetTextINetFormat()) &&
+ nullptr != ( pTextNd = pTextAttr->GetpTextNode() ) &&
pTextNd->GetNodes().IsDocNodes() )
{
AddLinkTarget( pINetFormat->GetValue() );
@@ -1930,7 +1930,7 @@ void SwHTMLWriter::CollectLinkTargets()
nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = static_cast<const SwFormatURL*>(pDoc->GetAttrPool().GetItem2(
+ if( nullptr != (pURL = static_cast<const SwFormatURL*>(pDoc->GetAttrPool().GetItem2(
RES_URL, n ) ) ) )
{
AddLinkTarget( pURL->GetURL() );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index f9c5ded4e078..94794a79faa3 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -88,7 +88,7 @@ static HTMLOptionEnum aHTMLFormMethodTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_METHOD_get, FormSubmitMethod_GET },
{ OOO_STRING_SVTOOLS_HTML_METHOD_post, FormSubmitMethod_POST },
- { 0, 0 }
+ { nullptr, 0 }
};
static HTMLOptionEnum aHTMLFormEncTypeTable[] =
@@ -96,7 +96,7 @@ static HTMLOptionEnum aHTMLFormEncTypeTable[] =
{ OOO_STRING_SVTOOLS_HTML_ET_url, FormSubmitEncoding_URL },
{ OOO_STRING_SVTOOLS_HTML_ET_multipart, FormSubmitEncoding_MULTIPART },
{ OOO_STRING_SVTOOLS_HTML_ET_text, FormSubmitEncoding_TEXT },
- { 0, 0 }
+ { nullptr, 0 }
};
enum HTMLWordWrapMode { HTML_WM_OFF, HTML_WM_HARD, HTML_WM_SOFT };
@@ -108,7 +108,7 @@ static HTMLOptionEnum aHTMLTextAreaWrapTable[] =
{ OOO_STRING_SVTOOLS_HTML_WW_soft, HTML_WM_SOFT },
{ OOO_STRING_SVTOOLS_HTML_WW_physical,HTML_WM_HARD },
{ OOO_STRING_SVTOOLS_HTML_WW_virtual, HTML_WM_SOFT },
- { 0, 0 }
+ { nullptr, 0 }
};
HTMLEventType aEventTypeTable[] =
@@ -157,7 +157,7 @@ const sal_Char * aEventSDOptionTable[] =
OOO_STRING_SVTOOLS_HTML_O_SDonclick,
OOO_STRING_SVTOOLS_HTML_O_SDonclick,
OOO_STRING_SVTOOLS_HTML_O_SDonchange,
- 0
+ nullptr
};
const sal_Char * aEventOptionTable[] =
@@ -169,7 +169,7 @@ const sal_Char * aEventOptionTable[] =
OOO_STRING_SVTOOLS_HTML_O_onclick,
OOO_STRING_SVTOOLS_HTML_O_onclick,
OOO_STRING_SVTOOLS_HTML_O_onchange,
- 0
+ nullptr
};
class SwHTMLForm_Impl
@@ -200,7 +200,7 @@ class SwHTMLForm_Impl
public:
explicit SwHTMLForm_Impl( SwDocShell *pDSh ) :
pDocSh( pDSh ),
- pHeaderAttrs( pDSh ? pDSh->GetHeaderAttributes() : 0 )
+ pHeaderAttrs( pDSh ? pDSh->GetHeaderAttributes() : nullptr )
{
OSL_ENSURE( pDocSh, "Keine DocShell, keine Controls" );
}
@@ -222,7 +222,7 @@ public:
xFormComps = r;
}
- void ReleaseFormComps() { xFormComps = 0; xControlEventManager = 0; }
+ void ReleaseFormComps() { xFormComps = nullptr; xControlEventManager = nullptr; }
const uno::Reference< beans::XPropertySet >& GetFCompPropSet() const
{
@@ -234,7 +234,7 @@ public:
xFCompPropSet = r;
}
- void ReleaseFCompPropSet() { xFCompPropSet = 0; }
+ void ReleaseFCompPropSet() { xFCompPropSet = nullptr; }
const uno::Reference< drawing::XShape >& GetShape() const { return xShape; }
void SetShape( const uno::Reference< drawing::XShape >& r ) { xShape = r; }
@@ -511,7 +511,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
SwXShape *pSwShape = xTunnel.is() ?
reinterpret_cast< SwXShape * >( sal::static_int_cast< sal_IntPtr>(
xTunnel->getSomething(SwXShape::getUnoTunnelId()) ))
- : 0;
+ : nullptr;
OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" );
if( pSwShape )
@@ -523,8 +523,8 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
SwNode *pANd;
SwTableNode *pTableNd;
if( pAPos &&
- 0 != (pANd = & pAPos->nNode.GetNode()) &&
- 0 != (pTableNd = pANd->FindTableNode()) )
+ nullptr != (pANd = & pAPos->nNode.GetNode()) &&
+ nullptr != (pTableNd = pANd->FindTableNode()) )
{
const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
@@ -548,7 +548,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
// uns selbst abmelden und loeschen
clear();
uno::Reference< awt::XImageConsumer > xTmp = static_cast<awt::XImageConsumer*>(this);
- xThis = 0;
+ xThis = nullptr;
}
void SwHTMLImageWatcher::setColorModel(
@@ -581,7 +581,7 @@ void SwHTMLImageWatcher::complete( sal_Int32 Status,
// uns selbst abmelden und loeschen
clear();
uno::Reference< awt::XImageConsumer > xTmp = static_cast<awt::XImageConsumer*>(this);
- xThis = 0;
+ xThis = nullptr;
}
}
@@ -595,14 +595,14 @@ void SwHTMLImageWatcher::disposing(const lang::EventObject& evt) throw ( uno::Ru
{
clear();
xTmp = static_cast<awt::XImageConsumer*>(this);
- xThis = 0;
+ xThis = nullptr;
}
}
void SwHTMLParser::DeleteFormImpl()
{
delete m_pFormImpl;
- m_pFormImpl = 0;
+ m_pFormImpl = nullptr;
}
static void lcl_html_setFixedFontProperty(
@@ -659,7 +659,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
{
// if there is no hidden property in the MediaDescriptor it should be removed after loading
const SfxBoolItem* pHiddenItem = SfxItemSet::GetItem<SfxBoolItem>(pDocSh->GetMedium()->GetItemSet(), SID_HIDDEN, false);
- m_bRemoveHidden = ( pHiddenItem == NULL || !pHiddenItem->GetValue() );
+ m_bRemoveHidden = ( pHiddenItem == nullptr || !pHiddenItem->GetValue() );
}
m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 );
@@ -672,20 +672,20 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
SwXShape *pSwShape = xTunnel.is() ?
reinterpret_cast< SwXShape *>( sal::static_int_cast< sal_IntPtr >(
xTunnel->getSomething(SwXShape::getUnoTunnelId()) ))
- : 0;
+ : nullptr;
OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" );
// es muss ein Draw-Format sein
- SwFrameFormat *pFrameFormat = pSwShape ? pSwShape->GetFrameFormat() : NULL ;
+ SwFrameFormat *pFrameFormat = pSwShape ? pSwShape->GetFrameFormat() : nullptr ;
OSL_ENSURE( pFrameFormat && RES_DRAWFRMFMT == pFrameFormat->Which(), "Kein DrawFrameFormat" );
// Schauen, ob es ein SdrObject dafuer gibt
- const SdrObject *pObj = pFrameFormat ? pFrameFormat->FindSdrObject() : NULL;
+ const SdrObject *pObj = pFrameFormat ? pFrameFormat->FindSdrObject() : nullptr;
OSL_ENSURE( pObj, "SdrObject nicht gefunden" );
OSL_ENSURE( pObj && FmFormInventor == pObj->GetObjInventor(), "falscher Inventor" );
- const SdrView* pDrawView = pVSh ? pVSh->GetDrawView() : 0;
+ const SdrView* pDrawView = pVSh ? pVSh->GetDrawView() : nullptr;
const SdrUnoObj *pFormObj = dynamic_cast<const SdrUnoObj*>( pObj );
uno::Reference< awt::XControl > xControl;
@@ -1397,7 +1397,7 @@ void SwHTMLParser::EndForm( bool bAppend )
void SwHTMLParser::InsertInput()
{
- assert(m_pPendStack == 0);
+ assert(m_pPendStack == nullptr);
if( !m_pFormImpl || !m_pFormImpl->GetFormComps().is() )
return;
@@ -1824,7 +1824,7 @@ void SwHTMLParser::InsertInput()
{
aSz.Width() = HTML_DFLT_IMG_WIDTH;
bSetGrfWidth = true;
- if( m_pTable != 0 )
+ if( m_pTable != nullptr )
IncGrfsThatResizeTable();
}
if( !aSz.Height() )
@@ -1878,7 +1878,7 @@ void SwHTMLParser::InsertInput()
void SwHTMLParser::NewTextArea()
{
- assert(m_pPendStack == 0);
+ assert(m_pPendStack == nullptr);
OSL_ENSURE( !m_bTextArea, "TextArea in TextArea???" );
OSL_ENSURE( !m_pFormImpl || !m_pFormImpl->GetFCompPropSet().is(),
@@ -2161,7 +2161,7 @@ void SwHTMLParser::InsertTextAreaText( sal_uInt16 nToken )
void SwHTMLParser::NewSelect()
{
- assert(m_pPendStack == 0);
+ assert(m_pPendStack == nullptr);
OSL_ENSURE( !m_bSelect, "Select in Select???" );
OSL_ENSURE( !m_pFormImpl || !m_pFormImpl->GetFCompPropSet().is(),
@@ -2375,7 +2375,7 @@ void SwHTMLParser::NewSelect()
void SwHTMLParser::EndSelect()
{
- assert(m_pPendStack == 0);
+ assert(m_pPendStack == nullptr);
OSL_ENSURE( m_bSelect, "keine Select" );
OSL_ENSURE( m_pFormImpl && m_pFormImpl->GetFCompPropSet().is(),
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index f0c7c96573d8..37a8a73ee162 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -152,7 +152,7 @@ static void lcl_html_outEvents( SvStream& rStrm,
sListener = sListener.getToken( nTok-1, '.' );
OUString sMethod( pDescs[i].EventMethod );
- const sal_Char *pOpt = 0;
+ const sal_Char *pOpt = nullptr;
for( int j=0; aEventListenerTable[j]; j++ )
{
if( sListener.equalsAscii( aEventListenerTable[j] ) &&
@@ -266,7 +266,7 @@ void SwHTMLWriter::OutForm( bool bTag_On, const SwStartNode *pStartNd )
// Tabelle/dem Bereich liegen
uno::Reference< container::XIndexContainer > xCurrentFormComps;// die aktuelle Form in der Tabelle
- const SwStartNode *pCurrentStNd = 0; // und der Start-Node eines Ctrls
+ const SwStartNode *pCurrentStNd = nullptr; // und der Start-Node eines Ctrls
sal_Int32 nCurrentCtrls = 0; // und die in ihr gefundenen Controls
sal_uInt32 nEndIdx = pStartNd->EndOfSectionIndex();
for( ; i < m_aHTMLControls.size() &&
@@ -500,7 +500,7 @@ void SwHTMLWriter::OutForm( bool bOn,
{
form::FormSubmitEncoding eEncType =
*static_cast<form::FormSubmitEncoding const *>(aTmp.getValue());
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( eEncType )
{
case form::FormSubmitEncoding_MULTIPART:
@@ -637,7 +637,7 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrameFormat& rFormat
// Schauen, ob es ein SdrObject dafuer gibt
const SdrObject *pObj = rFormat.FindSdrObject();
if( !pObj || FmFormInventor != pObj->GetObjInventor() )
- return 0;
+ return nullptr;
const SdrUnoObj& rFormObj = dynamic_cast<const SdrUnoObj&>(*pObj);
uno::Reference< awt::XControlModel > xControlModel =
@@ -645,13 +645,13 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrameFormat& rFormat
OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" );
if( !xControlModel.is() )
- return 0;
+ return nullptr;
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
OUString sPropName("ClassId");
if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) )
- return 0;
+ return nullptr;
uno::Any aTmp = xPropSet->getPropertyValue( sPropName );
if( aTmp.getValueType() == ::cppu::UnoType<sal_Int16>::get()&&
@@ -660,7 +660,7 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrameFormat& rFormat
return pObj;
}
- return 0;
+ return nullptr;
}
static void GetControlSize(const SdrUnoObj& rFormObj, Size& rSz, SwDoc *pDoc)
@@ -846,7 +846,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
(aTmp.getValueType() == cppu::UnoType<bool>::get() &&
!*static_cast<sal_Bool const *>(aTmp.getValue())) )
{
- const sal_Char *pWrapStr = 0;
+ const sal_Char *pWrapStr = nullptr;
aTmp = xPropSet->getPropertyValue( "HardLineBreaks" );
pWrapStr =
(aTmp.getValueType() == cppu::UnoType<bool>::get() &&
@@ -1158,7 +1158,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
sal_Int32 nCnt = aList.getLength();
const OUString *pStrings = aList.getConstArray();
- const OUString *pValues = 0;
+ const OUString *pValues = nullptr;
sal_Int32 nValCnt = 0;
aTmp = xPropSet->getPropertyValue( "ListSource" );
uno::Sequence<OUString> aValList;
@@ -1170,7 +1170,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
}
uno::Any aSelTmp = xPropSet->getPropertyValue( "DefaultSelection" );
- const sal_Int16 *pSels = 0;
+ const sal_Int16 *pSels = nullptr;
sal_Int32 nSel = 0;
sal_Int32 nSelCnt = 0;
uno::Sequence<sal_Int16> aSelList;
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 06a6aa837ef6..314a515f2e8a 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -228,12 +228,12 @@ void SwHTMLParser::InsertFootEndNoteText()
void SwHTMLParser::DeleteFootEndNoteImpl()
{
delete m_pFootEndNoteImpl;
- m_pFootEndNoteImpl = 0;
+ m_pFootEndNoteImpl = nullptr;
}
SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName )
{
- SwNodeIndex *pStartNodeIdx = 0;
+ SwNodeIndex *pStartNodeIdx = nullptr;
if( m_pFootEndNoteImpl )
{
@@ -250,7 +250,7 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName )
if(m_pFootEndNoteImpl->aNames.empty())
{
delete m_pFootEndNoteImpl;
- m_pFootEndNoteImpl = 0;
+ m_pFootEndNoteImpl = nullptr;
}
break;
@@ -386,7 +386,7 @@ void SwHTMLWriter::OutFootEndNotes()
else
m_nFootNote++;
- m_pFormatFootnote = 0;
+ m_pFormatFootnote = nullptr;
}
}
@@ -398,13 +398,13 @@ void SwHTMLWriter::OutFootEndNotes()
#endif
delete m_pFootEndNotes;
- m_pFootEndNotes = 0;
+ m_pFootEndNotes = nullptr;
m_nFootNote = m_nEndNote = 0;
}
OUString SwHTMLWriter::GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnote )
{
- const SwEndNoteInfo * pInfo = 0;
+ const SwEndNoteInfo * pInfo = nullptr;
if( rFormatFootnote.GetNumStr().isEmpty() )
pInfo = rFormatFootnote.IsEndNote() ? &pDoc->GetEndNoteInfo()
: &pDoc->GetFootnoteInfo();
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 8bc0b7cf83a2..35dbcf540ddf 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -75,7 +75,7 @@ HTMLOptionEnum aHTMLImgHAlignTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_AL_left, text::HoriOrientation::LEFT },
{ OOO_STRING_SVTOOLS_HTML_AL_right, text::HoriOrientation::RIGHT },
- { 0, 0 }
+ { nullptr, 0 }
};
HTMLOptionEnum aHTMLImgVAlignTable[] =
@@ -88,7 +88,7 @@ HTMLOptionEnum aHTMLImgVAlignTable[] =
{ OOO_STRING_SVTOOLS_HTML_VA_bottom, text::VertOrientation::TOP },
{ OOO_STRING_SVTOOLS_HTML_VA_baseline, text::VertOrientation::TOP },
{ OOO_STRING_SVTOOLS_HTML_VA_absbottom, text::VertOrientation::LINE_BOTTOM },
- { 0, 0 }
+ { nullptr, 0 }
};
ImageMap *SwHTMLParser::FindImageMap( const OUString& rName ) const
@@ -119,7 +119,7 @@ void SwHTMLParser::ConnectImageMaps()
while( m_nMissingImgMaps > 0 && nIdx < nEndIdx )
{
SwNode *pNd = rNds[nIdx + 1];
- if( 0 != (pGrfNd = pNd->GetGrfNode()) )
+ if( nullptr != (pGrfNd = pNd->GetGrfNode()) )
{
SwFrameFormat *pFormat = pGrfNd->GetFlyFormat();
SwFormatURL aURL( pFormat->GetURL() );
@@ -154,7 +154,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
const SvxCSS1PropertyInfo &rCSS1PropInfo,
SfxItemSet& rFrmItemSet )
{
- const SfxItemSet *pCntnrItemSet = 0;
+ const SfxItemSet *pCntnrItemSet = nullptr;
auto i = m_aContexts.size();
while( !pCntnrItemSet && i > m_nContextStMin )
pCntnrItemSet = m_aContexts[--i]->GetFrmItemSet();
@@ -236,7 +236,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
{
NewAttr( &m_aAttrTab.pULSpace, SvxULSpaceItem( 0, nLower, RES_UL_SPACE ) );
m_aParaAttrs.push_back( m_aAttrTab.pULSpace );
- EndAttr( m_aAttrTab.pULSpace, 0, false );
+ EndAttr( m_aAttrTab.pULSpace, nullptr, false );
}
}
@@ -293,7 +293,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
{
SwDocShell *pDocSh = m_pDoc->GetDocShell();
SvKeyValueIterator* pHeaderAttrs = pDocSh ? pDocSh->GetHeaderAttributes()
- : 0;
+ : nullptr;
rType = GetScriptType( pHeaderAttrs );
rTypeStr = GetScriptTypeString( pHeaderAttrs );
}
@@ -507,8 +507,8 @@ IMAGE_SETEVENT:
nVBorderWidth = (long)nBorder;
SvxCSS1Parser::PixelToTwip( nVBorderWidth, nHBorderWidth );
- ::editeng::SvxBorderLine aHBorderLine( NULL, nHBorderWidth );
- ::editeng::SvxBorderLine aVBorderLine( NULL, nVBorderWidth );
+ ::editeng::SvxBorderLine aHBorderLine( nullptr, nHBorderWidth );
+ ::editeng::SvxBorderLine aVBorderLine( nullptr, nVBorderWidth );
if( m_aAttrTab.pINetFormat )
{
@@ -601,7 +601,7 @@ IMAGE_SETEVENT:
// Wenn die Grfik in einer Tabelle steht, wird sie gleich
// angefordert, damit sie eventuell schon da ist, bevor die
// Tabelle layoutet wird.
- if( m_pTable!=0 && !nWidth )
+ if( m_pTable!=nullptr && !nWidth )
{
bRequestGrfNow = true;
IncGrfsThatResizeTable();
@@ -724,7 +724,7 @@ IMAGE_SETEVENT:
// passing empty sGrfNm here, means we don't want the graphic to be linked
SwFrameFormat *pFlyFormat = m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic,
- &aFrmSet, NULL, NULL );
+ &aFrmSet, nullptr, nullptr );
SwGrfNode *pGrfNd = m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetGrfNode();
@@ -776,7 +776,7 @@ IMAGE_SETEVENT:
for( int n = 0; aEvents[ n ]; ++n )
{
const SvxMacro *pMacro = rINetFormat.GetMacro( aEvents[ n ] );
- if( 0 != pMacro )
+ if( nullptr != pMacro )
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
}
@@ -974,11 +974,11 @@ void SwHTMLParser::InsertBodyOptions()
SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
OUString aDummy;
- ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, 0, &aDir );
+ ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, nullptr, &aDir );
// Ein par Attribute muessen an der Seitenvorlage gesetzt werden,
// und zwar die, die nicht vererbit werden
- m_pCSS1Parser->SetPageDescAttrs( bSetBrush ? &aBrushItem : 0,
+ m_pCSS1Parser->SetPageDescAttrs( bSetBrush ? &aBrushItem : nullptr,
&aItemSet );
const SfxPoolItem *pItem;
@@ -1407,7 +1407,7 @@ void SwHTMLParser::StripTrailingPara()
break;
}
- m_pPam->GetPoint()->nContent.Assign( 0, 0 );
+ m_pPam->GetPoint()->nContent.Assign( nullptr, 0 );
m_pPam->SetMark();
m_pPam->DeleteMark();
m_pDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
@@ -1436,7 +1436,7 @@ void SwHTMLParser::StripTrailingPara()
--nPos;
bSetSmallFont =
(CH_TXTATR_BREAKWORD == pTextNd->GetText()[nPos]) &&
- (0 != pTextNd->GetTextAttrForCharAt( nPos, RES_TXTATR_FLYCNT ));
+ (nullptr != pTextNd->GetTextAttrForCharAt( nPos, RES_TXTATR_FLYCNT ));
}
}
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index d4b566a73412..840fd61e88bd 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -39,7 +39,7 @@ void SwHTMLNumRuleInfo::Set( const SwTextNode& rTextNd )
}
else
{
- pNumRule = 0;
+ pNumRule = nullptr;
nDeep = 0;
bNumbered = bRestart = false;
}
diff --git a/sw/source/filter/html/htmlnum.hxx b/sw/source/filter/html/htmlnum.hxx
index 555a644afdb2..6ef008b2dd0d 100644
--- a/sw/source/filter/html/htmlnum.hxx
+++ b/sw/source/filter/html/htmlnum.hxx
@@ -47,7 +47,7 @@ public:
void Set( const SwTextNode& rTextNd );
SwHTMLNumRuleInfo() :
- pNumRule( 0 ), nDeep( 0 ),
+ pNumRule( nullptr ), nDeep( 0 ),
bRestart( false ), bNumbered( false )
{
memset( &aNumStarts, 0xff, sizeof( aNumStarts ) );
@@ -101,7 +101,7 @@ inline void SwHTMLNumRuleInfo::Set( const SwHTMLNumRuleInfo& rInf )
inline void SwHTMLNumRuleInfo::Clear()
{
- pNumRule = 0;
+ pNumRule = nullptr;
nDeep = 0;
bRestart = bNumbered = false;
memset( &aNumStarts, 0xff, sizeof( aNumStarts ) );
@@ -110,7 +110,7 @@ inline void SwHTMLNumRuleInfo::Clear()
inline sal_uInt8 SwHTMLNumRuleInfo::GetLevel() const
{
return
- (sal_uInt8)( pNumRule!=0 && nDeep != 0
+ (sal_uInt8)( pNumRule!=nullptr && nDeep != 0
? ( nDeep<=MAXLEVEL ? nDeep-1 : MAXLEVEL - 1 )
: 0 );
}
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 70d76983c627..05e9c4eb84af 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -48,7 +48,7 @@ static HTMLOptionEnum aHTMLULTypeTable[] =
{ OOO_STRING_SVTOOLS_HTML_ULTYPE_disc, HTML_BULLETCHAR_DISC },
{ OOO_STRING_SVTOOLS_HTML_ULTYPE_circle, HTML_BULLETCHAR_CIRCLE },
{ OOO_STRING_SVTOOLS_HTML_ULTYPE_square, HTML_BULLETCHAR_SQUARE },
- { 0, 0 }
+ { nullptr, 0 }
};
@@ -77,7 +77,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// das Format anpassen, falls es fuer den Level noch nicht
// geschehen ist!
- bool bNewNumFormat = rInfo.GetNumRule()->GetNumFormat( nLevel ) == 0;
+ bool bNewNumFormat = rInfo.GetNumRule()->GetNumFormat( nLevel ) == nullptr;
bool bChangeNumFormat = false;
// das default Numerierungsformat erstellen
@@ -227,7 +227,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
aBrushItem.SetGraphicPos( GPOS_AREA );
// Die Groesse nur beachten, wenn Breite und Hoehe vorhanden sind
- Size aTwipSz( nWidth, nHeight), *pTwipSz=0;
+ Size aTwipSz( nWidth, nHeight), *pTwipSz=nullptr;
if( nWidth!=USHRT_MAX && nHeight!=USHRT_MAX )
{
aTwipSz =
@@ -239,7 +239,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// Die Ausrichtung auch nur beachten, wenn eine Ausrichtung
// angegeben wurde
aNumFormat.SetGraphicBrush( &aBrushItem, pTwipSz,
- text::VertOrientation::NONE!=eVertOri ? &eVertOri : 0);
+ text::VertOrientation::NONE!=eVertOri ? &eVertOri : nullptr);
// Und noch die Grafik merken, um sie in den Absaetzen nicht
// einzufuegen
@@ -352,7 +352,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
AddParSpace();
// den aktuellen Kontext vom Stack holen
- _HTMLAttrContext *pCntxt = nToken!=0 ? PopContext( static_cast< sal_uInt16 >(nToken & ~1) ) : 0;
+ _HTMLAttrContext *pCntxt = nToken!=0 ? PopContext( static_cast< sal_uInt16 >(nToken & ~1) ) : nullptr;
// Keine Liste aufgrund eines Tokens beenden, wenn der Kontext
// nie angelgt wurde oder nicht beendet werden darf.
@@ -363,7 +363,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
{
// Die noch nicht angepassten Formate werden jetzt noch
// angepasst, damit es sich besser Editieren laesst.
- const SwNumFormat *pRefNumFormat = 0;
+ const SwNumFormat *pRefNumFormat = nullptr;
bool bChanged = false;
for( sal_uInt16 i=0; i<MAXLEVEL; i++ )
{
@@ -558,7 +558,7 @@ void SwHTMLParser::EndNumBulListItem( int nToken, bool bSetColl,
AppendTextNode( AM_NOSPACE );
// Kontext zu dem Token suchen und vom Stack holen
- _HTMLAttrContext *pCntxt = 0;
+ _HTMLAttrContext *pCntxt = nullptr;
auto nPos = m_aContexts.size();
nToken &= ~1;
while( !pCntxt && nPos>m_nContextStMin )
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index a3c1588c4e0f..a2f39ba1bb82 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -45,7 +45,7 @@ using namespace css;
void SwHTMLWriter::FillNextNumInfo()
{
- m_pNextNumRuleInfo = 0;
+ m_pNextNumRuleInfo = nullptr;
sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
@@ -90,7 +90,7 @@ void SwHTMLWriter::FillNextNumInfo()
void SwHTMLWriter::ClearNextNumInfo()
{
delete m_pNextNumRuleInfo;
- m_pNextNumRuleInfo = 0;
+ m_pNextNumRuleInfo = nullptr;
}
Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
@@ -189,7 +189,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
sOut += OString(OOO_STRING_SVTOOLS_HTML_unorderlist);
// den Typ ueber das Bullet-Zeichen bestimmen
- const sal_Char *pStr = 0;
+ const sal_Char *pStr = nullptr;
switch( rNumFormat.GetBulletChar() )
{
case HTML_BULLETCHAR_DISC:
@@ -214,7 +214,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
sOut += OString(OOO_STRING_SVTOOLS_HTML_unorderlist);
rWrt.Strm().WriteOString( sOut );
OutHTML_BulletImage( rWrt,
- 0,
+ nullptr,
rNumFormat.GetBrush() );
}
else
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 34a592a91adb..e0caa1610ae3 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -465,7 +465,7 @@ void SwHTMLParser::InsertEmbed()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, NULL, NULL );
+ m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, nullptr, nullptr );
// Namen am FrameFormat setzen
if( !aName.isEmpty() )
@@ -600,7 +600,7 @@ void SwHTMLParser::NewObject()
if( !bIsApplet )
{
delete m_pAppletImpl;
- m_pAppletImpl = 0;
+ m_pAppletImpl = nullptr;
return;
}
@@ -640,8 +640,8 @@ void SwHTMLParser::EndObject()
m_pDoc->getIDocumentContentOperations().Insert( *m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet(),
- NULL,
- NULL );
+ nullptr,
+ nullptr );
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
@@ -653,7 +653,7 @@ void SwHTMLParser::EndObject()
RegisterFlyFrm( pFlyFormat );
delete m_pAppletImpl;
- m_pAppletImpl = 0;
+ m_pAppletImpl = nullptr;
}
#else
(void) this; // Silence loplugin:staticmethods
@@ -732,7 +732,7 @@ void SwHTMLParser::InsertApplet()
if( aCode.isEmpty() )
{
delete m_pAppletImpl;
- m_pAppletImpl = 0;
+ m_pAppletImpl = nullptr;
return;
}
@@ -774,8 +774,8 @@ void SwHTMLParser::EndApplet()
m_pDoc->getIDocumentContentOperations().Insert( *m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet(),
- NULL,
- NULL );
+ nullptr,
+ nullptr );
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
@@ -787,7 +787,7 @@ void SwHTMLParser::EndApplet()
RegisterFlyFrm( pFlyFormat );
delete m_pAppletImpl;
- m_pAppletImpl = 0;
+ m_pAppletImpl = nullptr;
#else
(void) this;
#endif
@@ -945,7 +945,7 @@ void SwHTMLParser::InsertFloatingFrame()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, NULL, NULL );
+ m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, nullptr, nullptr );
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index fc02fad11ed0..b40c3ce4bc50 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -259,11 +259,11 @@ void SwHTMLParser::NewDivision( int nToken )
bAppended = true;
}
}
- _HTMLAttrs *pPostIts = bAppended ? 0 : new _HTMLAttrs;
+ _HTMLAttrs *pPostIts = bAppended ? nullptr : new _HTMLAttrs;
SetAttr( true, true, pPostIts );
// Namen der Section eindeutig machen
- const OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : 0 ) );
+ const OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
if( !aHRef.isEmpty() )
{
@@ -332,7 +332,7 @@ void SwHTMLParser::NewDivision( int nToken )
aItemSet.ClearItem( RES_FRAMEDIR );
}
- m_pDoc->InsertSwSection( *m_pPam, aSection, 0, &aFrmItemSet, false );
+ m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrmItemSet, false );
// ggfs. einen Bereich anspringen
if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
@@ -342,7 +342,7 @@ void SwHTMLParser::NewDivision( int nToken )
}
SwTextNode* pOldTextNd =
- (bAppended) ? 0 : m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
+ (bAppended) ? nullptr : m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
m_pPam->Move( fnMoveBackward );
@@ -358,7 +358,7 @@ void SwHTMLParser::NewDivision( int nToken )
// der Tabelle setzen
InsertAttrs( *pPostIts );
delete pPostIts;
- pPostIts = 0;
+ pPostIts = nullptr;
}
pCntxt->SetSpansSection( true );
@@ -388,7 +388,7 @@ void SwHTMLParser::EndDivision( int /*nToken*/ )
{
// Stack-Eintrag zu dem Token suchen (weil wir noch den Div-Stack
// haben unterscheiden wir erst einmal nicht zwischen DIV und CENTER
- _HTMLAttrContext *pCntxt = 0;
+ _HTMLAttrContext *pCntxt = nullptr;
auto nPos = m_aContexts.size();
while( !pCntxt && nPos>m_nContextStMin )
{
@@ -591,7 +591,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
bool bInCntnr = false;
auto i = m_aContexts.size();
while( !bInCntnr && i > m_nContextStMin )
- bInCntnr = 0 != m_aContexts[--i]->GetFrmItemSet();
+ bInCntnr = nullptr != m_aContexts[--i]->GetFrmItemSet();
// Parse style sheets, but don't position anything by now.
bool bStyleParsed = false;
@@ -683,11 +683,11 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
bAppended = true;
}
}
- _HTMLAttrs *pPostIts = bAppended ? 0 : new _HTMLAttrs;
+ _HTMLAttrs *pPostIts = bAppended ? nullptr : new _HTMLAttrs;
SetAttr( true, true, pPostIts );
// Make section name unique.
- OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : 0 ) );
+ OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
SwSectionData aSection( CONTENT_SECTION, aName );
SfxItemSet aFrmItemSet( m_pDoc->GetAttrPool(),
@@ -721,7 +721,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
aFrmItemSet.Put( *pItem );
aItemSet.ClearItem( RES_FRAMEDIR );
}
- m_pDoc->InsertSwSection( *m_pPam, aSection, 0, &aFrmItemSet, false );
+ m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrmItemSet, false );
// Jump to section, if this is requested.
if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
@@ -731,7 +731,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
}
SwTextNode* pOldTextNd =
- (bAppended) ? 0 : m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
+ (bAppended) ? nullptr : m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
m_pPam->Move( fnMoveBackward );
@@ -746,7 +746,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
// Move pending PostIts into the section.
InsertAttrs( *pPostIts );
delete pPostIts;
- pPostIts = 0;
+ pPostIts = nullptr;
}
pCntxt->SetSpansSection( true );
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index b97f1fe306cb..53cb06bbd779 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -67,7 +67,7 @@ static HTMLOptionEnum aHTMLTableVAlignTable[] =
{ OOO_STRING_SVTOOLS_HTML_VA_top, text::VertOrientation::NONE },
{ OOO_STRING_SVTOOLS_HTML_VA_middle, text::VertOrientation::CENTER },
{ OOO_STRING_SVTOOLS_HTML_VA_bottom, text::VertOrientation::BOTTOM },
- { 0, 0 }
+ { nullptr, 0 }
};
// table tags options
@@ -121,8 +121,8 @@ public:
_HTMLTableContext( SwPosition *pPs, size_t nCntxtStMin,
size_t nCntxtStAttrMin ) :
- pTableNd( 0 ),
- pFrameFormat( 0 ),
+ pTableNd( nullptr ),
+ pFrameFormat( nullptr ),
pPos( pPs ),
nContextStAttrMin( nCntxtStAttrMin ),
nContextStMin( nCntxtStMin ),
@@ -257,7 +257,7 @@ public:
sal_Int16 GetVertOri() const { return eVertOri; }
// Is the cell filled or protected ?
- bool IsUsed() const { return pContents!=0 || bProtected; }
+ bool IsUsed() const { return pContents!=nullptr || bProtected; }
SwHTMLTableLayoutCell *CreateLayoutInfo();
@@ -471,7 +471,7 @@ class HTMLTable
void FixFillerFrameFormat( SwTableBox *pBox, bool bRight ) const;
// Create a table with the content (lines/boxes)
- void _MakeTable( SwTableBox *pUpper=0 );
+ void _MakeTable( SwTableBox *pUpper=nullptr );
// Gernerate a new SwTableBox, which contains a SwStartNode
SwTableBox *NewTableBox( const SwStartNode *pStNd,
@@ -592,7 +592,7 @@ public:
void SetTable( const SwStartNode *pStNd, _HTMLTableContext *pCntxt,
sal_uInt16 nLeft, sal_uInt16 nRight,
- const SwTable *pSwTab=0, bool bFrcFrame=false );
+ const SwTable *pSwTab=nullptr, bool bFrcFrame=false );
_HTMLTableContext *GetContext() const { return pContext; }
@@ -619,20 +619,20 @@ public:
void HTMLTableCnts::InitCtor()
{
- m_pNext = 0;
- m_pLayoutInfo = 0;
+ m_pNext = nullptr;
+ m_pLayoutInfo = nullptr;
m_bNoBreak = false;
}
HTMLTableCnts::HTMLTableCnts( const SwStartNode* pStNd ):
- m_pStartNode(pStNd), m_pTable(0)
+ m_pStartNode(pStNd), m_pTable(nullptr)
{
InitCtor();
}
HTMLTableCnts::HTMLTableCnts( HTMLTable* pTab ):
- m_pStartNode(0), m_pTable(pTab)
+ m_pStartNode(nullptr), m_pTable(pTab)
{
InitCtor();
}
@@ -664,8 +664,8 @@ SwHTMLTableLayoutCnts *HTMLTableCnts::CreateLayoutInfo()
{
if( !m_pLayoutInfo )
{
- SwHTMLTableLayoutCnts *pNextInfo = m_pNext ? m_pNext->CreateLayoutInfo() : 0;
- SwHTMLTableLayout *pTableInfo = m_pTable ? m_pTable->CreateLayoutInfo() : 0;
+ SwHTMLTableLayoutCnts *pNextInfo = m_pNext ? m_pNext->CreateLayoutInfo() : nullptr;
+ SwHTMLTableLayout *pTableInfo = m_pTable ? m_pTable->CreateLayoutInfo() : nullptr;
m_pLayoutInfo = new SwHTMLTableLayoutCnts( m_pStartNode, pTableInfo,
m_bNoBreak, pNextInfo );
@@ -675,8 +675,8 @@ SwHTMLTableLayoutCnts *HTMLTableCnts::CreateLayoutInfo()
}
HTMLTableCell::HTMLTableCell():
- pContents(0),
- pBGBrush(0),
+ pContents(nullptr),
+ pBGBrush(nullptr),
nNumFormat(0),
nRowSpan(1),
nColSpan(1),
@@ -737,7 +737,7 @@ void HTMLTableCell::SetProtected()
// sein, weil sie nicht geloescht werden!!!
// Inhalt loeschen
- pContents = 0;
+ pContents = nullptr;
// Hintergrundfarbe kopieren.
if( pBGBrush )
@@ -762,7 +762,7 @@ inline bool HTMLTableCell::GetValue( double& rValue ) const
SwHTMLTableLayoutCell *HTMLTableCell::CreateLayoutInfo()
{
- SwHTMLTableLayoutCnts *pCntInfo = pContents ? pContents->CreateLayoutInfo() : 0;
+ SwHTMLTableLayoutCnts *pCntInfo = pContents ? pContents->CreateLayoutInfo() : nullptr;
return new SwHTMLTableLayoutCell( pCntInfo, nRowSpan, nColSpan, nWidth,
bRelWidth, bNoWrap );
@@ -775,7 +775,7 @@ HTMLTableRow::HTMLTableRow( sal_uInt16 nCells ):
nEmptyRows(0),
eAdjust(SVX_ADJUST_END),
eVertOri(text::VertOrientation::TOP),
- pBGBrush(0),
+ pBGBrush(nullptr),
bBottomBorder(false)
{
for( sal_uInt16 i=0; i<nCells; i++ )
@@ -873,7 +873,7 @@ HTMLTableColumn::HTMLTableColumn():
bLeftBorder(false)
{
for( sal_uInt16 i=0; i<6; i++ )
- aFrameFormats[i] = 0;
+ aFrameFormats[i] = nullptr;
}
inline void HTMLTableColumn::SetWidth( sal_uInt16 nWdth, bool bRelWdth )
@@ -922,21 +922,21 @@ inline SwFrameFormat *HTMLTableColumn::GetFrameFormat( bool bBorderLine,
void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
{
- pResizeDrawObjs = 0;
- pDrawObjPrcWidths = 0;
+ pResizeDrawObjs = nullptr;
+ pDrawObjPrcWidths = nullptr;
pRows = new HTMLTableRows;
pColumns = new HTMLTableColumns;
nRows = 0;
nCurRow = 0; nCurCol = 0;
- pBox1 = 0;
- pBoxFormat = 0; pLineFormat = 0;
- pLineFrameFormatNoHeight = 0;
- pInhBGBrush = 0;
+ pBox1 = nullptr;
+ pBoxFormat = nullptr; pLineFormat = nullptr;
+ pLineFrameFormatNoHeight = nullptr;
+ pInhBGBrush = nullptr;
- pPrevStNd = 0;
- pSwTable = 0;
+ pPrevStNd = nullptr;
+ pSwTable = nullptr;
bTopBorder = false; bRightBorder = false;
bTopAlwd = true; bRightAlwd = true;
@@ -1034,11 +1034,11 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
bColSpec = false;
pBGBrush = pParser->CreateBrushItem(
- pOptions->bBGColor ? &(pOptions->aBGColor) : 0,
+ pOptions->bBGColor ? &(pOptions->aBGColor) : nullptr,
pOptions->aBGImage, aEmptyOUStr, aEmptyOUStr, aEmptyOUStr );
- pContext = 0;
- pParentContents = 0;
+ pContext = nullptr;
+ pParentContents = nullptr;
aId = pOptions->aId;
aClass = pOptions->aClass;
@@ -1055,7 +1055,7 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable *pTopTab,
nCellPadding( pOptions->nCellPadding ),
nCellSpacing( pOptions->nCellSpacing ),
nBoxes( 1 ),
- pCaptionStartNode( 0 ),
+ pCaptionStartNode( nullptr ),
bTableAdjustOfTag( !pTopTab && pOptions->bTableAdjust ),
bIsParentHead( bParHead ),
bHasParentSection( bHasParentSec ),
@@ -1064,7 +1064,7 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable *pTopTab,
bPrcWidth( pOptions->bPrcWidth ),
pParser( pPars ),
pTopTable( pTopTab ? pTopTab : this ),
- pLayoutInfo( 0 ),
+ pLayoutInfo( nullptr ),
nWidth( pOptions->nWidth ),
nHeight( pTopTab ? 0 : pOptions->nHeight ),
eTableAdjust( pOptions->eAdjust ),
@@ -1183,7 +1183,7 @@ void HTMLTable::ProtectRowSpan( sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRo
// Suchen des SwStartNodes der letzten belegten Vorgaengerbox
const SwStartNode* HTMLTable::GetPrevBoxStartNode( sal_uInt16 nRow, sal_uInt16 nCol ) const
{
- const HTMLTableCnts *pPrevCnts = 0;
+ const HTMLTableCnts *pPrevCnts = nullptr;
if( 0==nRow )
{
@@ -1330,9 +1330,9 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
bool bFirstPara, bool bLastPara ) const
{
- SwFrameFormat *pFrameFormat = 0; // frame::Frame-Format
+ SwFrameFormat *pFrameFormat = nullptr; // frame::Frame-Format
sal_Int16 eVOri = text::VertOrientation::NONE;
- const SvxBrushItem *pBGBrushItem = 0; // Hintergrund
+ const SvxBrushItem *pBGBrushItem = nullptr; // Hintergrund
std::shared_ptr<SvxBoxItem> pBoxItem;
bool bTopLine = false, bBottomLine = false, bLastBottomLine = false;
bool bReUsable = false; // Format nochmals verwendbar?
@@ -1497,7 +1497,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
SvxAdjust eAdjust = SVX_ADJUST_END;
- SwContentNode *pCNd = 0;
+ SwContentNode *pCNd = nullptr;
if( !bLock )
{
const SwStartNode *pSttNd = pBox->GetSttNd();
@@ -1605,7 +1605,7 @@ SwTableBox *HTMLTable::NewTableBox( const SwStartNode *pStNd,
// entspricht nehmen wir diese Box
pBox = pTopTable->pBox1;
pBox->SetUpper( pUpper );
- pTopTable->pBox1 = 0;
+ pTopTable->pBox1 = nullptr;
}
else
pBox = new SwTableBox( pBoxFormat, *pStNd, pUpper );
@@ -1637,7 +1637,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
HTMLTableRow *pTopRow = &(*pRows)[nTopRow];
sal_uInt16 nRowHeight = pTopRow->GetHeight();
- const SvxBrushItem *pBGBrushItem = 0;
+ const SvxBrushItem *pBGBrushItem = nullptr;
if( this == pTopTable || nTopRow>0 || nBottomRow<nRows )
{
// An der Line eine Frabe zu setzen macht keinen Sinn, wenn sie
@@ -1705,7 +1705,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
OSL_ENSURE((nCol != nRightCol-1) || bSplit, "Split-Flag wrong");
if( bSplit )
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
HTMLTableCell *pCell2 = GetCell( nTopRow, nStartCol );
if( pCell2->GetColSpan() == (nCol+1-nStartCol) )
{
@@ -1827,7 +1827,7 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper,
pLine );
pCnts->SetTableBox( pCntBox );
FixFrameFormat( pCntBox, nTopRow, nLeftCol, nRowSpan, nColSpan,
- bFirstPara, 0==pCnts->Next() );
+ bFirstPara, nullptr==pCnts->Next() );
pLine->GetTabBoxes().push_back( pCntBox );
rLines.push_back( pLine );
@@ -1998,7 +1998,7 @@ void HTMLTable::SetBorders()
pCell->GetRowSpan(),
pCell->GetColSpan(),
bFirstPara,
- 0==pCnts->Next() );
+ nullptr==pCnts->Next() );
pTable->SetBorders();
}
bFirstPara = false;
@@ -2407,7 +2407,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
OSL_ENSURE( nRows>0 && nCols>0 && nCurRow==nRows,
"Wurde CloseTable nicht aufgerufen?" );
- OSL_ENSURE( (pLayoutInfo==0) == (this==pTopTable),
+ OSL_ENSURE( (pLayoutInfo==nullptr) == (this==pTopTable),
"Top-Tabelle hat keine Layout-Info oder umgekehrt" );
if( this==pTopTable )
@@ -2932,7 +2932,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
const OUString& rId,
const OUString& rClass )
{
- SvxBrushItem *pBrushItem = 0;
+ SvxBrushItem *pBrushItem = nullptr;
if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() )
{
@@ -2957,7 +2957,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
}
m_pCSS1Parser->ParseStyleOption( rStyle, aItemSet, aPropInfo );
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
@@ -3005,7 +3005,7 @@ public:
_SectionSaveStruct::_SectionSaveStruct( SwHTMLParser& rParser ) :
m_nBaseFontStMinSave(0), m_nFontStMinSave(0), m_nFontStHeadStartSave(0),
m_nDefListDeepSave(0), m_nContextStMinSave(0), m_nContextStAttrMinSave(0),
- m_pTable( 0 )
+ m_pTable( nullptr )
{
// Font-Stacks einfrieren
m_nBaseFontStMinSave = rParser.m_nBaseFontStMin;
@@ -3101,8 +3101,8 @@ public:
void AddContents( HTMLTableCnts *pNewCnts );
HTMLTableCnts *GetFirstContents() { return pCnts; }
- void ClearIsInSection() { pCurrCnts = 0; }
- bool IsInSection() const { return pCurrCnts!=0; }
+ void ClearIsInSection() { pCurrCnts = nullptr; }
+ bool IsInSection() const { return pCurrCnts!=nullptr; }
void InsertCell( SwHTMLParser& rParser, HTMLTable *pCurTable );
@@ -3116,9 +3116,9 @@ public:
_CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable,
bool bHd, bool bReadOpt ) :
_SectionSaveStruct( rParser ),
- pCnts( 0 ),
- pCurrCnts( 0 ),
- pNoBreakEndParaIdx( 0 ),
+ pCnts( nullptr ),
+ pCurrCnts( nullptr ),
+ pNoBreakEndParaIdx( nullptr ),
nValue( 0.0 ),
nNumFormat( 0 ),
nRowSpan( 1 ),
@@ -3315,7 +3315,7 @@ void _CellSaveStruct::InsertCell( SwHTMLParser& rParser,
// jetzt muessen wir noch die Zelle an der aktuellen Position einfuegen
SvxBrushItem *pBrushItem =
- rParser.CreateBrushItem( bBGColor ? &aBGColor : 0, aBGImage,
+ rParser.CreateBrushItem( bBGColor ? &aBGColor : nullptr, aBGImage,
aStyle, aId, aClass );
pCurTable->InsertCell( pCnts, nRowSpan, nColSpan, nWidth,
bPrcWidth, nHeight, eVertOri, pBrushItem, m_pBoxItem,
@@ -3451,7 +3451,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
delete m_pPendStack;
m_pPendStack = pTmp;
nToken = m_pPendStack ? m_pPendStack->nToken : GetSaveToken();
- bPending = SVPAR_ERROR == eState && m_pPendStack != 0;
+ bPending = SVPAR_ERROR == eState && m_pPendStack != nullptr;
SaveState( nToken );
}
@@ -3490,8 +3490,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
pCurTable->GetId(),
pCurTable->GetClass(),
aItemSet, aPropInfo,
- 0, &pCurTable->GetDirection() );
- const SfxPoolItem *pItem = 0;
+ nullptr, &pCurTable->GetDirection() );
+ const SfxPoolItem *pItem = nullptr;
if( bStyleParsed )
{
if( SfxItemState::SET == aItemSet.GetItemState(
@@ -3517,7 +3517,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
// die aktuelle Position an die wir irgendwann zurueckkehren
- SwPosition *pSavePos = 0;
+ SwPosition *pSavePos = nullptr;
bool bForceFrame = false;
bool bAppended = false;
bool bParentLFStripped = false;
@@ -3625,7 +3625,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// alle noch offenen Attribute beenden und hinter der Tabelle
// neu aufspannen
- _HTMLAttrs *pPostIts = 0;
+ _HTMLAttrs *pPostIts = nullptr;
if( !bForceFrame && (bTopTable || pCurTable->HasParentSection()) )
{
SplitAttrTab( pTCntxt->aAttrTab, bTopTable );
@@ -3782,7 +3782,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// der Tabelle setzen
InsertAttrs( *pPostIts );
delete pPostIts;
- pPostIts = 0;
+ pPostIts = nullptr;
}
pTCntxt->SetTableNode( const_cast<SwTableNode *>(pNd->FindTableNode()) );
@@ -3813,7 +3813,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// aktuellen Absatzes schieben
InsertAttrs( *pPostIts );
delete pPostIts;
- pPostIts = 0;
+ pPostIts = nullptr;
}
}
@@ -4170,7 +4170,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, bool bReadOptions,
delete m_pPendStack;
m_pPendStack = pTmp;
nToken = m_pPendStack ? m_pPendStack->nToken : GetSaveToken();
- bPending = SVPAR_ERROR == eState && m_pPendStack != 0;
+ bPending = SVPAR_ERROR == eState && m_pPendStack != nullptr;
SaveState( nToken );
}
@@ -4228,7 +4228,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, bool bReadOptions,
InsertBookmark( aId );
SvxBrushItem *pBrushItem =
- CreateBrushItem( bBGColor ? &aBGColor : 0, aBGImage, aStyle,
+ CreateBrushItem( bBGColor ? &aBGColor : nullptr, aBGImage, aStyle,
aId, aClass );
pCurTable->OpenRow( eAdjust, eVertOri, pBrushItem );
// ist beim ersten GetNextToken schon pending, muss bei
@@ -4375,7 +4375,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
delete m_pPendStack;
m_pPendStack = pTmp;
nToken = m_pPendStack ? m_pPendStack->nToken : GetSaveToken();
- bPending = SVPAR_ERROR == eState && m_pPendStack != 0;
+ bPending = SVPAR_ERROR == eState && m_pPendStack != nullptr;
SaveState( nToken );
}
@@ -4562,7 +4562,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable,
delete m_pPendStack;
m_pPendStack = pTmp;
nToken = m_pPendStack ? m_pPendStack->nToken : GetSaveToken();
- bPending = SVPAR_ERROR == eState && m_pPendStack != 0;
+ bPending = SVPAR_ERROR == eState && m_pPendStack != nullptr;
SaveState( nToken );
}
@@ -4982,7 +4982,7 @@ _TableSaveStruct::~_TableSaveStruct()
void _TableSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc )
{
- m_pCurrentTable->MakeTable(0, nWidth);
+ m_pCurrentTable->MakeTable(nullptr, nWidth);
_HTMLTableContext *pTCntxt = m_pCurrentTable->GetContext();
OSL_ENSURE( pTCntxt, "Wo ist der Tabellen-Kontext" );
@@ -5155,7 +5155,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
bool bHasToFly )
{
if( !IsParserWorking() && !m_pPendStack )
- return 0;
+ return nullptr;
int nToken = 0;
bool bPending = false;
@@ -5169,13 +5169,13 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
delete m_pPendStack;
m_pPendStack = pTmp;
nToken = m_pPendStack ? m_pPendStack->nToken : GetSaveToken();
- bPending = SVPAR_ERROR == eState && m_pPendStack != 0;
+ bPending = SVPAR_ERROR == eState && m_pPendStack != nullptr;
SaveState( nToken );
}
else
{
- m_pTable = 0;
+ m_pTable = nullptr;
HTMLTableOptions *pTableOptions =
new HTMLTableOptions( GetOptions(), eParentAdjust );
@@ -5296,7 +5296,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
{
m_pPendStack = new SwPendingStack( HTML_TABLE_ON, m_pPendStack );
m_pPendStack->pData = pSaveStruct;
- return 0;
+ return nullptr;
}
_HTMLTableContext *pTCntxt = pCurTable->GetContext();
@@ -5368,7 +5368,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
m_pPam->SetMark();
m_pPam->DeleteMark();
m_pDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
- m_pTable->SetCaption( 0, false );
+ m_pTable->SetCaption( nullptr, false );
}
// SwTable aufbereiten
@@ -5418,15 +5418,15 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
m_pPam->SetMark();
m_pPam->DeleteMark();
m_pDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
- pCurTable->SetCaption( 0, false );
+ pCurTable->SetCaption( nullptr, false );
}
}
if( m_pTable == pCurTable )
{
delete pSaveStruct->m_pCurrentTable;
- pSaveStruct->m_pCurrentTable = 0;
- m_pTable = 0;
+ pSaveStruct->m_pCurrentTable = nullptr;
+ m_pTable = nullptr;
}
HTMLTable* pRetTable = pSaveStruct->m_pCurrentTable;
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 2dd195f152d7..3b3c8a457ce6 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -89,8 +89,8 @@ public:
explicit SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
void Write( SwHTMLWriter& rWrt, sal_Int16 eAlign=text::HoriOrientation::NONE,
- bool bTHead=false, const SwFrameFormat *pFrameFormat=0,
- const OUString *pCaption=0, bool bTopCaption=false,
+ bool bTHead=false, const SwFrameFormat *pFrameFormat=nullptr,
+ const OUString *pCaption=nullptr, bool bTopCaption=false,
sal_uInt16 nHSpace=0, sal_uInt16 nVSpace=0 ) const;
};
@@ -98,13 +98,13 @@ SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
sal_uInt32 nBWidth, bool bRel,
sal_uInt16 nLSub, sal_uInt16 nRSub,
sal_uInt16 nNumOfRowsToRepeat )
- : SwWriteTable(NULL, rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat)
+ : SwWriteTable(nullptr, rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat)
{
PixelizeBorders();
}
SwHTMLWrtTable::SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo )
- : SwWriteTable(NULL, pLayoutInfo)
+ : SwWriteTable(nullptr, pLayoutInfo)
{
// Einige Twip-Werte an Pixel-Grenzen anpassen
if( bCollectBorderWidth )
@@ -414,7 +414,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
rWrt.m_bTextAttr = false;
rWrt.m_bOutOpts = true;
- const SvxBrushItem *pBrushItem = 0;
+ const SvxBrushItem *pBrushItem = nullptr;
if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
{
pBrushItem = static_cast<const SvxBrushItem *>(pItem);
@@ -1110,7 +1110,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode,
{
SwViewShell *pSh = rWrt.pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
if ( pSh && pSh->GetViewOptions()->IsTest1() )
- pLayout = 0;
+ pLayout = nullptr;
}
#endif
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index b5042edc18ad..2b14d4195a7b 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -392,7 +392,7 @@ CSS1Token CSS1Parser::GetNextToken()
aIdent += sTmpBuffer2.makeStringAndClear();
// Ist es eine Einheit?
- const sal_Char *pCmp1 = 0, *pCmp2 = 0, *pCmp3 = 0;
+ const sal_Char *pCmp1 = nullptr, *pCmp2 = nullptr, *pCmp3 = nullptr;
double nScale1 = 1., nScale2 = 1.;
CSS1Token nToken1 = CSS1_LENGTH,
nToken2 = CSS1_LENGTH,
@@ -826,10 +826,10 @@ void CSS1Parser::ParseRule()
CSS1Selector *CSS1Parser::ParseSelector()
{
- CSS1Selector *pRoot = 0, *pLast = 0;
+ CSS1Selector *pRoot = nullptr, *pLast = nullptr;
bool bDone = false;
- CSS1Selector *pNew = 0;
+ CSS1Selector *pNew = nullptr;
LOOP_CHECK_DECL
@@ -927,7 +927,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
// falls ein Selektor angelegt wurd, ihn speichern
if( pNew )
{
- OSL_ENSURE( (pRoot!=0) == (pLast!=0),
+ OSL_ENSURE( (pRoot!=nullptr) == (pLast!=nullptr),
"Root-Selektor, aber kein Last" );
if( pLast )
pLast->SetNext( pNew );
@@ -935,7 +935,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
pRoot = pNew;
pLast = pNew;
- pNew = 0;
+ pNew = nullptr;
}
if( bNextToken && !bDone )
@@ -993,7 +993,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
// beruecksichtigt und wird auf nValue angewendet!
CSS1Expression *CSS1Parser::ParseDeclaration( OUString& rProperty )
{
- CSS1Expression *pRoot = 0, *pLast = 0;
+ CSS1Expression *pRoot = nullptr, *pLast = nullptr;
// property
if( CSS1_IDENT != nToken )
@@ -1018,7 +1018,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( OUString& rProperty )
// Problem sein
bool bDone = false;
sal_Unicode cSign = 0, cOp = 0;
- CSS1Expression *pNew = 0;
+ CSS1Expression *pNew = nullptr;
LOOP_CHECK_DECL
@@ -1074,7 +1074,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( OUString& rProperty )
// falls ein Expression angelegt wurde, diesen speichern
if( pNew )
{
- OSL_ENSURE( (pRoot!=0) == (pLast!=0),
+ OSL_ENSURE( (pRoot!=nullptr) == (pLast!=nullptr),
"Root-Selektor, aber kein Last" );
if( pLast )
pLast->SetNext( pNew );
@@ -1082,7 +1082,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( OUString& rProperty )
pRoot = pNew;
pLast = pNew;
- pNew = 0;
+ pNew = nullptr;
}
if( !bDone )
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index cbe524c44b70..a1fdba12f0e4 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -93,7 +93,7 @@ class CSS1Selector
public:
CSS1Selector( CSS1SelectorType eTyp, const OUString &rSel )
- : eType(eTyp), aSelector( rSel ), pNext( 0 )
+ : eType(eTyp), aSelector( rSel ), pNext( nullptr )
{}
~CSS1Selector();
@@ -123,7 +123,7 @@ struct CSS1Expression
public:
CSS1Expression( CSS1Token eTyp, const OUString &rVal,
double nVal, sal_Unicode cO = 0 )
- : cOp(cO), eType(eTyp), aValue(rVal), nValue(nVal), pNext(0)
+ : cOp(cO), eType(eTyp), aValue(rVal), nValue(nVal), pNext(nullptr)
{}
~CSS1Expression();
@@ -148,7 +148,7 @@ public:
inline void CSS1Expression::Set( CSS1Token eTyp, const OUString &rVal,
double nVal, sal_Unicode cO )
{
- cOp = cO; eType = eTyp; aValue = rVal; nValue = nVal; pNext = 0;
+ cOp = cO; eType = eTyp; aValue = rVal; nValue = nVal; pNext = nullptr;
}
inline sal_uInt32 CSS1Expression::GetULength() const
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index bdd1bee2cbeb..23919ccbe5c2 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -72,7 +72,7 @@ static CSS1PropertyEnum const aFontSizeTable[] =
{ "large", 4 },
{ "x-large", 5 },
{ "xx-large", 6 },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aFontWeightTable[] =
@@ -87,7 +87,7 @@ static CSS1PropertyEnum const aFontWeightTable[] =
{ "extra-bold", WEIGHT_BOLD }, // WEIGHT_ULTRABOLD (OBS)
{ "bolder", WEIGHT_BOLD },
{ "lighter", WEIGHT_NORMAL },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aFontStyleTable[] =
@@ -95,14 +95,14 @@ static CSS1PropertyEnum const aFontStyleTable[] =
{ "normal", ITALIC_NONE },
{ "italic", ITALIC_NORMAL },
{ "oblique", ITALIC_NORMAL },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aFontVariantTable[] =
{
{ "normal", SVX_CASEMAP_NOT_MAPPED },
{ "small-caps", SVX_CASEMAP_KAPITAELCHEN },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aTextTransformTable[] =
@@ -110,7 +110,7 @@ static CSS1PropertyEnum const aTextTransformTable[] =
{ "uppercase", SVX_CASEMAP_VERSALIEN },
{ "lowercase", SVX_CASEMAP_GEMEINE },
{ "capitalize", SVX_CASEMAP_TITEL },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aDirectionTable[] =
@@ -118,7 +118,7 @@ static CSS1PropertyEnum const aDirectionTable[] =
{ "ltr", FRMDIR_HORI_LEFT_TOP },
{ "rtl", FRMDIR_HORI_RIGHT_TOP },
{ "inherit", FRMDIR_ENVIRONMENT },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aBGRepeatTable[] =
@@ -127,7 +127,7 @@ static CSS1PropertyEnum const aBGRepeatTable[] =
{ "repeat-x", GPOS_TILED },
{ "repeat-y", GPOS_TILED },
{ "no-repeat", GPOS_NONE },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aBGHoriPosTable[] =
@@ -135,7 +135,7 @@ static CSS1PropertyEnum const aBGHoriPosTable[] =
{ "left", GPOS_LT },
{ "center", GPOS_MT },
{ "right", GPOS_RT },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aBGVertPosTable[] =
@@ -143,7 +143,7 @@ static CSS1PropertyEnum const aBGVertPosTable[] =
{ "top", GPOS_LT },
{ "middle", GPOS_LM },
{ "bottom", GPOS_LB },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aTextAlignTable[] =
@@ -152,7 +152,7 @@ static CSS1PropertyEnum const aTextAlignTable[] =
{ "center", SVX_ADJUST_CENTER },
{ "right", SVX_ADJUST_RIGHT },
{ "justify", SVX_ADJUST_BLOCK },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aBorderWidthTable[] =
@@ -160,7 +160,7 @@ static CSS1PropertyEnum const aBorderWidthTable[] =
{ "thin", 0 }, // DEF_LINE_WIDTH_0 / DEF_DOUBLE_LINE0
{ "medium", 1 }, // DEF_LINE_WIDTH_1 / DEF_DOUBLE_LINE1
{ "thick", 2 }, // DEF_LINE_WIDTH_2 / DEF_DOUBLE_LINE2
- { 0, 0 }
+ { nullptr, 0 }
};
enum CSS1BorderStyle { CSS1_BS_NONE, CSS1_BS_SINGLE, CSS1_BS_DOUBLE, CSS1_BS_DOTTED, CSS1_BS_DASHED, CSS1_BS_GROOVE, CSS1_BS_RIDGE, CSS1_BS_INSET, CSS1_BS_OUTSET };
@@ -176,7 +176,7 @@ static CSS1PropertyEnum const aBorderStyleTable[] =
{ "ridge", CSS1_BS_RIDGE },
{ "inset", CSS1_BS_INSET },
{ "outset", CSS1_BS_OUTSET },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aFloatTable[] =
@@ -184,7 +184,7 @@ static CSS1PropertyEnum const aFloatTable[] =
{ "left", SVX_ADJUST_LEFT },
{ "right", SVX_ADJUST_RIGHT },
{ "none", SVX_ADJUST_END },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aPositionTable[] =
@@ -192,7 +192,7 @@ static CSS1PropertyEnum const aPositionTable[] =
{ "absolute", SVX_CSS1_POS_ABSOLUTE },
{ "relative", SVX_CSS1_POS_RELATIVE },
{ "static", SVX_CSS1_POS_STATIC },
- { 0, 0 }
+ { nullptr, 0 }
};
// Feature: PrintExt
@@ -201,7 +201,7 @@ static CSS1PropertyEnum const aSizeTable[] =
{ "auto", SVX_CSS1_STYPE_AUTO },
{ "landscape", SVX_CSS1_STYPE_LANDSCAPE },
{ "portrait", SVX_CSS1_STYPE_PORTRAIT },
- { 0, 0 }
+ { nullptr, 0 }
};
static CSS1PropertyEnum const aPageBreakTable[] =
@@ -211,7 +211,7 @@ static CSS1PropertyEnum const aPageBreakTable[] =
{ "avoid", SVX_CSS1_PBREAK_AVOID },
{ "left", SVX_CSS1_PBREAK_LEFT },
{ "right", SVX_CSS1_PBREAK_RIGHT },
- { 0, 0 }
+ { nullptr, 0 }
};
@@ -291,7 +291,7 @@ void SvxCSS1BorderInfo::SetBorderLine( SvxBoxItemLine nLine, SvxBoxItem &rBoxIte
if( CSS1_BS_NONE==eStyle || nAbsWidth==0 ||
(nAbsWidth==USHRT_MAX && nNamedWidth==USHRT_MAX) )
{
- rBoxItem.SetLine( 0, nLine );
+ rBoxItem.SetLine( nullptr, nLine );
return;
}
@@ -341,7 +341,7 @@ void SvxCSS1BorderInfo::SetBorderLine( SvxBoxItemLine nLine, SvxBoxItem &rBoxIte
SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
{
for( size_t i=0; i<SAL_N_ELEMENTS(aBorderInfos); ++i )
- aBorderInfos[i] = 0;
+ aBorderInfos[i] = nullptr;
Clear();
}
@@ -377,7 +377,7 @@ SvxCSS1PropertyInfo::SvxCSS1PropertyInfo( const SvxCSS1PropertyInfo& rProp ) :
for( size_t i=0; i<SAL_N_ELEMENTS(aBorderInfos); ++i )
aBorderInfos[i] = rProp.aBorderInfos[i]
? new SvxCSS1BorderInfo( *rProp.aBorderInfos[i] )
- : 0;
+ : nullptr;
}
SvxCSS1PropertyInfo::~SvxCSS1PropertyInfo()
@@ -390,7 +390,7 @@ void SvxCSS1PropertyInfo::DestroyBorderInfos()
for( size_t i=0; i<SAL_N_ELEMENTS(aBorderInfos); ++i )
{
delete aBorderInfos[i];
- aBorderInfos[i] = 0;
+ aBorderInfos[i] = nullptr;
}
}
@@ -568,7 +568,7 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
nRightBorderDistance != USHRT_MAX;
for( size_t i=0; !bChg && i<SAL_N_ELEMENTS(aBorderInfos); ++i )
- bChg = aBorderInfos[i]!=0;
+ bChg = aBorderInfos[i]!=nullptr;
if( !bChg )
return;
@@ -697,10 +697,10 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL, sal_
sal_uInt16 *pWhichIds, sal_uInt16 nWhichIds ) :
CSS1Parser(),
sBaseURL( rBaseURL ),
- pSheetItemSet(0),
- pItemSet(0),
- pSearchEntry( 0 ),
- pPropInfo( 0 ),
+ pSheetItemSet(nullptr),
+ pItemSet(nullptr),
+ pSearchEntry( nullptr ),
+ pPropInfo( nullptr ),
nMinFixLineSpace( nMinFixLineSp ),
eDfltEnc( RTL_TEXTENCODING_DONTKNOW ),
nScriptFlags( CSS1_SCRIPT_ALL ),
@@ -838,8 +838,8 @@ bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn )
pSheetItemSet->ClearItem();
pSheetPropInfo->Clear();
- pItemSet = 0;
- pPropInfo = 0;
+ pItemSet = nullptr;
+ pPropInfo = nullptr;
return bSuccess;
}
@@ -854,8 +854,8 @@ bool SvxCSS1Parser::ParseStyleOption( const OUString& rIn,
bool bSuccess = CSS1Parser::ParseStyleOption( rIn );
rItemSet.ClearItem( aItemIds.nDirection );
- pItemSet = 0;
- pPropInfo = 0;
+ pItemSet = nullptr;
+ pPropInfo = nullptr;
return bSuccess;
}
@@ -874,7 +874,7 @@ bool SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
if( pPropTable->pName )
rEnum = pPropTable->nEnum;
- return (pPropTable->pName != 0);
+ return (pPropTable->pName != nullptr);
}
void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
@@ -911,7 +911,7 @@ sal_uInt32 SvxCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
const FontList *SvxCSS1Parser::GetFontList() const
{
- return 0;
+ return nullptr;
}
void SvxCSS1Parser::InsertMapEntry( const OUString& rKey,
@@ -1089,7 +1089,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
if( !bFound && pFList )
{
sal_Handle hFont = pFList->GetFirstFontInfo( aIdent );
- if( 0 != hFont )
+ if( nullptr != hFont )
{
const vcl::FontInfo& rFInfo = FontList::GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
@@ -3165,10 +3165,10 @@ void SvxCSS1Parser::ParseProperty( const OUString& rProperty,
CSS1PropEntry aSrch;
aSrch.pName = &aTmp;
- aSrch.pFunc = 0;
+ aSrch.pFunc = nullptr;
void* pFound;
- if( 0 != ( pFound = bsearch( &aSrch,
+ if( nullptr != ( pFound = bsearch( &aSrch,
static_cast<void*>(aCSS1PropFnTab),
sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
sizeof( CSS1PropEntry ),
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index d35f8ef1a64a..47619ad42e5b 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -145,7 +145,7 @@ public:
void CopyBorderInfo( sal_uInt16 nCount, sal_uInt16 nWhat );
void SetBoxItem( SfxItemSet& rItemSet, sal_uInt16 nMinBorderDist,
- const SvxBoxItem* pDflt=0, bool bTable = false );
+ const SvxBoxItem* pDflt=nullptr, bool bTable = false );
};
@@ -242,7 +242,7 @@ public:
SvxCSS1Parser( SfxItemPool& rPool,
const OUString& rBaseURL,
sal_uInt16 nMinFixLineSp,
- sal_uInt16 *pWhichIds=0, sal_uInt16 nWhichIds=0 );
+ sal_uInt16 *pWhichIds=nullptr, sal_uInt16 nWhichIds=0 );
virtual ~SvxCSS1Parser();
bool IsIgnoreFontFamily() const { return bIgnoreFontFamily; }
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index abe6ae7acf9d..fedcbb395794 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -109,7 +109,7 @@ public:
// werden aus dem Item-Set geloescht ). Wird fuer's BODY-Tag
// aufgerufen.
void SetPageDescAttrs( const SvxBrushItem *pBrush,
- SfxItemSet *pItemSet=0 );
+ SfxItemSet *pItemSet=nullptr );
void ChgPageDesc( const SwPageDesc *pPageDesc,
const SwPageDesc& rNewPageDesc );
@@ -120,7 +120,7 @@ public:
// Fuellen eines DropCap-Attributs
void FillDropCap( SwFormatDrop& rDrop, SfxItemSet& rItemSet,
- const OUString *pName=0 );
+ const OUString *pName=nullptr );
bool SetFormatBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e1dbe40902b4..7e2ea5721b2d 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -134,7 +134,7 @@ HTMLOptionEnum aHTMLPAlignTable[] =
{ OOO_STRING_SVTOOLS_HTML_AL_right, SVX_ADJUST_RIGHT },
{ OOO_STRING_SVTOOLS_HTML_AL_justify, SVX_ADJUST_BLOCK },
{ OOO_STRING_SVTOOLS_HTML_AL_char, SVX_ADJUST_LEFT },
- { 0, 0 }
+ { nullptr, 0 }
};
// <SPACER TYPE=...>
@@ -143,7 +143,7 @@ static HTMLOptionEnum aHTMLSpacerTypeTable[] =
{ OOO_STRING_SVTOOLS_HTML_SPTYPE_block, HTML_SPTYPE_BLOCK },
{ OOO_STRING_SVTOOLS_HTML_SPTYPE_horizontal, HTML_SPTYPE_HORI },
{ OOO_STRING_SVTOOLS_HTML_SPTYPE_vertical, HTML_SPTYPE_VERT },
- { 0, 0 }
+ { nullptr, 0 }
};
HTMLReader::HTMLReader()
@@ -240,23 +240,23 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
SfxMedium* pMed, bool bReadUTF8,
bool bNoHTMLComments )
: SfxHTMLParser( rIn, bReadNewDoc, pMed ),
- SwClient( 0 ),
+ SwClient( nullptr ),
m_aPathToFile( rPath ),
m_sBaseURL( rBaseURL ),
- m_pAppletImpl( 0 ),
- m_pCSS1Parser( 0 ),
+ m_pAppletImpl( nullptr ),
+ m_pCSS1Parser( nullptr ),
m_pNumRuleInfo( new SwHTMLNumRuleInfo ),
- m_pPendStack( 0 ),
+ m_pPendStack( nullptr ),
m_pDoc( pD ),
- m_pActionViewShell( 0 ),
- m_pSttNdIdx( 0 ),
- m_pTable(0),
- m_pFormImpl( 0 ),
- m_pMarquee( 0 ),
- m_pField( 0 ),
- m_pImageMap( 0 ),
+ m_pActionViewShell( nullptr ),
+ m_pSttNdIdx( nullptr ),
+ m_pTable(nullptr),
+ m_pFormImpl( nullptr ),
+ m_pMarquee( nullptr ),
+ m_pField( nullptr ),
+ m_pImageMap( nullptr ),
m_pImageMaps(nullptr),
- m_pFootEndNoteImpl( 0 ),
+ m_pFootEndNoteImpl( nullptr ),
m_nScriptStartLineNr( 0 ),
m_nBaseFontStMin( 0 ),
m_nFontStMin( 0 ),
@@ -297,9 +297,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
m_bInFootEndNoteSymbol( false ),
m_bIgnoreHTMLComments( bNoHTMLComments ),
m_bRemoveHidden( false ),
- m_pTempViewFrame(0)
+ m_pTempViewFrame(nullptr)
{
- m_nEventId = 0;
+ m_nEventId = nullptr;
m_bUpperSpace = m_bViewCreated = m_bChkJumpMark =
m_bSetCrsr = false;
@@ -475,7 +475,7 @@ SwHTMLParser::~SwHTMLParser()
{
// keiner will mehr das Doc haben, also weg damit
delete m_pDoc;
- m_pDoc = NULL;
+ m_pDoc = nullptr;
}
if ( m_pTempViewFrame )
@@ -490,7 +490,7 @@ SwHTMLParser::~SwHTMLParser()
IMPL_LINK_NOARG_TYPED( SwHTMLParser, AsyncCallback, void*, void )
{
- m_nEventId=0;
+ m_nEventId=nullptr;
// #i47907# - If the document has already been destructed,
// the parser should be aware of this:
@@ -501,7 +501,7 @@ IMPL_LINK_NOARG_TYPED( SwHTMLParser, AsyncCallback, void*, void )
eState = SVPAR_ERROR;
}
- GetAsynchCallLink().Call(0);
+ GetAsynchCallLink().Call(nullptr);
}
SvParserState SwHTMLParser::CallParser()
@@ -540,7 +540,7 @@ SvParserState SwHTMLParser::CallParser()
else
{
m_bViewCreated = true;
- m_nEventId = 0;
+ m_nEventId = nullptr;
}
}
@@ -764,7 +764,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
SwViewShell *pVSh = CheckActionViewShell();
SwCrsrShell *pCrsrSh = pVSh && dynamic_cast< const SwCrsrShell *>( pVSh ) != nullptr
? static_cast < SwCrsrShell * >( pVSh )
- : 0;
+ : nullptr;
if( pCrsrSh &&
pCrsrSh->GetCrsr()->GetPoint()
->nNode.GetIndex() == nNodeIdx )
@@ -773,13 +773,13 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
pCrsrSh->SetMark();
pCrsrSh->ClearMark();
}
- m_pPam->GetBound().nContent.Assign( 0, 0 );
- m_pPam->GetBound(false).nContent.Assign( 0, 0 );
+ m_pPam->GetBound().nContent.Assign( nullptr, 0 );
+ m_pPam->GetBound(false).nContent.Assign( nullptr, 0 );
m_pDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
}
}
}
- else if( 0 != ( pAktNd = m_pDoc->GetNodes()[ nNodeIdx ]->GetTextNode()) && !bHasFlysOrMarks )
+ else if( nullptr != ( pAktNd = m_pDoc->GetNodes()[ nNodeIdx ]->GetTextNode()) && !bHasFlysOrMarks )
{
if( pAktNd->CanJoinNext( &pPos->nNode ))
{
@@ -790,7 +790,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
}
else if (pAktNd->GetText().isEmpty())
{
- pPos->nContent.Assign( 0, 0 );
+ pPos->nContent.Assign( nullptr, 0 );
m_pPam->SetMark(); m_pPam->DeleteMark();
m_pDoc->GetNodes().Delete( pPos->nNode );
m_pPam->Move( fnMoveBackward );
@@ -857,7 +857,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
}
if( SVPAR_PENDING != GetStatus() )
- delete m_pSttNdIdx, m_pSttNdIdx = 0;
+ delete m_pSttNdIdx, m_pSttNdIdx = nullptr;
// sollte der Parser der Letzte sein, der das Doc haelt, dann braucht
// man hier auch nichts mehr tun, Doc wird gleich zerstoert!
@@ -1264,7 +1264,7 @@ void SwHTMLParser::NextToken( int nToken )
InsertBodyOptions();
// If there is a template for the first or the right page,
// it is set here.
- const SwPageDesc *pPageDesc = 0;
+ const SwPageDesc *pPageDesc = nullptr;
if( m_pCSS1Parser->IsSetFirstPageDesc() )
pPageDesc = m_pCSS1Parser->GetFirstPageDesc();
else if( m_pCSS1Parser->IsSetRightPageDesc() )
@@ -1317,7 +1317,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_META:
{
- SvKeyValueIterator *pHTTPHeader = 0;
+ SvKeyValueIterator *pHTTPHeader = nullptr;
if( IsNewDoc() )
{
SwDocShell *pDocSh = m_pDoc->GetDocShell();
@@ -1385,20 +1385,20 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_OBJECT_ON:
#if HAVE_FEATURE_JAVA
NewObject();
- m_bCallNextToken = m_pAppletImpl!=0 && m_pTable!=0;
+ m_bCallNextToken = m_pAppletImpl!=nullptr && m_pTable!=nullptr;
#endif
break;
case HTML_APPLET_ON:
#if HAVE_FEATURE_JAVA
InsertApplet();
- m_bCallNextToken = m_pAppletImpl!=0 && m_pTable!=0;
+ m_bCallNextToken = m_pAppletImpl!=nullptr && m_pTable!=nullptr;
#endif
break;
case HTML_IFRAME_ON:
InsertFloatingFrame();
- m_bCallNextToken = m_bInFloatingFrame && m_pTable!=0;
+ m_bCallNextToken = m_bInFloatingFrame && m_pTable!=nullptr;
break;
case HTML_LINEBREAK:
@@ -1441,7 +1441,7 @@ void SwHTMLParser::NextToken( int nToken )
if( !m_pTable && !m_pDoc->IsInHeaderFooter( m_pPam->GetPoint()->nNode ) )
{
NewAttr( &m_aAttrTab.pBreak, SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
- EndAttr( m_aAttrTab.pBreak, 0, false );
+ EndAttr( m_aAttrTab.pBreak, nullptr, false );
}
break;
@@ -1508,7 +1508,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_NOEMBED_ON:
m_bInNoEmbed = true;
- m_bCallNextToken = m_pTable!=0;
+ m_bCallNextToken = m_pTable!=nullptr;
ReadRawData( OOO_STRING_SVTOOLS_HTML_noembed );
break;
@@ -1579,7 +1579,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_MARQUEE_ON:
NewMarquee();
- m_bCallNextToken = m_pMarquee!=0 && m_pTable!=0;
+ m_bCallNextToken = m_pMarquee!=nullptr && m_pTable!=nullptr;
break;
case HTML_FORM_ON:
@@ -1855,7 +1855,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_SDFIELD_ON:
NewField();
- m_bCallNextToken = m_bInField && m_pTable!=0;
+ m_bCallNextToken = m_bInField && m_pTable!=nullptr;
break;
case HTML_EMPHASIS_OFF:
@@ -1907,9 +1907,9 @@ void SwHTMLParser::NextToken( int nToken )
SvxCSS1PropertyInfo aPropInfo;
OUString aDummy;
ParseStyleOptions( aDummy, aDummy, aDummy, aItemSet,
- aPropInfo, 0, &rDir );
+ aPropInfo, nullptr, &rDir );
- m_pCSS1Parser->SetPageDescAttrs( 0, &aItemSet );
+ m_pCSS1Parser->SetPageDescAttrs( nullptr, &aItemSet );
break;
}
}
@@ -1922,12 +1922,12 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_TEXTAREA_ON:
NewTextArea();
- m_bCallNextToken = m_bTextArea && m_pTable!=0;
+ m_bCallNextToken = m_bTextArea && m_pTable!=nullptr;
break;
case HTML_SELECT_ON:
NewSelect();
- m_bCallNextToken = m_bSelect && m_pTable!=0;
+ m_bCallNextToken = m_bSelect && m_pTable!=nullptr;
break;
case HTML_ANCHOR_ON:
@@ -1974,14 +1974,14 @@ void SwHTMLParser::NextToken( int nToken )
else
{
delete m_pImageMap;
- m_pImageMap = 0;
+ m_pImageMap = nullptr;
}
break;
case HTML_MAP_OFF:
// there is no ImageMap anymore (don't delete IMap, because it's
// already contained in the array!)
- m_pImageMap = 0;
+ m_pImageMap = nullptr;
break;
case HTML_AREA:
@@ -2546,7 +2546,7 @@ SwViewShell *SwHTMLParser::CallStartAction( SwViewShell *pVSh, bool bChkPtr )
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( !pVSh || !pOldVSh || pOldVSh == pVSh, "CallStartAction: Wer hat die SwViewShell ausgetauscht?" );
if( pOldVSh && !pVSh )
- pVSh = 0;
+ pVSh = nullptr;
#endif
}
m_pActionViewShell = pVSh;
@@ -2571,10 +2571,10 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr )
"CallEndAction: Wer hat die SwViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 0
if( m_pActionViewShell && !pVSh )
- pVSh = 0;
+ pVSh = nullptr;
#endif
if( pVSh != m_pActionViewShell )
- m_pActionViewShell = 0;
+ m_pActionViewShell = nullptr;
}
if( !m_pActionViewShell || (bChkAction && !m_pActionViewShell->ActionPend()) )
@@ -2623,7 +2623,7 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr )
}
SwViewShell *pVSh = m_pActionViewShell;
- m_pActionViewShell = 0;
+ m_pActionViewShell = nullptr;
return pVSh;
}
@@ -2635,10 +2635,10 @@ SwViewShell *SwHTMLParser::CheckActionViewShell()
"CheckActionViewShell: Wer hat die SwViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 0
if( m_pActionViewShell && !pVSh )
- pVSh = 0;
+ pVSh = nullptr;
#endif
if( pVSh != m_pActionViewShell )
- m_pActionViewShell = 0;
+ m_pActionViewShell = nullptr;
return m_pActionViewShell;
}
@@ -3008,7 +3008,7 @@ bool SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
// WIrd das zueltzt gestartete oder ein frueher gestartetes Attribut
// beendet?
- _HTMLAttr *pLast = 0;
+ _HTMLAttr *pLast = nullptr;
if( ppHead && pAttr != *ppHead )
{
// Es wird nicht das zuletzt gestartete Attribut beendet
@@ -3179,7 +3179,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
// Wird das zueltzt gestartete oder ein frueher gestartetes Attribut
// entfernt?
- _HTMLAttr *pLast = 0;
+ _HTMLAttr *pLast = nullptr;
if( ppHead && pAttr != *ppHead )
{
// Es wird nicht das zuletzt gestartete Attribut beendet
@@ -3244,7 +3244,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
pAttr = pAttr->GetNext();
}
- *pHTMLAttributes = 0;
+ *pHTMLAttributes = nullptr;
}
}
@@ -3289,7 +3289,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
for (auto nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; (++pHTMLAttributes, ++pSaveAttributes))
{
_HTMLAttr *pAttr = *pHTMLAttributes;
- *pSaveAttributes = 0;
+ *pSaveAttributes = nullptr;
while( pAttr )
{
_HTMLAttr *pNext = pAttr->GetNext();
@@ -3350,7 +3350,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pAttr = pNext;
}
- *pHTMLAttributes = 0;
+ *pHTMLAttributes = nullptr;
}
}
@@ -3393,7 +3393,7 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab,
pAttr = pAttr->GetNext();
}
- *pSaveAttributes = 0;
+ *pSaveAttributes = nullptr;
}
}
@@ -3756,7 +3756,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( !aFace.isEmpty() && !m_pCSS1Parser->IsIgnoreFontFamily() )
{
- const FontList *pFList = 0;
+ const FontList *pFList = nullptr;
SwDocShell *pDocSh = m_pDoc->GetDocShell();
if( pDocSh )
{
@@ -3777,7 +3777,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( !bFound && pFList )
{
sal_Handle hFont = pFList->GetFirstFontInfo( aFName );
- if( 0 != hFont )
+ if( nullptr != hFont )
{
const vcl::FontInfo& rFInfo = FontList::GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
@@ -3935,7 +3935,7 @@ void SwHTMLParser::NewPara()
PushContext( pCntxt );
// die aktuelle Vorlage oder deren Attribute setzen
- SetTextCollAttrs( !aClass.isEmpty() ? pCntxt : 0 );
+ SetTextCollAttrs( !aClass.isEmpty() ? pCntxt : nullptr );
// Laufbalkenanzeige
ShowStatline();
@@ -4086,7 +4086,7 @@ void SwHTMLParser::EndHeading()
AddParSpace();
// Kontext zu dem Token suchen und vom Stack holen
- _HTMLAttrContext *pCntxt = 0;
+ _HTMLAttrContext *pCntxt = nullptr;
auto nPos = m_aContexts.size();
while( !pCntxt && nPos>m_nContextStMin )
{
@@ -4419,7 +4419,7 @@ void SwHTMLParser::EndDefListItem( int nToken, bool bSetColl,
// Kontext zu dem Token suchen und vom Stack holen
nToken &= ~1;
- _HTMLAttrContext *pCntxt = 0;
+ _HTMLAttrContext *pCntxt = nullptr;
auto nPos = m_aContexts.size();
while( !pCntxt && nPos>m_nContextStMin )
{
@@ -4539,8 +4539,8 @@ const SwFormatColl *SwHTMLParser::GetCurrFormatColl() const
void SwHTMLParser::SetTextCollAttrs( _HTMLAttrContext *pContext )
{
- SwTextFormatColl *pCollToSet = 0; // die zu setzende Vorlage
- SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs
+ SwTextFormatColl *pCollToSet = nullptr; // die zu setzende Vorlage
+ SfxItemSet *pItemSet = nullptr; // der Set fuer harte Attrs
sal_uInt16 nTopColl = pContext ? pContext->GetTextFormatColl() : 0;
const OUString& rTopClass = pContext ? pContext->GetClass() : aEmptyOUStr;
sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT;
@@ -4747,7 +4747,7 @@ void SwHTMLParser::SetTextCollAttrs( _HTMLAttrContext *pContext )
NewAttr( &m_aAttrTab.pLRSpace, aLRItem );
m_aAttrTab.pLRSpace->SetLikePara();
m_aParaAttrs.push_back( m_aAttrTab.pLRSpace );
- EndAttr( m_aAttrTab.pLRSpace, 0, false );
+ EndAttr( m_aAttrTab.pLRSpace, nullptr, false );
}
}
@@ -4920,7 +4920,7 @@ void SwHTMLParser::InsertSpacer()
}
// einen Absatz-Abstand setzen
- SwTextNode *pTextNode = 0;
+ SwTextNode *pTextNode = nullptr;
if( !m_pPam->GetPoint()->nContent.GetIndex() )
{
// den unteren Absatz-Abstand des vorherigen Nodes aendern,
@@ -4948,7 +4948,7 @@ void SwHTMLParser::InsertSpacer()
else
{
NewAttr( &m_aAttrTab.pULSpace, SvxULSpaceItem( 0, (sal_uInt16)nSize, RES_UL_SPACE ) );
- EndAttr( m_aAttrTab.pULSpace, 0, false );
+ EndAttr( m_aAttrTab.pULSpace, nullptr, false );
AppendTextNode(); // nicht am Abstand drehen!
}
@@ -4981,7 +4981,7 @@ void SwHTMLParser::InsertSpacer()
aLRItem.SetTextFirstLineOfst( nIndent );
NewAttr( &m_aAttrTab.pLRSpace, aLRItem );
- EndAttr( m_aAttrTab.pLRSpace, 0, false );
+ EndAttr( m_aAttrTab.pLRSpace, nullptr, false );
}
else
{
@@ -5178,7 +5178,7 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_AFTER==aBreakItem.GetBreak() )
{
NewAttr( &m_aAttrTab.pBreak, aBreakItem );
- EndAttr( m_aAttrTab.pBreak, 0, false );
+ EndAttr( m_aAttrTab.pBreak, nullptr, false );
}
if( !bCleared && !bBreakItem )
@@ -5200,7 +5200,7 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() )
{
NewAttr( &m_aAttrTab.pBreak, aBreakItem );
- EndAttr( m_aAttrTab.pBreak, 0, false );
+ EndAttr( m_aAttrTab.pBreak, nullptr, false );
}
}
@@ -5450,8 +5450,8 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
bLikePara( false ),
bValid( true ),
nCount( 1 ),
- pNext( 0 ),
- pPrev( 0 ),
+ pNext( nullptr ),
+ pPrev( nullptr ),
ppHead( ppHd )
{
pItem = rItem.Clone();
@@ -5467,8 +5467,8 @@ _HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
bLikePara( rAttr.bLikePara ),
bValid( rAttr.bValid ),
nCount( rAttr.nCount ),
- pNext( 0 ),
- pPrev( 0 ),
+ pNext( nullptr ),
+ pPrev( nullptr ),
ppHead( ppHd )
{
pItem = rAttr.pItem->Clone();
@@ -5500,8 +5500,8 @@ void _HTMLAttr::Reset(const SwNodeIndex& rSttPara, sal_Int32 nSttCnt,
nEndContent = nSttCnt;
// den Head korrigieren und die Verkettungen aufheben
- pNext = 0;
- pPrev = 0;
+ pNext = nullptr;
+ pPrev = nullptr;
ppHead = ppHd;
}
@@ -5509,11 +5509,11 @@ void _HTMLAttr::InsertPrev( _HTMLAttr *pPrv )
{
OSL_ENSURE( !pPrv->pNext || pPrv->pNext == this,
"_HTMLAttr::InsertPrev: pNext falsch" );
- pPrv->pNext = 0;
+ pPrv->pNext = nullptr;
- OSL_ENSURE( 0 == pPrv->ppHead || ppHead == pPrv->ppHead,
+ OSL_ENSURE( nullptr == pPrv->ppHead || ppHead == pPrv->ppHead,
"_HTMLAttr::InsertPrev: ppHead falsch" );
- pPrv->ppHead = 0;
+ pPrv->ppHead = nullptr;
_HTMLAttr *pAttr = this;
while( pAttr->GetPrev() )
@@ -5543,7 +5543,7 @@ void SwHTMLParser::AddMetaUserDefined( OUString const & i_rMetaName )
(m_InfoNames[0].isEmpty() ? &m_InfoNames[0] :
(m_InfoNames[1].isEmpty() ? &m_InfoNames[1] :
(m_InfoNames[2].isEmpty() ? &m_InfoNames[2] :
- (m_InfoNames[3].isEmpty() ? &m_InfoNames[3] : 0 ))));
+ (m_InfoNames[3].isEmpty() ? &m_InfoNames[3] : nullptr ))));
if (pName)
{
(*pName) = i_rMetaName;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 8957feac177c..4429254e7489 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -88,7 +88,7 @@ class _HTMLAttr
_HTMLAttr **ppHead; // der Listenkopf
_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
- _HTMLAttr **pHd=0 );
+ _HTMLAttr **pHd=nullptr );
_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
sal_Int32 nEndCnt, _HTMLAttr **pHd );
@@ -122,7 +122,7 @@ public:
_HTMLAttr *GetPrev() const { return pPrev; }
void InsertPrev( _HTMLAttr *pPrv );
- void ClearPrev() { pPrev = 0; }
+ void ClearPrev() { pPrev = nullptr; }
void SetHead( _HTMLAttr **ppHd ) { ppHead = ppHd; }
@@ -233,8 +233,8 @@ public:
_HTMLAttrContext( sal_uInt16 nTokn, sal_uInt16 nPoolId, const OUString& rClass,
bool bDfltColl=false ) :
aClass( rClass ),
- pSaveDocContext( 0 ),
- pFrmItemSet( 0 ),
+ pSaveDocContext( nullptr ),
+ pFrmItemSet( nullptr ),
nToken( nTokn ),
nTextFormatColl( nPoolId ),
nLeftMargin( 0 ),
@@ -255,8 +255,8 @@ public:
{}
explicit _HTMLAttrContext( sal_uInt16 nTokn ) :
- pSaveDocContext( 0 ),
- pFrmItemSet( 0 ),
+ pSaveDocContext( nullptr ),
+ pFrmItemSet( nullptr ),
nToken( nTokn ),
nTextFormatColl( 0 ),
nLeftMargin( 0 ),
@@ -305,7 +305,7 @@ public:
void SetPopStack( bool bSet ) { bPopStack = bSet; }
bool GetPopStack() const { return bPopStack; }
- bool HasSaveDocContext() const { return pSaveDocContext!=0; }
+ bool HasSaveDocContext() const { return pSaveDocContext!=nullptr; }
_HTMLAttrContext_SaveDoc *GetSaveDocContext( bool bCreate=false );
const SfxItemSet *GetFrmItemSet() const { return pFrmItemSet; }
@@ -484,7 +484,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void DocumentDetected();
void Show();
void ShowStatline();
- SwViewShell *CallStartAction( SwViewShell *pVSh = 0, bool bChkPtr = true );
+ SwViewShell *CallStartAction( SwViewShell *pVSh = nullptr, bool bChkPtr = true );
SwViewShell *CallEndAction( bool bChkAction = false, bool bChkPtr = true );
SwViewShell *CheckActionViewShell();
@@ -493,7 +493,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// Attribute am Dok setzen
void _SetAttr( bool bChkEnd, bool bBeforeTable, _HTMLAttrs *pPostIts );
inline void SetAttr( bool bChkEnd = true, bool bBeforeTable = false,
- _HTMLAttrs *pPostIts = 0 )
+ _HTMLAttrs *pPostIts = nullptr )
{
if( !m_aSetAttrTab.empty() || !m_aMoveFlyFrms.empty() )
_SetAttr( bChkEnd, bBeforeTable, pPostIts );
@@ -509,7 +509,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// ppDepAttr gibt einen Attribut-Tabellen-Eintrag an, dessen Attribute
// gesetzt sein muessen, bevor das Attribut beendet werden darf
void NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem );
- bool EndAttr( _HTMLAttr *pAttr, _HTMLAttr **ppDepAttr=0,
+ bool EndAttr( _HTMLAttr *pAttr, _HTMLAttr **ppDepAttr=nullptr,
bool bChkEmpty=true );
void DeleteAttr( _HTMLAttr* pAttr );
@@ -552,7 +552,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// Verwalten von Absatz-Vorlagen
// die Vorlagen auf dem Stack bzw. deren Attribute setzen
- void SetTextCollAttrs( _HTMLAttrContext *pContext = 0 );
+ void SetTextCollAttrs( _HTMLAttrContext *pContext = nullptr );
void InsertParaAttrs( const SfxItemSet& rItemSet );
@@ -606,7 +606,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void NewMultiCol( sal_uInt16 columnsFromCss=0 );
// <MARQUEE>
- void NewMarquee( HTMLTable *pCurTable=0 );
+ void NewMarquee( HTMLTable *pCurTable=nullptr );
void EndMarquee();
void InsertMarqueeText();
@@ -633,8 +633,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void NewStdAttr( int nToken );
void NewStdAttr( int nToken,
_HTMLAttr **ppAttr, const SfxPoolItem & rItem,
- _HTMLAttr **ppAttr2=0, const SfxPoolItem *pItem2=0,
- _HTMLAttr **ppAttr3=0, const SfxPoolItem *pItem3=0 );
+ _HTMLAttr **ppAttr2=nullptr, const SfxPoolItem *pItem2=nullptr,
+ _HTMLAttr **ppAttr3=nullptr, const SfxPoolItem *pItem3=nullptr );
void EndTag( int nToken );
// Font-Attribute behandeln
@@ -731,8 +731,8 @@ private:
// eine Bookmark einfuegen
void InsertBookmark( const OUString& rName );
- void InsertCommentText( const sal_Char *pTag = 0 );
- void InsertComment( const OUString& rName, const sal_Char *pTag = 0 );
+ void InsertCommentText( const sal_Char *pTag = nullptr );
+ void InsertComment( const OUString& rName, const sal_Char *pTag = nullptr );
// sind im aktuellen Absatz Bookmarks vorhanden?
bool HasCurrentParaBookmarks( bool bIgnoreStack=false ) const;
@@ -756,12 +756,12 @@ private:
void EndStyle();
static inline bool HasStyleOptions( const OUString &rStyle, const OUString &rId,
- const OUString &rClass, const OUString *pLang=0,
- const OUString *pDir=0 );
+ const OUString &rClass, const OUString *pLang=nullptr,
+ const OUString *pDir=nullptr );
bool ParseStyleOptions( const OUString &rStyle, const OUString &rId,
const OUString &rClass, SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
- const OUString *pLang=0, const OUString *pDir=0 );
+ const OUString *pLang=nullptr, const OUString *pDir=nullptr );
// Inserting Controls and Forms (htmlform.cxx)
@@ -890,7 +890,7 @@ public:
const OUString& rFileName,
const OUString& rBaseURL,
bool bReadNewDoc = true,
- SfxMedium* pMed = 0, bool bReadUTF8 = false,
+ SfxMedium* pMed = nullptr, bool bReadUTF8 = false,
bool bIgnoreHTMLComments = false );
virtual SvParserState CallParser() override;
@@ -916,7 +916,7 @@ struct SwPendingStack
SwPendingStack* pNext;
SwPendingStack( int nTkn, SwPendingStack* pNxt )
- : nToken( nTkn ), pData( 0 ), pNext( pNxt )
+ : nToken( nTkn ), pData( nullptr ), pNext( pNxt )
{}
};
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 2f9fd0936cc9..28f7c8f23786 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -91,18 +91,18 @@ static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] =
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL )
- : m_pHTMLPosFlyFrms(NULL)
+ : m_pHTMLPosFlyFrms(nullptr)
, m_pNumRuleInfo(new SwHTMLNumRuleInfo)
- , m_pNextNumRuleInfo(NULL)
+ , m_pNextNumRuleInfo(nullptr)
, m_nHTMLMode(0)
, m_eCSS1Unit(FUNIT_NONE)
- , m_pFootEndNotes(NULL)
+ , m_pFootEndNotes(nullptr)
, mxFormComps()
- , m_pTemplate(NULL)
- , m_pDfltColor(NULL)
- , m_pStartNdIdx(NULL)
- , m_pCurrPageDesc(NULL)
- , m_pFormatFootnote(NULL)
+ , m_pTemplate(nullptr)
+ , m_pDfltColor(nullptr)
+ , m_pStartNdIdx(nullptr)
+ , m_pCurrPageDesc(nullptr)
+ , m_pFormatFootnote(nullptr)
, m_nWarn(0)
, m_nLastLFPos(0)
, m_nLastParaToken(0)
@@ -169,7 +169,7 @@ SwHTMLWriter::~SwHTMLWriter()
void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium)
{
const SfxItemSet* pSet = rMedium.GetItemSet();
- if (pSet == NULL)
+ if (pSet == nullptr)
return;
const SfxPoolItem* pItem;
@@ -204,7 +204,7 @@ sal_uLong SwHTMLWriter::WriteStream()
// ueberhaupt Styles ausgeben
// (dann auch obere und untere Absatz-Abstaende)
m_nExportMode = rHtmlOptions.GetExportMode();
- m_nHTMLMode = GetHtmlMode(0);
+ m_nHTMLMode = GetHtmlMode(nullptr);
if( HTML_CFG_WRITER == m_nExportMode || HTML_CFG_NS40 == m_nExportMode )
m_nHTMLMode |= HTMLMODE_BLOCK_SPACER;
@@ -281,9 +281,9 @@ sal_uLong SwHTMLWriter::WriteStream()
::StartProgress( STR_STATSTR_W4WWRITE, 0, pDoc->GetNodes().Count(),
pDoc->GetDocShell());
- m_pDfltColor = 0;
- m_pFootEndNotes = 0;
- m_pFormatFootnote = 0;
+ m_pDfltColor = nullptr;
+ m_pFootEndNotes = nullptr;
+ m_pFormatFootnote = nullptr;
m_bOutTable = m_bOutHeader = m_bOutFooter = m_bOutFlyFrame = false;
mxFormComps.clear();
m_nFormCntrlCnt = 0;
@@ -327,7 +327,7 @@ sal_uLong SwHTMLWriter::WriteStream()
m_nWarn = 0;
GetNumInfo().Clear();
- m_pNextNumRuleInfo = 0;
+ m_pNextNumRuleInfo = nullptr;
OString aStartTags;
@@ -378,7 +378,7 @@ sal_uLong SwHTMLWriter::WriteStream()
// Tabelle fuer die freifliegenden Rahmen erzeugen, aber nur wenn
// das gesamte Dokument geschrieben wird
- m_pHTMLPosFlyFrms = 0;
+ m_pHTMLPosFlyFrms = nullptr;
CollectFlyFrms();
m_nLastParaToken = 0;
GetControls();
@@ -443,7 +443,7 @@ sal_uLong SwHTMLWriter::WriteStream()
{
m_pHTMLPosFlyFrms->DeleteAndDestroyAll();
delete m_pHTMLPosFlyFrms;
- m_pHTMLPosFlyFrms = 0;
+ m_pHTMLPosFlyFrms = nullptr;
}
m_aHTMLControls.DeleteAndDestroyAll();
@@ -469,17 +469,17 @@ sal_uLong SwHTMLWriter::WriteStream()
m_aScriptTextStyles.clear();
delete m_pDfltColor;
- m_pDfltColor = 0;
+ m_pDfltColor = nullptr;
delete m_pStartNdIdx;
- m_pStartNdIdx = 0;
+ m_pStartNdIdx = nullptr;
mxFormComps.clear();
OSL_ENSURE( !m_pFootEndNotes,
"SwHTMLWriter::Write: Footnotes nicht durch OutFootEndNotes geloescht" );
- m_pCurrPageDesc = 0;
+ m_pCurrPageDesc = nullptr;
ClearNextNumInfo();
@@ -513,7 +513,7 @@ sal_uLong SwHTMLWriter::WriteStream()
if( 0 == m_pTemplate->release() )
delete m_pTemplate;
- m_pTemplate = 0;
+ m_pTemplate = nullptr;
}
return m_nWarn;
@@ -522,7 +522,7 @@ sal_uLong SwHTMLWriter::WriteStream()
static const SwFormatCol *lcl_html_GetFormatCol( const SwSection& rSection,
const SwSectionFormat& rFormat )
{
- const SwFormatCol *pCol = 0;
+ const SwFormatCol *pCol = nullptr;
const SfxPoolItem* pItem;
if( FILE_LINK_SECTION != rSection.GetType() &&
@@ -684,10 +684,10 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
bool bStartTag = true;
bool bEndTag = true;
- const SwSectionFormat *pSurrFormat = 0;
- const SwSectionNode *pSurrSectNd = 0;
- const SwSection *pSurrSection = 0;
- const SwFormatCol *pSurrCol = 0;
+ const SwSectionFormat *pSurrFormat = nullptr;
+ const SwSectionNode *pSurrSectNd = nullptr;
+ const SwSection *pSurrSection = nullptr;
+ const SwFormatCol *pSurrCol = nullptr;
sal_uInt32 nSectSttIdx = rSectNd.GetIndex();
sal_uInt32 nSectEndIdx = rSectNd.EndOfSectionIndex();
@@ -792,7 +792,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
}
else if( rNd.IsTableNode() )
{
- OutHTML_SwTableNode( *this, *rNd.GetTableNode(), 0 );
+ OutHTML_SwTableNode( *this, *rNd.GetTableNode(), nullptr );
m_nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1;
}
else if( rNd.IsSectionNode() )
@@ -833,16 +833,16 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
static void OutBodyColor( const sal_Char* pTag, const SwFormat *pFormat,
SwHTMLWriter& rHWrt )
{
- const SwFormat *pRefFormat = 0;
+ const SwFormat *pRefFormat = nullptr;
if( rHWrt.m_pTemplate )
pRefFormat = SwHTMLWriter::GetTemplateFormat( pFormat->GetPoolFormatId(),
&rHWrt.m_pTemplate->getIDocumentStylePoolAccess() );
- const SvxColorItem *pColorItem = 0;
+ const SvxColorItem *pColorItem = nullptr;
const SfxItemSet& rItemSet = pFormat->GetAttrSet();
- const SfxPoolItem *pRefItem = 0, *pItem = 0;
+ const SfxPoolItem *pRefItem = nullptr, *pItem = nullptr;
bool bItemSet = SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
true, &pItem);
bool bRefItemSet = pRefFormat &&
@@ -900,9 +900,9 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex();
sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
- SwTextNode *pTextNd = 0;
+ SwTextNode *pTextNd = nullptr;
while( nIdx<=nEndIdx &&
- 0==(pTextNd=pDoc->GetNodes()[nIdx]->GetTextNode()) )
+ nullptr==(pTextNd=pDoc->GetNodes()[nIdx]->GetTextNode()) )
nIdx++;
OSL_ENSURE( pTextNd, "Kein Text-Node gefunden" );
@@ -980,7 +980,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
OutFootEndNoteInfo();
}
- const SwPageDesc *pPageDesc = 0;
+ const SwPageDesc *pPageDesc = nullptr;
// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
// exportiert und wenn keine gesetzt ist die Standard-Vorlage
@@ -1081,7 +1081,7 @@ void SwHTMLWriter::OutAnchor( const OUString& rName )
void SwHTMLWriter::OutBookmarks()
{
// hole das aktuelle Bookmark
- const ::sw::mark::IMark* pBookmark = NULL;
+ const ::sw::mark::IMark* pBookmark = nullptr;
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
if(m_nBkmkTabPos != -1)
pBookmark = (pMarkAccess->getAllMarksBegin() + m_nBkmkTabPos)->get();
@@ -1410,14 +1410,14 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt,
: rWrt(rWriter)
, pOldPam(rWrt.pCurPam)
, pOldEnd(rWrt.GetEndPaM())
- , pOldNumRuleInfo(0)
- , pOldNextNumRuleInfo(0)
+ , pOldNumRuleInfo(nullptr)
+ , pOldNextNumRuleInfo(nullptr)
, nOldDefListLvl(rWrt.m_nDefListLvl)
, nOldDirection(rWrt.m_nDirection)
, bOldOutHeader(rWrt.m_bOutHeader)
, bOldOutFooter(rWrt.m_bOutFooter)
, bOldOutFlyFrame(rWrt.m_bOutFlyFrame)
- , pOldFlyFormat(NULL)
+ , pOldFlyFormat(nullptr)
{
bOldWriteAll = rWrt.bWriteAll;
@@ -1444,7 +1444,7 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt,
{
pOldNumRuleInfo = new SwHTMLNumRuleInfo( rWrt.GetNumInfo() );
pOldNextNumRuleInfo = rWrt.GetNextNumInfo();
- rWrt.SetNextNumInfo( 0 );
+ rWrt.SetNextNumInfo( nullptr );
}
else
{
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index f8dc35c01000..9a2704af74a4 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -230,8 +230,8 @@ struct SwHTMLFormatInfo
// Konstruktor fuer einen Dummy zum Suchen
explicit SwHTMLFormatInfo( const SwFormat *pF ) :
pFormat( pF ),
- pRefFormat(0),
- pItemSet( 0 ),
+ pRefFormat(nullptr),
+ pItemSet( nullptr ),
nLeftMargin( 0 ),
nRightMargin( 0 ),
nFirstLineIndent(0),
@@ -417,11 +417,11 @@ public:
// gebe die evt. an der akt. Position stehenden FlyFrame aus.
bool OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx,
- sal_uInt8 nPos, HTMLOutContext *pContext = 0 );
+ sal_uInt8 nPos, HTMLOutContext *pContext = nullptr );
void OutFrameFormat( sal_uInt8 nType, const SwFrameFormat& rFormat,
const SdrObject *pSdrObj );
- void OutForm( bool bTagOn=true, const SwStartNode *pStNd=0 );
+ void OutForm( bool bTagOn=true, const SwStartNode *pStNd=nullptr );
void OutHiddenForms();
void OutHiddenForm( const css::uno::Reference<css::form::XForm>& rForm );
@@ -478,8 +478,8 @@ public:
void OutCSS1_TableCellBorderHack(const SwFrameFormat& rFrameFormat);
void OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol );
void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, sal_uInt32 nFrmOpts,
- const SdrObject *pSdrObj=0,
- const SfxItemSet *pItemSet=0 );
+ const SdrObject *pSdrObj=nullptr,
+ const SfxItemSet *pItemSet=nullptr );
void OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFormat );
void ChangeParaToken( sal_uInt16 nNew );
@@ -534,7 +534,7 @@ public:
static const SdrObject* GetMarqueeTextObj( const SwDrawFrameFormat& rFormat );
static sal_uInt16 GetCSS1Selector( const SwFormat *pFormat, OString& rToken,
OUString& rClass, sal_uInt16& rRefPoolId,
- OUString *pPseudo=0 );
+ OUString *pPseudo=nullptr );
static const SwFormat *GetTemplateFormat( sal_uInt16 nPoolId, IDocumentStylePoolAccess* /*SwDoc*/ pTemplate );
static const SwFormat *GetParentFormat( const SwFormat& rFormat, sal_uInt16 nDeep );
@@ -543,7 +543,7 @@ public:
const SfxItemSet& rRefItemSet,
bool bSetDefaults,
bool bClearSame = true,
- const SfxItemSet *pRefScriptItemSet=0 );
+ const SfxItemSet *pRefScriptItemSet=nullptr );
static bool HasScriptDependentItems( const SfxItemSet& rItemSet,
bool bCheckDropCap );
@@ -590,19 +590,19 @@ inline bool SwHTMLWriter::IsCSS1Script( sal_uInt16 n ) const
inline void SwHTMLWriter::OutCSS1_PropertyAscii( const sal_Char *pProp,
const sal_Char *pVal )
{
- OutCSS1_Property( pProp, pVal, 0 );
+ OutCSS1_Property( pProp, pVal, nullptr );
}
inline void SwHTMLWriter::OutCSS1_PropertyAscii( const sal_Char *pProp,
const OString& rVal )
{
- OutCSS1_Property( pProp, rVal.getStr(), 0 );
+ OutCSS1_Property( pProp, rVal.getStr(), nullptr );
}
inline void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
const OUString& rVal )
{
- OutCSS1_Property( pProp, 0, &rVal );
+ OutCSS1_Property( pProp, nullptr, &rVal );
}
// Struktur speichert die aktuellen Daten des Writers zwischen, um
@@ -628,7 +628,7 @@ struct HTMLSaveData
HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd,
bool bSaveNum=true,
- const SwFrameFormat *pFrameFormat=0 );
+ const SwFrameFormat *pFrameFormat=nullptr );
~HTMLSaveData();
};
@@ -640,7 +640,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rForma
Writer& OutHTML_SwTextNode( Writer&, const SwContentNode& );
Writer& OutHTML_SwTableNode( Writer& , SwTableNode &, const SwFrameFormat *,
- const OUString* pCaption=0, bool bTopCaption=false );
+ const OUString* pCaption=nullptr, bool bTopCaption=false );
Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, const SwDrawFrameFormat& rFormat,
const SdrUnoObj& rSdrObj, bool bInCntnr );
@@ -653,8 +653,8 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat,
Writer& OutHTML_Image( Writer&, const SwFrameFormat& rFormat,
Graphic& rGraphic, const OUString& rAlternateText,
const Size& rRealSize, sal_uInt32 nFrmOpts,
- const sal_Char *pMarkType = 0,
- const ImageMap *pGenImgMap = 0 );
+ const sal_Char *pMarkType = nullptr,
+ const ImageMap *pGenImgMap = nullptr );
Writer& OutHTML_BulletImage( Writer& rWrt, const sal_Char *pTag,
const SvxBrushItem* pBrush );
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 572baff5eba0..002990df6143 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -178,7 +178,7 @@ public:
void StealAttr(const SwNodeIndex& rNode, sal_uInt16 nAttrId = 0);
void MarkAllAttrsOld();
void KillUnlockedAttrs(const SwPosition& pPos);
- SfxPoolItem* GetFormatStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
+ SfxPoolItem* GetFormatStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = nullptr);
const SfxPoolItem* GetOpenStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
void Delete(const SwPaM &rPam);
@@ -203,7 +203,7 @@ public:
// "pure virtual Methoden" vom SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
void SetFrameFormat(SwFrameFormat * _pFrameFormat);
const SwFrameFormat* GetFrameFormat() const { return pFrameFormat;}
SwFrameFormat* GetFrameFormat() { return pFrameFormat;}
@@ -234,7 +234,7 @@ public:
const DateTime& rStamp_,
RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT,
sal_uInt16 nAutorNoPrev_ = USHRT_MAX,
- const DateTime* pStampPrev_ = 0)
+ const DateTime* pStampPrev_ = nullptr)
: SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_),
aStampPrev( DateTime::EMPTY ),
eType(eType_),
@@ -255,7 +255,7 @@ public:
{}
// "pure virtual Methoden" vom SfxPoolItem
virtual bool operator==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
};
class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
@@ -276,7 +276,7 @@ public:
// "pure virtual Methoden" vom SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
long GetHandle() const { return mnHandle; }
const OUString& GetName() const { return maName; }
@@ -298,7 +298,7 @@ public:
SwFltTOX(const SwFltTOX&);
// "pure virtual Methoden" vom SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
SwTOXBase* GetBase() { return pTOXBase; }
void SetHadBreakItem( bool bVal ) { bHadBreakItem = bVal; }
void SetHadPageDescItem( bool bVal ) { bHadPageDescItem = bVal; }
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 429e3f65b20e..7e2ef5ebcfec 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -49,7 +49,7 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP
// We want to work in an empty paragraph.
// Step 1: XTextRange will be updated when content is inserted, so we know
// the end position.
- const uno::Reference<text::XTextRange> xInsertPosition = SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), 0);
+ const uno::Reference<text::XTextRange> xInsertPosition = SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), nullptr);
std::shared_ptr<SwNodeIndex> pSttNdIdx(new SwNodeIndex(rDoc.GetNodes()));
const SwPosition* pPos = rPam.GetPoint();
@@ -75,7 +75,7 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP
xImporter->setTargetDocument(xDstDoc);
const uno::Reference<text::XTextRange> xInsertTextRange =
- SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), 0);
+ SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), nullptr);
uno::Reference<document::XFilter> xFilter(xInterface, uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aDescriptor(3);
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 0274d5b35959..6eff01aecd90 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -74,7 +74,7 @@ struct Writer_Impl
};
Writer_Impl::Writer_Impl()
- : m_pStream(0)
+ : m_pStream(nullptr)
{
}
@@ -119,7 +119,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
Writer::Writer()
: m_pImpl(o3tl::make_unique<Writer_Impl>())
- , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0)
+ , pOrigPam(nullptr), pOrigFileName(nullptr), pDoc(nullptr), pCurPam(nullptr)
{
bWriteAll = bShowProgress = bUCS2_WithStartChar = true;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
@@ -151,9 +151,9 @@ void Writer::ResetWriter()
delete pCurPam->GetNext();
delete pCurPam;
}
- pCurPam = 0;
- pOrigFileName = 0;
- pDoc = 0;
+ pCurPam = nullptr;
+ pOrigFileName = nullptr;
+ pDoc = nullptr;
bShowProgress = bUCS2_WithStartChar = true;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
@@ -200,7 +200,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
SwNodeIndex aStt( *pNds, nStartIdx );
SwContentNode* pCNode = aStt.GetNode().GetContentNode();
- if( !pCNode && 0 == pNds->GoNext( &aStt ) )
+ if( !pCNode && nullptr == pNds->GoNext( &aStt ) )
{
OSL_FAIL( "No more ContentNode at StartPos" );
}
@@ -320,7 +320,7 @@ void Writer::PutNumFormatFontsInAttrPool()
if( SVX_NUM_CHAR_SPECIAL == (pFormat = &pRule->Get( nLvl ))->GetNumberingType() ||
SVX_NUM_BITMAP == pFormat->GetNumberingType() )
{
- if( 0 == ( pFont = pFormat->GetBulletFont() ) )
+ if( nullptr == ( pFont = pFormat->GetBulletFont() ) )
pFont = pDefFont;
if( bCheck )
@@ -356,12 +356,12 @@ void Writer::_AddFontItems( SfxItemPool& rPool, sal_uInt16 nW )
const SvxFontItem* pFont = static_cast<const SvxFontItem*>(&rPool.GetDefaultItem( nW ));
_AddFontItem( rPool, *pFont );
- if( 0 != ( pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem( nW ))) )
+ if( nullptr != ( pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem( nW ))) )
_AddFontItem( rPool, *pFont );
sal_uInt32 nMaxItem = rPool.GetItemCount2( nW );
for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = static_cast<const SvxFontItem*>(rPool.GetItem2( nW, nGet ))) )
+ if( nullptr != (pFont = static_cast<const SvxFontItem*>(rPool.GetItem2( nW, nGet ))) )
_AddFontItem( rPool, *pFont );
}
@@ -448,7 +448,7 @@ sal_uLong StgWriter::WriteStream()
sal_uLong StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName )
{
- SetStream(0);
+ SetStream(nullptr);
pStg = &rStg;
pDoc = rPaM.GetDoc();
pOrigFileName = pFName;
@@ -460,7 +460,7 @@ sal_uLong StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFNam
sal_uLong nRet = WriteStorage();
- pStg = NULL;
+ pStg = nullptr;
ResetWriter();
return nRet;
@@ -468,8 +468,8 @@ sal_uLong StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFNam
sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const OUString* pFName, SfxMedium* pMedium )
{
- SetStream(0);
- pStg = 0;
+ SetStream(nullptr);
+ pStg = nullptr;
xStg = rStg;
pDoc = rPaM.GetDoc();
pOrigFileName = pFName;
@@ -481,7 +481,7 @@ sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage
sal_uLong nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
- pStg = NULL;
+ pStg = nullptr;
ResetWriter();
return nRet;
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index de5a7c17e1bc..48adecc576c4 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -30,7 +30,7 @@ Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
sal_uInt16 nId = rHt.Which();
OSL_ENSURE( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
FnAttrOut pOut;
- if( 0 != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
+ if( nullptr != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
(*pOut)( rWrt, rHt );
return rWrt;
@@ -47,12 +47,12 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
{
if( !bDeep )
return rWrt;
- while( 0 != ( pSet = pSet->GetParent() ) && !pSet->Count() )
+ while( nullptr != ( pSet = pSet->GetParent() ) && !pSet->Count() )
;
if( !pSet )
return rWrt;
}
- const SfxPoolItem* pItem(0);
+ const SfxPoolItem* pItem(nullptr);
FnAttrOut pOut;
if( !bDeep || !pSet->GetParent() )
{
@@ -61,9 +61,9 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
pItem = aIter.GetCurItem();
do {
// pTab only covers POOLATTR_BEGIN..POOLATTR_END.
- if( pItem->Which() <= POOLATTR_END && 0 != ( pOut = pTab[ pItem->Which() - RES_CHRATR_BEGIN] ))
+ if( pItem->Which() <= POOLATTR_END && nullptr != ( pOut = pTab[ pItem->Which() - RES_CHRATR_BEGIN] ))
(*pOut)( rWrt, *pItem );
- } while( !aIter.IsAtEnd() && 0 != ( pItem = aIter.NextItem() ) );
+ } while( !aIter.IsAtEnd() && nullptr != ( pItem = aIter.NextItem() ) );
}
else
{
@@ -76,7 +76,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
*pItem != rPool.GetDefaultItem( nWhich )
|| ( pSet->GetParent() &&
*pItem != pSet->GetParent()->Get( nWhich ))
- )) && 0 != ( pOut = pTab[ nWhich - RES_CHRATR_BEGIN] ))
+ )) && nullptr != ( pOut = pTab[ nWhich - RES_CHRATR_BEGIN] ))
(*pOut)( rWrt, *pItem );
nWhich = aIter.NextWhich();
}
@@ -108,7 +108,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
break;
}
FnNodeOut pOut;
- if( 0 != ( pOut = pTab[ nId - RES_NODE_BEGIN ] ))
+ if( nullptr != ( pOut = pTab[ nId - RES_NODE_BEGIN ] ))
(*pOut)( rWrt, *pCNd );
return rWrt;
}
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 0dadce9a5b1b..a9475d2e68b6 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -52,7 +52,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
}
SwWriteTableRow::SwWriteTableRow( long nPosition, bool bUseLayoutHeights )
- : pBackground(0), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
+ : pBackground(nullptr), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
nTopBorder(USHRT_MAX), nBottomBorder(USHRT_MAX), bTopBorder(true),
bBottomBorder(true)
{
@@ -174,17 +174,17 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
{
if( !pRow->GetBackground() )
pRow->SetBackground( static_cast<const SvxBrushItem *>(pItem) );
- pItem = 0;
+ pItem = nullptr;
}
return static_cast<const SvxBrushItem *>(pItem);
}
pBox = pLine->GetUpper();
- pLine = pBox ? pBox->GetUpper() : 0;
+ pLine = pBox ? pBox->GetUpper() : nullptr;
}
- return 0;
+ return nullptr;
}
void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
@@ -362,7 +362,7 @@ long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow,
// Additional subtract in the first column CELLSPACING and
// line thickness once again.
- const SwWriteTableRow *pRow = 0;
+ const SwWriteTableRow *pRow = nullptr;
if( nRow==0 )
{
nRawHeight -= nCellSpacing;
@@ -607,7 +607,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
if( bOutAtRow )
{
pRow->SetBackground( pLineBrush );
- pBrushItem = 0;
+ pBrushItem = nullptr;
}
else
pBrushItem = pLineBrush;
@@ -615,7 +615,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
else
{
pRow->SetBackground( pLineBrush );
- pBrushItem = 0;
+ pBrushItem = nullptr;
}
const SwTableBoxes::size_type nBoxes = rBoxes.size();
@@ -750,7 +750,7 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, lo
// and is highly coupled to CollectTableRowsCols - sadly.
bUseLayoutHeights = true;
// And now fill with life
- FillTableRowsCols( 0, 0, 0, 0, 0, nParentWidth, rLines, 0, nMaxDepth - 1, static_cast< sal_uInt16 >(nNumOfRowsToRepeat) );
+ FillTableRowsCols( 0, 0, 0, 0, 0, nParentWidth, rLines, nullptr, nMaxDepth - 1, static_cast< sal_uInt16 >(nNumOfRowsToRepeat) );
// Adjust some Twip values to pixel boundaries
if( !nBorder )
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 3f4b08b04063..92640e340f90 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -44,8 +44,8 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent)
, mbEndOfCell(false)
, mbFirstInTable(false)
, mbVertMerge(false)
-, mpTableBox(NULL)
-, mpTable(NULL)
+, mpTableBox(nullptr)
+, mpTable(nullptr)
{
}
@@ -129,9 +129,9 @@ void WW8TableNodeInfoInner::setRect(const SwRect & rRect)
const SwNode * WW8TableNodeInfoInner::getNode() const
{
- const SwNode * pResult = NULL;
+ const SwNode * pResult = nullptr;
- if (mpParent != NULL)
+ if (mpParent != nullptr)
pResult = mpParent->getNode();
return pResult;
@@ -144,7 +144,7 @@ TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow()
WW8TableCellGrid::Pointer_t pCellGrid =
mpParent->getParent()->getCellGridForTable(getTable(), false);
- if (pCellGrid.get() == NULL)
+ if (pCellGrid.get() == nullptr)
{
const SwTableLine * pTabLine = getTableBox()->GetUpper();
const SwTableBoxes & rTableBoxes = pTabLine->GetTabBoxes();
@@ -238,7 +238,7 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows()
WW8TableCellGrid::Pointer_t pCellGrid =
mpParent->getParent()->getCellGridForTable(getTable(), false);
- if (pCellGrid.get() == NULL)
+ if (pCellGrid.get() == nullptr)
{
const SwTable * pTable = getTable();
const SwTableLines& rTableLines = pTable->GetTabLines();
@@ -297,7 +297,7 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
WW8TableCellGrid::Pointer_t pCellGrid =
mpParent->getParent()->getCellGridForTable(getTable(), false);
- if (pCellGrid.get() == NULL)
+ if (pCellGrid.get() == nullptr)
{
const SwTableBox * pTabBox = getTableBox();
const SwTableLine * pTabLine = pTabBox->GetUpper();
@@ -330,7 +330,7 @@ RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow()
WW8TableCellGrid::Pointer_t pCellGrid =
mpParent->getParent()->getCellGridForTable(getTable(), false);
- if (pCellGrid.get() == NULL)
+ if (pCellGrid.get() == nullptr)
{
const SwTableBox * pTabBox = getTableBox();
const SwTableLine * pTabLine = pTabBox->GetUpper();
@@ -383,8 +383,8 @@ WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent,
: mpParent(pParent),
mnDepth(0),
mpNode(pNode),
- mpNext(NULL),
- mpNextNode(NULL)
+ mpNext(nullptr),
+ mpNextNode(nullptr)
{
}
@@ -593,7 +593,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable, RowEndInners_t &rLa
const SwTableBox * pTableBox = aTableCellInfo.getTableBox();
const SwStartNode * pSttNd = pTableBox->GetSttNd();
- if (pSttNd != NULL)
+ if (pSttNd != nullptr)
{
SwPaM aPam(*pSttNd, 0);
@@ -628,7 +628,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
SAL_INFO( "sw.ww8", "<processSwTable>" );
- WW8TableNodeInfo * pPrev = NULL;
+ WW8TableNodeInfo * pPrev = nullptr;
RowEndInners_t aLastRowEnds;
if (pTable->IsTableComplex() && pTable->HasLayout())
@@ -834,7 +834,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable,
}
while (!bDone);
- if (pEndOfCellInfo.get() != NULL)
+ if (pEndOfCellInfo.get() != nullptr)
{
pEndOfCellInfo->setEndOfCell(true);
@@ -862,7 +862,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
{
WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode);
- if (pNodeInfo.get() == NULL)
+ if (pNodeInfo.get() == nullptr)
{
pNodeInfo =
WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(this, pNode));
@@ -935,21 +935,21 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::getTableNodeInfo
const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode)
{
- const SwNode * pResult = NULL;
+ const SwNode * pResult = nullptr;
WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode);
- if (pNodeInfo.get() != NULL)
+ if (pNodeInfo.get() != nullptr)
{
WW8TableNodeInfo * pNextInfo = pNodeInfo->getNext();
- if (pNextInfo != NULL)
+ if (pNextInfo != nullptr)
pResult = pNextInfo->getNode();
else
{
const SwNode * pNextNode = pNodeInfo->getNextNode();
- if (pNextNode != NULL)
+ if (pNextNode != nullptr)
pResult = pNextNode;
}
}
@@ -961,9 +961,9 @@ bool WW8TableNodeInfo::operator < (const WW8TableNodeInfo & rInfo) const
{
bool bRet = false;
- if (rInfo.mpNode != NULL)
+ if (rInfo.mpNode != nullptr)
{
- if (mpNode == NULL)
+ if (mpNode == nullptr)
{
bRet = true;
}
@@ -999,7 +999,7 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const
{
if (aCellInfo.getTableNodeInfo())
{
- if (m_pNodeInfo == NULL)
+ if (m_pNodeInfo == nullptr)
aRet = true;
else
{
@@ -1102,7 +1102,7 @@ void WW8TableCellGrid::insert(const SwRect & rRect,
{
CellInfo aCellInfo(rRect, pNodeInfo);
- if (pFormatFrmWidth != NULL)
+ if (pFormatFrmWidth != nullptr)
aCellInfo.setFormatFrmWidth(*pFormatFrmWidth);
WW8TableCellGridRow::Pointer_t pRow = getRow(rRect.Top());
@@ -1144,7 +1144,7 @@ void WW8TableCellGrid::addShadowCells()
{
aRect.Top(*aRowSpanIt);
unsigned long nFormatFrmWidth = aCellIt->getFormatFrmWidth();
- insert(aRect, NULL, &nFormatFrmWidth);
+ insert(aRect, nullptr, &nFormatFrmWidth);
bVertMerge = true;
}
@@ -1179,7 +1179,7 @@ void WW8TableCellGrid::addShadowCells()
}
WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
- if (pRow.get() != NULL)
+ if (pRow.get() != nullptr)
pRow->setRowSpans(pRowSpans);
++aTopsIt;
@@ -1191,7 +1191,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
{
RowTops_t::const_iterator aTopsIt = getRowTopsBegin();
sal_uInt32 nRow = 0;
- WW8TableNodeInfo * pLastNodeInfo = NULL;
+ WW8TableNodeInfo * pLastNodeInfo = nullptr;
while (aTopsIt != getRowTopsEnd())
{
@@ -1203,7 +1203,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
sal_uInt32 nShadows = 0;
sal_uInt32 nCell = 0;
bool bBeginningOfCell = true;
- WW8TableNodeInfo * pEndOfCellInfo = NULL;
+ WW8TableNodeInfo * pEndOfCellInfo = nullptr;
sal_uInt32 nDepthInCell = 0;
while (aCellIt != aCellEndIt)
{
@@ -1216,7 +1216,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
if (pNode->IsStartNode())
{
nDepthInCell++;
- pEndOfCellInfo = NULL;
+ pEndOfCellInfo = nullptr;
}
if (nDepthInCell == 1 && pNode->IsTextNode())
@@ -1253,7 +1253,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
if (pNodeInfo)
pTableBoxes->push_back(pNodeInfo->getTableBox());
else
- pTableBoxes->push_back(NULL);
+ pTableBoxes->push_back(nullptr);
}
++aCellIt;
@@ -1269,7 +1269,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
pEndOfCellInfo->setEndOfCell(true);
}
- pEndOfCellInfo = NULL;
+ pEndOfCellInfo = nullptr;
}
}
@@ -1330,7 +1330,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
WidthsPtr pWidths = pRow->getWidths();
- if (pWidths != 0)
+ if (pWidths != nullptr)
{
sResult += "<widths>";
@@ -1350,7 +1350,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds)
}
RowSpansPtr pRowSpans = pRow->getRowSpans();
- if (pRowSpans.get() != NULL)
+ if (pRowSpans.get() != nullptr)
{
sResult += "<rowspans>";
@@ -1386,7 +1386,7 @@ TableBoxVectorPtr WW8TableCellGrid::getTableBoxesOfRow
WW8TableCellGridRow::Pointer_t pRow =
getRow(pNodeInfoInner->getRect().Top(), false);
- if (pRow.get() != NULL)
+ if (pRow.get() != nullptr)
{
pResult = pRow->getTableBoxVector();
}
@@ -1402,7 +1402,7 @@ WidthsPtr WW8TableCellGrid::getWidthsOfRow
WW8TableCellGridRow::Pointer_t pRow =
getRow(pNodeInfoInner->getRect().Top(), false);
- if (pRow.get() != NULL)
+ if (pRow.get() != nullptr)
{
pResult = pRow->getWidths();
}
@@ -1418,7 +1418,7 @@ RowSpansPtr WW8TableCellGrid::getRowSpansOfRow
WW8TableCellGridRow::Pointer_t pRow =
getRow(pNodeInfoInner->getRect().Top(), false);
- if (pRow.get() != NULL)
+ if (pRow.get() != nullptr)
{
pResult = pRow->getRowSpans();
}
@@ -1477,7 +1477,7 @@ void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans)
CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo)
: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFormatFrmWidth(0)
{
- if (pNodeInfo != NULL)
+ if (pNodeInfo != nullptr)
{
const SwTableBox * pBox = pNodeInfo->getTableBox();
const SwFrameFormat * pFrameFormat = pBox->GetFrameFormat();
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index 06454cff01a5..f6f7168e5d92 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -276,7 +276,7 @@ public:
~WW8TableCellGrid();
void insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo,
- unsigned long * pFormatFrmWidth = NULL);
+ unsigned long * pFormatFrmWidth = nullptr);
void addShadowCells();
WW8TableNodeInfo *connectCells(RowEndInners_t &rLastRowEnds);
@@ -330,7 +330,7 @@ class WW8TableInfo
sal_uInt32 nRow,
sal_uInt32 nCell,
sal_uInt32 nDepth,
- SwRect * pRect = NULL);
+ SwRect * pRect = nullptr);
WW8TableCellGrid::Pointer_t getCellGridForTable(const SwTable * pTable,
bool bCreate = true);
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 506717dddc30..3fe18ea3536e 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -292,7 +292,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) = 0;
// preserve page vertical alignment
virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust) {};
@@ -358,7 +358,7 @@ public:
sal_Int16 nFirstLineIndex,
sal_Int16 nListTabPos,
const OUString &rNumberingString,
- const SvxBrushItem* pBrush = 0) = 0; // #i120928 export graphic of bullet
+ const SvxBrushItem* pBrush = nullptr) = 0; // #i120928 export graphic of bullet
protected:
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e06f81cd0cc7..cfd048424302 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -537,7 +537,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
WritePostponedCustomShape();
m_pSerializer->endElementNS( XML_w, XML_r );
}
- m_pPostponedCustomShape.reset(0);
+ m_pPostponedCustomShape.reset(nullptr);
m_aFramesOfParagraph.clear();
}
@@ -591,7 +591,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
pushToTableExportContext(aTableExportContext);
m_pCurrentFrame = it->get();
m_rExport.SdrExporter().writeOnlyTextOfFrame(it->get());
- m_pCurrentFrame = NULL;
+ m_pCurrentFrame = nullptr;
popFromTableExportContext(aTableExportContext);
}
aFramePrTextbox.clear();
@@ -936,7 +936,7 @@ void lcl_writeParagraphMarkerProperties(DocxAttributeOutput& rAttributeOutput, c
{
SfxWhichIter aIter(rParagraphMarkerProperties);
sal_uInt16 nWhichId = aIter.FirstWhich();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
// Did we already produce a <w:sz> element?
bool bFontSizeWritten = false;
while (nWhichId)
@@ -1286,7 +1286,7 @@ void DocxAttributeOutput::EndRun()
WritePendingPlaceholder();
- m_pRedlineData = NULL;
+ m_pRedlineData = nullptr;
if ( m_closeHyperlinkInThisRun )
{
@@ -1709,9 +1709,9 @@ void DocxAttributeOutput::StartRunProperties()
void DocxAttributeOutput::InitCollectedRunProperties()
{
- m_pFontsAttrList = 0;
- m_pEastAsianLayoutAttrList = 0;
- m_pCharLangAttrList = 0;
+ m_pFontsAttrList = nullptr;
+ m_pEastAsianLayoutAttrList = nullptr;
+ m_pCharLangAttrList = nullptr;
// Write the elements in the spec order
static const sal_Int32 aOrder[] =
@@ -2065,7 +2065,7 @@ void DocxAttributeOutput::WritePostponedGraphic()
it != m_pPostponedGraphic->end();
++it )
FlyFrameGraphic( it->grfNode, it->size, it->mOLEFrameFormat, it->mOLENode, it->pSdrObj );
- m_pPostponedGraphic.reset(0);
+ m_pPostponedGraphic.reset(nullptr);
}
void DocxAttributeOutput::WritePostponedDiagram()
@@ -2074,7 +2074,7 @@ void DocxAttributeOutput::WritePostponedDiagram()
it != m_pPostponedDiagrams->end();
++it )
m_rExport.SdrExporter().writeDiagram( it->object, *(it->frame), m_anchorId++ );
- m_pPostponedDiagrams.reset(0);
+ m_pPostponedDiagrams.reset(nullptr);
}
void DocxAttributeOutput::FootnoteEndnoteRefTag()
@@ -2228,7 +2228,7 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
m_pSerializer->endElementNS( XML_w, XML_rubyPr );
m_pSerializer->startElementNS( XML_w, XML_rt, FSEND );
- StartRun( NULL );
+ StartRun( nullptr );
StartRunProperties( );
SwWW8AttrIter aAttrIt( m_rExport, rNode );
aAttrIt.OutAttr( nPos, true );
@@ -2238,13 +2238,13 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
m_pSerializer->singleElementNS( XML_w, XML_rStyle,
FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
- EndRunProperties( NULL );
+ EndRunProperties( nullptr );
RunText( rRuby.GetText( ) );
EndRun( );
m_pSerializer->endElementNS( XML_w, XML_rt );
m_pSerializer->startElementNS( XML_w, XML_rubyBase, FSEND );
- StartRun( NULL );
+ StartRun( nullptr );
}
void DocxAttributeOutput::EndRuby()
@@ -2291,7 +2291,7 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge
if ( !sMark.isEmpty() && !bBookmarkOnly )
{
- m_rExport.OutputField( NULL, ww::eHYPERLINK, sUrl );
+ m_rExport.OutputField( nullptr, ww::eHYPERLINK, sUrl );
}
else
{
@@ -2357,7 +2357,7 @@ bool DocxAttributeOutput::EndURL(bool const)
void DocxAttributeOutput::FieldVanish( const OUString& rText, ww::eField eType )
{
- WriteField_Impl( NULL, eType, rText, WRITEFIELD_ALL );
+ WriteField_Impl( nullptr, eType, rText, WRITEFIELD_ALL );
}
// The difference between 'Redline' and 'StartRedline'+'EndRedline' is that:
@@ -2574,7 +2574,7 @@ void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
}
static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist,
- bool bWriteShadow = false, const table::BorderLine2* rStyleProps = NULL )
+ bool bWriteShadow = false, const table::BorderLine2* rStyleProps = nullptr )
{
// Compute val attribute value
// Can be one of:
@@ -2638,7 +2638,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
break;
}
}
- else if( rStyleProps == NULL )
+ else if( rStyleProps == nullptr )
// no line, and no line set by the style either:
// there is no need to write the property
return;
@@ -2646,7 +2646,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// compare the properties with the theme properties before writing them:
// if they are equal, it means that they were style-defined and there is
// no need to write them.
- if( rStyleProps != NULL && pBorderLine && !pBorderLine->isEmpty() &&
+ if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
pBorderLine->GetBorderLineStyle() == rStyleProps->LineStyle &&
pBorderLine->GetColor() == rStyleProps->Color &&
pBorderLine->GetWidth() == convertMm100ToTwip( rStyleProps->LineWidth ) )
@@ -2779,7 +2779,7 @@ static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
- const table::BorderLine2 *aStyleProps = NULL;
+ const table::BorderLine2 *aStyleProps = nullptr;
if( rTableStyleConf.find( *pBrd ) != rTableStyleConf.end() )
aStyleProps = &rTableStyleConf[ *pBrd ];
@@ -2853,14 +2853,14 @@ static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const
}
if (bWriteInsideH)
{
- const table::BorderLine2 *aStyleProps = NULL;
+ const table::BorderLine2 *aStyleProps = nullptr;
if( rTableStyleConf.find( SvxBoxItemLine::BOTTOM ) != rTableStyleConf.end() )
aStyleProps = &rTableStyleConf[ SvxBoxItemLine::BOTTOM ];
impl_borderLine( pSerializer, XML_insideH, rBox.GetLine(SvxBoxItemLine::BOTTOM), 0, false, aStyleProps );
}
if (bWriteInsideV)
{
- const table::BorderLine2 *aStyleProps = NULL;
+ const table::BorderLine2 *aStyleProps = nullptr;
if( rTableStyleConf.find( SvxBoxItemLine::RIGHT ) != rTableStyleConf.end() )
aStyleProps = &rTableStyleConf[ SvxBoxItemLine::RIGHT ];
impl_borderLine( pSerializer, XML_insideV, rBox.GetLine(SvxBoxItemLine::RIGHT), 0, false, aStyleProps );
@@ -2870,7 +2870,7 @@ static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const
}
}
-static void impl_cellMargins( FSHelperPtr pSerializer, const SvxBoxItem& rBox, sal_Int32 tag, bool bUseStartEnd = false, const SvxBoxItem* pDefaultMargins = 0)
+static void impl_cellMargins( FSHelperPtr pSerializer, const SvxBoxItem& rBox, sal_Int32 tag, bool bUseStartEnd = false, const SvxBoxItem* pDefaultMargins = nullptr)
{
static const SvxBoxItemLine aBorders[] =
{
@@ -2986,7 +2986,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
const SvxBoxItem& rDefaultBox = (*tableFirstCells.rbegin())->getTableBox( )->GetFrameFormat( )->GetBox( );
{
// The cell borders
- impl_borders( m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), NULL, m_aTableStyleConf );
+ impl_borders( m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), nullptr, m_aTableStyleConf );
}
TableBackgrounds( pTableTextNodeInfoInner );
@@ -3056,7 +3056,7 @@ void DocxAttributeOutput::EndTable()
m_tableReference->m_bTableCellOpen = true;
// Cleans the table helper
- m_xTableWrt.reset(0);
+ m_xTableWrt.reset(nullptr);
m_aTableStyleConf.clear();
}
@@ -3286,7 +3286,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
{"lastColumn", XML_lastColumn},
{"noHBand", XML_noHBand},
{"noVBand", XML_noVBand},
- {0, 0}
+ {nullptr, 0}
};
if (sal_Int32 nToken = DocxStringGetToken(aTokens, aAttributeList[i].Name))
@@ -3352,7 +3352,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
XFastAttributeListRef xAttrListTablePosRef( attrListTablePos );
m_pSerializer->singleElementNS( XML_w, XML_tblpPr, xAttrListTablePosRef);
- attrListTablePos = NULL;
+ attrListTablePos = nullptr;
}
else
SAL_WARN("sw.ww8", "DocxAttributeOutput::TableDefinition: unhandled property: " << aGrabBagElement->first);
@@ -3444,7 +3444,7 @@ void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Point
if (m_aTableStyleConf.empty())
{
// the defaults of the table are taken from the top-left cell
- impl_borders(m_pSerializer, pFrameFormat->GetBox(), lcl_getTableDefaultBorderOptions(bEcma), NULL, m_aTableStyleConf);
+ impl_borders(m_pSerializer, pFrameFormat->GetBox(), lcl_getTableDefaultBorderOptions(bEcma), nullptr, m_aTableStyleConf);
}
}
@@ -3527,7 +3527,7 @@ void DocxAttributeOutput::TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t
{
SwExtraRedline* pExtraRedline = aExtraRedlineTable.GetRedline(nCurRedlinePos);
const SwTableRowRedline* pTableRowRedline = dynamic_cast<const SwTableRowRedline*>(pExtraRedline);
- const SwTableLine *pRedTabLine = pTableRowRedline ? &pTableRowRedline->GetTableLine() : NULL;
+ const SwTableLine *pRedTabLine = pTableRowRedline ? &pTableRowRedline->GetTableLine() : nullptr;
if (pRedTabLine == pTabLine)
{
// Redline for this table row
@@ -3573,7 +3573,7 @@ void DocxAttributeOutput::TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_
{
SwExtraRedline* pExtraRedline = aExtraRedlineTable.GetRedline(nCurRedlinePos);
const SwTableCellRedline* pTableCellRedline = dynamic_cast<const SwTableCellRedline*>(pExtraRedline);
- const SwTableBox *pRedTabBox = pTableCellRedline ? &pTableCellRedline->GetTableBox() : NULL;
+ const SwTableBox *pRedTabBox = pTableCellRedline ? &pTableCellRedline->GetTableBox() : nullptr;
if (pRedTabBox == pTabBox)
{
// Redline for this table cell
@@ -3619,7 +3619,7 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() )
{
sal_Int32 nHeight = rLSz.GetHeight();
- const char *pRule = NULL;
+ const char *pRule = nullptr;
switch ( rLSz.GetHeightSizeType() )
{
@@ -3779,7 +3779,7 @@ DocxStringTokenMap const aDefaultTokens[] = {
{"count", XML_count},
{"defUIPriority", XML_defUIPriority},
{"defLockedState", XML_defLockedState},
- {0, 0}
+ {nullptr, 0}
};
DocxStringTokenMap const aExceptionTokens[] = {
@@ -3789,7 +3789,7 @@ DocxStringTokenMap const aExceptionTokens[] = {
{"semiHidden", XML_semiHidden},
{"unhideWhenUsed", XML_unhideWhenUsed},
{"qFormat", XML_qFormat},
- {0, 0}
+ {nullptr, 0}
};
}
@@ -3825,7 +3825,7 @@ void DocxAttributeOutput::LatentStyles()
XFastAttributeListRef xAttributeList(pAttributeList);
m_pSerializer->startElementNS(XML_w, XML_latentStyles, xAttributeList);
- pAttributeList = 0;
+ pAttributeList = nullptr;
// Then handle the exceptions.
for (sal_Int32 i = 0; i < aLsdExceptions.getLength(); ++i)
@@ -3840,7 +3840,7 @@ void DocxAttributeOutput::LatentStyles()
xAttributeList = pAttributeList;
m_pSerializer->singleElementNS(XML_w, XML_lsdException, xAttributeList);
- pAttributeList = 0;
+ pAttributeList = nullptr;
}
m_pSerializer->endElementNS(XML_w, XML_latentStyles);
@@ -3857,7 +3857,7 @@ bool lcl_isDefaultFontSize(const SvxFontHeightItem& rFontHeight, SwDoc* pDoc)
SwTextFormatColl* pDefaultStyle = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD);
if (pDefaultStyle)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (pDefaultStyle->GetAttrSet().HasItem(RES_CHRATR_FONTSIZE, &pItem))
return static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() != rFontHeight.GetHeight();
}
@@ -3921,8 +3921,8 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
const SvxBrushItem& rBrushItem = static_cast< const SvxBrushItem& >(rHt);
bMustWrite = (rBrushItem.GetColor() != COL_AUTO ||
rBrushItem.GetShadingValue() != ShadingPattern::CLEAR ||
- rBrushItem.GetGraphic() != NULL ||
- rBrushItem.GetGraphicObject() != NULL);
+ rBrushItem.GetGraphic() != nullptr ||
+ rBrushItem.GetGraphicObject() != nullptr);
}
break;
@@ -3989,8 +3989,8 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
const SvxBrushItem& rBrushItem = static_cast< const SvxBrushItem& >(rHt);
bMustWrite = (rBrushItem.GetColor() != COL_AUTO ||
rBrushItem.GetShadingValue() != ShadingPattern::CLEAR ||
- rBrushItem.GetGraphic() != NULL ||
- rBrushItem.GetGraphicObject() != NULL);
+ rBrushItem.GetGraphic() != nullptr ||
+ rBrushItem.GetGraphicObject() != nullptr);
}
break;
@@ -4174,7 +4174,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
{
// linked image, just create the relation
OUString aFileName;
- pGrfNode->GetFileFilterNms( &aFileName, 0 );
+ pGrfNode->GetFileFilterNms( &aFileName, nullptr );
// TODO Convert the file name to relative for better interoperability
@@ -4187,7 +4187,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
else
{
// inline, we also have to write the image itself
- const Graphic* pGraphic = 0;
+ const Graphic* pGraphic = nullptr;
if (pGrfNode)
pGraphic = &pGrfNode->GetGrf();
else
@@ -4212,7 +4212,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
// In case there are any grab-bag items on the graphic frame, emit them now.
// These are always character grab-bags, as graphics are at-char or as-char in Word.
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (pFrameFormat->GetAttrSet().HasItem(RES_FRMATR_GRABBAG, &pItem))
{
const SfxGrabBagItem* pGrabBag = static_cast<const SfxGrabBagItem*>(pItem);
@@ -4295,7 +4295,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
FSNS( XML_r, nImageType ), aRelId.getStr(),
FSEND );
- pItem = 0;
+ pItem = nullptr;
sal_uInt32 nMode = GRAPHICDRAWMODE_STANDARD;
if ( pGrfNode && SfxItemState::SET == pGrfNode->GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE, true, &pItem))
@@ -4373,10 +4373,10 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOL
return;
// Then we fall back to just export the object as a graphic.
if( !m_pPostponedGraphic )
- FlyFrameGraphic( 0, rSize, pFlyFrameFormat, &rOLENode );
+ FlyFrameGraphic( nullptr, rSize, pFlyFrameFormat, &rOLENode );
else
// w:drawing should not be inside w:rPr, so write it out later
- m_pPostponedGraphic->push_back(PostponedGraphic(0, rSize, pFlyFrameFormat, &rOLENode, 0));
+ m_pPostponedGraphic->push_back(PostponedGraphic(nullptr, rSize, pFlyFrameFormat, &rOLENode, nullptr));
}
bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize )
@@ -4404,7 +4404,7 @@ bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& r
*/
void DocxAttributeOutput::WritePostponedChart()
{
- if(m_postponedChart == NULL)
+ if(m_postponedChart == nullptr)
return;
uno::Reference< chart2::XChartDocument > xChartDoc;
uno::Reference< drawing::XShape > xShape( const_cast<SdrObject*>(m_postponedChart)->getUnoShape(), uno::UNO_QUERY );
@@ -4479,7 +4479,7 @@ void DocxAttributeOutput::WritePostponedChart()
m_pSerializer->endElementNS( XML_w, XML_drawing );
}
- m_postponedChart = NULL;
+ m_postponedChart = nullptr;
}
bool DocxAttributeOutput::WriteOLEMath( const SdrObject*, const SwOLENode& rOLENode, const Size& )
@@ -4506,7 +4506,7 @@ void DocxAttributeOutput::WritePostponedMath(const SwOLENode* pPostponedMath)
// so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated
// to RTLD_GLOBAL, so most probably a gcc bug.
oox::FormulaExportBase* formulaexport = dynamic_cast<oox::FormulaExportBase*>(dynamic_cast<SfxBaseModel*>(xInterface.get()));
- assert( formulaexport != NULL );
+ assert( formulaexport != nullptr );
if (formulaexport)
formulaexport->writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion());
}
@@ -4699,7 +4699,7 @@ void DocxAttributeOutput::WritePostponedOLE()
}
// clear list of postponed objects
- m_pPostponedOLEs.reset(0);
+ m_pPostponedOLEs.reset(nullptr);
}
void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat )
@@ -4828,7 +4828,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
{
// the embedded file could not be saved
// fallback: save as an image
- FlyFrameGraphic( 0, rSize, rFlyFrameFormat, &rNode );
+ FlyFrameGraphic( nullptr, rSize, rFlyFrameFormat, &rNode );
return;
}
@@ -4887,7 +4887,7 @@ void DocxAttributeOutput::WritePostponedVMLDrawing()
{
m_rExport.SdrExporter().writeVMLDrawing(it->object, *(it->frame), *(it->point));
}
- m_pPostponedVMLDrawings.reset(0);
+ m_pPostponedVMLDrawings.reset(nullptr);
}
void DocxAttributeOutput::WritePostponedCustomShape()
@@ -4906,7 +4906,7 @@ void DocxAttributeOutput::WritePostponedCustomShape()
m_rExport.SdrExporter().writeDMLAndVMLDrawing(it->object, *(it->frame), *(it->point), m_anchorId++);
}
m_bStartedParaSdt = bStartedParaSdt;
- m_pPostponedCustomShape.reset(0);
+ m_pPostponedCustomShape.reset(nullptr);
}
void DocxAttributeOutput::WritePostponedDMLDrawing()
@@ -4944,18 +4944,18 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
{
const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject();
const SwNode *pNode = rFrame.GetContent();
- const SwGrfNode *pGrfNode = pNode ? pNode->GetGrfNode() : 0;
+ const SwGrfNode *pGrfNode = pNode ? pNode->GetGrfNode() : nullptr;
if ( pGrfNode )
{
if (!m_pPostponedGraphic)
{
m_bPostponedProcessingFly = false ;
- FlyFrameGraphic( pGrfNode, rFrame.GetLayoutSize(), 0, 0, pSdrObj);
+ FlyFrameGraphic( pGrfNode, rFrame.GetLayoutSize(), nullptr, nullptr, pSdrObj);
}
else // we are writing out attributes, but w:drawing should not be inside w:rPr,
{ // so write it out later
m_bPostponedProcessingFly = true ;
- m_pPostponedGraphic->push_back(PostponedGraphic(pGrfNode, rFrame.GetLayoutSize(), 0, 0, pSdrObj));
+ m_pPostponedGraphic->push_back(PostponedGraphic(pGrfNode, rFrame.GetLayoutSize(), nullptr, nullptr, pSdrObj));
}
}
}
@@ -5121,7 +5121,7 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
StartParagraphProperties();
aAttrIter.OutParaAttr(false);
SfxItemSet aParagraphMarkerProperties(m_rExport.m_pDoc->GetAttrPool());
- EndParagraphProperties(aParagraphMarkerProperties, 0, 0, 0);
+ EndParagraphProperties(aParagraphMarkerProperties, nullptr, nullptr, nullptr);
do {
const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd);
@@ -5297,7 +5297,7 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
SAL_WARN("sw.ww8", "Unhandled style property: " << rGrabBag[i].Name);
}
- const char* pType = 0;
+ const char* pType = nullptr;
switch (eType)
{
case STYLE_TYPE_PARA: pType = "paragraph"; break;
@@ -5746,7 +5746,7 @@ void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
- const char* pType = NULL;
+ const char* pType = nullptr;
switch ( nBreakCode )
{
case 1: pType = "nextColumn"; break;
@@ -5822,7 +5822,7 @@ void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEnc
void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const
{
- const char *pFamily = NULL;
+ const char *pFamily = nullptr;
switch ( eFamily )
{
case FAMILY_ROMAN: pFamily = "roman"; break;
@@ -5841,7 +5841,7 @@ void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const
void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
{
- const char *pPitch = NULL;
+ const char *pPitch = nullptr;
switch ( ePitch )
{
case PITCH_VARIABLE: pPitch = "variable"; break;
@@ -6049,7 +6049,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
FSEND );
// suffix
- const char *pSuffix = NULL;
+ const char *pSuffix = nullptr;
switch ( nFollow )
{
case 1: pSuffix = "space"; break;
@@ -6196,7 +6196,7 @@ void DocxAttributeOutput::CharColor( const SvxColorItem& rColor )
aColorString = msfilter::util::ConvertColor( aColor );
- const char* pExistingValue(NULL);
+ const char* pExistingValue(nullptr);
if (m_pColorAttrList.is() && m_pColorAttrList->getAsChar(FSNS(XML_w, XML_val), pExistingValue))
{
assert(aColorString.equalsL(pExistingValue, rtl_str_getLength(pExistingValue)));
@@ -6676,7 +6676,7 @@ void DocxAttributeOutput::WritePostitFields()
// Check for the text object existing, it seems that it can be NULL when saving a newly created
// comment without giving focus back to the main document. As GetText() is empty in that case as well,
// that is probably a bug in the Writer core.
- if( f->GetTextObject() != NULL )
+ if( f->GetTextObject() != nullptr )
GetExport().WriteOutliner( *f->GetTextObject(), TXT_ATN );
m_pSerializer->endElementNS( XML_w, XML_comment );
}
@@ -6695,17 +6695,17 @@ bool DocxAttributeOutput::DropdownField( const SwField* pField )
bool DocxAttributeOutput::PlaceholderField( const SwField* pField )
{
- assert( pendingPlaceholder == NULL );
+ assert( pendingPlaceholder == nullptr );
pendingPlaceholder = pField;
return false; // do not expand
}
void DocxAttributeOutput::WritePendingPlaceholder()
{
- if( pendingPlaceholder == NULL )
+ if( pendingPlaceholder == nullptr )
return;
const SwField* pField = pendingPlaceholder;
- pendingPlaceholder = NULL;
+ pendingPlaceholder = nullptr;
m_pSerializer->startElementNS( XML_w, XML_sdt, FSEND );
m_pSerializer->startElementNS( XML_w, XML_sdtPr, FSEND );
if( !pField->GetPar2().isEmpty())
@@ -6937,7 +6937,7 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr
const SwEndNoteInfo& info, int listtag )
{
fs->startElementNS( XML_w, tag, FSEND );
- const char* fmt = NULL;
+ const char* fmt = nullptr;
switch( info.aFormat.GetNumberingType())
{
case SVX_NUM_CHARS_UPPER_LETTER_N: // fall through, map to upper letters
@@ -6968,7 +6968,7 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr
default:
break; // no format
}
- if( fmt != NULL )
+ if( fmt != nullptr )
fs->singleElementNS( XML_w, XML_numFmt, FSNS( XML_w, XML_val ), fmt, FSEND );
if( info.nFootnoteOffset != 0 )
fs->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ),
@@ -7021,10 +7021,10 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
const SfxItemSet* pItems = GetExport().GetCurItemSet();
const SvxFrameDirectionItem* rFrameDir = pItems?
- static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) ): NULL;
+ static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) ): nullptr;
short nDir = FRMDIR_ENVIRONMENT;
- if( rFrameDir != NULL )
+ if( rFrameDir != nullptr )
nDir = rFrameDir->GetValue();
if ( nDir == FRMDIR_ENVIRONMENT )
nDir = GetExport( ).GetDefaultFrameDirection( );
@@ -7269,7 +7269,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize )
attrList->add( FSNS( XML_w, XML_h ), OString::number( rSize.GetHeight( ) ) );
XFastAttributeListRef xAttrList( attrList );
- attrList = NULL;
+ attrList = nullptr;
m_pSerializer->singleElementNS( XML_w, XML_pgSz, xAttrList );
}
@@ -8458,7 +8458,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_pFootnotesList( new ::docx::FootnotesList() ),
m_pEndnotesList( new ::docx::FootnotesList() ),
m_footnoteEndnoteRefTag( 0 ),
- m_pRedlineData( NULL ),
+ m_pRedlineData( nullptr ),
m_nRedlineId( 0 ),
m_bOpenedSectPr( false ),
m_bHadSectPr(false),
@@ -8468,7 +8468,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_sFieldBkm( ),
m_nNextBookmarkId( 0 ),
m_nNextAnnotationMarkId( 0 ),
- m_pCurrentFrame( NULL ),
+ m_pCurrentFrame( nullptr ),
m_bParagraphOpened( false ),
m_bParagraphFrameOpen( false ),
m_bIsFirstParagraph( true ),
@@ -8481,8 +8481,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_startedHyperlink( false ),
m_nHyperLinkCount(0),
m_nFieldsInHyperlink( 0 ),
- m_postponedChart( NULL ),
- pendingPlaceholder( NULL ),
+ m_postponedChart( nullptr ),
+ pendingPlaceholder( nullptr ),
m_postitFieldsMaxId( 0 ),
m_anchorId( 1 ),
m_nextFontId( 1 ),
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index fadc5124880c..53042bc62222 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -57,7 +57,7 @@ struct FieldInfos
bool bOpen;
bool bClose;
OUString sCmd;
- FieldInfos() : pFieldmark(NULL), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
+ FieldInfos() : pFieldmark(nullptr), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
};
enum DocxColBreakStatus
@@ -288,7 +288,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) override;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) override;
// preserve DOCX page vertical alignment
virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) SAL_OVERRIDE;
@@ -364,7 +364,7 @@ public:
sal_Int16 nFirstLineIndex,
sal_Int16 nListTabPos,
const OUString &rNumberingString,
- const SvxBrushItem* pBrush = 0 ) override;
+ const SvxBrushItem* pBrush = nullptr ) override;
void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, sal_uInt8 nMode );
void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
@@ -408,7 +408,7 @@ private:
/// replacement graphics, set the first as 0, and pass the remaining three.
///
/// @see WriteOLE2Obj()
- void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat = 0, SwOLENode* pOLENode = 0, const SdrObject* pSdrObj = 0);
+ void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat = nullptr, SwOLENode* pOLENode = nullptr, const SdrObject* pSdrObj = nullptr);
void WriteSrcRect( const SdrObject* pSdrObj );
void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index aa12283ade93..109b36d3f7f3 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -414,7 +414,7 @@ void DocxExport::OutputDML(uno::Reference<drawing::XShape>& xShape)
nNamespace = XML_wpg;
else if (xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape"))
nNamespace = XML_pic;
- oox::drawingml::ShapeExport aExport(nNamespace, m_pAttrOutput->GetSerializer(), 0, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX, m_pAttrOutput);
+ oox::drawingml::ShapeExport aExport(nNamespace, m_pAttrOutput->GetSerializer(), nullptr, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX, m_pAttrOutput);
aExport.WriteShape(xShape);
}
@@ -454,8 +454,8 @@ void DocxExport::ExportDocument_Impl()
WriteEmbeddings();
m_aLinkedTextboxesHelper.clear(); //final cleanup
- delete m_pStyles, m_pStyles = NULL;
- delete m_pSections, m_pSections = NULL;
+ delete m_pStyles, m_pStyles = nullptr;
+ delete m_pSections, m_pSections = nullptr;
}
void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum )
@@ -1344,7 +1344,7 @@ void DocxExport::WriteMainText()
// the last section info
m_pAttrOutput->EndParaSdtBlock();
- const WW8_SepInfo *pSectionInfo = m_pSections? m_pSections->CurrentSectionInfo(): NULL;
+ const WW8_SepInfo *pSectionInfo = m_pSections? m_pSections->CurrentSectionInfo(): nullptr;
if ( pSectionInfo )
SectionProperties( *pSectionInfo );
@@ -1397,7 +1397,7 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy
sal_Int32 nAktPos = 0;
const sal_Int32 nEnd = aStr.getLength();
do {
- AttrOutput().StartRun( NULL );
+ AttrOutput().StartRun( nullptr );
const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd);
rtl_TextEncoding eNextChrSet = aAttrIter.GetNextCharSet();
@@ -1414,7 +1414,7 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy
}
AttrOutput().StartRunProperties();
aAttrIter.OutAttr( nAktPos );
- AttrOutput().EndRunProperties( NULL );
+ AttrOutput().EndRunProperties( nullptr );
nAktPos = nNextAttr;
eChrSet = eNextChrSet;
@@ -1434,14 +1434,14 @@ void DocxExport::SetFS( ::sax_fastparser::FSHelperPtr pFS )
DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam )
: MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
m_pFilter( pFilter ),
- m_pAttrOutput( NULL ),
- m_pSections( NULL ),
+ m_pAttrOutput( nullptr ),
+ m_pSections( nullptr ),
m_nHeaders( 0 ),
m_nFooters( 0 ),
m_nOLEObjects( 0 ),
m_nHeadersFootersInSection(0),
- m_pVMLExport( NULL ),
- m_pSdrExport( NULL )
+ m_pVMLExport( nullptr ),
+ m_pSdrExport( nullptr )
{
// Write the document properies
WriteProperties( );
@@ -1471,10 +1471,10 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur
DocxExport::~DocxExport()
{
- delete m_pSdrExport, m_pSdrExport = NULL;
- delete m_pVMLExport, m_pVMLExport = NULL;
- delete m_pAttrOutput, m_pAttrOutput = NULL;
- delete m_pDrawingML, m_pDrawingML = NULL;
+ delete m_pSdrExport, m_pSdrExport = nullptr;
+ delete m_pVMLExport, m_pVMLExport = nullptr;
+ delete m_pAttrOutput, m_pAttrOutput = nullptr;
+ delete m_pDrawingML, m_pDrawingML = nullptr;
}
DocxSettingsData::DocxSettingsData()
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 3643a6569ada..a4315d702c5e 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -200,8 +200,8 @@ protected:
/// Get ready for a new section.
virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
const SwNode& rNd,
- const SwFormatPageDesc* pNewPgDescFormat = 0,
- const SwPageDesc* pNewPgDesc = 0 ) override;
+ const SwFormatPageDesc* pNewPgDescFormat = nullptr,
+ const SwPageDesc* pNewPgDesc = nullptr ) override;
private:
/// Setup pStyles and write styles.xml
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 0076ed07fe43..64a5edd0a9b1 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -53,7 +53,7 @@ bool DocxExportFilter::exportDocument()
// update layout (if present), for SwWriteTable
SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->CalcLayout();
// get SwPaM*
@@ -114,14 +114,14 @@ extern "C"
{
DocxExport_createInstance, DocxExport_getImplementationName,
DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
RtfExport_createInstance, RtfExport_getImplementationName,
RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
SAL_DLLPUBLIC_EXPORT void* SAL_CALL msword_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx
index b5ed18d3bbd9..0c4b859b8092 100644
--- a/sw/source/filter/ww8/docxexportfilter.hxx
+++ b/sw/source/filter/ww8/docxexportfilter.hxx
@@ -35,9 +35,9 @@ public:
// FIXME these should not even exist for the export-only filter!
// For now, let's just do empty implementations of those.
virtual bool importDocument() override { return false; }
- virtual const ::oox::drawingml::Theme* getCurrentTheme() const override { return NULL; }
- virtual ::oox::vml::Drawing* getVmlDrawing() override { return NULL; }
- virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override { return NULL; }
+ virtual const ::oox::drawingml::Theme* getCurrentTheme() const override { return nullptr; }
+ virtual ::oox::vml::Drawing* getVmlDrawing() override { return nullptr; }
+ virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override { return nullptr; }
virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() override { return ::oox::drawingml::table::TableStyleListPtr(); }
// Actual export of the DOCX document
@@ -48,7 +48,7 @@ private:
virtual ::oox::ole::VbaProject* implCreateVbaProject() const override
{
- return NULL; // FIXME: implement me !
+ return nullptr; // FIXME: implement me !
}
};
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index 281d842335a3..87593aa80e13 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -56,7 +56,7 @@ public:
if ( m_nCurrent < 0 )
{
rId = -1;
- return NULL;
+ return nullptr;
}
// skip ids 0 and 1 - they are reserved for separator and
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index ba9c83905abf..c4581b103d08 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -154,7 +154,7 @@ struct DocxSdrExport::Impl
m_rExport(rExport),
m_pSerializer(pSerializer),
m_pDrawingML(pDrawingML),
- m_pFlyFrameSize(0),
+ m_pFlyFrameSize(nullptr),
m_bTextFrameSyntax(false),
m_bDMLTextFrameSyntax(false),
m_bFrameBtLr(false),
@@ -162,8 +162,8 @@ struct DocxSdrExport::Impl
m_bParagraphSdtOpen(false),
m_bParagraphHasDrawing(false),
m_bFlyFrameGraphic(false),
- m_pFlyWrapAttrList(0),
- m_pBodyPrAttrList(0),
+ m_pFlyWrapAttrList(nullptr),
+ m_pBodyPrAttrList(nullptr),
m_bDMLAndVMLDrawingOpen(false),
m_aTextBoxes(SwTextBoxHelper::findTextBoxes(m_rExport.m_pDoc)),
m_nDMLandVMLTextFrameRotation(0)
@@ -356,7 +356,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
bool bOpaque = pFrameFormat->GetOpaque().GetValue();
awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(), pFrameFormat->GetVertOrient().GetPos());
const SdrObject* pObj = pFrameFormat->FindRealSdrObject();
- if (pObj != NULL)
+ if (pObj != nullptr)
{
// SdrObjects know their layer, consider that instead of the frame format.
bOpaque = pObj->GetLayer() != pFrameFormat->GetDoc()->getIDocumentDrawModelAccess().GetHellId() && pObj->GetLayer() != pFrameFormat->GetDoc()->getIDocumentDrawModelAccess().GetInvisibleHellId();
@@ -372,13 +372,13 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
attrList->add(XML_locked, "0");
attrList->add(XML_layoutInCell, "1");
attrList->add(XML_allowOverlap, "1"); // TODO
- if (pObj != NULL)
+ if (pObj != nullptr)
// It seems 0 and 1 have special meaning: just start counting from 2 to avoid issues with that.
attrList->add(XML_relativeHeight, OString::number(pObj->GetOrdNum() + 2));
else
// relativeHeight is mandatory attribute, if value is not present, we must write default value
attrList->add(XML_relativeHeight, "0");
- if (pObj != NULL)
+ if (pObj != nullptr)
{
OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObj);
if (!sAnchorId.isEmpty())
@@ -389,8 +389,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_simplePos, XML_x, "0", XML_y, "0", FSEND); // required, unused
const char* relativeFromH;
const char* relativeFromV;
- const char* alignH = NULL;
- const char* alignV = NULL;
+ const char* alignH = nullptr;
+ const char* alignV = nullptr;
switch (pFrameFormat->GetVertOrient().GetRelationOrient())
{
case text::RelOrientation::PAGE_PRINT_AREA:
@@ -481,7 +481,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
**/
const sal_Int64 MAX_INTEGER_VALUE = SAL_MAX_INT32;
const sal_Int64 MIN_INTEGER_VALUE = SAL_MIN_INT32;
- if (alignH != NULL)
+ if (alignH != nullptr)
{
m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_align, FSEND);
m_pImpl->m_pSerializer->write(alignH);
@@ -527,11 +527,11 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
(strcmp(relativeFromV, "line") == 0 || strcmp(relativeFromV, "paragraph") == 0) &&
(!alignV || strcmp(alignV, "top") == 0))
{
- alignV = NULL;
+ alignV = nullptr;
nTwipstoEMU = 635;
}
- if (alignV != NULL)
+ if (alignV != nullptr)
{
m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_align, FSEND);
m_pImpl->m_pSerializer->write(alignV);
@@ -561,7 +561,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
aAttrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft())).getStr());
aAttrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight())).getStr());
const SdrObject* pObj = pFrameFormat->FindRealSdrObject();
- if (pObj != NULL)
+ if (pObj != nullptr)
{
OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObj);
if (!sAnchorId.isEmpty())
@@ -780,7 +780,7 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat
m_pImpl->m_pSerializer->endElementNS(XML_w, XML_pict);
if (bSwapInPage)
- const_cast< SdrObject* >(sdrObj)->SetPage(0);
+ const_cast< SdrObject* >(sdrObj)->SetPage(nullptr);
}
bool lcl_isLockedCanvas(uno::Reference<drawing::XShape> xShape)
@@ -1314,7 +1314,7 @@ void DocxSdrExport::writeOnlyTextOfFrame(sw::Frame* pParentFrame)
void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox)
{
- const editeng::SvxBorderLine* pBorderLine = 0;
+ const editeng::SvxBorderLine* pBorderLine = nullptr;
if (rBox.GetTop())
{
@@ -1529,7 +1529,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo
m_pImpl->m_rExport.m_bLinkedTextboxesHelperInitialized = true;
}
- m_pImpl->m_rExport.m_pParentFrame = NULL;
+ m_pImpl->m_rExport.m_pParentFrame = nullptr;
bool skipTxBxContent = false ;
bool isTxbxLinked = false ;
@@ -1593,7 +1593,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo
pFS->endElementNS(XML_wps, XML_txbx);
}
sax_fastparser::XFastAttributeListRef xBodyPrAttrList(m_pImpl->m_pBodyPrAttrList);
- m_pImpl->m_pBodyPrAttrList = NULL;
+ m_pImpl->m_pBodyPrAttrList = nullptr;
if (!bTextBoxOnly)
{
pFS->startElementNS(XML_wps, XML_bodyPr, xBodyPrAttrList);
@@ -1668,7 +1668,7 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly
m_pImpl->m_pFlyAttrList->add(XML_style, m_pImpl->m_aTextFrameStyle.makeStringAndClear());
const SdrObject* pObject = pParentFrame->GetFrameFormat().FindRealSdrObject();
- if (pObject != NULL)
+ if (pObject != nullptr)
{
OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObject);
if (!sAnchorId.isEmpty())
@@ -1680,8 +1680,8 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly
sax_fastparser::XFastAttributeListRef xTextboxAttrList(m_pImpl->m_pTextboxAttrList.get());
m_pImpl->m_pTextboxAttrList.clear();
m_pImpl->m_bTextFrameSyntax = false;
- m_pImpl->m_pFlyFrameSize = 0;
- m_pImpl->m_rExport.m_pParentFrame = NULL;
+ m_pImpl->m_pFlyFrameSize = nullptr;
+ m_pImpl->m_rExport.m_pParentFrame = nullptr;
if (!bTextBoxOnly)
{
@@ -1719,7 +1719,7 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly
if (m_pImpl->m_pFlyWrapAttrList)
{
sax_fastparser::XFastAttributeListRef xFlyWrapAttrList(m_pImpl->m_pFlyWrapAttrList);
- m_pImpl->m_pFlyWrapAttrList = NULL;
+ m_pImpl->m_pFlyWrapAttrList = nullptr;
pFS->singleElementNS(XML_w10, XML_wrap, xFlyWrapAttrList);
}
@@ -1744,7 +1744,7 @@ bool DocxSdrExport::Impl::checkFrameBtlr(SwNode* pStartNode, bool bDML)
SwTextNode* pTextNode = pStartNode->GetTextNode();
- const SfxPoolItem* pItem = 0; // explicitly init to avoid warnings
+ const SfxPoolItem* pItem = nullptr; // explicitly init to avoid warnings
bool bItemSet = false;
if (pTextNode->HasSwAttrSet())
{
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 1142f3551b51..3d6d075685c3 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -92,7 +92,7 @@ void DocxTableStyleExport::CnfStyle(uno::Sequence<beans::PropertyValue>& rAttrib
{"firstRowLastColumn", XML_firstRowLastColumn},
{"lastRowFirstColumn", XML_lastRowFirstColumn},
{"lastRowLastColumn", XML_lastRowLastColumn},
- {0, 0}
+ {nullptr, 0}
};
if (sal_Int32 nToken = DocxStringGetToken(aTokens, rAttributeList[j].Name))
@@ -143,7 +143,7 @@ void DocxTableStyleExport::Impl::tableStyleTableCellMar(uno::Sequence<beans::Pro
{"end", XML_end},
{"top", XML_top},
{"bottom", XML_bottom},
- {0, 0}
+ {nullptr, 0}
};
if (!rTableCellMar.hasElements())
@@ -174,7 +174,7 @@ void DocxTableStyleExport::Impl::tableStyleTcBorder(sal_Int32 nToken, const uno:
{"space", XML_space},
{"themeColor", XML_themeColor},
{"themeTint", XML_themeTint},
- {0, 0}
+ {nullptr, 0}
};
if (!rTcBorder.hasElements())
@@ -203,7 +203,7 @@ void DocxTableStyleExport::Impl::tableStyleTcBorders(uno::Sequence<beans::Proper
{"insideV", XML_insideV},
{"tl2br", XML_tl2br},
{"tr2bl", XML_tr2bl},
- {0, 0}
+ {nullptr, 0}
};
if (!rTcBorders.hasElements())
diff --git a/sw/source/filter/ww8/fields.cxx b/sw/source/filter/ww8/fields.cxx
index e0d9764377cb..d95ccf12de4b 100644
--- a/sw/source/filter/ww8/fields.cxx
+++ b/sw/source/filter/ww8/fields.cxx
@@ -29,9 +29,9 @@ namespace ww
// #i43956# - field <eFOOTREF> = 5 should be mapped to "REF"
static const char *aFieldNames[] =
{
- /* 0*/ 0,
- /* 1*/ 0,
- /* 2*/ 0,
+ /* 0*/ nullptr,
+ /* 1*/ nullptr,
+ /* 2*/ nullptr,
/* 3*/ "REF",
/* 4*/ "XE",
/* 5*/ "REF",
@@ -65,18 +65,18 @@ namespace ww
/*33*/ "PAGE",
/*34*/ "=",
/*35*/ "QUOTE",
- /*36*/ 0,
+ /*36*/ nullptr,
/*37*/ "PAGEREF",
/*38*/ "ASK",
/*39*/ "FILLIN",
- /*40*/ 0,
+ /*40*/ nullptr,
/*41*/ "NEXT",
/*42*/ "NEXTIF",
/*43*/ "SKIPIF",
/*44*/ "MERGEREC",
- /*45*/ 0,
- /*46*/ 0,
- /*47*/ 0,
+ /*45*/ nullptr,
+ /*46*/ nullptr,
+ /*47*/ nullptr,
/*48*/ "PRINT",
/*49*/ "EQ",
/*50*/ "GOTOBUTTON",
@@ -84,7 +84,7 @@ namespace ww
/*52*/ "AUTONUMOUT",
/*53*/ "AUTONUMLGL",
/*54*/ "AUTONUM",
- /*55*/ 0,
+ /*55*/ nullptr,
/*56*/ "LINK",
/*57*/ "SYMBOL",
/*58*/ "EMBED",
@@ -105,22 +105,22 @@ namespace ww
/*73*/ "TOA",
/*74*/ "TA",
/*75*/ "MERGESEQ",
- /*76*/ 0,
+ /*76*/ nullptr,
/*77*/ "PRIVATE",
/*78*/ "DATABASE",
/*79*/ "AUTOTEXT",
/*80*/ "COMPARE",
- /*81*/ 0,
- /*82*/ 0,
+ /*81*/ nullptr,
+ /*82*/ nullptr,
/*83*/ "FORMDROPDOWN",
/*84*/ "ADVANCE",
/*85*/ "DOCPROPERTY",
- /*86*/ 0,
+ /*86*/ nullptr,
/*87*/ "CONTROL",
/*88*/ "HYPERLINK",
/*89*/ "AUTOTEXTLIST",
/*90*/ "LISTNUM",
- /*91*/ 0,
+ /*91*/ nullptr,
/*92*/ "BIDIOUTLINE",
/*93*/ "ADDRESSBLOCK",
/*94*/ "GREETINGLINE",
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 434ec181c9db..52cdf24cccc8 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -476,7 +476,7 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
nRubyScript = i18n::ScriptType::ASIAN;
const SwTextRuby* pRubyText = rRuby.GetTextRuby();
- const SwCharFormat* pFormat = pRubyText ? pRubyText->GetCharFormat() : 0;
+ const SwCharFormat* pFormat = pRubyText ? pRubyText->GetCharFormat() : nullptr;
OUString sFamilyName;
long nHeight;
if (pFormat)
@@ -531,16 +531,16 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
aStr += OUString::number(nHeight);
aStr += "(";
EndRun();
- m_rExport.OutputField(0, ww::eEQ, aStr, WRITEFIELD_START | WRITEFIELD_CMD_START);
+ m_rExport.OutputField(nullptr, ww::eEQ, aStr, WRITEFIELD_START | WRITEFIELD_CMD_START);
aStr = rRuby.GetText();
aStr += ")";
aStr += ",";
- m_rExport.OutputField(0, ww::eEQ, aStr, 0);
+ m_rExport.OutputField(nullptr, ww::eEQ, aStr, 0);
}
void RtfAttributeOutput::EndRuby()
{
- m_rExport.OutputField(0, ww::eEQ, ")", WRITEFIELD_END | WRITEFIELD_CLOSE);
+ m_rExport.OutputField(nullptr, ww::eEQ, ")", WRITEFIELD_END | WRITEFIELD_CLOSE);
EndRun();
}
@@ -981,7 +981,7 @@ void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t p
void RtfAttributeOutput::StartTable(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/)
{
// To trigger calling InitTableHelper()
- m_pTableWrt.reset(0);
+ m_pTableWrt.reset(nullptr);
}
void RtfAttributeOutput::StartTableRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner)
@@ -1075,7 +1075,7 @@ void RtfAttributeOutput::EndTable()
if (m_nTableDepth > 0)
{
m_nTableDepth--;
- m_pTableWrt.reset(0);
+ m_pTableWrt.reset(nullptr);
}
// We closed the table; if it is a nested table, the cell that contains it
@@ -1083,7 +1083,7 @@ void RtfAttributeOutput::EndTable()
m_bTableCellOpen = true;
// Cleans the table helper
- m_pTableWrt.reset(0);
+ m_pTableWrt.reset(nullptr);
}
void RtfAttributeOutput::FinishTableRowCell(ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool /*bForceEmptyParagraph*/)
@@ -1293,7 +1293,7 @@ void RtfAttributeOutput::SectionPageNumbering(sal_uInt16 nNumType, const ::boost
m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGNRESTART);
}
- const char* pStr = 0;
+ const char* pStr = nullptr;
switch (nNumType)
{
case SVX_NUM_CHARS_UPPER_LETTER:
@@ -1327,7 +1327,7 @@ void RtfAttributeOutput::SectionType(sal_uInt8 nBreakCode)
* break code: 0 No break, 1 New column
* 2 New page, 3 Even page, 4 Odd page
*/
- const char* sType = NULL;
+ const char* sType = nullptr;
switch (nBreakCode)
{
case 1:
@@ -1828,7 +1828,7 @@ void RtfAttributeOutput::writeTextFrame(const sw::Frame& rFrame, bool bTextBox)
m_nTableDepth = nTableDepth;
}
- m_rExport.m_pParentFrame = NULL;
+ m_rExport.m_pParentFrame = nullptr;
m_rExport.Strm().WriteChar('}'); // shptxt
@@ -1843,7 +1843,7 @@ void RtfAttributeOutput::writeTextFrame(const sw::Frame& rFrame, bool bTextBox)
void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Point& /*rNdTopLeft*/)
{
const SwNode* pNode = rFrame.GetContent();
- const SwGrfNode* pGrfNode = pNode ? pNode->GetGrfNode() : 0;
+ const SwGrfNode* pGrfNode = pNode ? pNode->GetGrfNode() : nullptr;
switch (rFrame.GetWriterType())
{
@@ -1872,7 +1872,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin
m_rExport.Strm().WriteCharPtr(m_aRunText.makeStringAndClear().getStr());
m_rExport.Strm().WriteCharPtr(m_aStyles.makeStringAndClear().getStr());
m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false;
- m_pFlyFrameSize = 0;
+ m_pFlyFrameSize = nullptr;
const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat();
lcl_TextFrameShadow(m_aFlyProperties, rFrameFormat);
@@ -1907,7 +1907,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin
m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE);
m_rExport.OutputFormat(rFrame.GetFrameFormat(), false, false, true);
m_aRunText->append('}');
- m_rExport.m_pParentFrame = NULL;
+ m_rExport.m_pParentFrame = nullptr;
}
if (pGrfNode)
@@ -1943,7 +1943,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin
m_aRunText->append('}');
if (bSwapInPage)
- const_cast< SdrObject* >(pSdrObj)->SetPage(0);
+ const_cast< SdrObject* >(pSdrObj)->SetPage(nullptr);
}
}
break;
@@ -2354,7 +2354,7 @@ void RtfAttributeOutput::CharShadow(const SvxShadowedItem& rShadow)
void RtfAttributeOutput::CharUnderline(const SvxUnderlineItem& rUnderline)
{
- const char* pStr = 0;
+ const char* pStr = nullptr;
const SfxPoolItem* pItem = m_rExport.HasItem(RES_CHRATR_WORDLINEMODE);
bool bWord = false;
if (pItem)
@@ -2594,7 +2594,7 @@ void RtfAttributeOutput::CharRelief(const SvxCharReliefItem& rRelief)
pStr = OOO_STRING_SVTOOLS_RTF_IMPR;
break;
default:
- pStr = 0;
+ pStr = nullptr;
break;
}
@@ -2630,7 +2630,7 @@ void RtfAttributeOutput::TextINetFormat(const SwFormatINetFormat& rURL)
const SwCharFormat* pFormat;
const SwTextINetFormat* pTextAtr = rURL.GetTextINetFormat();
- if (pTextAtr && 0 != (pFormat = pTextAtr->GetCharFormat()))
+ if (pTextAtr && nullptr != (pFormat = pTextAtr->GetCharFormat()))
{
sal_uInt16 nStyle = m_rExport.GetId(pFormat);
OString* pString = m_rExport.GetStyle(nStyle);
@@ -2751,7 +2751,7 @@ void RtfAttributeOutput::ParaTabStop(const SvxTabStopItem& rTabStop)
const SvxTabStop& rTS = rTabStop[ n ];
if (SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment())
{
- const char* pFill = 0;
+ const char* pFill = nullptr;
switch (rTS.GetFill())
{
case cDfltFillChar:
@@ -2775,7 +2775,7 @@ void RtfAttributeOutput::ParaTabStop(const SvxTabStopItem& rTabStop)
if (pFill)
m_aStyles.append(pFill);
- const sal_Char* pAdjStr = 0;
+ const sal_Char* pAdjStr = nullptr;
switch (rTS.GetAdjustment())
{
case SVX_TAB_ADJUST_RIGHT:
@@ -2811,7 +2811,7 @@ void RtfAttributeOutput::ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone)
void RtfAttributeOutput::ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId)
{
- if (USHRT_MAX == nNumId || 0 == nNumId || 0 == pTextNd)
+ if (USHRT_MAX == nNumId || 0 == nNumId || nullptr == pTextNd)
return;
const SwNumRule* pRule = pTextNd->GetNumRule();
@@ -3500,8 +3500,8 @@ RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport)
m_aCells(),
m_bSingleEmptyRun(false),
m_bInRun(false),
- m_pFlyFrameSize(0),
- m_pPrevPageDesc(0)
+ m_pFlyFrameSize(nullptr),
+ m_pPrevPageDesc(nullptr)
{
}
@@ -3677,7 +3677,7 @@ static void lcl_AppendSP(OStringBuffer& rBuffer,
static OString ExportPICT(const SwFlyFrameFormat* pFlyFrameFormat, const Size& rOrig, const Size& rRendered, const Size& rMapped,
const SwCropGrf& rCr, const char* pBLIPType, const sal_uInt8* pGraphicAry,
- unsigned long nSize, const RtfExport& rExport, SvStream* pStream = 0, bool bWritePicProp = true)
+ unsigned long nSize, const RtfExport& rExport, SvStream* pStream = nullptr, bool bWritePicProp = true)
{
OStringBuffer aRet;
if (pBLIPType && nSize && pGraphicAry)
@@ -3764,7 +3764,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFram
Size aMapped(pGraphic->GetPrefSize());
const SwCropGrf& rCr = static_cast<const SwCropGrf&>(rOLENode.GetAttr(RES_GRFATR_CROPGRF));
const sal_Char* pBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP;
- const sal_uInt8* pGraphicAry = 0;
+ const sal_uInt8* pGraphicAry = nullptr;
SvMemoryStream aStream;
if (GraphicConverter::Export(aStream, *pGraphic, ConvertDataFormat::PNG) != ERRCODE_NONE)
SAL_WARN("sw.rtf", "failed to export the graphic");
@@ -3803,7 +3803,7 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat
// so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated
// to RTLD_GLOBAL, so most probably a gcc bug.
oox::FormulaExportBase* pBase = dynamic_cast<oox::FormulaExportBase*>(dynamic_cast<SfxBaseModel*>(xClosable.get()));
- assert(pBase != NULL);
+ assert(pBase != nullptr);
OStringBuffer aBuf;
if (pBase)
pBase->writeFormulaRtf(aBuf, m_rExport.eCurrentEncoding);
@@ -3828,7 +3828,7 @@ void RtfAttributeOutput::FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, Sw
void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode)
{
SvMemoryStream aStream;
- const sal_uInt8* pGraphicAry = 0;
+ const sal_uInt8* pGraphicAry = nullptr;
sal_uInt32 nSize = 0;
const Graphic& rGraphic(pGrfNode->GetGrf());
@@ -3841,7 +3841,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
const sal_Char* pConvertDestinationBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE;
GfxLink aGraphicLink;
- const sal_Char* pBLIPType = 0;
+ const sal_Char* pBLIPType = nullptr;
if (rGraphic.IsLink())
{
aGraphicLink = rGraphic.GetLink();
@@ -3859,7 +3859,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
// compatible, keep it that way by assigning NULL value to pGraphicAry
case GFX_LINK_TYPE_NATIVE_BMP:
// pBLIPType = OOO_STRING_SVTOOLS_RTF_WBITMAP;
- pGraphicAry = 0;
+ pGraphicAry = nullptr;
break;
case GFX_LINK_TYPE_NATIVE_JPG:
@@ -3908,7 +3908,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
aRendered.Width() = rS.GetWidth();
aRendered.Height() = rS.GetHeight();
- sw::Frame* pFrame = 0;
+ sw::Frame* pFrame = nullptr;
for (sw::FrameIter it = m_rExport.m_aFrames.begin(); it != m_rExport.m_aFrames.end(); ++it)
{
if (pFlyFrameFormat == &it->GetFrameFormat())
@@ -3938,8 +3938,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true;
m_rExport.OutputFormat(pFrame->GetFrameFormat(), false, false, true);
m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false;
- m_rExport.m_pParentFrame = NULL;
- m_pFlyFrameSize = 0;
+ m_rExport.m_pParentFrame = nullptr;
+ m_pFlyFrameSize = nullptr;
std::vector< std::pair<OString, OString> > aFlyProperties;
aFlyProperties.push_back(std::make_pair<OString, OString>("shapeType", OString::number(ESCHER_ShpInst_PictureFrame)));
@@ -4031,7 +4031,7 @@ void RtfAttributeOutput::BulletDefinition(int /*nId*/, const Graphic& rGraphic,
m_rExport.OutULong(aSize.Height());
m_rExport.Strm().WriteCharPtr(SAL_NEWLINE_STRING);
- const sal_uInt8* pGraphicAry = 0;
+ const sal_uInt8* pGraphicAry = nullptr;
SvMemoryStream aStream;
if (GraphicConverter::Export(aStream, rGraphic, ConvertDataFormat::PNG) != ERRCODE_NONE)
SAL_WARN("sw.rtf", "failed to export the numbering picture bullet");
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 7f249d544db2..403c79798476 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -158,7 +158,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak(sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL) override;
+ virtual void SectionBreak(sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr) override;
/// Start of the section properties.
virtual void StartSection() override;
@@ -210,7 +210,7 @@ public:
sal_Int16 nFirstLineIndex,
sal_Int16 nListTabPos,
const OUString& rNumberingString,
- const SvxBrushItem* pBrush = 0) override;//For i120928,to export graphic of bullet
+ const SvxBrushItem* pBrush = nullptr) override;//For i120928,to export graphic of bullet
void WriteField_Impl(const SwField* pField, ww::eField eType, const OUString& rFieldCmd, sal_uInt8 nMode);
void WriteBookmarks_Impl(std::vector< OUString >& rStarts, std::vector< OUString >& rEnds);
@@ -631,7 +631,7 @@ public:
void FontPitchType(FontPitch ePitch) const;
/// Writes binary data as a hex dump.
- static OString WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, SvStream* pStream = 0, sal_uInt32 nLimit = 64);
+ static OString WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, SvStream* pStream = nullptr, sal_uInt32 nLimit = 64);
void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 607521cd4e9d..df670a7f0982 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -177,7 +177,7 @@ void RtfExport::WriteChar(sal_Unicode)
/* WriteChar() has nothing to do for rtf. */
}
-static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = 0)
+static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = nullptr)
{
sal_uInt8 nEnd = MAXLEVEL;
while (nEnd-- && !rRule.GetNumFormat(nEnd))
@@ -388,7 +388,7 @@ void RtfExport::WriteMainText()
SwTableNode* pTableNode = m_pCurPam->GetNode().FindTableNode();
if (m_pWriter && m_pWriter->bWriteOnlyFirstTable
- && pTableNode != 0)
+ && pTableNode != nullptr)
{
m_pCurPam->GetPoint()->nNode = *pTableNode;
m_pCurPam->GetMark()->nNode = *(pTableNode->EndOfSectionNode());
@@ -556,11 +556,11 @@ void RtfExport::ExportDocument_Impl()
if (m_pDoc->GetPageDescCnt())
{
// Seeking the first SwFormatPageDesc. If no set, the default is valid
- const SwFormatPageDesc* pSttPgDsc = 0;
+ const SwFormatPageDesc* pSttPgDsc = nullptr;
{
const SwNode& rSttNd = *m_pDoc->GetNodes()[
m_pDoc->GetNodes().GetEndOfExtras().GetIndex() + 2 ];
- const SfxItemSet* pSet = 0;
+ const SfxItemSet* pSet = nullptr;
if (rSttNd.IsContentNode())
pSet = &rSttNd.GetContentNode()->GetSwAttrSet();
@@ -577,7 +577,7 @@ void RtfExport::ExportDocument_Impl()
size_t nPosInDoc;
pSttPgDsc = static_cast<const SwFormatPageDesc*>(&pSet->Get(RES_PAGEDESC));
if (!pSttPgDsc->GetPageDesc())
- pSttPgDsc = 0;
+ pSttPgDsc = nullptr;
else if (m_pDoc->FindPageDesc(pSttPgDsc->GetPageDesc()->GetName(), &nPosInDoc))
{
Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_IGNORE).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PGDSCNO);
@@ -812,7 +812,7 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc* pDocument, SwPaM* pCurrent
m_pFilter(pFilter),
m_pWriter(pWriter),
m_pAttrOutput(),
- m_pSections(NULL),
+ m_pSections(nullptr),
m_pSdrExport(),
m_bOutOutlineOnly(bOutOutlineOnly),
eDefaultEncoding(rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING))),
@@ -940,7 +940,7 @@ void RtfExport::InsColor(const Color& rCol)
void RtfExport::InsColorLine(const SvxBoxItem& rBox)
{
- const editeng::SvxBorderLine* pLine = 0;
+ const editeng::SvxBorderLine* pLine = nullptr;
if (rBox.GetTop())
InsColor((pLine = rBox.GetTop())->GetColor());
@@ -981,12 +981,12 @@ void RtfExport::OutColorTable()
{
const SvxColorItem* pCol = static_cast<const SvxColorItem*>(GetDfltAttr(RES_CHRATR_COLOR));
InsColor(pCol->GetValue());
- if (0 != (pCol = static_cast<const SvxColorItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_COLOR))))
+ if (nullptr != (pCol = static_cast<const SvxColorItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_COLOR))))
InsColor(pCol->GetValue());
nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pCol = static_cast<const SvxColorItem*>(rPool.GetItem2(RES_CHRATR_COLOR, n))))
+ if (nullptr != (pCol = static_cast<const SvxColorItem*>(rPool.GetItem2(RES_CHRATR_COLOR, n))))
InsColor(pCol->GetValue());
}
@@ -995,7 +995,7 @@ void RtfExport::OutColorTable()
nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pUnder = static_cast<const SvxUnderlineItem*>(rPool.GetItem2(RES_CHRATR_UNDERLINE, n))))
+ if (nullptr != (pUnder = static_cast<const SvxUnderlineItem*>(rPool.GetItem2(RES_CHRATR_UNDERLINE, n))))
InsColor(pUnder->GetColor());
}
@@ -1005,7 +1005,7 @@ void RtfExport::OutColorTable()
nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pOver = static_cast<const SvxOverlineItem*>(rPool.GetItem2(RES_CHRATR_OVERLINE, n))))
+ if (nullptr != (pOver = static_cast<const SvxOverlineItem*>(rPool.GetItem2(RES_CHRATR_OVERLINE, n))))
InsColor(pOver->GetColor());
}
@@ -1022,14 +1022,14 @@ void RtfExport::OutColorTable()
{
const SvxBrushItem* pBkgrd = static_cast<const SvxBrushItem*>(GetDfltAttr(*pIds));
InsColor(pBkgrd->GetColor());
- if (0 != (pBkgrd = static_cast<const SvxBrushItem*>(rPool.GetPoolDefaultItem(*pIds))))
+ if (nullptr != (pBkgrd = static_cast<const SvxBrushItem*>(rPool.GetPoolDefaultItem(*pIds))))
{
InsColor(pBkgrd->GetColor());
}
nMaxItem = rPool.GetItemCount2(*pIds);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pBkgrd = static_cast<const SvxBrushItem*>(rPool.GetItem2(*pIds , n))))
+ if (nullptr != (pBkgrd = static_cast<const SvxBrushItem*>(rPool.GetItem2(*pIds , n))))
{
InsColor(pBkgrd->GetColor());
}
@@ -1040,14 +1040,14 @@ void RtfExport::OutColorTable()
{
const SvxShadowItem* pShadow = static_cast<const SvxShadowItem*>(GetDfltAttr(RES_SHADOW));
InsColor(pShadow->GetColor());
- if (0 != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetPoolDefaultItem(RES_SHADOW))))
+ if (nullptr != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetPoolDefaultItem(RES_SHADOW))))
{
InsColor(pShadow->GetColor());
}
nMaxItem = rPool.GetItemCount2(RES_SHADOW);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetItem2(RES_SHADOW, n))))
+ if (nullptr != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetItem2(RES_SHADOW, n))))
{
InsColor(pShadow->GetColor());
}
@@ -1057,24 +1057,24 @@ void RtfExport::OutColorTable()
// frame border color
{
const SvxBoxItem* pBox;
- if (0 != (pBox = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_BOX))))
+ if (nullptr != (pBox = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_BOX))))
InsColorLine(*pBox);
nMaxItem = rPool.GetItemCount2(RES_BOX);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_BOX, n))))
+ if (nullptr != (pBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_BOX, n))))
InsColorLine(*pBox);
}
}
{
const SvxBoxItem* pCharBox;
- if (0 != (pCharBox = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_BOX))))
+ if (nullptr != (pCharBox = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_BOX))))
InsColorLine(*pCharBox);
nMaxItem = rPool.GetItemCount2(RES_CHRATR_BOX);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (0 != (pCharBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_CHRATR_BOX, n))))
+ if (nullptr != (pCharBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_CHRATR_BOX, n))))
InsColorLine(*pCharBox);
}
}
@@ -1111,7 +1111,7 @@ OString* RtfExport::GetStyle(sal_uInt16 nId)
std::map<sal_uInt16,OString>::iterator i = m_aStyTable.find(nId);
if (i != m_aStyTable.end())
return &i->second;
- return NULL;
+ return nullptr;
}
sal_uInt16 RtfExport::GetRedline(const OUString& rAuthor)
@@ -1130,7 +1130,7 @@ const OUString* RtfExport::GetRedline(sal_uInt16 nId)
for (std::map<OUString,sal_uInt16>::iterator aIter = m_aRedlineTable.begin(); aIter != m_aRedlineTable.end(); ++aIter)
if ((*aIter).second == nId)
return &(*aIter).first;
- return NULL;
+ return nullptr;
}
void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, bool bCheckForFirstPage)
@@ -1253,7 +1253,7 @@ SwRTFWriter::~SwRTFWriter()
sal_uLong SwRTFWriter::WriteStream()
{
SwPaM aPam(*pCurPam->End(), *pCurPam->Start());
- RtfExport aExport(NULL, pDoc, &aPam, pCurPam, this, m_bOutOutlineOnly);
+ RtfExport aExport(nullptr, pDoc, &aPam, pCurPam, this, m_bOutOutlineOnly);
aExport.ExportDocument(true);
return 0;
}
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index c4c3f869d2b5..cdf7b8e825ec 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -133,8 +133,8 @@ protected:
/// Get ready for a new section.
virtual void PrepareNewPageDesc(const SfxItemSet* pSet,
const SwNode& rNd,
- const SwFormatPageDesc* pNewPgDescFormat = 0,
- const SwPageDesc* pNewPgDesc = 0) override;
+ const SwFormatPageDesc* pNewPgDescFormat = nullptr,
+ const SwPageDesc* pNewPgDesc = nullptr) override;
/// Return value indicates if an inherited outline numbering is suppressed.
virtual bool DisallowInheritingOutlineNumbering(const SwFormat& rFormat) override;
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index b7ea8f22f38e..70a514318c0e 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -62,7 +62,7 @@ sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aD
// fdo#37161 - update layout (if present), for SwWriteTable
SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->CalcLayout();
// get SwPaM*
@@ -76,7 +76,7 @@ sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aD
// export the document
// (in a separate block so that it's destructed before the commit)
{
- RtfExport aExport(this, pDoc, pCurPam, &aPam, NULL);
+ RtfExport aExport(this, pDoc, pCurPam, &aPam, nullptr);
aExport.ExportDocument(true);
}
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 5a28807fd79e..364d1a685336 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -32,10 +32,10 @@
using namespace css;
RtfSdrExport::RtfSdrExport(RtfExport& rExport)
- : EscherEx(EscherExGlobalRef(new EscherExGlobal), 0),
+ : EscherEx(EscherExGlobalRef(new EscherExGlobal), nullptr),
m_rExport(rExport),
m_rAttrOutput(static_cast<RtfAttributeOutput&>(m_rExport.AttrOutput())),
- m_pSdrObject(NULL),
+ m_pSdrObject(nullptr),
m_nShapeType(ESCHER_ShpInst_Nil),
m_nShapeFlags(0) ,
m_aShapeStyle(200),
@@ -48,8 +48,8 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
RtfSdrExport::~RtfSdrExport()
{
- delete mpOutStrm, mpOutStrm = NULL;
- delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL;
+ delete mpOutStrm, mpOutStrm = nullptr;
+ delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = nullptr;
}
void RtfSdrExport::OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance)
@@ -514,7 +514,7 @@ sal_Int32 RtfSdrExport::StartShape()
{
if (SwFrameFormat* pTextBox = SwTextBoxHelper::findTextBox(pShape))
{
- sw::Frame* pFrame = 0;
+ sw::Frame* pFrame = nullptr;
for (sw::FrameIter it = m_rExport.m_aFrames.begin(); it != m_rExport.m_aFrames.end(); ++it)
{
if (pTextBox == &it->GetFrameFormat())
@@ -533,7 +533,7 @@ sal_Int32 RtfSdrExport::StartShape()
const SdrTextObj* pTextObj = dynamic_cast<const SdrTextObj*>(m_pSdrObject);
if (pTextObj)
{
- const OutlinerParaObject* pParaObj = 0;
+ const OutlinerParaObject* pParaObj = nullptr;
std::unique_ptr<const OutlinerParaObject> pOwnedParaObj;
/*
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index fdb5371c2c95..ab0b24d32696 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -89,7 +89,7 @@ private:
virtual void OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance = 0) override;
virtual void CloseContainer() override;
- virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const Rectangle* pBoundRect = 0) override;
+ virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const Rectangle* pBoundRect = nullptr) override;
virtual void LeaveGroup() override;
virtual void AddShape(sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0) override;
diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx
index 44f0340b38c4..55c4d68a2653 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.cxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.cxx
@@ -11,8 +11,8 @@
RtfStringBufferValue::RtfStringBufferValue()
: m_aBuffer(),
- m_pFlyFrameFormat(0),
- m_pGrfNode(0)
+ m_pFlyFrameFormat(nullptr),
+ m_pGrfNode(nullptr)
{
}
@@ -38,7 +38,7 @@ OString RtfStringBufferValue::makeStringAndClear()
bool RtfStringBufferValue::isGraphic() const
{
- return m_pFlyFrameFormat != 0 && m_pGrfNode != 0;
+ return m_pFlyFrameFormat != nullptr && m_pGrfNode != nullptr;
}
RtfStringBuffer::RtfStringBuffer()
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index 3f74cf5f0a8b..47c2f87ff620 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -134,7 +134,7 @@ namespace ww
const sal_Char* GetEnglishNameFromSti(sti eSti) throw()
{
if (eSti >= stiMax)
- return 0;
+ return nullptr;
else
return GetStiNames()[eSti];
}
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index d537e2d084de..8b157913ff8e 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -165,12 +165,12 @@ namespace sw
{
//For i120928,size conversion before exporting graphic of bullet
Frame::Frame(const Graphic &rGrf, const SwPosition &rPos)
- : mpFlyFrm(NULL)
+ : mpFlyFrm(nullptr)
, maPos(rPos)
, maSize()
, maLayoutSize()
, meWriterType(eBulletGrf)
- , mpStartFrameContent(0)
+ , mpStartFrameContent(nullptr)
, mbIsInline(true)
, mbForBullet(true)
, maGrf(rGrf)
@@ -195,7 +195,7 @@ namespace sw
, maSize()
, maLayoutSize() // #i43447#
, meWriterType(eTextBox)
- , mpStartFrameContent(0)
+ , mpStartFrameContent(nullptr)
// #i43447# - move to initialization list
, mbIsInline( (rFormat.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
// #i120928# - handle graphic of bullet within existing implementation
@@ -321,7 +321,7 @@ namespace sw
rName,
OUString() );
- mxIPRef = 0;
+ mxIPRef = nullptr;
}
return bSuccess;
@@ -342,7 +342,7 @@ namespace sw
{
}
- mxIPRef = 0;
+ mxIPRef = nullptr;
}
}
}
@@ -424,7 +424,7 @@ namespace sw
sal_uInt16 nTotal = rSet.TotalCount();
for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
{
rItems[pItem->Which()] = pItem;
@@ -438,7 +438,7 @@ namespace sw
{
do
rItems[pItem->Which()] = pItem;
- while (!aIter.IsAtEnd() && 0 != (pItem = aIter.NextItem()));
+ while (!aIter.IsAtEnd() && nullptr != (pItem = aIter.NextItem()));
}
}
}
@@ -449,7 +449,7 @@ namespace sw
sw::cPoolItemIter aIter = rItems.find(eType);
if (aIter != rItems.end())
return aIter->second;
- return 0;
+ return nullptr;
}
void ClearOverridesFromSet(const SwFormatCharFormat &rFormat, SfxItemSet &rSet)
@@ -462,7 +462,7 @@ namespace sw
const SfxPoolItem *pItem = aIter.GetCurItem();
do
rSet.ClearItem(pItem->Which());
- while (!aIter.IsAtEnd() && 0 != (pItem = aIter.NextItem()));
+ while (!aIter.IsAtEnd() && nullptr != (pItem = aIter.NextItem()));
}
}
}
@@ -556,17 +556,17 @@ namespace sw
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
OSL_FAIL("Invalid level");
- return NULL;
+ return nullptr;
}
return &(rRule.Get( static_cast< sal_uInt16 >(nLevel) ));
}
const SwNumFormat* GetNumFormatFromTextNode(const SwTextNode &rTextNode)
{
- const SwNumRule *pRule = 0;
+ const SwNumRule *pRule = nullptr;
if (
rTextNode.IsNumbered() && rTextNode.IsCountedInList() &&
- 0 != (pRule = rTextNode.GetNumRule())
+ nullptr != (pRule = rTextNode.GetNumRule())
)
{
return GetNumFormatFromSwNumRuleLevel(*pRule,
@@ -575,18 +575,18 @@ namespace sw
OSL_ENSURE(rTextNode.GetDoc(), "No document for node?, suspicious");
if (!rTextNode.GetDoc())
- return 0;
+ return nullptr;
if (
rTextNode.IsNumbered() && rTextNode.IsCountedInList() &&
- 0 != (pRule = rTextNode.GetDoc()->GetOutlineNumRule())
+ nullptr != (pRule = rTextNode.GetDoc()->GetOutlineNumRule())
)
{
return GetNumFormatFromSwNumRuleLevel(*pRule,
rTextNode.GetActualListLevel());
}
- return 0;
+ return nullptr;
}
const SwNumRule* GetNumRuleFromTextNode(const SwTextNode &rTextNode)
@@ -596,16 +596,16 @@ namespace sw
const SwNumRule* GetNormalNumRuleFromTextNode(const SwTextNode &rTextNode)
{
- const SwNumRule *pRule = 0;
+ const SwNumRule *pRule = nullptr;
if (
rTextNode.IsNumbered() && rTextNode.IsCountedInList() &&
- 0 != (pRule = rTextNode.GetNumRule())
+ nullptr != (pRule = rTextNode.GetNumRule())
)
{
return pRule;
}
- return 0;
+ return nullptr;
}
SwNoTextNode *GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat)
@@ -613,14 +613,14 @@ namespace sw
const SwNodeIndex *pIndex = rFormat.GetContent().GetContentIdx();
OSL_ENSURE(pIndex, "No NodeIndex in SwFrameFormat ?, suspicious");
if (!pIndex)
- return 0;
+ return nullptr;
SwNodeIndex aIdx(*pIndex, 1);
return aIdx.GetNode().GetNoTextNode();
}
bool HasPageBreak(const SwNode &rNd)
{
- const SvxFormatBreakItem *pBreak = 0;
+ const SvxFormatBreakItem *pBreak = nullptr;
if (rNd.IsTableNode() && rNd.GetTableNode())
{
const SwTable& rTable = rNd.GetTableNode()->GetTable();
@@ -766,13 +766,13 @@ namespace sw
{
SwRedlineData aData(pFltRedline->eTypePrev,
pFltRedline->nAutorNoPrev, pFltRedline->aStampPrev, OUString(),
- 0);
+ nullptr);
mrDoc.getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(aData, aRegion), true);
}
SwRedlineData aData(pFltRedline->eType, pFltRedline->nAutorNo,
- pFltRedline->aStamp, OUString(), 0);
+ pFltRedline->aStamp, OUString(), nullptr);
SwRangeRedline *const pNewRedline(new SwRangeRedline(aData, aRegion));
// the point node may be deleted in AppendRedline, so park
@@ -856,7 +856,7 @@ namespace sw
{
SwFrameFormat * pFrameFormat = pTable->GetTable().GetFrameFormat();
- if (pFrameFormat != NULL)
+ if (pFrameFormat != nullptr)
{
SwNodeIndex *pIndex = aIter->second;
pTable->DelFrms();
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 0d115bb90451..7538cb36a0fb 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -262,7 +262,7 @@ namespace sw
template<class T> const T * item_cast(const SfxPoolItem *pItem)
{
if (pItem && !pItem->IsA(STATICTYPE(T)))
- pItem = 0;
+ pItem = nullptr;
return static_cast<const T *>(pItem);
}
@@ -565,7 +565,7 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM = 0);
+ Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM = nullptr);
/** fix up frame positions, must be called after SetRedlineMode */
void UpdateFramePositions(Frames & rFrames);
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index f9d3fc94146f..229a757ebbd0 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -156,7 +156,7 @@ namespace myImplHelpers
OSL_ENSURE(SAL_N_ELEMENTS(aArr) == 75, "Style Array has false size");
- SwTextFormatColl* pRet = 0;
+ SwTextFormatColl* pRet = nullptr;
//If this is a built-in word style that has a built-in writer
//equivalent, then map it to one of our built in styles regardless
//of its name
@@ -220,7 +220,7 @@ namespace myImplHelpers
eLookup = RES_POOLCHR_NORMAL_END;
break;
}
- SwCharFormat *pRet = 0;
+ SwCharFormat *pRet = nullptr;
if (eLookup != RES_POOLCHR_NORMAL_END)
pRet = mrDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool( static_cast< sal_uInt16 >(eLookup) );
return pRet;
@@ -567,7 +567,7 @@ namespace sw
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized(rText.getLength(), 0, &nError);
ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(),
- static_cast< UBiDiLevel >(eDefaultDir), 0, &nError);
+ static_cast< UBiDiLevel >(eDefaultDir), nullptr, &nError);
sal_Int32 nCount = ubidi_countRuns(pBidi, &nError);
aDirChanges.reserve(nCount);
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 5717a91bba7b..fa39c6d6e600 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -450,7 +450,7 @@ void WW8Export::DoComboBox(const OUString &rName,
const OUString &rSelected,
uno::Sequence<OUString> &rListItems)
{
- OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
+ OutputField(nullptr, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
sal_uLong nDataStt = pDataStrm->Tell();
@@ -470,7 +470,7 @@ void WW8Export::DoComboBox(const OUString &rName,
m_pChpPlc->AppendFkpEntry(Strm().Tell(), sizeof(aArr1), aArr1);
- OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
+ OutputField(nullptr, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_CLOSE);
::sw::WW8FFData aFFData;
@@ -497,7 +497,7 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
uno::Reference<beans::XPropertySetInfo> xPropSetInfo =
xPropSet->getPropertySetInfo();
- OutputField(0, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
+ OutputField(nullptr, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
sal_uLong nDataStt = pDataStrm->Tell();
@@ -552,12 +552,12 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
aFFData.Write(pDataStrm);
- OutputField(0, ww::eFORMCHECKBOX, OUString(), WRITEFIELD_CLOSE);
+ OutputField(nullptr, ww::eFORMCHECKBOX, OUString(), WRITEFIELD_CLOSE);
}
void WW8Export::DoFormText(const SwInputField * pField)
{
- OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
+ OutputField(nullptr, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
sal_uLong nDataStt = pDataStrm->Tell();
@@ -585,7 +585,7 @@ void WW8Export::DoFormText(const SwInputField * pField)
aFFData.setStatus(pField->GetToolTip());
aFFData.Write(pDataStrm);
- OutputField(0, ww::eFORMTEXT, OUString(), WRITEFIELD_CMD_END);
+ OutputField(nullptr, ww::eFORMTEXT, OUString(), WRITEFIELD_CMD_END);
const OUString fieldStr( pField->ExpandField(true) );
SwWW8Writer::WriteString16(Strm(), fieldStr, false);
@@ -600,7 +600,7 @@ void WW8Export::DoFormText(const SwInputField * pField)
m_pChpPlc->AppendFkpEntry(Strm().Tell(),
sizeof( aArr2 ), aArr2 );
- OutputField(0, ww::eFORMTEXT, OUString(), WRITEFIELD_CLOSE);
+ OutputField(nullptr, ww::eFORMTEXT, OUString(), WRITEFIELD_CLOSE);
}
PlcDrawObj::~PlcDrawObj()
@@ -990,13 +990,13 @@ void WW8_WrPlcTextBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId )
aContent.push_back( &rObj );
aShapeIds.push_back( nShapeId );
//save NULL, if we have an actual SdrObject
- aSpareFormats.push_back(NULL);
+ aSpareFormats.push_back(nullptr);
}
void WW8_WrPlcTextBoxes::Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId )
{
//no sdr object, we insert a NULL in the aContent and save the real fmt in aSpareFormats.
- aContent.push_back( NULL );
+ aContent.push_back( nullptr );
aShapeIds.push_back( nShapeId );
aSpareFormats.push_back(pFormat);
}
@@ -1039,7 +1039,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrameFormat,
if (rFrameFormat.IsInline())
{
- OutputField(0, ww::eSHAPE, FieldString(ww::eSHAPE),
+ OutputField(nullptr, ww::eSHAPE, FieldString(ww::eSHAPE),
WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
}
@@ -1067,12 +1067,12 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrameFormat,
}
if (rFrameFormat.IsInline())
- OutputField(0, ww::eSHAPE, OUString(), WRITEFIELD_CLOSE);
+ OutputField(nullptr, ww::eSHAPE, OUString(), WRITEFIELD_CLOSE);
}
MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
const EditTextObject& rEditObj, sal_uInt8 nTyp )
- : MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0), mnTyp(nTyp)
+ : MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(nullptr), mnTyp(nTyp)
{
NextPara( 0 );
}
@@ -1203,7 +1203,7 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos )
if (!aTextAtrArr.empty())
{
const SwModify* pOldMod = m_rExport.m_pOutFormatNode;
- m_rExport.m_pOutFormatNode = 0;
+ m_rExport.m_pOutFormatNode = nullptr;
const SfxItemPool* pSrcPool = pEditPool;
const SfxItemPool& rDstPool = m_rExport.m_pDoc->GetAttrPool();
@@ -1290,10 +1290,10 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const
if (nWhich == i->pAttr->Which() && nTmpSwPos >= i->nStart && nTmpSwPos < i->nEnd)
return i->pAttr; // Found
if (nTmpSwPos < i->nStart)
- return NULL; // dann kommt da nichts mehr
+ return nullptr; // dann kommt da nichts mehr
}
}
- return NULL;
+ return nullptr;
}
const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
@@ -1378,14 +1378,14 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>*
m_rExport.AttrOutput().OutputItem(*pI);
delete pI;
}
- } while( !aIter.IsAtEnd() && 0 != ( pItem = aIter.NextItem() ) );
+ } while( !aIter.IsAtEnd() && nullptr != ( pItem = aIter.NextItem() ) );
m_rExport.SetCurItemSet( pOldSet );
}
}
void WW8Export::WriteSdrTextObj(const SdrTextObj& rTextObj, sal_uInt8 nTyp)
{
- const OutlinerParaObject* pParaObj = 0;
+ const OutlinerParaObject* pParaObj = nullptr;
bool bOwnParaObj = false;
/*
@@ -1526,7 +1526,7 @@ void WW8Export::WriteEscher()
pFib->fcDggInfo = nStart;
pFib->lcbDggInfo = pTableStrm->Tell() - nStart;
- delete m_pEscher, m_pEscher = 0;
+ delete m_pEscher, m_pEscher = nullptr;
}
}
@@ -1668,7 +1668,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI
{
sal_Int32 nBorderThick=0;
SwNoTextNode *pNd = GetNoTextNodeFromSwFrameFormat(rFormat);
- SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
+ SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : nullptr;
OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious");
if (!pGrfNd)
return nBorderThick;
@@ -1686,7 +1686,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI
if (pGrfNd->IsLinkedFile())
{
OUString sURL;
- pGrfNd->GetFileFilterNms( &sURL, 0 );
+ pGrfNd->GetFileFilterNms( &sURL, nullptr );
ww::bytes aBuf;
SwWW8Writer::InsAsString16( aBuf, sURL );
@@ -1890,7 +1890,7 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uI
EscherPropertyContainer aPropOpt;
const SwMirrorGrf &rMirror = rOLENd.GetSwAttrSet().GetMirrorGrf();
WriteOLEPicture(aPropOpt, AddMirrorFlags(0xa00 | SHAPEFLAG_OLESHAPE,
- rMirror), pGraphic ? *pGraphic : Graphic(), *pSdrObj, nShapeId, bRectIsSet ? &aRect : NULL );
+ rMirror), pGraphic ? *pGraphic : Graphic(), *pSdrObj, nShapeId, bRectIsSet ? &aRect : nullptr );
nBorderThick = WriteFlyFrameAttr(rFormat, mso_sptPictureFrame, aPropOpt);
WriteGrfAttr(rOLENd, aPropOpt);
@@ -1979,7 +1979,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
const SvxBorderLine* pLine;
for( SvxBoxItemLine n : o3tl::enumrange<SvxBoxItemLine>() )
- if( 0 != ( pLine = static_cast<const SvxBoxItem*>(pItem)->GetLine( n )) )
+ if( nullptr != ( pLine = static_cast<const SvxBoxItem*>(pItem)->GetLine( n )) )
{
if( bFirstLine )
{
@@ -2266,7 +2266,7 @@ void SwBasicEscherEx::WritePictures()
SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
: SwBasicEscherEx(pStrm, rWW8Wrt),
- pTextBxs(0)
+ pTextBxs(nullptr)
{
aHostData.SetClientData(&aWinwordAnchoring);
OpenContainer( ESCHER_DggContainer );
@@ -2353,7 +2353,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
nShapeId = AddSdrObject(*pSdrObj);
if (bSwapInPage)
- (const_cast<SdrObject*>(pSdrObj))->SetPage(0);
+ (const_cast<SdrObject*>(pSdrObj))->SetPage(nullptr);
}
#if OSL_DEBUG_LEVEL > 0
else
@@ -2383,7 +2383,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
EscherPropertyContainer aPropOpt;
const SwFrameFormat &rFormat = rWrt.m_pDoc->GetPageDesc(0).GetMaster();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState = rFormat.GetItemState(RES_BACKGROUND, true,
&pItem);
if (SfxItemState::SET == eState && pItem)
@@ -2424,7 +2424,7 @@ void SwEscherEx::FinishEscher()
{
pEscherStrm->Seek(0);
rWrt.pTableStrm->WriteStream( *pEscherStrm );
- delete pEscherStrm, pEscherStrm = 0;
+ delete pEscherStrm, pEscherStrm = nullptr;
}
/** method to perform conversion of positioning attributes with the help
@@ -2465,7 +2465,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri,
}
// determine anchored object
- SwAnchoredObject* pAnchoredObj( 0L );
+ SwAnchoredObject* pAnchoredObj( nullptr );
{
const SwContact* pContact = _rFrameFormat.FindContactObj();
if ( pContact )
@@ -2909,7 +2909,7 @@ sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
sal_uInt32 nTextId;
sal_uInt16 nOff = 0;
const SwFrameFormat* pFormat = &rFormat, *pPrev;
- while( 0 != ( pPrev = pFormat->GetChain().GetPrev() ))
+ while( nullptr != ( pPrev = pFormat->GetChain().GetPrev() ))
{
++nOff;
pFormat = pPrev;
@@ -3084,7 +3084,7 @@ void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShap
EscherPropertyContainer aPropOpt;
WriteOLEPicture(aPropOpt, 0xa00 | SHAPEFLAG_OLESHAPE, aGraphic,
- *pSdrObj, nShapeId, NULL );
+ *pSdrObj, nShapeId, nullptr );
WriteFlyFrameAttr( rFormat, mso_sptPictureFrame , aPropOpt );
aPropOpt.Commit( GetStream() );
@@ -3154,7 +3154,7 @@ sal_uInt32 SwEscherEx::QueryTextID(
}
SwMSConvertControls::SwMSConvertControls( SfxObjectShell *pDSh,SwPaM *pP ) : oox
-::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : NULL ), pPaM( pP ), mnObjectId(0)
+::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : nullptr ), pPaM( pP ), mnObjectId(0)
{
}
@@ -3220,13 +3220,13 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo
OUString sField = FieldString(ww::eCONTROL) + "Forms." + sUName + ".1 \\s ";
- rWW8Wrt.OutputField(0, ww::eCONTROL, sField,
+ rWW8Wrt.OutputField(nullptr, ww::eCONTROL, sField,
WRITEFIELD_START|WRITEFIELD_CMD_START|WRITEFIELD_CMD_END);
rWW8Wrt.m_pChpPlc->AppendFkpEntry(rWW8Wrt.Strm().Tell(),sizeof(aSpecOLE),
aSpecOLE);
rWW8Wrt.WriteChar( 0x1 );
- rWW8Wrt.OutputField(0, ww::eCONTROL, OUString(), WRITEFIELD_END | WRITEFIELD_CLOSE);
+ rWW8Wrt.OutputField(nullptr, ww::eCONTROL, OUString(), WRITEFIELD_END | WRITEFIELD_CLOSE);
return true;
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index d948f8c51d77..a04012be37bc 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -109,7 +109,7 @@ using namespace ::oox::vml;
static OUString lcl_getFieldCode( const IFieldmark* pFieldmark )
{
- OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
+ OSL_ENSURE(pFieldmark!=nullptr, "where is my fieldmark???");
if ( !pFieldmark)
return OUString();
@@ -129,7 +129,7 @@ static OUString lcl_getFieldCode( const IFieldmark* pFieldmark )
}
static ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) {
- OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
+ OSL_ENSURE(pFieldmark!=nullptr, "where is my fieldmark???");
if ( !pFieldmark )
return ww::eUNKNOWN;
if ( pFieldmark->GetFieldname( ) == ODF_FORMTEXT )
@@ -180,7 +180,7 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) :
MSWordAttrIter(rWr),
rNd(rTextNd),
maCharRuns(GetPseudoCharRuns(rTextNd)),
- pCurRedline(0),
+ pCurRedline(nullptr),
nAktSwPos(0),
nCurRedlinePos(USHRT_MAX),
mrSwFormatDrop(rTextNd.GetSwAttrSet().GetDrop())
@@ -395,7 +395,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
const SvxFontItem &rParentFont = ItemGet<SvxFontItem>(
static_cast<const SwTextFormatColl&>(rNd.GetAnyFormatColl()), nFontId);
const SvxFontItem *pFont = &rParentFont;
- const SfxPoolItem *pGrabBag = 0;
+ const SfxPoolItem *pGrabBag = nullptr;
SfxItemSet aExportSet(*rNd.GetSwAttrSet().GetPool(),
RES_CHRATR_BEGIN, RES_TXTATR_END - 1);
@@ -468,7 +468,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
sw::PoolItems aExportItems;
GetPoolItems( aExportSet, aExportItems, false );
- if( rNd.GetpSwpHints() == 0 )
+ if( rNd.GetpSwpHints() == nullptr )
m_rExport.SetCurItemSet(&aExportSet);
sw::cPoolItemIter aEnd = aRangeItems.end();
@@ -491,8 +491,8 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
m_rExport.m_pOutFormatNode = pOldMod;
}
- if( rNd.GetpSwpHints() == 0 )
- m_rExport.SetCurItemSet(0);
+ if( rNd.GetpSwpHints() == nullptr )
+ m_rExport.SetCurItemSet(nullptr);
OSL_ENSURE( pFont, "must be *some* font associated with this txtnode" );
if ( pFont )
@@ -715,7 +715,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
// It searches with bDeep
const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
- const SfxPoolItem* pRet = 0;
+ const SfxPoolItem* pRet = nullptr;
const SwpHints* pTextAttrs = rNd.GetpSwpHints();
if (pTextAttrs && !m_rExport.m_aCurrentCharPropStarts.empty())
{
@@ -724,8 +724,8 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SwTextAttr* pHt = pTextAttrs->Get(i);
const SfxPoolItem* pItem = &pHt->GetAttr();
- const sal_Int32 * pAtrEnd = 0;
- if( 0 != ( pAtrEnd = pHt->End() ) && // only Attr with an end
+ const sal_Int32 * pAtrEnd = nullptr;
+ if( nullptr != ( pAtrEnd = pHt->End() ) && // only Attr with an end
nTmpSwPos >= pHt->GetStart() && nTmpSwPos < *pAtrEnd )
{
if ( nWhich == pItem->Which() )
@@ -812,7 +812,7 @@ void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/,
nRubyScript = i18n::ScriptType::ASIAN;
const SwTextRuby* pRubyText = rRuby.GetTextRuby();
- const SwCharFormat* pFormat = pRubyText ? pRubyText->GetCharFormat() : 0;
+ const SwCharFormat* pFormat = pRubyText ? pRubyText->GetCharFormat() : nullptr;
OUString sFamilyName;
long nHeight;
if ( pFormat )
@@ -875,14 +875,14 @@ void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/,
else
aStr += ";";
- m_rWW8Export.OutputField( 0, ww::eEQ, aStr,
+ m_rWW8Export.OutputField( nullptr, ww::eEQ, aStr,
WRITEFIELD_START | WRITEFIELD_CMD_START );
}
void WW8AttributeOutput::EndRuby()
{
m_rWW8Export.WriteChar( ')' );
- m_rWW8Export.OutputField( 0, ww::eEQ, OUString(), WRITEFIELD_END | WRITEFIELD_CLOSE );
+ m_rWW8Export.OutputField( nullptr, ww::eEQ, OUString(), WRITEFIELD_END | WRITEFIELD_CLOSE );
}
/*#i15387# Better ideas welcome*/
@@ -973,7 +973,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
bool bBookMarkOnly = AnalyzeURL( rUrl, rTarget, &sURL, &sMark );
- m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
+ m_rWW8Export.OutputField( nullptr, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
// write the refence to the "picture" structure
sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
@@ -994,7 +994,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
m_rWW8Export.m_pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), sizeof( aArr1 ), aArr1 );
- m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_CMD_END );
+ m_rWW8Export.OutputField( nullptr, ww::eHYPERLINK, sURL, WRITEFIELD_CMD_END );
// now write the picture structure
sURL = aURL.GetURLNoMark();
@@ -1119,7 +1119,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
bool WW8AttributeOutput::EndURL(bool const)
{
- m_rWW8Export.OutputField( 0, ww::eHYPERLINK, OUString(), WRITEFIELD_CLOSE );
+ m_rWW8Export.OutputField( nullptr, ww::eHYPERLINK, OUString(), WRITEFIELD_CLOSE );
return true;
}
@@ -1385,7 +1385,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons
const SwRedlineData* SwWW8AttrIter::GetParagraphLevelRedline( )
{
- pCurRedline = NULL;
+ pCurRedline = nullptr;
// ToDo : this is not the most ideal ... should start maybe from 'nCurRedlinePos'
for( size_t nRedlinePos = 0; nRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedlinePos )
@@ -1407,7 +1407,7 @@ const SwRedlineData* SwWW8AttrIter::GetParagraphLevelRedline( )
}
}
}
- return NULL;
+ return nullptr;
}
const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
@@ -1418,7 +1418,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
if( pEnd->nNode == rNd &&
pEnd->nContent.GetIndex() <= nPos )
{
- pCurRedline = 0;
+ pCurRedline = nullptr;
++nCurRedlinePos;
}
else
@@ -1434,7 +1434,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
default:
break;
}
- pCurRedline = 0;
+ pCurRedline = nullptr;
++nCurRedlinePos;
}
}
@@ -1487,7 +1487,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
}
}
}
- return NULL;
+ return nullptr;
}
short MSWordExportBase::GetCurrentPageDirection() const
@@ -1540,13 +1540,13 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const
short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) const
{
const SwFrameFormat *pFlyFormat = &rFlyFormat;
- const SvxFrameDirectionItem* pItem = 0;
+ const SvxFrameDirectionItem* pItem = nullptr;
while ( pFlyFormat )
{
pItem = &pFlyFormat->GetFrmDir();
if ( FRMDIR_ENVIRONMENT == pItem->GetValue() )
{
- pItem = 0;
+ pItem = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor() )
@@ -1554,10 +1554,10 @@ short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) co
pFlyFormat = pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat();
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
short nRet;
@@ -1576,7 +1576,7 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const
? m_pAktPageDesc->GetMaster()
: m_pDoc->GetPageDesc(0).GetMaster();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
//If not set, or "no fill", get real bg
SfxItemState eState = rFormat.GetItemState(RES_BACKGROUND, true, &pItem);
@@ -1592,19 +1592,19 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const
SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
{
const SwFrameFormat *pFlyFormat = &rFlyFormat;
- const SvxBrushItem* pRet = 0;
+ const SvxBrushItem* pRet = nullptr;
while (pFlyFormat)
{
//If not set, or "no fill", get real bg
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState =
pFlyFormat->GetItemState(RES_BACKGROUND, true, &pItem);
pRet = static_cast<const SvxBrushItem*>(pItem);
if (SfxItemState::SET != eState || !pRet || (!pRet->GetGraphic() &&
pRet->GetColor() == COL_TRANSPARENT))
{
- pRet = 0;
+ pRet = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor())
@@ -1613,10 +1613,10 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat();
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
else
- pFlyFormat = 0;
+ pFlyFormat = nullptr;
}
if (!pRet)
@@ -1756,7 +1756,7 @@ void WW8AttributeOutput::FormatDrop( const SwTextNode& rNode, const SwFormatDrop
m_rWW8Export.WriteCR( pTextNodeInfoInner );
- if ( pTextNodeInfo.get() != NULL )
+ if ( pTextNodeInfo.get() != nullptr )
{
#ifdef DBG_UTIL
SAL_INFO( "sw.ww8", pTextNodeInfo->toString());
@@ -2085,7 +2085,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
AttrOutput().StartParagraph( pTextNodeInfo );
- const SwSection* pTOXSect = 0;
+ const SwSection* pTOXSect = nullptr;
if( m_bInWriteTOX )
{
// check for end of TOX
@@ -2099,7 +2099,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
const SwNode* pNxt = rNode.GetNodes().GoNext( &aIdx );
if( pNxt && pNxt->FindSectionNode() == pTOXSectNd )
- pTOXSect = 0;
+ pTOXSect = nullptr;
}
}
}
@@ -2120,7 +2120,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
OUString aStringForImage("\001");
ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner;
- if ( pTextNodeInfo.get() != NULL )
+ if ( pTextNodeInfo.get() != nullptr )
{
pTextNodeInfoInner = pTextNodeInfo->getFirstInner();
if ( pTextNodeInfoInner && pTextNodeInfoInner->isEndOfCell() ) {
@@ -2199,13 +2199,13 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
}
}
- OutputField( NULL, eFieldId, sCode, WRITEFIELD_START | WRITEFIELD_CMD_START );
+ OutputField( nullptr, eFieldId, sCode, WRITEFIELD_START | WRITEFIELD_CMD_START );
if ( pFieldmark && pFieldmark->GetFieldname( ) == ODF_FORMTEXT )
WriteFormData( *pFieldmark );
else if ( pFieldmark && pFieldmark->GetFieldname( ) == ODF_HYPERLINK )
WriteHyperlinkData( *pFieldmark );
- OutputField( NULL, lcl_getFieldId( pFieldmark ), OUString(), WRITEFIELD_CMD_END );
+ OutputField( nullptr, lcl_getFieldId( pFieldmark ), OUString(), WRITEFIELD_CMD_END );
if ( pFieldmark && pFieldmark->GetFieldname() == ODF_UNHANDLED )
{
@@ -2240,7 +2240,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
}
}
- OutputField( NULL, eFieldId, OUString(), WRITEFIELD_CLOSE );
+ OutputField( nullptr, eFieldId, OUString(), WRITEFIELD_CLOSE );
if ( pFieldmark && pFieldmark->GetFieldname() == ODF_FORMTEXT )
AppendBookmark( pFieldmark->GetName() );
@@ -2256,12 +2256,12 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName() );
- OutputField( NULL, lcl_getFieldId( pFieldmark ),
+ OutputField( nullptr, lcl_getFieldId( pFieldmark ),
lcl_getFieldCode( pFieldmark ),
WRITEFIELD_START | WRITEFIELD_CMD_START );
if ( isDropdownOrCheckbox )
WriteFormData( *pFieldmark );
- OutputField( NULL, lcl_getFieldId( pFieldmark ), OUString(), WRITEFIELD_CLOSE );
+ OutputField( nullptr, lcl_getFieldId( pFieldmark ), OUString(), WRITEFIELD_CLOSE );
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName() );
}
@@ -2438,7 +2438,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
if ( m_pParentFrame && IsInTable() ) // Fly-Attrs
OutputFormat( m_pParentFrame->GetFrameFormat(), false, false, true );
- if ( pTextNodeInfo.get() != NULL )
+ if ( pTextNodeInfo.get() != nullptr )
{
#ifdef DBG_UTIL
SAL_INFO( "sw.ww8", pTextNodeInfo->toString());
@@ -2450,7 +2450,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
const SwTable * pTable = pTextNodeInfoInner->getTable();
const SwTableFormat* pTabFormat = pTable->GetFrameFormat();
- if (pTabFormat != NULL)
+ if (pTabFormat != nullptr)
{
if (pTabFormat->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE)
AttrOutput().PageBreakBefore(true);
@@ -2460,7 +2460,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
if ( !bFlyInTable )
{
- SfxItemSet* pTmpSet = 0;
+ SfxItemSet* pTmpSet = nullptr;
const sal_uInt8 nPrvNxtNd = rNode.HasPrevNextLayNode();
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
@@ -2591,7 +2591,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
// #i44815# adjust numbering/indents for numbered paragraphs
// without number (NO_NUMLEVEL)
// #i47013# need to check rNode.GetNumRule()!=NULL as well.
- if ( ! rNode.IsCountedInList() && rNode.GetNumRule()!=NULL )
+ if ( ! rNode.IsCountedInList() && rNode.GetNumRule()!=nullptr )
{
// WW8 does not know numbered paragraphs without number
// (NO_NUMLEVEL). In WW8AttributeOutput::ParaNumRule(), we will export
@@ -2603,10 +2603,10 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
// create new LRSpace item, based on the current (if present)
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
pTmpSet->GetItemState(RES_LR_SPACE, true, &pPoolItem);
SvxLRSpaceItem aLRSpace(
- ( pPoolItem == NULL )
+ ( pPoolItem == nullptr )
? SvxLRSpaceItem(0, 0, 0, 0, RES_LR_SPACE)
: *static_cast<const SvxLRSpaceItem*>( pPoolItem ) );
@@ -2695,7 +2695,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
// bDontSplit : set keep at first paragraphs in all lines except from last line
// but only for non-complex tables
const SwTableBox* pBox = rNode.GetTableBox();
- const SwTableLine* pLine = pBox ? pBox->GetUpper() : 0;
+ const SwTableLine* pLine = pBox ? pBox->GetUpper() : nullptr;
if ( pLine && !pLine->GetUpper() )
{
@@ -2741,7 +2741,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
// Pap-Attrs, so script is not necessary
OutputItemSet( *pNewSet, true, false, i18n::ScriptType::LATIN, false);
- m_pStyAttr = 0;
+ m_pStyAttr = nullptr;
m_pOutFormatNode = pOldMod;
if( pNewSet != rNode.GetpSwAttrSet() )
@@ -2810,7 +2810,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet )
{
bool bNoPageBreak = false;
if ( SfxItemState::SET != pSet->GetItemState(RES_PAGEDESC, true, &pI)
- || 0 == static_cast<const SwFormatPageDesc*>(pI)->GetPageDesc() )
+ || nullptr == static_cast<const SwFormatPageDesc*>(pI)->GetPageDesc() )
{
bNoPageBreak = true;
}
@@ -2861,10 +2861,10 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
RES_LINENUMBER )).GetStartValue();
}
else
- pSet = 0;
+ pSet = nullptr;
if ( pSet && NoPageBreakSection( pSet ) )
- pSet = 0;
+ pSet = nullptr;
if ( !pSet )
{
@@ -3025,7 +3025,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
NS_sprm::LN_CFRMarkDel, NS_sprm::LN_CIbstRMarkDel, NS_sprm::LN_CDttmRMarkDel,
};
- const sal_uInt16* pSprmIds = 0;
+ const sal_uInt16* pSprmIds = nullptr;
switch( pRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index cf5a3cf43f44..084254fd3599 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -408,7 +408,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
OUString sNumStr;
OUString sFontName;
bool bWriteBullet = false;
- const vcl::Font* pBulletFont=0;
+ const vcl::Font* pBulletFont=nullptr;
rtl_TextEncoding eChrSet=0;
FontFamily eFamily=FAMILY_DECORATIVE;
if( SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType() ||
@@ -480,8 +480,8 @@ void MSWordExportBase::AbstractNumberingDefinitions()
}
// Attributes of the numbering
- wwFont *pPseudoFont = NULL;
- const SfxItemSet* pOutSet = NULL;
+ wwFont *pPseudoFont = nullptr;
+ const SfxItemSet* pOutSet = nullptr;
// cbGrpprlChpx
SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
@@ -534,7 +534,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
pPseudoFont, pOutSet,
nIndentAt, nFirstLineIndex, nListTabPos,
sNumStr,
- rFormat.GetNumberingType()==SVX_NUM_BITMAP ? rFormat.GetBrush():0);
+ rFormat.GetNumberingType()==SVX_NUM_BITMAP ? rFormat.GetBrush():nullptr);
delete pPseudoFont;
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 1d4edb4852b4..d3ed0bc4aa4d 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -444,7 +444,7 @@ void MSWordStyles::SetStyleDefaults( const SwFormat& rFormat, bool bPap )
// dynamic defaults
const SfxItemPool& rPool = *rFormat.GetAttrSet().GetPool();
for( n = nStt; n < nEnd; ++n )
- aFlags[ n - RES_CHRATR_BEGIN ] = 0 != rPool.GetPoolDefaultItem( n );
+ aFlags[ n - RES_CHRATR_BEGIN ] = nullptr != rPool.GetPoolDefaultItem( n );
// static defaults, that differs between WinWord and SO
if( bPap )
@@ -504,14 +504,14 @@ void MSWordStyles::WriteProperties( const SwFormat* pFormat, bool bParProp, sal_
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
- OSL_ENSURE( m_rExport.m_pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out
+ OSL_ENSURE( m_rExport.m_pCurrentStyle == nullptr, "Current style not NULL" ); // set current style before calling out
m_rExport.m_pCurrentStyle = pFormat;
m_rExport.OutputFormat( *pFormat, bParProp, !bParProp );
OSL_ENSURE( m_rExport.m_pCurrentStyle == pFormat, "current style was changed" );
// reset current style...
- m_rExport.m_pCurrentStyle = NULL;
+ m_rExport.m_pCurrentStyle = nullptr;
if ( bInsDefCharSiz ) // not derived from other Style
SetStyleDefaults( *pFormat, bParProp );
@@ -849,7 +849,7 @@ void wwFontHelper::InitFontTable(const SwDoc& rDoc)
pFont->GetFamily(), pFont->GetCharSet()));
const SfxItemPool& rPool = rDoc.GetAttrPool();
- if (0 != (pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_FONT))))
+ if (nullptr != (pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_FONT))))
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet()));
@@ -865,7 +865,7 @@ void wwFontHelper::InitFontTable(const SwDoc& rDoc)
for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
{
pFont = static_cast<const SvxFontItem*>(rPool.GetItem2( *pId, nGet ));
- if (0 != pFont)
+ if (nullptr != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet()));
@@ -963,12 +963,12 @@ void WW8_WrPlc0::Write( SvStream& rStrm )
MSWordSections::MSWordSections( MSWordExportBase& rExport )
: mbDocumentIsProtected( false )
{
- const SwSectionFormat *pFormat = 0;
+ const SwSectionFormat *pFormat = nullptr;
rExport.m_pAktPageDesc = &rExport.m_pDoc->GetPageDesc( 0 );
const SfxPoolItem* pI;
const SwNode* pNd = rExport.m_pCurPam->GetContentNode();
- const SfxItemSet* pSet = pNd ? &static_cast<const SwContentNode*>(pNd)->GetSwAttrSet() : 0;
+ const SfxItemSet* pSet = pNd ? &static_cast<const SwContentNode*>(pNd)->GetSwAttrSet() : nullptr;
sal_uLong nRstLnNum = pSet ? static_cast<const SwFormatLineNumber&>(pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
@@ -979,7 +979,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
pSet = &pTableNd->GetTable().GetFrameFormat()->GetAttrSet();
pNd = pTableNd;
}
- else if (pNd && 0 != ( pSectNd = pNd->FindSectionNode() ))
+ else if (pNd && nullptr != ( pSectNd = pNd->FindSectionNode() ))
{
if ( TOX_HEADER_SECTION == pSectNd->GetSection().GetType() &&
pSectNd->StartOfSectionNode()->IsSectionNode() )
@@ -1011,7 +1011,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
: MSWordSections( rExport )
, m_bHeaderFooterWritten( false )
- , pTextPos( 0 )
+ , pTextPos( nullptr )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
@@ -1076,7 +1076,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
if ( !aSects.empty() )
return &aSects.back();
- return NULL;
+ return nullptr;
}
void MSWordSections::AppendSection( const SwPageDesc* pPd,
@@ -1085,7 +1085,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
if (HeaderFooterWritten()) {
return; // #i117955# prevent new sections in endnotes
}
- aSects.push_back( WW8_SepInfo( pPd, pSectionFormat, nLnNumRestartNo, boost::none, NULL, bIsFirstParagraph ) );
+ aSects.push_back( WW8_SepInfo( pPd, pSectionFormat, nLnNumRestartNo, boost::none, nullptr, bIsFirstParagraph ) );
NeedsDocumentProtected( aSects.back() );
}
@@ -1738,7 +1738,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
*/
const SwTextNode *pOldPageRoot = GetHdFtPageRoot();
- SetHdFtPageRoot( rSepInfo.pPDNd ? rSepInfo.pPDNd->GetTextNode() : 0 );
+ SetHdFtPageRoot( rSepInfo.pPDNd ? rSepInfo.pPDNd->GetTextNode() : nullptr );
WriteHeadersFooters( nHeadFootFlags, *pPdFormat, *pPdLeftFormat, *pPdFirstPgFormat, nBreakCode );
@@ -1795,7 +1795,7 @@ bool WW8_WrPlcSepx::WriteKFText( WW8Export& rWrt )
rWrt.pFib->ccpHdr = nCpEnd - nCpStart;
}
else
- delete pTextPos, pTextPos = 0;
+ delete pTextPos, pTextPos = nullptr;
return rWrt.pFib->ccpHdr != 0;
}
@@ -1807,7 +1807,7 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
for (size_t i = 0; i < m_SectionAttributes.size(); i++) // all sections
{
WW8_PdAttrDesc *const pA = m_SectionAttributes[i].get();
- if (pA->m_nLen && pA->m_pData != 0)
+ if (pA->m_nLen && pA->m_pData != nullptr)
{
SVBT16 nL;
pA->m_nSepxFcPos = rStrm.Tell();
@@ -1894,7 +1894,7 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFormat& rFormat, bool bHea
m_bOutKF = bOldKF;
}
else
- pSttIdx = 0;
+ pSttIdx = nullptr;
}
if ( !pSttIdx )
@@ -1910,7 +1910,7 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFormat& rFormat, bool bHea
// WW8_WrPlcFootnoteEdn is the class for Footnotes and Endnotes
WW8_WrPlcSubDoc::WW8_WrPlcSubDoc()
- : pTextPos( 0 )
+ : pTextPos( nullptr )
{
}
@@ -1941,7 +1941,7 @@ WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart,
WW8_Annotation::WW8_Annotation(const SwRedlineData* pRedline)
:
- mpRichText(0),
+ mpRichText(nullptr),
maDateTime( DateTime::EMPTY ),
m_nRangeStart(0),
m_nRangeEnd(0)
@@ -2031,7 +2031,7 @@ bool WW8_WrPlcSubDoc::WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp,
aCps.insert( aCps.begin()+i, nCP );
pTextPos->Append( nCP );
- if( aContent[ i ] != NULL )
+ if( aContent[ i ] != nullptr )
{
// is it an writer or sdr - textbox?
const SdrObject& rObj = *static_cast<SdrObject const *>(aContent[ i ]);
@@ -2307,7 +2307,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
pChn = &pChn->GetNext()->GetChain();
}
}
- if( NULL == pObj )
+ if( nullptr == pObj )
{
if (i < aSpareFormats.size() && aSpareFormats[i])
{
@@ -2445,7 +2445,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
const std::vector<sal_uInt32>* WW8_WrPlcSubDoc::GetShapeIdArr() const
{
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index fd2b4eddc939..59effda72ba4 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -139,7 +139,7 @@ class WW8_WrFkp
public:
WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc);
~WW8_WrFkp();
- bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = 0 );
+ bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = nullptr );
bool Combine();
void Write( SvStream& rStrm, SwWW8WrGrf& rGrf );
@@ -191,7 +191,7 @@ public:
WW8_WrtBookmarks();
~WW8_WrtBookmarks();
//! Add a new bookmark to the list OR add an end position to an existing bookmark.
- void Append( WW8_CP nStartCp, const OUString& rNm, const ::sw::mark::IMark* pBkmk=NULL );
+ void Append( WW8_CP nStartCp, const OUString& rNm, const ::sw::mark::IMark* pBkmk=nullptr );
//! Write out bookmarks to file.
void Write( WW8Export& rWrt );
//! Move existing field marks from one position to another.
@@ -209,7 +209,7 @@ WW8_WrtBookmarks::~WW8_WrtBookmarks()
if (aItr->second)
{
delete aItr->second;
- aItr->second = NULL;
+ aItr->second = nullptr;
}
}
}
@@ -303,7 +303,7 @@ void WW8_WrtBookmarks::MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo)
aItr->second->first = nTo;
}
aSttCps.insert(std::pair<long,BKMKCP*>(nTo,aItr->second));
- aItr->second = NULL;
+ aItr->second = nullptr;
aRange = aSttCps.equal_range(nFrom);
aItr = aRange.first;
continue;
@@ -538,8 +538,8 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
},
};
- const i18n::ForbiddenCharacters *pForbidden = 0;
- const i18n::ForbiddenCharacters *pUseMe = 0;
+ const i18n::ForbiddenCharacters *pForbidden = nullptr;
+ const i18n::ForbiddenCharacters *pUseMe = nullptr;
sal_uInt8 nUseReserved=0;
int nNoNeeded=0;
/*
@@ -566,7 +566,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
for (rTypo.reserved1=8;rTypo.reserved1>0;rTypo.reserved1-=2)
{
- if (0 != (pForbidden = m_pDoc->getIDocumentSettingAccess().getForbiddenCharacters(rTypo.GetConvertedLang(),
+ if (nullptr != (pForbidden = m_pDoc->getIDocumentSettingAccess().getForbiddenCharacters(rTypo.GetConvertedLang(),
false)))
{
int nIdx = (rTypo.reserved1-2)/2;
@@ -642,7 +642,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
// WW8_SwAttrIter::OutAttr() and WW8Export::OutputItemSet()
const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
{
- const SfxPoolItem* pItem=0;
+ const SfxPoolItem* pItem=nullptr;
if (m_pISet)
{
// if write a EditEngine text, then the WhichIds are greater as
@@ -650,14 +650,14 @@ const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
// EditEngine Range
nWhich = sw::hack::GetSetWhichFromSwDocWhich(*m_pISet, *m_pDoc, nWhich);
if (nWhich && SfxItemState::SET != m_pISet->GetItemState(nWhich, true, &pItem))
- pItem = 0;
+ pItem = nullptr;
}
else if( m_pChpIter )
pItem = m_pChpIter->HasTextItem( nWhich );
else
{
OSL_ENSURE( false, "Where is my ItemSet / pChpIter ?" );
- pItem = 0;
+ pItem = nullptr;
}
return pItem;
}
@@ -679,7 +679,7 @@ const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
else
{
OSL_ENSURE( false, "Where is my ItemSet / pChpIter ?" );
- pItem = 0;
+ pItem = nullptr;
}
return *pItem;
}
@@ -784,7 +784,7 @@ bool WW8_WrPlcField::Write( WW8Export& rWrt )
break;
default:
- pfc = plc = 0;
+ pfc = plc = nullptr;
break;
}
@@ -1026,7 +1026,7 @@ sal_uInt8 WW8_WrFkp::SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms
sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen)
{
rLen=0;
- sal_uInt8 *pStart=0,*pRet=0;
+ sal_uInt8 *pStart=nullptr,*pRet=nullptr;
if (!bCombined)
pStart = pOfs;
@@ -1127,7 +1127,7 @@ bool WW8_WrFkp::Combine()
if( nIMax )
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
delete[] pOfs;
- pOfs = 0;
+ pOfs = nullptr;
pFkp[511] = nIMax;
bCombined = true;
@@ -1330,7 +1330,7 @@ void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_I
continue;
const SwPosition* pPos = &rBkmk.GetMarkPos();
- const SwPosition* pOPos = 0;
+ const SwPosition* pOPos = nullptr;
if(rBkmk.IsExpanded())
pOPos = &rBkmk.GetOtherMarkPos();
if( pOPos && pOPos->nNode == pPos->nNode &&
@@ -1405,7 +1405,7 @@ int MSWordExportBase::CollectGrfsOfBullets()
{
continue;
}
- const Graphic *pGraf = rFormat.GetBrush()? rFormat.GetBrush()->GetGraphic():0;
+ const Graphic *pGraf = rFormat.GetBrush()? rFormat.GetBrush()->GetGraphic():nullptr;
if ( pGraf )
{
bool bHas = false;
@@ -1730,7 +1730,7 @@ void WW8Export::OutSwString(const OUString& rStr, sal_Int32 nStt,
void WW8Export::WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner)
{
- if (pTableTextNodeInfoInner.get() != NULL && pTableTextNodeInfoInner->getDepth() == 1 && pTableTextNodeInfoInner->isEndOfCell())
+ if (pTableTextNodeInfoInner.get() != nullptr && pTableTextNodeInfoInner->getDepth() == 1 && pTableTextNodeInfoInner->isEndOfCell())
WriteChar('\007');
else
WriteChar( '\015' );
@@ -1765,7 +1765,7 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
MSWordSaveData aData;
// WW8Export only stuff - zeroed here not to issue warnings
- aData.pOOld = NULL;
+ aData.pOOld = nullptr;
// Common stuff
aData.pOldPam = m_pCurPam;
@@ -1828,7 +1828,7 @@ void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
pO = new ww::bytes();
}
else
- rData.pOOld = 0; // reuse pO
+ rData.pOOld = nullptr; // reuse pO
rData.bOldWriteAll = GetWriter().bWriteAll;
GetWriter().bWriteAll = true;
@@ -1922,7 +1922,7 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR
else if (nRowSpan < 0)
nFlags |= (1 << 5);
- if (pBox != NULL)
+ if (pBox != nullptr)
{
const SwFrameFormat * pFormat = pBox->GetFrameFormat();
switch (pFormat->GetVertOrient().GetVertOrient())
@@ -2094,7 +2094,7 @@ void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTab
// Writing these SPRM's will make the table a floating one, so only write
// them in case the table is already inside a frame.
- if (pTableFormat != NULL && pTable->GetTableNode()->GetFlyFormat())
+ if (pTableFormat != nullptr && pTable->GetTableNode()->GetFlyFormat())
{
const SvxULSpaceItem & rUL = pTableFormat->GetULSpace();
@@ -2209,8 +2209,8 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
sal_uInt16 npOCount = m_rWW8Export.pO->size();
const SwTableBox * pTabBox1 = *aIt;
- const SwFrameFormat * pBoxFormat = NULL;
- if (pTabBox1 != NULL)
+ const SwFrameFormat * pBoxFormat = nullptr;
+ if (pTabBox1 != nullptr)
pBoxFormat = pTabBox1->GetFrameFormat();
sal_uInt16 nFlags =
@@ -2220,14 +2220,14 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aNullBytes, aNullBytes+2 ); // dummy
- if (pBoxFormat != NULL)
+ if (pBoxFormat != nullptr)
{
const SvxBoxItem & rBoxItem = pBoxFormat->GetBox();
WW8Export::Out_SwFormatTableBox( *m_rWW8Export.pO, &rBoxItem ); // 8/16 Byte
}
else
- WW8Export::Out_SwFormatTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte
+ WW8Export::Out_SwFormatTableBox( *m_rWW8Export.pO, nullptr); // 8/16 Byte
SAL_INFO( "sw.ww8.level2", "<tclength>" << ( m_rWW8Export.pO->size() - npOCount ) << "</tclength>" );
}
@@ -2351,14 +2351,14 @@ void WW8AttributeOutput::TableCellBorders(
const SwTableLine * pTabLine = pTabBox->GetUpper();
const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
sal_uInt8 nBoxes = std::min<size_t>(rTabBoxes.size(), 255);
- const SvxBoxItem * pLastBox = 0;
+ const SvxBoxItem * pLastBox = nullptr;
sal_uInt8 nSeqStart = 0; // start of sequence of cells with same borders
// Detect sequences of cells which have the same borders, and output
// a border description for each such cell range.
for ( unsigned n = 0; n <= nBoxes; ++n )
{
- const SvxBoxItem * pBox = (n == nBoxes) ? 0 :
+ const SvxBoxItem * pBox = (n == nBoxes) ? nullptr :
&rTabBoxes[n]->GetFrameFormat()->GetBox();
if( !pLastBox )
pLastBox = pBox;
@@ -2387,7 +2387,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
{
const SwTableBox * pBox1 = rTabBoxes[n];
const SwFrameFormat * pFrameFormat = pBox1->GetFrameFormat();
- const SfxPoolItem * pI = NULL;
+ const SfxPoolItem * pI = nullptr;
Color aColor;
if ( SfxItemState::SET == pFrameFormat->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) )
@@ -2417,7 +2417,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
{
const SwTableBox * pBox1 = rTabBoxes[n];
const SwFrameFormat * pFrameFormat = pBox1->GetFrameFormat();
- const SfxPoolItem * pI = NULL;
+ const SfxPoolItem * pI = nullptr;
Color aColor;
if ( SfxItemState::SET ==
@@ -2542,7 +2542,7 @@ void MSWordExportBase::WriteText()
SwTextNode *pTempNext = aIdx.GetNode().GetTextNode();
if ( pTempNext )
{
- const SfxPoolItem * pTempItem = NULL;
+ const SfxPoolItem * pTempItem = nullptr;
if (pTempNext->GetpSwAttrSet() && SfxItemState::SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem)
&& pTempItem && static_cast<const SwFormatPageDesc*>(pTempItem)->GetRegisteredIn())
{
@@ -2602,10 +2602,10 @@ void MSWordExportBase::WriteText()
if (pCurrentNode == pNextNode)
{
SAL_WARN("sw.ww8", "loop in TableInfo");
- pNextNode = NULL;
+ pNextNode = nullptr;
}
- if (pNextNode != NULL)
+ if (pNextNode != nullptr)
m_pCurPam->GetPoint()->nNode = SwNodeIndex(*pNextNode);
else
++m_pCurPam->GetPoint()->nNode;
@@ -2649,15 +2649,15 @@ bool MSWordExportBase::IsInTable() const
{
bool bResult = false;
- if (m_pCurPam != NULL)
+ if (m_pCurPam != nullptr)
{
SwNode& rNode = m_pCurPam->GetNode();
- if (m_pTableInfo.get() != NULL)
+ if (m_pTableInfo.get() != nullptr)
{
ww8::WW8TableNodeInfo::Pointer_t pTableNodeInfo = m_pTableInfo->getTableNodeInfo(&rNode);
- if (pTableNodeInfo.get() != NULL && pTableNodeInfo->getDepth() > 0)
+ if (pTableNodeInfo.get() != nullptr && pTableNodeInfo->getDepth() > 0)
{
bResult = true;
}
@@ -2928,16 +2928,16 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
m_bFootnoteAtTextEnd = m_bEndAtTextEnd = true;
- m_pParentFrame = 0;
- m_pFlyOffset = 0;
+ m_pParentFrame = nullptr;
+ m_pFlyOffset = nullptr;
m_eNewAnchorType = FLY_AT_PAGE;
m_nTextTyp = TXT_MAINTEXT;
m_nStyleBeforeFly = m_nLastFormatId = 0;
- m_pStyAttr = 0;
- m_pCurrentStyle = NULL;
- m_pOutFormatNode = 0;
- m_pEscher = 0;
- m_pRedlAuthors = 0;
+ m_pStyAttr = nullptr;
+ m_pCurrentStyle = nullptr;
+ m_pOutFormatNode = nullptr;
+ m_pEscher = nullptr;
+ m_pRedlAuthors = nullptr;
m_aTOXArr.clear();
if ( !m_pOLEExp )
@@ -2960,7 +2960,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
m_pOCXExp = new SwMSConvertControls( m_pDoc->GetDocShell(), m_pCurPam );
// #i81405# - Collect anchored objects before changing the redline mode.
- m_aFrames = GetFrames( *m_pDoc, bWriteAll? NULL : m_pOrigPam );
+ m_aFrames = GetFrames( *m_pDoc, bWriteAll? nullptr : m_pOrigPam );
m_nOrigRedlineMode = m_pDoc->getIDocumentRedlineAccess().GetRedlineMode();
if ( !m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
@@ -3214,7 +3214,7 @@ void WW8Export::ExportDocument_Impl()
delete m_pPiece;
delete pDop;
delete pFib;
- GetWriter().SetStream( 0 );
+ GetWriter().SetStream( nullptr );
xWwStrm->SetBufferSize( 0 );
xTableStrm->SetBufferSize( 0 );
@@ -3222,7 +3222,7 @@ void WW8Export::ExportDocument_Impl()
if( 0 == pDataStrm->Seek( STREAM_SEEK_TO_END ))
{
xDataStrm.Clear();
- pDataStrm = 0;
+ pDataStrm = nullptr;
GetWriter().GetStorage().Remove(OUString(SL::aData));
}
}
@@ -3294,7 +3294,7 @@ sal_uLong SwWW8Writer::WriteStorage()
{
// #i34818# - update layout (if present), for SwWriteTable
SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
- if( pViewShell != NULL )
+ if( pViewShell != nullptr )
pViewShell->CalcLayout();
long nMaxNode = pDoc->GetNodes().Count();
@@ -3314,7 +3314,7 @@ sal_uLong SwWW8Writer::WriteStorage()
WW8Export aExport(this, pDoc, pCurPam, pOrigPam, bDot);
m_pExport = &aExport;
aExport.ExportDocument( bWriteAll );
- m_pExport = NULL;
+ m_pExport = nullptr;
}
::EndProgress( pDoc->GetDocShell() );
@@ -3331,20 +3331,20 @@ sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
{
mpMedium = &rMed;
sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
- mpMedium = NULL;
+ mpMedium = nullptr;
return nRet;
}
MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam )
: m_aMainStg(sMainStream)
- , m_pISet(0)
- , m_pPiece(NULL)
- , m_pUsedNumTable(0)
- , m_pTopNodeOfHdFtPage(0)
- , m_pBkmks(0)
- , m_pRedlAuthors(0)
- , m_pOLEExp(0)
- , m_pOCXExp(0)
+ , m_pISet(nullptr)
+ , m_pPiece(nullptr)
+ , m_pUsedNumTable(nullptr)
+ , m_pTopNodeOfHdFtPage(nullptr)
+ , m_pBkmks(nullptr)
+ , m_pRedlAuthors(nullptr)
+ , m_pOLEExp(nullptr)
+ , m_pOCXExp(nullptr)
, m_pTableInfo(new ww8::WW8TableInfo())
, m_nCharFormatStart(0)
, m_nFormatCollStart(0)
@@ -3353,33 +3353,33 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM
, m_nUniqueList(0)
, m_nHdFtIndex(0)
, m_nOrigRedlineMode(0)
- , m_pAktPageDesc(0)
+ , m_pAktPageDesc(nullptr)
, m_bPrevTextNodeIsEmpty(false)
- , m_pPapPlc(0)
- , m_pChpPlc(0)
- , m_pChpIter(0)
- , m_pStyles(NULL)
- , m_pAtn(0)
- , m_pTextBxs(0)
- , m_pHFTextBxs(0)
- , m_pParentFrame(0)
- , m_pFlyOffset(0)
+ , m_pPapPlc(nullptr)
+ , m_pChpPlc(nullptr)
+ , m_pChpIter(nullptr)
+ , m_pStyles(nullptr)
+ , m_pAtn(nullptr)
+ , m_pTextBxs(nullptr)
+ , m_pHFTextBxs(nullptr)
+ , m_pParentFrame(nullptr)
+ , m_pFlyOffset(nullptr)
, m_eNewAnchorType(FLY_AS_CHAR)
- , m_pFieldMain(0)
- , m_pFieldHdFt(0)
- , m_pFieldFootnote(0)
- , m_pFieldEdn(0)
- , m_pFieldAtn(0)
- , m_pFieldTextBxs(0)
- , m_pFieldHFTextBxs(0)
- , m_pMagicTable(0)
- , m_pGrf(0)
- , m_pStyAttr(0)
- , m_pOutFormatNode(0)
- , m_pCurrentStyle(0)
- , m_pSdrObjs(0)
- , m_pHFSdrObjs(0)
- , m_pEscher(0)
+ , m_pFieldMain(nullptr)
+ , m_pFieldHdFt(nullptr)
+ , m_pFieldFootnote(nullptr)
+ , m_pFieldEdn(nullptr)
+ , m_pFieldAtn(nullptr)
+ , m_pFieldTextBxs(nullptr)
+ , m_pFieldHFTextBxs(nullptr)
+ , m_pMagicTable(nullptr)
+ , m_pGrf(nullptr)
+ , m_pStyAttr(nullptr)
+ , m_pOutFormatNode(nullptr)
+ , m_pCurrentStyle(nullptr)
+ , m_pSdrObjs(nullptr)
+ , m_pHFSdrObjs(nullptr)
+ , m_pEscher(nullptr)
, m_nTextTyp(0)
, m_bStyDef(false)
, m_bBreakBefore(false)
@@ -3419,14 +3419,14 @@ WW8Export::WW8Export( SwWW8Writer *pWriter,
SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam,
bool bDot )
: MSWordExportBase( pDocument, pCurrentPam, pOriginalPam )
- , pO(NULL)
- , pTableStrm(NULL)
- , pDataStrm(NULL)
- , pFib(NULL)
- , pDop(NULL)
- , pFootnote(NULL)
- , pEdn(NULL)
- , pSepx(NULL)
+ , pO(nullptr)
+ , pTableStrm(nullptr)
+ , pDataStrm(nullptr)
+ , pFib(nullptr)
+ , pDop(nullptr)
+ , pFootnote(nullptr)
+ , pEdn(nullptr)
+ , pSepx(nullptr)
, m_bDot(bDot)
, m_pWriter(pWriter)
, m_pAttrOutput(new WW8AttributeOutput(*this))
@@ -3435,7 +3435,7 @@ WW8Export::WW8Export( SwWW8Writer *pWriter,
WW8Export::~WW8Export()
{
- delete m_pAttrOutput, m_pAttrOutput = NULL;
+ delete m_pAttrOutput, m_pAttrOutput = nullptr;
}
AttributeOutputBase& WW8Export::AttrOutput() const
@@ -3450,8 +3450,8 @@ MSWordSections& WW8Export::Sections() const
SwWW8Writer::SwWW8Writer(const OUString& rFltName, const OUString& rBaseURL)
: StgWriter(),
- m_pExport( NULL ),
- mpMedium( 0 )
+ m_pExport( nullptr ),
+ mpMedium( nullptr )
{
assert(rFltName == FILTER_WW8); // WW6/7 export was removed
(void)rFltName;
@@ -3767,7 +3767,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
if (nShadowsBefore > 0)
{
ww8::WW8TableNodeInfoInner::Pointer_t
- pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL));
+ pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(nullptr));
pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth());
pTmpNodeInfoInner->setEndOfCell(true);
@@ -3802,7 +3802,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
if (nShadowsAfter > 0)
{
ww8::WW8TableNodeInfoInner::Pointer_t
- pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL));
+ pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(nullptr));
pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth());
pTmpNodeInfoInner->setEndOfCell(true);
@@ -3841,7 +3841,7 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo =
m_pTableInfo->getTableNodeInfo( &rNode );
- if (pNodeInfo.get() != NULL)
+ if (pNodeInfo.get() != nullptr)
{
#ifdef DBG_UTIL
SAL_INFO( "sw.ww8", pNodeInfo->toString());
@@ -3868,7 +3868,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = m_pTableInfo->getTableNodeInfo( &rNode );
- if (pNodeInfo.get() != NULL)
+ if (pNodeInfo.get() != nullptr)
{
#ifdef DBG_UTIL
SAL_INFO( "sw.ww8", pNodeInfo->toString());
@@ -3889,7 +3889,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
const NfKeywordTable & MSWordExportBase::GetNfKeywordTable()
{
- if (m_pKeyMap.get() == NULL)
+ if (m_pKeyMap.get() == nullptr)
{
m_pKeyMap.reset(new NfKeywordTable);
NfKeywordTable & rKeywordTable = *m_pKeyMap;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index aaadd8e08c0d..1d835b0633aa 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -170,13 +170,13 @@ struct WW8_SepInfo
bool bIsFirstParagraph;
WW8_SepInfo()
- : pPageDesc(0), pSectionFormat(0), pPDNd(0), nLnNumRestartNo(0), bIsFirstParagraph(false)
+ : pPageDesc(nullptr), pSectionFormat(nullptr), pPDNd(nullptr), nLnNumRestartNo(0), bIsFirstParagraph(false)
{}
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
sal_uLong nLnRestart, ::boost::optional<sal_uInt16> oPgRestart = boost::none,
- const SwNode* pNd = NULL, bool bIsFirstPara = false )
+ const SwNode* pNd = nullptr, bool bIsFirstPara = false )
: pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
bIsFirstParagraph( bIsFirstPara )
@@ -206,7 +206,7 @@ public:
virtual bool HeaderFooterWritten();
void AppendSection( const SwPageDesc* pPd,
- const SwSectionFormat* pSectionFormat = 0,
+ const SwSectionFormat* pSectionFormat = nullptr,
sal_uLong nLnNumRestartNo = 0,
bool bIsFirstParagraph = false );
void AppendSection( const SwFormatPageDesc& rPd,
@@ -253,7 +253,7 @@ public:
void AppendSep( WW8_CP nStartCp,
const SwPageDesc* pPd,
- const SwSectionFormat* pSectionFormat = 0,
+ const SwSectionFormat* pSectionFormat = nullptr,
sal_uLong nLnNumRestartNo = 0 );
void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd,
const SwNode& rNd,
@@ -724,7 +724,7 @@ public:
/// Write section properties.
///
/// pA is ignored for docx.
- void SectionProperties( const WW8_SepInfo& rSectionInfo, WW8_PdAttrDesc* pA = NULL );
+ void SectionProperties( const WW8_SepInfo& rSectionInfo, WW8_PdAttrDesc* pA = nullptr );
/// Output the numbering table.
virtual void WriteNumbering() = 0;
@@ -808,8 +808,8 @@ protected:
virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
const SwNode& rNd,
- const SwFormatPageDesc* pNewPgDescFormat = 0,
- const SwPageDesc* pNewPgDesc = 0 ) = 0;
+ const SwFormatPageDesc* pNewPgDescFormat = nullptr,
+ const SwPageDesc* pNewPgDesc = nullptr ) = 0;
/// Return value indicates if an inherited outline numbering is suppressed.
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0;
@@ -929,7 +929,7 @@ public:
bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = 0 ) override;
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = nullptr ) override;
//Seems not an expected to provide method to access the private member
SfxMedium* GetMedia() { return mpMedium; }
@@ -1009,8 +1009,8 @@ public:
sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
- void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = 0 );
- void WritePostItBegin( ww::bytes* pO = 0 );
+ void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = nullptr );
+ void WritePostItBegin( ww::bytes* pO = nullptr );
const SvxBrushItem* GetCurrentPageBgBrush() const;
SvxBrushItem TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const;
@@ -1065,8 +1065,8 @@ public:
// #i76300#
virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
const SwNode& rNd,
- const SwFormatPageDesc* pNewPgDescFormat = 0,
- const SwPageDesc* pNewPgDesc = 0 ) override;
+ const SwFormatPageDesc* pNewPgDescFormat = nullptr,
+ const SwPageDesc* pNewPgDesc = nullptr ) override;
static void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
@@ -1267,7 +1267,7 @@ private:
public:
WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
~WW8_WrPlcPn();
- void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = 0);
+ void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = nullptr);
void WriteFkps();
void WritePlc();
sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
@@ -1359,7 +1359,7 @@ private:
static void WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
- const SwAttrSet* pAttrSet = 0);
+ const SwAttrSet* pAttrSet = nullptr);
void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
@@ -1423,7 +1423,7 @@ public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
sal_uInt8 nType );
void NextPara( sal_Int32 nPar );
- void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = NULL);
+ void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = nullptr);
void OutEEField(const SfxPoolItem& rHt);
bool IsTextAttr(sal_Int32 nSwPos);
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 56ed88c90ee8..bf252de0137f 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -118,7 +118,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
bGraphicNeeded = true;
}
} while( !bGraphicNeeded && !aIter.IsAtEnd() &&
- 0 != ( pItem = aIter.NextItem() ) );
+ nullptr != ( pItem = aIter.NextItem() ) );
/*
Now we must see if the object contains a preview itself which is equal to
@@ -141,14 +141,14 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
if ( pOLENd )
nAspect = pOLENd->GetAspect();
SdrOle2Obj *pRet = SvxMSDffManager::CreateSdrOLEFromStorage(
- rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,aVisArea,0,nErr,0,nAspect);
+ rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,aVisArea,nullptr,nErr,0,nAspect);
if (pRet)
{
uno::Reference< embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef();
if ( xObj.is() )
{
- SvStream* pGraphicStream = NULL;
+ SvStream* pGraphicStream = nullptr;
comphelper::EmbeddedObjectContainer aCnt( m_pDoc->GetDocStorage() );
try
{
@@ -263,7 +263,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
// in the escher export
OUString sServer = FieldString(ww::eEMBED) + xOleStg->GetUserName() + " ";
- OutputField(0, ww::eEMBED, sServer, WRITEFIELD_START |
+ OutputField(nullptr, ww::eEMBED, sServer, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
m_pChpPlc->AppendFkpEntry( Strm().Tell(),
@@ -309,7 +309,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
OutGrf(*m_pParentFrame);
}
- OutputField(0, ww::eEMBED, OUString(),
+ OutputField(nullptr, ww::eEMBED, OUString(),
WRITEFIELD_END | WRITEFIELD_CLOSE);
if (bEndCR) //No newline in inline case
@@ -379,7 +379,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// #i29408#
// linked, as-character anchored graphics have to be exported as fields.
const SwGrfNode* pGrfNd = rFrame.IsInline() && rFrame.GetContent()
- ? rFrame.GetContent()->GetGrfNode() : 0;
+ ? rFrame.GetContent()->GetGrfNode() : nullptr;
if ( pGrfNd && pGrfNd->IsLinkedFile() )
{
OUString sStr( FieldString(ww::eINCLUDEPICTURE) );
@@ -388,13 +388,13 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
if ( pGrfNd )
{
OUString aFileURL;
- pGrfNd->GetFileFilterNms( &aFileURL, 0 );
+ pGrfNd->GetFileFilterNms( &aFileURL, nullptr );
sStr += aFileURL;
}
}
sStr += "\" \\d";
- OutputField( 0, ww::eINCLUDEPICTURE, sStr,
+ OutputField( nullptr, ww::eINCLUDEPICTURE, sStr,
WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
}
@@ -473,7 +473,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// linked, as-character anchored graphics have to be exported as fields.
else if ( pGrfNd && pGrfNd->IsLinkedFile() )
{
- OutputField( 0, ww::eINCLUDEPICTURE, OUString(), WRITEFIELD_CLOSE );
+ OutputField( nullptr, ww::eINCLUDEPICTURE, OUString(), WRITEFIELD_CLOSE );
}
//Added for i120568,the hyperlink info within a graphic whose anchor type is
//"As character" will be exported to ensure the fidelity
@@ -659,7 +659,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
if (rGrfNd.IsLinkedFile()) // Linked File
{
OUString aFileN;
- rGrfNd.GetFileFilterNms( &aFileN, 0 );
+ rGrfNd.GetFileFilterNms( &aFileN, nullptr );
sal_uInt16 mm = 94; // 94 = BMP, GIF
@@ -786,7 +786,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
case sw::Frame::eGraphic:
{
const SwNode *pNode = rItem.maFly.GetContent();
- const SwGrfNode *pNd = pNode ? pNode->GetGrfNode() : 0;
+ const SwGrfNode *pNd = pNode ? pNode->GetGrfNode() : nullptr;
OSL_ENSURE(pNd, "Impossible");
if (pNd)
WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
@@ -806,7 +806,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
case sw::Frame::eOle:
{
const SwNode *pNode = rItem.maFly.GetContent();
- const SwOLENode *pNd = pNode ? pNode->GetOLENode() : 0;
+ const SwOLENode *pNd = pNode ? pNode->GetOLENode() : nullptr;
OSL_ENSURE(pNd, "Impossible");
if (pNd)
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 22249f1c17ea..9f0ca1765dec 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -244,7 +244,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, b
// No explicit adjust set ?
if ( SfxItemState::SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) )
{
- if ( 0 != ( pItem = rSet.GetItem( RES_PARATR_ADJUST, bExportParentItemSet ) ) )
+ if ( nullptr != ( pItem = rSet.GetItem( RES_PARATR_ADJUST, bExportParentItemSet ) ) )
{
// then set the adjust used by the parent format
AttrOutput().OutputItem( *pItem );
@@ -291,7 +291,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, b
AttrOutput().OutputItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
}
}
- m_pISet = 0; // fuer Doppel-Attribute
+ m_pISet = nullptr; // fuer Doppel-Attribute
}
}
@@ -340,7 +340,7 @@ bool MSWordExportBase::FormatHdFtContainsChapterField(const SwFrameFormat &rForm
if ( m_aChapterFieldLocs.empty() )
return false;
- const SwFrameFormat *pFormat = 0;
+ const SwFrameFormat *pFormat = nullptr;
pFormat = rFormat.GetHeader().GetHeaderFormat();
if ( pFormat && ContentContainsChapterField( pFormat->GetContent() ) )
@@ -397,8 +397,8 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
m_bBreakBefore = true;
bool bNewPageDesc = false;
- const SfxPoolItem* pItem=0;
- const SwFormatPageDesc *pPgDesc=0;
+ const SfxPoolItem* pItem=nullptr;
+ const SwFormatPageDesc *pPgDesc=nullptr;
//Output a sectionbreak if theres a new pagedesciptor. otherwise output a
//pagebreak if there is a pagebreak here, unless the new page (follow
@@ -429,7 +429,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
* set pSet to NULL as we don't want to add any section breaks.
*/
if ( isCellOpen && ( m_pAktPageDesc->GetName() != pPageDesc->GetName() ) )
- pSet = NULL;
+ pSet = nullptr;
}
else if (!sw::util::IsPlausableSingleWordSection(m_pAktPageDesc->GetFirstMaster(), pPageDesc->GetMaster()))
{
@@ -442,7 +442,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
if ( pSet && pSet->Count() )
{
if ( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) &&
- static_cast<const SwFormatPageDesc*>(pItem)->GetRegisteredIn() != NULL)
+ static_cast<const SwFormatPageDesc*>(pItem)->GetRegisteredIn() != nullptr)
{
bBreakSet = true;
bNewPageDesc = true;
@@ -459,7 +459,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
if ( pTableNode )
{
const SwTableBox* pBox = rNd.GetTableBox();
- const SwTableLine* pLine = pBox ? pBox->GetUpper() : 0;
+ const SwTableLine* pLine = pBox ? pBox->GetUpper() : nullptr;
// but only for non-complex tables
if ( pLine && !pLine->GetUpper() )
{
@@ -554,7 +554,7 @@ bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTex
m_pAktPageDesc &&
m_pAktPageDesc != m_pAktPageDesc->GetFollow() )
{
- PrepareNewPageDesc( pSet, *pNd, 0, m_pAktPageDesc->GetFollow() );
+ PrepareNewPageDesc( pSet, *pNd, nullptr, m_pAktPageDesc->GetFollow() );
bRet = true;
}
@@ -563,7 +563,7 @@ bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTex
const SwSectionFormat* MSWordExportBase::GetSectionFormat( const SwNode& rNd )
{
- const SwSectionFormat* pFormat = NULL;
+ const SwSectionFormat* pFormat = nullptr;
const SwSectionNode* pSect = rNd.FindSectionNode();
if ( pSect &&
CONTENT_SECTION == pSect->GetSection().GetType() )
@@ -576,7 +576,7 @@ const SwSectionFormat* MSWordExportBase::GetSectionFormat( const SwNode& rNd )
sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd )
{
- const SwFormatLineNumber* pNItem = 0;
+ const SwFormatLineNumber* pNItem = nullptr;
if ( pSet )
{
pNItem = &( ItemGet<SwFormatLineNumber>( *pSet, RES_LINENUMBER ) );
@@ -854,7 +854,7 @@ bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const OUString* pName, s
{
const SwTextNode* pNd = pFormatField->GetTextField()->GetpTextNode();
if ( pFormatField->GetTextField() && nTyp == pFormatField->GetField()->GetSubType() &&
- 0 != pNd && pNd->GetNodes().IsDocNodes() )
+ nullptr != pNd && pNd->GetNodes().IsDocNodes() )
{
const SwGetRefField& rRField = *static_cast< SwGetRefField* >( pFormatField->GetField() );
switch ( nTyp )
@@ -939,7 +939,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
mbOnTOXEnding = false;
m_rWW8Export.pO->clear();
- if ( pTextNodeInfoInner.get() != NULL )
+ if ( pTextNodeInfoInner.get() != nullptr )
{
if ( pTextNodeInfoInner->isEndOfLine() )
{
@@ -1549,7 +1549,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFormatINetFormat& rINet )
// add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
- OUString* pLinkStr = 0L,
+ OUString* pLinkStr = nullptr,
bool bIncludeEmptyPicLocation = false )
{
ww::bytes aItems;
@@ -1636,7 +1636,7 @@ static OUString lcl_GetExpandedField(const SwField &rField)
WW8_WrPlcField* WW8Export::CurrentFieldPlc() const
{
- WW8_WrPlcField* pFieldP = NULL;
+ WW8_WrPlcField* pFieldP = nullptr;
switch (m_nTextTyp)
{
case TXT_MAINTEXT:
@@ -1701,7 +1701,7 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
aField13[0] |= 0x80;
aField13[1] = static_cast< sal_uInt8 >(eFieldType); // Typ nachtragen
pFieldP->Append( Fc2Cp( Strm().Tell() ), aField13 );
- InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
+ InsertSpecialChar( *this, 0x13, nullptr, bIncludeEmptyPicLocation );
}
if (WRITEFIELD_CMD_START & nMode)
{
@@ -1733,7 +1733,7 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
else if ( nSubType == REF_FOOTNOTE ||
nSubType == REF_ENDNOTE )
{
- aLinkStr = GetBookmarkName( nSubType, 0, rRField.GetSeqNo() );
+ aLinkStr = GetBookmarkName( nSubType, nullptr, rRField.GetSeqNo() );
}
else if ( nSubType == REF_SEQUENCEFLD )
{
@@ -1748,7 +1748,7 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
static const sal_uInt8 aField14[2] = { 0x14, 0xff };
pFieldP->Append( Fc2Cp( Strm().Tell() ), aField14 );
pFieldP->ResultAdded();
- InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
+ InsertSpecialChar( *this, 0x14, nullptr, bIncludeEmptyPicLocation );
}
if (WRITEFIELD_END & nMode)
{
@@ -1800,7 +1800,7 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
}
pFieldP->Append( Fc2Cp( Strm().Tell() ), aField15 );
- InsertSpecialChar( *this, 0x15, 0, bIncludeEmptyPicLocation );
+ InsertSpecialChar( *this, 0x15, nullptr, bIncludeEmptyPicLocation );
}
}
@@ -1808,14 +1808,14 @@ void WW8Export::StartCommentOutput(const OUString& rName)
{
OUString sStr(FieldString(ww::eQUOTE));
sStr += "[" + rName + "] ";
- OutputField(0, ww::eQUOTE, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START);
+ OutputField(nullptr, ww::eQUOTE, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START);
}
void WW8Export::EndCommentOutput(const OUString& rName)
{
OUString sStr(" [");
sStr += rName + "] ";
- OutputField(0, ww::eQUOTE, sStr, WRITEFIELD_CMD_END | WRITEFIELD_END |
+ OutputField(nullptr, ww::eQUOTE, sStr, WRITEFIELD_CMD_END | WRITEFIELD_END |
WRITEFIELD_CLOSE);
}
@@ -1950,7 +1950,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sal_uLong nRstLnNum = 0;
SwSection *pParent = rSect.GetParent();
WW8_SepInfo rInfo(&GetExport( ).m_pDoc->GetPageDesc(0),
- pParent ? pParent->GetFormat() : NULL, nRstLnNum);
+ pParent ? pParent->GetFormat() : nullptr, nRstLnNum);
GetExport( ).AttrOutput().SectionBreak( msword::PageBreak, &rInfo );
}
@@ -2253,7 +2253,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if (!sStr.isEmpty())
{
GetExport( ).m_bInWriteTOX = true;
- GetExport( ).OutputField( 0, eCode, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START |
+ GetExport( ).OutputField( nullptr, eCode, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START |
WRITEFIELD_CMD_END );
}
}
@@ -2267,7 +2267,7 @@ void AttributeOutputBase::EndTOX( const SwSection& rSect,bool bCareEnd )
if ( pTOX )
{
ww::eField eCode = TOX_INDEX == pTOX->GetType() ? ww::eINDEX : ww::eTOC;
- GetExport( ).OutputField( 0, eCode, OUString(), WRITEFIELD_CLOSE );
+ GetExport( ).OutputField( nullptr, eCode, OUString(), WRITEFIELD_CLOSE );
if ( pTOX->GetType() == TOX_INDEX && GetExport().AddSectionBreaksForTOX() )
{
@@ -2609,7 +2609,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField )
const SwDocInfoField * pDocInfoField =
dynamic_cast<const SwDocInfoField *> (pField);
- if (pDocInfoField != NULL)
+ if (pDocInfoField != nullptr)
{
OUString sFieldname = pDocInfoField->GetFieldName();
sal_Int32 nIndex = sFieldname.indexOf(':');
@@ -2790,7 +2790,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField )
break;
}
sStr = FieldString(eField)
- + MSWordExportBase::GetBookmarkName(nSubType, 0, rRField.GetSeqNo());
+ + MSWordExportBase::GetBookmarkName(nSubType, nullptr, rRField.GetSeqNo());
break;
}
@@ -3121,9 +3121,9 @@ void AttributeOutputBase::TextFootnote( const SwFormatFootnote& rFootnote )
// if any reference to this footnote/endnote then insert an internal
// Bookmark.
OUString sBkmkNm;
- if ( GetExport().HasRefToObject( nTyp, 0, rFootnote.GetTextFootnote()->GetSeqRefNo() ))
+ if ( GetExport().HasRefToObject( nTyp, nullptr, rFootnote.GetTextFootnote()->GetSeqRefNo() ))
{
- sBkmkNm = MSWordExportBase::GetBookmarkName( nTyp, 0,
+ sBkmkNm = MSWordExportBase::GetBookmarkName( nTyp, nullptr,
rFootnote.GetTextFootnote()->GetSeqRefNo() );
GetExport().AppendBookmark( sBkmkNm );
}
@@ -3204,7 +3204,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
- const SwTextNode* pTextNd = 0;
+ const SwTextNode* pTextNd = nullptr;
sal_uInt16 nNumId;
sal_uInt8 nLvl = 0;
if (!rNumRule.GetValue().isEmpty())
@@ -3535,7 +3535,7 @@ sal_uInt32 AttributeOutputBase::GridCharacterPitch( const SwTextGridItem& rGrid
sal_uInt32 nPageCharSize = 0;
- if (pSwFormat != NULL)
+ if (pSwFormat != nullptr)
{
nPageCharSize = ItemGet<SvxFontHeightItem>
(*pSwFormat, RES_CHRATR_FONTSIZE).GetHeight();
@@ -4074,7 +4074,7 @@ void WW8Export::Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * pBox )
for( int i = 0; i < 4; ++i )
{
const SvxBorderLine* pLn;
- if (pBox != NULL)
+ if (pBox != nullptr)
pLn = pBox->GetLine( aBorders[i] );
else
pLn = & aBorderLine;
@@ -4093,8 +4093,8 @@ void WW8Export::Out_CellRangeBorders( const SvxBoxItem * pBox, sal_uInt8 nStart,
for( int i = 0; i < 4; ++i )
{
- const SvxBorderLine* pLn = 0;
- if (pBox != NULL)
+ const SvxBorderLine* pLn = nullptr;
+ if (pBox != nullptr)
pLn = pBox->GetLine( aBorders[i] );
if (!pLn)
continue;
@@ -4302,7 +4302,7 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
nSpace = (short)rSpacing.GetInterLineSpace();
sal_uInt16 nScript =
i18n::ScriptType::LATIN;
- const SwAttrSet *pSet = 0;
+ const SwAttrSet *pSet = nullptr;
if ( GetExport().m_pOutFormatNode && dynamic_cast< const SwFormat *>( GetExport().m_pOutFormatNode ) != nullptr )
{
const SwFormat *pFormat = static_cast<const SwFormat*>( GetExport().m_pOutFormatNode );
@@ -4522,7 +4522,7 @@ public:
SwWW8WrTabu::SwWW8WrTabu(sal_uInt16 nDelMax, sal_uInt16 nAddMax)
: nAdd(0), nDel(0)
{
- pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : 0;
+ pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : nullptr;
pAddPos = new sal_uInt8[nAddMax * 2];
pAddTyp = new sal_uInt8[nAddMax];
}
@@ -4675,7 +4675,7 @@ static void ParaTabStopDelAdd( WW8Export& rWrt,
}
else
{
- pTO = 0;
+ pTO = nullptr;
nOP = LONG_MAX;
}
@@ -4693,7 +4693,7 @@ static void ParaTabStopDelAdd( WW8Export& rWrt,
}
else
{
- pTN = 0;
+ pTN = nullptr;
nNP = LONG_MAX;
}
@@ -4736,14 +4736,14 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops )
{
const SfxPoolItem* pLR = m_rWW8Export.HasItem( RES_LR_SPACE );
- if ( pLR != NULL )
+ if ( pLR != nullptr )
nCurrentLeft = static_cast<const SvxLRSpaceItem*>(pLR)->GetTextLeft();
}
// #i100264#
if ( m_rWW8Export.m_bStyDef &&
- m_rWW8Export.m_pCurrentStyle != NULL &&
- m_rWW8Export.m_pCurrentStyle->DerivedFrom() != NULL )
+ m_rWW8Export.m_pCurrentStyle != nullptr &&
+ m_rWW8Export.m_pCurrentStyle->DerivedFrom() != nullptr )
{
SvxTabStopItem aParentTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
const SwFormat *pParentStyle = m_rWW8Export.m_pCurrentStyle->DerivedFrom();
@@ -4766,7 +4766,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops )
return;
}
- const SvxTabStopItem* pStyleTabs = 0;
+ const SvxTabStopItem* pStyleTabs = nullptr;
if ( !m_rWW8Export.m_bStyDef && m_rWW8Export.m_pStyAttr )
{
pStyleTabs = m_rWW8Export.m_pStyAttr->GetItem<SvxTabStopItem>(RES_PARATR_TABSTOP);
@@ -5048,7 +5048,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep
if ( !bDeep )
return;
- while ( 0 != ( pSet = pSet->GetParent() ) && !pSet->Count() )
+ while ( nullptr != ( pSet = pSet->GetParent() ) && !pSet->Count() )
;
if ( !pSet )
@@ -5063,7 +5063,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep
pItem = aIter.GetCurItem();
do {
OutputItem( *pItem );
- } while ( !aIter.IsAtEnd() && 0 != ( pItem = aIter.NextItem() ) );
+ } while ( !aIter.IsAtEnd() && nullptr != ( pItem = aIter.NextItem() ) );
}
else
{
@@ -5086,7 +5086,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep
void AttributeOutputBase::FormatCharBorder( const SvxBoxItem& rBox )
{
// Get one of the borders (if there is any border then in docx also will be)
- const SvxBorderLine* pBorderLine = 0;
+ const SvxBorderLine* pBorderLine = nullptr;
sal_uInt16 nDist = 0;
if( rBox.GetTop() )
{
@@ -5162,7 +5162,7 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex
}
}
}
- return NULL;
+ return nullptr;
}
void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index eae91c0bce11..4c83070437e2 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -145,7 +145,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) override;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) override;
// preserve DOC page vertical alignment
virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) SAL_OVERRIDE;
@@ -196,7 +196,7 @@ public:
sal_Int16 nFirstLineIndex,
sal_Int16 nListTabPos,
const OUString &rNumberingString,
- const SvxBrushItem* pBrush = 0) override; //For i120928,transfer graphic of bullet
+ const SvxBrushItem* pBrush = nullptr) override; //For i120928,transfer graphic of bullet
protected:
/// Output frames - the implementation.
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index f89b8fd0098c..cb89dfbc0aa1 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -35,7 +35,7 @@
WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion,
SotStorage *pStg)
- : pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
+ : pGlossary(nullptr), rStrm(refStrm), xStg(pStg), nStrings(0)
{
refStrm->SetEndian(SvStreamEndian::LITTLE);
WW8Fib aWwFib(*refStrm, nVersion);
@@ -109,13 +109,13 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
SwTextFormatColl* pColl = pD->getIDocumentStylePoolAccess().GetTextCollFromPool
(RES_POOLCOLL_STANDARD, false);
sal_uInt16 nGlosEntry = 0;
- SwContentNode* pCNd = 0;
+ SwContentNode* pCNd = nullptr;
do {
SwPaM aPam( aStart );
{
SwNodeIndex& rIdx = aPam.GetPoint()->nNode;
++rIdx;
- if( 0 == ( pCNd = rIdx.GetNode().GetTextNode() ) )
+ if( nullptr == ( pCNd = rIdx.GetNode().GetTextNode() ) )
{
pCNd = pD->GetNodes().MakeTextNode( rIdx, pColl );
rIdx = *pCNd;
@@ -126,7 +126,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
{
SwNodeIndex& rIdx = aPam.GetPoint()->nNode;
rIdx = aStart.GetNode().EndOfSectionIndex() - 1;
- if(( 0 == ( pCNd = rIdx.GetNode().GetContentNode() ) )
+ if(( nullptr == ( pCNd = rIdx.GetNode().GetContentNode() ) )
|| HasBareGraphicEnd(pD,rIdx))
{
++rIdx;
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index a375f1dd06c0..1b62971817fe 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -57,7 +57,7 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion, SotStorage *pStg=0);
+ WW8Glossary( tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion, SotStorage *pStg=nullptr);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index de4bd8f26243..1d3113cbeb25 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -307,7 +307,7 @@ SdrObject* SwWW8ImplReader::ReadLine(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_LINE aLine;
if( !ReadGrafStart( static_cast<void*>(&aLine), sizeof( aLine ), pHd, rSet ) )
- return 0;
+ return nullptr;
Point aP[2];
{
@@ -339,7 +339,7 @@ SdrObject* SwWW8ImplReader::ReadRect(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_RECT aRect;
if( !ReadGrafStart( static_cast<void*>(&aRect), sizeof( aRect ), pHd, rSet ) )
- return 0;
+ return nullptr;
Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + m_nDrawXOfs2,
(sal_Int16)SVBT16ToShort( pHd->ya ) + m_nDrawYOfs2 );
@@ -360,7 +360,7 @@ SdrObject* SwWW8ImplReader::ReadElipse(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_ELIPSE aElipse;
if( !ReadGrafStart( static_cast<void*>(&aElipse), sizeof( aElipse ), pHd, rSet ) )
- return 0;
+ return nullptr;
Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + m_nDrawXOfs2,
(sal_Int16)SVBT16ToShort( pHd->ya ) + m_nDrawYOfs2 );
@@ -381,7 +381,7 @@ SdrObject* SwWW8ImplReader::ReadArc(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_ARC aArc;
if( !ReadGrafStart( static_cast<void*>(&aArc), sizeof( aArc ), pHd, rSet ) )
- return 0;
+ return nullptr;
Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + m_nDrawXOfs2,
(sal_Int16)SVBT16ToShort( pHd->ya ) + m_nDrawYOfs2 );
@@ -414,7 +414,7 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_POLYLINE aPoly;
if( !ReadGrafStart( static_cast<void*>(&aPoly), sizeof( aPoly ), pHd, rSet ) )
- return 0;
+ return nullptr;
sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
std::unique_ptr<SVBT16[]> xP(new SVBT16[nCount * 2]);
@@ -422,7 +422,7 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
bool bCouldRead = checkRead(*m_pStrm, xP.get(), nCount * 4); // Punkte einlesen
OSL_ENSURE(bCouldRead, "Short PolyLine header");
if (!bCouldRead)
- return 0;
+ return nullptr;
tools::Polygon aP( nCount );
Point aPt;
@@ -478,7 +478,7 @@ ESelection GetESelection(EditEngine &rDrawEditEngine, long nCpStart, long nCpEnd
void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
SwWW8StyInf * pStyInf = GetStyle(nColl);
- if( pStyInf != NULL && pStyInf->pFormat && pStyInf->bColl )
+ if( pStyInf != nullptr && pStyInf->pFormat && pStyInf->bColl )
{
const SfxPoolItem* pItem;
for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
@@ -771,7 +771,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
sal_uInt16 nTxBxS, sal_uInt16 nSequence)
{
// grab the TextBox-PLCF quickly
- WW8PLCFspecial* pT = m_pPlcxMan ? m_pPlcxMan->GetTxbx() : 0;
+ WW8PLCFspecial* pT = m_pPlcxMan ? m_pPlcxMan->GetTxbx() : nullptr;
if( !pT )
{
OSL_ENSURE( false, "+Wo ist der Grafik-Text (1) ?" );
@@ -934,13 +934,13 @@ void removePositions(EditEngine &rDrawEditEngine, const std::vector<sal_Int32>&
OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType)
{
- OutlinerParaObject* pRet = 0;
+ OutlinerParaObject* pRet = nullptr;
sal_Int32 nLen = GetRangeAsDrawingString(rString, nStartCp, nEndCp, eType);
if (nLen > 0)
{
if (!m_pDrawEditEngine)
- m_pDrawEditEngine = new EditEngine(0);
+ m_pDrawEditEngine = new EditEngine(nullptr);
//replace dos line endings with editeng ones, replace any extra chars with
//placeholders to keep the inserted string len in sync with the attribute cps
@@ -991,7 +991,7 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp,
bool* pbContainsGraphics, SvxMSDffImportRec* pRecord)
{
- SwFrameFormat* pFlyFormat = 0;
+ SwFrameFormat* pFlyFormat = nullptr;
sal_uLong nOld = m_pStrm->Tell();
ManTypes eType = m_pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX;
@@ -1005,7 +1005,7 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
GetRangeAsDrawingString(aString, nStartCp, nEndCp, eType) > 0;
if (!m_pDrawEditEngine)
- m_pDrawEditEngine = new EditEngine(0);
+ m_pDrawEditEngine = new EditEngine(nullptr);
if( pObjSiz )
m_pDrawEditEngine->SetPaperSize( *pObjSiz );
@@ -1044,7 +1044,7 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
{
const sal_uInt8* pParams;
while( aSprmIter.GetSprms()
- && (0 != (pParams = aSprmIter.GetAktParams())) )
+ && (nullptr != (pParams = aSprmIter.GetAktParams())) )
{
sal_uInt16 nAktId = aSprmIter.GetAktId();
switch( nAktId )
@@ -1109,7 +1109,7 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
{
InsertAttrsAsDrawingAttrs(nNewStartCp, nNewStartCp+1,
eType, true);
- pFlyFormat = ImportGraf(bMakeSdrGrafObj ? pTextObj : 0,
+ pFlyFormat = ImportGraf(bMakeSdrGrafObj ? pTextObj : nullptr,
pOldFlyFormat);
}
}
@@ -1149,7 +1149,7 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
}
}
aString.clear();
- rbEraseTextObj = (0 != pFlyFormat);
+ rbEraseTextObj = (nullptr != pFlyFormat);
}
}
}
@@ -1198,7 +1198,7 @@ bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartC
long& rEndCp)
{
bool bErase, bContainsText;
- InsertTxbxText( 0,0,nTxBxS,USHRT_MAX,0,0,false, bErase, &bContainsText,
+ InsertTxbxText( nullptr,nullptr,nTxBxS,USHRT_MAX,0,nullptr,false, bErase, &bContainsText,
&rStartCp, &rEndCp );
return bContainsText;
}
@@ -1210,7 +1210,7 @@ SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_TXTBOX aTextB;
if( !ReadGrafStart( static_cast<void*>(&aTextB), sizeof( aTextB ), pHd, rSet ) )
- return 0;
+ return nullptr;
Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + m_nDrawXOfs2,
(sal_Int16)SVBT16ToShort( pHd->ya ) + m_nDrawYOfs2 );
@@ -1226,8 +1226,8 @@ SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
long nStartCpFly,nEndCpFly;
bool bContainsGraphics;
- InsertTxbxText(dynamic_cast<SdrTextObj*>(pObj), &aSize, 0, 0, 0, 0, false,
- bDummy,0,&nStartCpFly,&nEndCpFly,&bContainsGraphics);
+ InsertTxbxText(dynamic_cast<SdrTextObj*>(pObj), &aSize, 0, 0, 0, nullptr, false,
+ bDummy,nullptr,&nStartCpFly,&nEndCpFly,&bContainsGraphics);
SetStdAttr( rSet, aTextB.aLnt, aTextB.aShd );
SetFill( rSet, aTextB.aFill );
@@ -1251,7 +1251,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
WW8_DP_CALLOUT_TXTBOX aCallB;
if( !ReadGrafStart( static_cast<void*>(&aCallB), sizeof( aCallB ), pHd, rSet ) )
- return 0;
+ return nullptr;
sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
std::unique_ptr<SVBT16[]> xP(new SVBT16[nCount * 2]);
@@ -1259,7 +1259,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
bool bCouldRead = checkRead(*m_pStrm, xP.get(), nCount * 4); // Punkte einlesen
OSL_ENSURE(bCouldRead, "Short CaptionBox header");
if (!bCouldRead)
- return 0;
+ return nullptr;
sal_uInt8 nTyp = (sal_uInt8)nCount - 1;
if( nTyp == 1 && SVBT16ToShort( xP[0] ) == SVBT16ToShort( xP[2] ) )
@@ -1287,7 +1287,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
(sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
bool bEraseThisObject;
- InsertTxbxText(pObj, &aSize, 0, 0, 0, 0, false, bEraseThisObject );
+ InsertTxbxText(pObj, &aSize, 0, 0, 0, nullptr, false, bEraseThisObject );
if( SVBT16ToShort( aCallB.dptxbx.aLnt.lnps ) != 5 ) // Umrandung sichtbar ?
SetStdAttr( rSet, aCallB.dptxbx.aLnt, aCallB.dptxbx.aShd );
@@ -1304,7 +1304,7 @@ SdrObject *SwWW8ImplReader::ReadGroup(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
sal_Int16 nGrouped;
if( !ReadGrafStart( static_cast<void*>(&nGrouped), sizeof( nGrouped ), pHd, rSet ) )
- return 0;
+ return nullptr;
#ifdef OSL_BIGENDIAN
nGrouped = (sal_Int16)OSL_SWAPWORD( nGrouped );
@@ -1340,7 +1340,7 @@ SdrObject* SwWW8ImplReader::ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet)
{
// This whole archaic word 6 graphic import can probably be refactored
// into an object hierarachy with a little effort.
- SdrObject *pRet=0;
+ SdrObject *pRet=nullptr;
WW8_DPHEAD aHd; // Lese Draw-Primitive-Header
bool bCouldRead = checkRead(*m_pStrm, &aHd, sizeof(WW8_DPHEAD));
OSL_ENSURE(bCouldRead, "Graphic Primitive header short read" );
@@ -1687,22 +1687,22 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
rInnerDist.Bottom()+=nLineThick;
const SvxBorderLine *pLine;
- if (0 != (pLine = aBox.GetLine(SvxBoxItemLine::LEFT)))
+ if (nullptr != (pLine = aBox.GetLine(SvxBoxItemLine::LEFT)))
{
rInnerDist.Left() -= (pLine->GetScaledWidth());
}
- if (0 != (pLine = aBox.GetLine(SvxBoxItemLine::TOP)))
+ if (nullptr != (pLine = aBox.GetLine(SvxBoxItemLine::TOP)))
{
rInnerDist.Top() -= (pLine->GetScaledWidth());
}
- if (0 != (pLine = aBox.GetLine(SvxBoxItemLine::RIGHT)))
+ if (nullptr != (pLine = aBox.GetLine(SvxBoxItemLine::RIGHT)))
{
rInnerDist.Right() -= (pLine->GetScaledWidth());
}
- if (0 != (pLine = aBox.GetLine(SvxBoxItemLine::BOTTOM)))
+ if (nullptr != (pLine = aBox.GetLine(SvxBoxItemLine::BOTTOM)))
{
rInnerDist.Bottom() -= (pLine->GetScaledWidth());
}
@@ -2058,7 +2058,7 @@ SwWW8ImplReader::SetAttributesAtGrfNode(SvxMSDffImportRec const*const pRecord,
{
const SwNodeIndex* pIdx = pFlyFormat->GetContent(false).GetContentIdx();
SwGrfNode* pGrfNd;
- if( pIdx && 0 != (pGrfNd = m_rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
+ if( pIdx && nullptr != (pGrfNd = m_rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
// use type <sal_uInt64> instead of sal_uLong to get correct results
@@ -2139,7 +2139,7 @@ SdrObject* SwWW8ImplReader::CreateContactObject(SwFrameFormat* pFlyFormat)
{
if (pFlyFormat)
{
- SdrObject* pNewObject = m_bNewDoc ? 0 : pFlyFormat->FindRealSdrObject();
+ SdrObject* pNewObject = m_bNewDoc ? nullptr : pFlyFormat->FindRealSdrObject();
if (!pNewObject)
pNewObject = pFlyFormat->FindSdrObject();
if (!pNewObject && dynamic_cast< const SwFlyFrameFormat *>( pFlyFormat ) != nullptr)
@@ -2151,7 +2151,7 @@ SdrObject* SwWW8ImplReader::CreateContactObject(SwFrameFormat* pFlyFormat)
}
return pNewObject;
}
- return 0;
+ return nullptr;
}
// Miserable miserable hack to fudge word's graphic layout in RTL mode to ours.
@@ -2436,7 +2436,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
{
if( m_nIniFlags & WW8FL_NO_GRAFLAYER )
- return 0;
+ return nullptr;
::SetProgressState(m_nProgress, m_pDocShell); // Update
@@ -2449,7 +2449,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if( !pPF )
{
OSL_ENSURE( false, "Where is the graphic (1) ?" );
- return 0;
+ return nullptr;
}
if( m_bVer67 )
@@ -2460,7 +2460,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
ReadGrafLayer1( pPF, nGrafAnchorCp );
m_pStrm->Seek( nOldPos );
- return 0;
+ return nullptr;
}
// Normal case of Word 8+ version stuff
@@ -2470,7 +2470,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
void* pF0;
if( !pPF->Get( nStartFc, pF0 ) ){
OSL_ENSURE( false, "+Wo ist die Grafik (2) ?" );
- return 0;
+ return nullptr;
}
WW8_FSPA_SHADOW* pFS = static_cast<WW8_FSPA_SHADOW*>(pF0);
@@ -2481,7 +2481,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if( !pF->nSpId )
{
OSL_ENSURE( false, "+Wo ist die Grafik (3) ?" );
- return 0;
+ return nullptr;
}
if (!m_pMSDffManager->GetModel())
@@ -2496,9 +2496,9 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
sorts of trouble later on
*/
SwDocShell* pPersist = m_rDoc.GetDocShell();
- m_rDoc.SetDocShell(0); // #i20540# Persist guard
+ m_rDoc.SetDocShell(nullptr); // #i20540# Persist guard
- SdrObject* pObject = 0;
+ SdrObject* pObject = nullptr;
bool bOk = (m_pMSDffManager->GetShape(pF->nSpId, pObject, aData) && pObject);
m_rDoc.SetDocShell(pPersist); // #i20540# Persist guard
@@ -2506,11 +2506,11 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if (!bOk)
{
OSL_ENSURE( false, "Where is the Shape ?" );
- return 0;
+ return nullptr;
}
bool bDone = false;
- SdrObject* pOurNewObject = 0;
+ SdrObject* pOurNewObject = nullptr;
bool bReplaceable = false;
switch (SdrObjKind(pObject->GetObjIdentifier()))
@@ -2590,7 +2590,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if (aData.size() != 1)
bReplaceable = false;
- SvxMSDffImportRec* pRecord = 0;
+ SvxMSDffImportRec* pRecord = nullptr;
/*
Get the record for top level object, so we can get the word anchoring
and wrapping information for it.
@@ -2607,7 +2607,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
OSL_ENSURE(pRecord, "how did that happen?");
if (!pRecord)
- return 0;
+ return nullptr;
const bool bLayoutInTableCell =
m_nInTable && IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell );
@@ -2623,7 +2623,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// #i21847#
// Some shapes are set to *hidden*, don't import those ones.
if (pRecord->bHidden)
- return 0;
+ return nullptr;
sal_uInt16 nCount = pObject->GetUserDataCount();
if(nCount)
@@ -2655,7 +2655,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
pFormatURL->SetName(aObjName);
if (!aTarFrm.isEmpty())
pFormatURL->SetTargetFrameName(aTarFrm);
- pFormatURL->SetMap(0);
+ pFormatURL->SetMap(nullptr);
aFlySet.Put(*pFormatURL);
}
@@ -2672,7 +2672,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
OUString aObjName = pObject->GetName();
- SwFrameFormat* pRetFrameFormat = 0;
+ SwFrameFormat* pRetFrameFormat = nullptr;
if (bReplaceable)
{
// Single graphics or ole objects
@@ -2819,8 +2819,8 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrameFormat,
- (pSdrTextObj != pTrueObject) || (0 != pGroupObject),
- bEraseThisObject, 0, 0, 0, 0, pRecord);
+ (pSdrTextObj != pTrueObject) || (nullptr != pGroupObject),
+ bEraseThisObject, nullptr, nullptr, nullptr, nullptr, pRecord);
// wurde dieses Objekt ersetzt ??
if (bEraseThisObject)
@@ -2835,7 +2835,7 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
if (pSdrTextObj != pNewObj)
{
// Objekt in der Z-Order-Liste ersetzen
- m_pMSDffManager->ExchangeInShapeOrder(pSdrTextObj, 0,0, pNewObj);
+ m_pMSDffManager->ExchangeInShapeOrder(pSdrTextObj, 0,nullptr, pNewObj);
// Objekt jetzt noch loeschen
SdrObject::Free( pRecord->pObj );
// und das neue Objekt merken.
@@ -2852,9 +2852,9 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// und FrameFormat entfernen, da durch Grafik ersetzt (dies
// loescht auch das Objekt)
m_rDoc.DelFrameFormat( pRetFrameFormat );
- pRetFrameFormat = 0;
+ pRetFrameFormat = nullptr;
// auch den Objektmerker loeschen
- pRecord->pObj = 0;
+ pRecord->pObj = nullptr;
}
}
else
@@ -2876,7 +2876,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, RndStdIds eAnchor,
WW8_FSPA *pF, SfxItemSet &rFlySet)
{
- SwFlyFrameFormat* pRetFrameFormat = 0;
+ SwFlyFrameFormat* pRetFrameFormat = nullptr;
long nStartCp;
long nEndCp;
@@ -2935,7 +2935,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
*/
m_pMSDffManager->StoreShapeOrder(pF->nSpId,
(((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
- pRecord->aTextId.nSequence, 0, pRetFrameFormat);
+ pRecord->aTextId.nSequence, nullptr, pRetFrameFormat);
// The Contact object has to be inserted into the draw page, so
// SwWW8ImplReader::LoadDoc1() can determine the z-order.
@@ -2998,7 +2998,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, WW8_FSPA *pF,
SfxItemSet &rFlySet )
{
- SwFlyFrameFormat* pRetFrameFormat = 0;
+ SwFlyFrameFormat* pRetFrameFormat = nullptr;
long nWidthTw = pF->nXaRight - pF->nXaLeft;
if (0 > nWidthTw)
nWidthTw = 0;
@@ -3043,8 +3043,8 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
// as a linked graphic -
if (GRAPHIC_NONE == eType || CanUseRemoteLink(aGrfName))
{
- pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, aGrfName, OUString(), 0,
- &rFlySet, &aGrSet, NULL);
+ pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, aGrfName, OUString(), nullptr,
+ &rFlySet, &aGrSet, nullptr);
bDone = true;
}
}
@@ -3052,7 +3052,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
{
const Graphic& rGraph = pGrf->GetGraphic();
pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &rGraph,
- &rFlySet, &aGrSet, NULL);
+ &rFlySet, &aGrSet, nullptr);
}
}
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index d041ea3ee882..09c13885fab1 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -369,7 +369,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
aFlySet.Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) );
SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph,
- &aFlySet, &rGrfSet, NULL);
+ &aFlySet, &rGrfSet, nullptr);
// So the frames are generated when inserted in an existing doc:
if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() &&
@@ -387,7 +387,7 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
{
WW8FlySet aFlySet(*this, m_pPaM, rPic, rPD.nWidth, rPD.nHeight);
- SwFrameFormat* pFlyFormat = 0;
+ SwFrameFormat* pFlyFormat = nullptr;
if (rFileName.isEmpty() && m_nObjLocFc) // dann sollte ists ein OLE-Object
pFlyFormat = ImportOle(pGraph, &aFlySet, &rGrfSet);
@@ -396,7 +396,7 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
{
pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, rFileName, OUString(), pGraph, &aFlySet,
- &rGrfSet, NULL);
+ &rGrfSet, nullptr);
}
// Resize the frame to the size of the picture if graphic is inside a frame
@@ -409,19 +409,19 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
SwFrameFormat* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
sal_uLong nFilePos )
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 )
- return 0;
+ return nullptr;
OUString aFileName;
bool bInDoc;
- Graphic* pGraph = 0;
+ Graphic* pGraph = nullptr;
bool bOk = ReadGrafFile(aFileName, pGraph, rPic, pSt, nFilePos, &bInDoc);
if (!bOk)
{
delete pGraph;
- return 0; // Graphic could not be readed correctly
+ return nullptr; // Graphic could not be readed correctly
}
WW8PicDesc aPD( rPic );
@@ -459,13 +459,13 @@ void SwWW8ImplReader::PicRead(SvStream *pDataStream, WW8_PIC *pPic,
SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
SwFrameFormat* pOldFlyFormat)
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
if (
((m_pStrm == m_pDataStream ) && !m_nPicLocFc) ||
(m_nIniFlags & WW8FL_NO_GRAF)
)
{
- return 0;
+ return nullptr;
}
::SetProgressState(m_nProgress, m_pDocShell); // Update
@@ -506,12 +506,12 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
m_pFlyFormatOfJustInsertedGraphic->SetFormatAttr( aFlySet );
- m_pFlyFormatOfJustInsertedGraphic = 0;
+ m_pFlyFormatOfJustInsertedGraphic = nullptr;
}
else if((0x64 == aPic.MFP.mm) || (0x66 == aPic.MFP.mm))
{
// verlinkte Grafik im Escher-Objekt
- SdrObject* pObject = 0;
+ SdrObject* pObject = nullptr;
WW8PicDesc aPD( aPic );
if (!m_pMSDffManager)
@@ -658,7 +658,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (!pRet)
{
pRet = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(),
- &rGraph, &aAttrSet, &aGrSet, NULL );
+ &rGraph, &aAttrSet, &aGrSet, nullptr );
}
}
else
@@ -670,7 +670,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (pRet)
{
if (pRecord)
- SetAttributesAtGrfNode(pRecord, pRet, 0);
+ SetAttributesAtGrfNode(pRecord, pRet, nullptr);
// #i68101#
// removed pObject->HasSetName() usage since always returned
@@ -685,7 +685,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
{
if (pOurNewObject != pObject)
{
- m_pMSDffManager->ExchangeInShapeOrder( pObject, 0, 0,
+ m_pMSDffManager->ExchangeInShapeOrder( pObject, 0, nullptr,
pOurNewObject );
// delete and destroy old SdrGrafObj from page
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0886debc7155..d4ea09f766c8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -178,7 +178,7 @@ SwMacroInfo* GetMacroInfo( SdrObject* pObj, bool bCreate ) // static
}
}
- return 0;
+ return nullptr;
};
void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell* pDocShell)
@@ -528,8 +528,8 @@ Sttb::getStringAtIndex( sal_uInt32 index )
SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr, bool bSkipImages )
: SvxMSDffManager(*rRdr.m_pTableStream, rRdr.GetBaseURL(), rRdr.m_pWwFib->fcDggInfo,
- rRdr.m_pDataStream, 0, 0, COL_WHITE, rRdr.m_pStrm, bSkipImages),
- rReader(rRdr), pFallbackStream(0)
+ rRdr.m_pDataStream, nullptr, 0, COL_WHITE, rRdr.m_pStrm, bSkipImages),
+ rReader(rRdr), pFallbackStream(nullptr)
{
SetSvxMSDffSettings( GetSvxMSDffSettings() );
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
@@ -568,10 +568,10 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
// if drawing OLE objects are allowed in Writer.
if ( _nCalledByGroup > 0 )
{
- return 0L;
+ return nullptr;
}
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
OUString sStorageName;
tools::SvRef<SotStorage> xSrcStg;
uno::Reference < embed::XStorage > xDstStg;
@@ -602,7 +602,7 @@ void SwMSDffManager::DisableFallbackStream()
pFallbackStream = pStData2;
aOldEscherBlipCache = aEscherBlipCache;
aEscherBlipCache.clear();
- pStData2 = 0;
+ pStData2 = nullptr;
}
void SwMSDffManager::EnableFallbackStream()
@@ -610,7 +610,7 @@ void SwMSDffManager::EnableFallbackStream()
pStData2 = pFallbackStream;
aEscherBlipCache = aOldEscherBlipCache;
aOldEscherBlipCache.clear();
- pFallbackStream = 0;
+ pFallbackStream = nullptr;
}
sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
@@ -948,7 +948,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
aSet.Put( SdrTextVertAdjustItem( eTVA ) );
aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
- if (pObj != NULL)
+ if (pObj != nullptr)
{
pObj->SetMergedItemSet(aSet);
pObj->SetModel(pSdrModel);
@@ -1022,7 +1022,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SfxItemSet aSet( pSdrModel->GetItemPool() );
ApplyAttributes( rSt, aSet, rObjData );
- const SfxPoolItem* pPoolItem=NULL;
+ const SfxPoolItem* pPoolItem=nullptr;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
false, &pPoolItem );
if( SfxItemState::DEFAULT == eState )
@@ -1059,7 +1059,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt))
{
delete pImpRec->pWrapPolygon;
- pImpRec->pWrapPolygon = NULL;
+ pImpRec->pWrapPolygon = nullptr;
sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
@@ -1235,7 +1235,7 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltStackEntry* SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
bool bTstEnde, long nHand, bool )
{
- SwFltStackEntry *pRet = NULL;
+ SwFltStackEntry *pRet = nullptr;
// Doing a textbox, and using the control stack only as a temporary
// collection point for properties which will are not to be set into
// the real document
@@ -1333,7 +1333,7 @@ void SyncIndentWithList( SvxLRSpaceItem &rLR,
const SwNumFormat* SwWW8FltControlStack::GetNumFormatFromStack(const SwPosition &rPos,
const SwTextNode &rTextNode)
{
- const SwNumFormat *pRet = 0;
+ const SwNumFormat *pRet = nullptr;
const SfxPoolItem *pItem = GetStackAttr(rPos, RES_FLTR_NUMRULE);
if (pItem && rTextNode.GetNumRule())
{
@@ -1387,7 +1387,7 @@ void SwWW8ReferencedFltEndStack::SetAttrInDoc( const SwPosition& rTmpPos,
bool bInsertBookmarkIntoDoc = true;
SwFltBookmark* pFltBookmark = dynamic_cast<SwFltBookmark*>(rEntry.pAttr);
- if ( pFltBookmark != 0 && pFltBookmark->IsTOCBookmark() )
+ if ( pFltBookmark != nullptr && pFltBookmark->IsTOCBookmark() )
{
const OUString& rName = pFltBookmark->GetName();
::std::set< OUString, SwWW8::ltstr >::const_iterator aResult = aReferencedTOCBookmarks.find(rName);
@@ -1441,7 +1441,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwTextNode *pTextNode = static_cast<SwTextNode*>(pNode);
- const SwNumFormat *pNum = 0;
+ const SwNumFormat *pNum = nullptr;
pNum = GetNumFormatFromStack( *aRegion.GetPoint(), *pTextNode );
if (!pNum)
{
@@ -1497,7 +1497,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
// If we have just one single inline graphic then
// don't insert a field for the single frame, set
// the frames hyperlink field attribute directly.
- if (0 != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion)))
+ if (nullptr != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion)))
{
const SwFormatINetFormat *pAttr = static_cast<const SwFormatINetFormat *>(
rEntry.pAttr);
@@ -1592,7 +1592,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
}
}
}
- return 0;
+ return nullptr;
}
bool SwWW8FltRefStack::IsFootnoteEdnBkmField(
@@ -1717,7 +1717,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
- const SwTextFormatColl* pSty = 0;
+ const SwTextFormatColl* pSty = nullptr;
sal_uInt16 nTabBase;
if (m_pAktColl && m_nAktColl < m_vColl.size()) // StyleDef
{
@@ -1764,10 +1764,10 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
if (aLoopWatch.find(reinterpret_cast<size_t>(pSty)) !=
aLoopWatch.end())
- pSty = 0;
+ pSty = nullptr;
}
else
- pSty = 0; // Give up on the search
+ pSty = nullptr; // Give up on the search
}
}
@@ -2065,11 +2065,11 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
= pRdr->m_bHasBorder = false;
pRdr->m_bFirstPara = true;
pRdr->m_nInTable = 0;
- pRdr->m_pWFlyPara = 0;
- pRdr->m_pSFlyPara = 0;
- pRdr->m_pPreviousNumPaM = 0;
- pRdr->m_pPrevNumRule = 0;
- pRdr->m_pTableDesc = 0;
+ pRdr->m_pWFlyPara = nullptr;
+ pRdr->m_pSFlyPara = nullptr;
+ pRdr->m_pPreviousNumPaM = nullptr;
+ pRdr->m_pPrevNumRule = nullptr;
+ pRdr->m_pTableDesc = nullptr;
pRdr->m_nAktColl = 0;
pRdr->m_pCtrlStck = new SwWW8FltControlStack(&pRdr->m_rDoc, pRdr->m_nFieldFlags,
@@ -2212,7 +2212,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
OutlinerParaObject *pOutliner = ImportAsOutliner( sText, pRes->nCp2OrIdx,
pRes->nCp2OrIdx + pRes->nMemLen, MAN_AND );
- m_pFormatOfJustInsertedApo = 0;
+ m_pFormatOfJustInsertedApo = nullptr;
SwPostItField aPostIt(
static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), sAuthor,
sText, sInitials, OUString(), aDate );
@@ -2434,7 +2434,7 @@ void wwSectionManager::SetHdFt(wwSection &rSection, int nSect,
OSL_ENSURE(rSection.mpPage, "makes no sense to call with a main page");
if (rSection.mpPage)
{
- mrReader.Read_HdFt(nSect, pPrevious ? pPrevious->mpPage : 0,
+ mrReader.Read_HdFt(nSect, pPrevious ? pPrevious->mpPage : nullptr,
rSection);
}
@@ -2449,9 +2449,9 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
{
SwTextNode* pText = m_pPaM->GetNode().GetTextNode();
- const SwNumRule* pRule = NULL;
+ const SwNumRule* pRule = nullptr;
- if (pText != NULL)
+ if (pText != nullptr)
pRule = sw::util::GetNumRuleFromTextNode(*pText);
if (
@@ -2475,7 +2475,7 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
// cache current paragraph
if(m_pPreviousNumPaM)
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
m_pPreviousNumPaM = new SwPaM(*m_pPaM, m_pPaM);
m_pPrevNumRule = pRule;
@@ -2485,14 +2485,14 @@ void SwWW8ImplReader::AppendTextNode(SwPosition& rPos)
// If the previous paragraph has numbering but the current one does not
// we need to add a space after the previous paragraph
SetLowerSpacing(*m_pPreviousNumPaM, GetParagraphAutoSpace(m_pWDop->fDontUseHTMLAutoSpacing));
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
- m_pPrevNumRule = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
+ m_pPrevNumRule = nullptr;
}
else
{
// clear paragraph cache
if(m_pPreviousNumPaM)
- delete m_pPreviousNumPaM, m_pPreviousNumPaM = 0;
+ delete m_pPreviousNumPaM, m_pPreviousNumPaM = nullptr;
m_pPrevNumRule = pRule;
}
@@ -2517,7 +2517,7 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
const SvxULSpaceItem* pULSpaceItem = static_cast<const SvxULSpaceItem*>(m_pCtrlStck->GetFormatAttr(*pSpacingPos, RES_UL_SPACE));
- if(pULSpaceItem != 0)
+ if(pULSpaceItem != nullptr)
{
SvxULSpaceItem aUL(*pULSpaceItem);
@@ -2585,7 +2585,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
OSL_ENSURE(m_nInTable >= 0,"nInTable < 0!");
// TabRowEnd
- bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417) != 0 );
+ bool bTableRowEnd = (m_pPlcxMan->HasParaSprm(m_bVer67 ? 25 : 0x2417) != nullptr );
// Unfortunately, for every paragraph we need to check first whether
// they contain a sprm 29 (0x261B), which starts an APO.
@@ -2616,16 +2616,16 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
sal_uInt8 nCellLevel = 0;
if (m_bVer67)
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(24));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(24));
else
{
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(0x2416));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x2416));
if (!nCellLevel)
- nCellLevel = int(0 != m_pPlcxMan->HasParaSprm(0x244B));
+ nCellLevel = int(nullptr != m_pPlcxMan->HasParaSprm(0x244B));
}
do
{
- WW8_TablePos *pTabPos=0;
+ WW8_TablePos *pTabPos=nullptr;
WW8_TablePos aTabPos;
if(nCellLevel && !m_bVer67)
{
@@ -2826,12 +2826,12 @@ rtl_TextEncoding SwWW8ImplReader::GetCurrentCJKCharSet()
void SwWW8ImplReader::PostProcessAttrs()
{
- if (m_pPostProcessAttrsInfo != NULL)
+ if (m_pPostProcessAttrsInfo != nullptr)
{
SfxItemIter aIter(m_pPostProcessAttrsInfo->mItemSet);
const SfxPoolItem * pItem = aIter.GetCurItem();
- if (pItem != NULL)
+ if (pItem != nullptr)
{
do
{
@@ -2840,11 +2840,11 @@ void SwWW8ImplReader::PostProcessAttrs()
m_pCtrlStck->SetAttr(*m_pPostProcessAttrsInfo->mPaM.GetMark(),
pItem->Which());
}
- while (!aIter.IsAtEnd() && 0 != (pItem = aIter.NextItem()));
+ while (!aIter.IsAtEnd() && nullptr != (pItem = aIter.NextItem()));
}
delete m_pPostProcessAttrsInfo;
- m_pPostProcessAttrsInfo = NULL;
+ m_pPostProcessAttrsInfo = nullptr;
}
}
@@ -2882,7 +2882,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
sal_uInt32 nInfo = 0;
sal_Size nThisConverted=0;
- nDestChars += rtl_convertTextToUnicode(hConverter, 0,
+ nDestChars += rtl_convertTextToUnicode(hConverter, nullptr,
pIn+nConverted, nInLen-nConverted,
pOut+nDestChars, nOutLen-nDestChars,
nFlags, &nInfo, &nThisConverted);
@@ -2899,7 +2899,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
sal_Size nOtherConverted;
rtl_TextToUnicodeConverter hCP1252Converter =
rtl_createTextToUnicodeConverter(RTL_TEXTENCODING_MS_1252);
- nDestChars += rtl_convertTextToUnicode(hCP1252Converter, 0,
+ nDestChars += rtl_convertTextToUnicode(hCP1252Converter, nullptr,
pIn+nConverted, 1,
pOut+nDestChars, nOutLen-nDestChars,
nFlags2, &nInfo, &nOtherConverted);
@@ -3026,7 +3026,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
*/
const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CJK_LANGUAGE);
- if (pItem != NULL && LANGUAGE_JAPANESE != static_cast<const SvxLanguageItem *>(pItem)->GetLanguage())
+ if (pItem != nullptr && LANGUAGE_JAPANESE != static_cast<const SvxLanguageItem *>(pItem)->GetLanguage())
{
SAL_WARN("sw.ww8", "discarding word95 RTL_TEXTENCODING_MS_932 encoding");
eSrcCharSet = GetCharSetFromLanguage();
@@ -3040,9 +3040,9 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
sal_Unicode* pBuffer = pStr->buffer;
sal_Unicode* pWork = pBuffer;
- sal_Char* p8Bits = NULL;
+ sal_Char* p8Bits = nullptr;
- rtl_TextToUnicodeConverter hConverter = 0;
+ rtl_TextToUnicodeConverter hConverter = nullptr;
if (!m_bIsUnicode || m_bVer67)
hConverter = rtl_createTextToUnicodeConverter(eSrcCharSet);
@@ -3055,7 +3055,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CTL_LANGUAGE);
- if (pItem != NULL)
+ if (pItem != nullptr)
nCTLLang = static_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
sal_Int32 nL2;
@@ -3123,7 +3123,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp
pStr->length = nEndUsed;
emulateMSWordAddTextToParagraph(OUString(pStr, SAL_NO_ACQUIRE));
- pStr = NULL;
+ pStr = nullptr;
rPos += nL2;
if (!m_aApos.back()) // a para end in apo doesn't count
m_bWasParaEnd = false; // No CR
@@ -3247,7 +3247,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
OUString sParagraphText;
const SwContentNode *pCntNd = m_pPaM->GetContentNode();
- const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL;
+ const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr;
if (pNd)
sParagraphText = pNd->GetText();
sal_Int32 nParaOffset = sParagraphText.getLength();
@@ -3262,7 +3262,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
OUString sChunk(rAddString.copy(nPos, nEnd-nPos));
const sal_uInt16 aIds[] = {RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
- const SvxFontItem *pOverriddenItems[] = {NULL, NULL, NULL};
+ const SvxFontItem *pOverriddenItems[] = {nullptr, nullptr, nullptr};
bool aForced[] = {false, false, false};
int nLclIdctHint = 0xFF;
@@ -3372,7 +3372,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString)
#endif
const SwContentNode *pCntNd = m_pPaM->GetContentNode();
- const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL;
+ const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr;
OSL_ENSURE(pNd, "What the hell, where's my text node");
@@ -3524,7 +3524,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
{
// Always insert a txtnode for a column break, e.g. ##
SwContentNode *pCntNd=m_pPaM->GetContentNode();
- if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed
+ if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed
AppendTextNode(*m_pPaM->GetPoint());
m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
}
@@ -3616,7 +3616,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
}
if( !bReadObj )
{
- SwFrameFormat *pResult = 0;
+ SwFrameFormat *pResult = nullptr;
if (m_bObj)
pResult = ImportOle();
else if (m_bSpec)
@@ -3851,7 +3851,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, long nTextEnd, bool& rbStar
{
m_pCtrlStck->KillUnlockedAttrs( *m_pPaM->GetPoint() );
if( nOldColl != m_pPlcxMan->GetColl() )
- ProcessAktCollChange(aRes, 0, false);
+ ProcessAktCollChange(aRes, nullptr, false);
}
return nNext;
@@ -3947,7 +3947,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
m_bWasParaEnd = false;
m_nAktColl = 0;
- m_pAktItemSet = 0;
+ m_pAktItemSet = nullptr;
m_nCharFormat = -1;
m_bSpec = false;
m_bPgSecBreak = false;
@@ -3956,10 +3956,10 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
long nCpOfs = m_pPlcxMan->GetCpOfs(); // Offset for Header/Footer, Footnote
WW8_CP nNext = m_pPlcxMan->Where();
- SwTextNode* pPreviousNode = 0;
+ SwTextNode* pPreviousNode = nullptr;
sal_uInt8 nDropLines = 0;
- SwCharFormat* pNewSwCharFormat = 0;
- const SwCharFormat* pFormat = 0;
+ SwCharFormat* pNewSwCharFormat = nullptr;
+ const SwCharFormat* pFormat = nullptr;
m_pStrm->Seek( m_pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &m_bIsUnicode ) );
WW8_CP l = nStartCp;
@@ -3975,7 +3975,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
ReadAttrs( l, nNext, nTextEnd, bStartLine );// Takes SectionBreaks into account, too
OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode");
- if (m_pPostProcessAttrsInfo != NULL)
+ if (m_pPostProcessAttrsInfo != nullptr)
PostProcessAttrs();
if (l >= nTextEnd)
@@ -4039,7 +4039,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
SwPosition aStart(*pEndNd);
m_pCtrlStck->NewAttr(aStart, aDrop);
m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_PARATR_DROP);
- pPreviousNode = 0;
+ pPreviousNode = nullptr;
}
else if (m_bDropCap)
{
@@ -4056,14 +4056,14 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
if (pDCS)
nDropLines = (*pDCS) >> 3;
else // There is no Drop Cap Specifier hence no dropcap
- pPreviousNode = 0;
+ pPreviousNode = nullptr;
if (const sal_uInt8 *pDistance = m_pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
- const SwFormatCharFormat *pSwFormatCharFormat = 0;
+ const SwFormatCharFormat *pSwFormatCharFormat = nullptr;
if(m_pAktItemSet)
pSwFormatCharFormat = &(ItemGet<SwFormatCharFormat>(*m_pAktItemSet, RES_TXTATR_CHARFMT));
@@ -4080,7 +4080,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
}
delete m_pAktItemSet;
- m_pAktItemSet = 0;
+ m_pAktItemSet = nullptr;
m_bDropCap=false;
}
@@ -4133,7 +4133,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
CloseAttrEnds();
- delete m_pPlcxMan, m_pPlcxMan = 0;
+ delete m_pPlcxMan, m_pPlcxMan = nullptr;
return bJoined;
}
@@ -4142,55 +4142,55 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
: m_pDocShell(rD.GetDocShell())
, m_pStg(pStorage)
, m_pStrm(pSt)
- , m_pTableStream(0)
- , m_pDataStream(0)
+ , m_pTableStream(nullptr)
+ , m_pDataStream(nullptr)
, m_rDoc(rD)
- , m_pPaM(0)
- , m_pCtrlStck(0)
- , m_pRedlineStack(0)
- , m_pReffedStck(0)
- , m_pReffingStck(0)
- , m_pAnchorStck(0)
+ , m_pPaM(nullptr)
+ , m_pCtrlStck(nullptr)
+ , m_pRedlineStack(nullptr)
+ , m_pReffedStck(nullptr)
+ , m_pReffingStck(nullptr)
+ , m_pAnchorStck(nullptr)
, m_aSectionManager(*this)
, m_aExtraneousParas(rD)
, m_aInsertedTables(rD)
, m_aSectionNameGenerator(rD, OUString("WW"))
- , m_pSprmParser(NULL)
+ , m_pSprmParser(nullptr)
, m_aGrfNameGenerator(bNewDoc, OUString('G'))
, m_aParaStyleMapper(rD)
, m_aCharStyleMapper(rD)
- , m_pFormImpl(0)
- , m_pFlyFormatOfJustInsertedGraphic(0)
- , m_pFormatOfJustInsertedApo(0)
- , m_pPreviousNumPaM(0)
- , m_pPrevNumRule(0)
- , m_pPostProcessAttrsInfo(0)
- , m_pWwFib(0)
- , m_pFonts(0)
- , m_pWDop(0)
- , m_pLstManager(0)
- , m_pSBase(0)
- , m_pPlcxMan(0)
+ , m_pFormImpl(nullptr)
+ , m_pFlyFormatOfJustInsertedGraphic(nullptr)
+ , m_pFormatOfJustInsertedApo(nullptr)
+ , m_pPreviousNumPaM(nullptr)
+ , m_pPrevNumRule(nullptr)
+ , m_pPostProcessAttrsInfo(nullptr)
+ , m_pWwFib(nullptr)
+ , m_pFonts(nullptr)
+ , m_pWDop(nullptr)
+ , m_pLstManager(nullptr)
+ , m_pSBase(nullptr)
+ , m_pPlcxMan(nullptr)
, m_aTextNodesHavingFirstLineOfstSet()
, m_aTextNodesHavingLeftIndentSet()
- , m_pStyles(0)
- , m_pAktColl(0)
- , m_pAktItemSet(0)
- , m_pDfltTextFormatColl(0)
- , m_pStandardFormatColl(0)
- , m_pHdFt(0)
- , m_pWFlyPara(0)
- , m_pSFlyPara(0)
- , m_pTableDesc(0)
- , m_pNumOlst(0)
- , m_pNode_FLY_AT_PARA(0)
- , m_pDrawModel(0)
- , m_pDrawPg(0)
- , m_pDrawEditEngine(0)
- , m_pWWZOrder(0)
- , m_pNumFieldType(0)
- , m_pMSDffManager(0)
- , m_pAtnNames(0)
+ , m_pStyles(nullptr)
+ , m_pAktColl(nullptr)
+ , m_pAktItemSet(nullptr)
+ , m_pDfltTextFormatColl(nullptr)
+ , m_pStandardFormatColl(nullptr)
+ , m_pHdFt(nullptr)
+ , m_pWFlyPara(nullptr)
+ , m_pSFlyPara(nullptr)
+ , m_pTableDesc(nullptr)
+ , m_pNumOlst(nullptr)
+ , m_pNode_FLY_AT_PARA(nullptr)
+ , m_pDrawModel(nullptr)
+ , m_pDrawPg(nullptr)
+ , m_pDrawEditEngine(nullptr)
+ , m_pWWZOrder(nullptr)
+ , m_pNumFieldType(nullptr)
+ , m_pMSDffManager(nullptr)
+ , m_pAtnNames(nullptr)
, m_sBaseURL(rBaseURL)
, m_nIniFlags(0)
, m_nIniFlags1(0)
@@ -4265,7 +4265,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
, m_bLoadingTOXCache(false)
, m_nEmbeddedTOXLevel(0)
, m_bLoadingTOXHyperlink(false)
- , m_pPosAfterTOC(0)
+ , m_pPosAfterTOC(nullptr)
, m_bCareFirstParaEndInToc(false)
, m_bCareLastParaEndInToc(false)
, m_aTOXEndCps()
@@ -4308,7 +4308,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
{
Rectangle aRect(0, 0, 100, 100); // A dummy, we don't care about the size
SvxMSDffImportData aData(aRect);
- SdrObject* pObject = 0;
+ SdrObject* pObject = nullptr;
if (mrReader.m_pMSDffManager->GetShape(0x401, pObject, aData))
{
// Only handle shape if it is a background shape
@@ -4402,14 +4402,14 @@ SwFormatPageDesc wwSectionManager::SetSwFormatPageDesc(mySegIter &rIter,
{
rIter->mpPage = mrReader.m_rDoc.MakePageDesc(
SwViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
- 0, false);
+ nullptr, false);
}
OSL_ENSURE(rIter->mpPage, "no page!");
if (!rIter->mpPage)
return SwFormatPageDesc();
// Set page before hd/ft
- const wwSection *pPrevious = 0;
+ const wwSection *pPrevious = nullptr;
if (rIter != rStart)
pPrevious = &(*(rIter-1));
SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
@@ -4532,7 +4532,7 @@ void wwSectionManager::InsertSegments()
GiveNodePageDesc(aIter->maStart, aDesc, mrReader.m_rDoc);
}
- SwTextNode* pTextNd = 0;
+ SwTextNode* pTextNd = nullptr;
if (bInsertSection)
{
// Start getting the bounds of this section
@@ -4549,7 +4549,7 @@ void wwSectionManager::InsertSegments()
const SwPosition* pPos = aSectPaM.GetPoint();
SwTextNode const*const pSttNd = pPos->nNode.GetNode().GetTextNode();
- const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
+ const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : nullptr;
if (pTableNd)
{
pTextNd =
@@ -4637,7 +4637,7 @@ void wwSectionManager::InsertSegments()
SwNodeIndex aIdx(*pTextNd);
SwPaM aTest(aIdx);
mrReader.m_rDoc.getIDocumentContentOperations().DelFullPara(aTest);
- pTextNd = 0;
+ pTextNd = nullptr;
}
}
}
@@ -5215,8 +5215,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
// Initialize FlyFrame Formats
SwFlyFrameFormat* pFlyFormat = pOrder->pFly;
- SwFlyFrameFormat* pNextFlyFormat = 0;
- SwFlyFrameFormat* pPrevFlyFormat = 0;
+ SwFlyFrameFormat* pNextFlyFormat = nullptr;
+ SwFlyFrameFormat* pPrevFlyFormat = nullptr;
// Determine successor, if we can
SvxMSDffShapeTxBxSort::iterator tmpIter1 = it;
@@ -5277,8 +5277,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
delete m_pSprmParser;
::EndProgress(m_pDocShell);
- m_pDataStream = 0;
- m_pTableStream = 0;
+ m_pDataStream = nullptr;
+ m_pTableStream = nullptr;
DeleteCtrlStk();
m_pRedlineStack->closeall(*m_pPaM->GetPoint());
@@ -5314,12 +5314,12 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat();
vecFrameFormat.push_back(pFrameFormat);
const SwNodeIndex* pNdIdx = pFrameFormat->GetContent().GetContentIdx();
- const SwNodes* pNodesArray = (pNdIdx != NULL)
+ const SwNodes* pNodesArray = (pNdIdx != nullptr)
? &(pNdIdx->GetNodes())
- : NULL;
- const SwGrfNode *pGrf = (pNodesArray != NULL)
+ : nullptr;
+ const SwGrfNode *pGrf = (pNodesArray != nullptr)
? dynamic_cast<const SwGrfNode*>((*pNodesArray)[pNdIdx->GetIndex() + 1])
- : NULL;
+ : nullptr;
vecBulletGrf.push_back(pGrf);
}
}
@@ -5335,7 +5335,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
const sal_uInt16 nGrfBulletCP = aNumFormat.GetGrfBulletCP();
if ( nType == SVX_NUM_BITMAP
&& vecBulletGrf.size() > nGrfBulletCP
- && vecBulletGrf[nGrfBulletCP] != NULL )
+ && vecBulletGrf[nGrfBulletCP] != nullptr )
{
Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
@@ -5627,9 +5627,9 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
if (!nErrRet)
nErrRet = SetSubStreams(xTableStream, xDataStream);
- utl::TempFile *pTempMain = 0;
- utl::TempFile *pTempTable = 0;
- utl::TempFile *pTempData = 0;
+ utl::TempFile *pTempMain = nullptr;
+ utl::TempFile *pTempTable = nullptr;
+ utl::TempFile *pTempData = nullptr;
SvFileStream aDecryptMain;
SvFileStream aDecryptTable;
SvFileStream aDecryptData;
@@ -5817,7 +5817,7 @@ void SwWW8ImplReader::SetOutlineStyles()
// - Populate temporary list of WW8 Built-In Heading Styles for further
// iteration
std::vector<SwWW8StyInf*> aWW8BuiltInHeadingStyles;
- const SwNumRule* pChosenWW8ListStyle = NULL;
+ const SwNumRule* pChosenWW8ListStyle = nullptr;
{
std::map<const SwNumRule*, int> aWW8ListStyleCounts;
for (size_t nI = 0; nI < m_vColl.size(); ++nI)
@@ -5832,7 +5832,7 @@ void SwWW8ImplReader::SetOutlineStyles()
aWW8BuiltInHeadingStyles.push_back(&rSI);
const SwNumRule* pWW8ListStyle = rSI.GetOutlineNumrule();
- if (pWW8ListStyle != NULL)
+ if (pWW8ListStyle != nullptr)
{
std::map<const SwNumRule*, int>::iterator aCountIter
= aWW8ListStyleCounts.find(pWW8ListStyle);
@@ -5893,7 +5893,7 @@ void SwWW8ImplReader::SetOutlineStyles()
continue;
}
- if (pChosenWW8ListStyle != NULL && pStyleInf->mnWW8OutlineLevel
+ if (pChosenWW8ListStyle != nullptr && pStyleInf->mnWW8OutlineLevel
== pStyleInf->nListLevel)
{
const SwNumFormat& rRule
@@ -5917,7 +5917,7 @@ void SwWW8ImplReader::SetOutlineStyles()
pTextFormatColl->DeleteAssignmentToListLevelOfOutlineStyle(false);
// Apply existing WW8 list style a normal list style at the
// Paragraph Style
- if (pStyleInf->GetOutlineNumrule() != NULL)
+ if (pStyleInf->GetOutlineNumrule() != nullptr)
{
pTextFormatColl->SetFormatAttr(
SwNumRuleItem(pStyleInf->GetOutlineNumrule()->GetName()));
@@ -5972,7 +5972,7 @@ const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
rStrm.Seek( nOldPos );
}
- const OUString *pRet = 0;
+ const OUString *pRet = nullptr;
if (m_pAtnNames && nIdx < m_pAtnNames->size())
pRet = &((*m_pAtnNames)[nIdx]);
return pRet;
@@ -6169,8 +6169,8 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
// Remove Frame and offsets from Frame Template
Reader::ResetFrameFormats( rDoc );
- rPaM.GetBound().nContent.Assign(0, 0);
- rPaM.GetBound(false).nContent.Assign(0, 0);
+ rPaM.GetBound().nContent.Assign(nullptr, 0);
+ rPaM.GetBound(false).nContent.Assign(nullptr, 0);
}
try
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 42ee0676f241..e0b0eabde52e 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -152,7 +152,7 @@ public:
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
- std::vector<sal_uInt8> &rParaSprms, SwTextNode *pNode=0);
+ std::vector<sal_uInt8> &rParaSprms, SwTextNode *pNode=nullptr);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
SwNumRule* GetNumRule(size_t i);
@@ -204,7 +204,7 @@ struct WW8FlyPara
// the contained graphics *not* as a character
bool mbVertSet; // true if vertical positioning has been set
- WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
+ WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = nullptr);
bool operator==(const WW8FlyPara& rSrc) const;
void Read(sal_uInt8 nSprm29, WW8PLCFx_Cp_FKP* pPap);
void ReadFull(sal_uInt8 nSprm29, SwWW8ImplReader* pIo);
@@ -261,9 +261,9 @@ public:
eLTRFontSrcCharSet(0),
eRTLFontSrcCharSet(0),
eCJKFontSrcCharSet(0),
- pFormat( 0 ),
- pWWFly( 0 ),
- pOutlineNumrule( 0 ),
+ pFormat( nullptr ),
+ pWWFly( nullptr ),
+ pOutlineNumrule( nullptr ),
nFilePos( 0 ),
nBase( 0 ),
nFollow( 0 ),
@@ -309,7 +309,7 @@ public:
bool HasWW8OutlineLevel() const
{
- return (pFormat != NULL && (MAXLEVEL > mnWW8OutlineLevel));
+ return (pFormat != nullptr && (MAXLEVEL > mnWW8OutlineLevel));
}
bool IsOutlineNumbered() const
@@ -744,7 +744,7 @@ public:
css::uno::Reference< css::drawing::XShape > *pShape, bool bFloatingCtrl) override;
bool ExportControl(WW8Export &rWrt, const SdrUnoObj& rFormObj);
bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
- css::uno::Reference< css::drawing::XShape > *pShapeRef=0,
+ css::uno::Reference< css::drawing::XShape > *pShapeRef=nullptr,
bool bFloatingCtrl=false );
private:
sal_uInt32 GenerateObjectID() { return ++mnObjectId; }
@@ -978,7 +978,7 @@ struct ApoTestResults
WW8FlyPara* mpStyleApo;
ApoTestResults()
: mbStartApo(false), mbStopApo(false), m_bHasSprm37(false)
- , m_bHasSprm29(false), m_nSprm29(0), mpStyleApo(0) {}
+ , m_bHasSprm29(false), m_nSprm29(0), mpStyleApo(nullptr) {}
bool HasStartStop() const { return (mbStartApo || mbStopApo); }
bool HasFrame() const { return (m_bHasSprm29 || m_bHasSprm37 || mpStyleApo); }
};
@@ -989,7 +989,7 @@ struct ANLDRuleMap
SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, variant 2
SwNumRule* GetNumRule(sal_uInt8 nNumType);
void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
- ANLDRuleMap() : mpOutlineNumRule(0), mpNumberingNumRule(0) {}
+ ANLDRuleMap() : mpOutlineNumRule(nullptr), mpNumberingNumRule(nullptr) {}
};
struct SprmReadInfo;
@@ -1396,15 +1396,15 @@ private:
SwPageDesc* pNewPageDesc, sal_uInt8 nCode );
void DeleteStk(SwFltControlStack* prStck);
- void DeleteCtrlStk() { DeleteStk( m_pCtrlStck ); m_pCtrlStck = 0; }
+ void DeleteCtrlStk() { DeleteStk( m_pCtrlStck ); m_pCtrlStck = nullptr; }
void DeleteRefStks()
{
DeleteStk( m_pReffedStck );
- m_pReffedStck = 0;
+ m_pReffedStck = nullptr;
DeleteStk( m_pReffingStck );
- m_pReffingStck = 0;
+ m_pReffingStck = nullptr;
}
- void DeleteAnchorStk() { DeleteStk( m_pAnchorStck ); m_pAnchorStck = 0; }
+ void DeleteAnchorStk() { DeleteStk( m_pAnchorStck ); m_pAnchorStck = nullptr; }
void emulateMSWordAddTextToParagraph(const OUString& rAddString);
void simpleAddTextToParagraph(const OUString& rAddString);
bool HandlePageBreakChar();
@@ -1458,14 +1458,14 @@ private:
// Note #i20672# we can't properly support between lines so best to ignore
// them for now
static bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc,
- short *pSizeArray=0, sal_uInt8 nSetBorders=0xFF);
+ short *pSizeArray=nullptr, sal_uInt8 nSetBorders=0xFF);
static void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist);
static sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
static bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
const WW8_BRCVer9& aRightBrc);
//returns true is a shadow was set
static bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc,
- short *SizeArray=0);
+ short *SizeArray=nullptr);
static void SetPageBorder(SwFrameFormat &rFormat, const wwSection &rSection);
static sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
@@ -1488,7 +1488,7 @@ private:
//Apo == Absolutely Positioned Object, MSWord's old-style frames
WW8FlyPara *ConstructApo(const ApoTestResults &rApo,
const WW8_TablePos *pTabPos);
- bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = 0);
+ bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = nullptr);
void StopApo();
bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd,
@@ -1515,13 +1515,13 @@ private:
SwFrameFormat *AddAutoAnchor(SwFrameFormat *pFormat);
SwFrameFormat* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos);
- SwFrameFormat* ImportGraf(SdrTextObj* pTextObj = 0, SwFrameFormat* pFlyFormat = 0);
+ SwFrameFormat* ImportGraf(SdrTextObj* pTextObj = nullptr, SwFrameFormat* pFlyFormat = nullptr);
- SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0,
- const SfxItemSet* pFlySet=0, const Rectangle& aVisArea = Rectangle() );
+ SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=nullptr,
+ const SfxItemSet* pFlySet=nullptr, const Rectangle& aVisArea = Rectangle() );
- SwFrameFormat* ImportOle( const Graphic* = 0, const SfxItemSet* pFlySet = 0,
- const SfxItemSet* pGrfSet = 0, const Rectangle& aVisArea = Rectangle() );
+ SwFrameFormat* ImportOle( const Graphic* = nullptr, const SfxItemSet* pFlySet = nullptr,
+ const SfxItemSet* pGrfSet = nullptr, const Rectangle& aVisArea = Rectangle() );
SwFlyFrameFormat* InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet,
const SfxItemSet *rGrfSet);
@@ -1539,7 +1539,7 @@ private:
void ReadDocVars();
- bool StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem = 0);
+ bool StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem = nullptr);
bool InEqualApo(int nLvl) const;
bool InLocalApo() const { return InEqualApo(m_nInTable); }
bool InEqualOrHigherApo(int nLvl) const;
@@ -1587,9 +1587,9 @@ private:
SwFrameFormat* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrameFormat* pFlyFormat,
bool bMakeSdrGrafObj, bool& rbEraseTextObj,
- bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0,
- long* pnEndCp = 0, bool* pbContainsGraphics = 0,
- SvxMSDffImportRec* pRecord = 0);
+ bool* pbTestTxbxContainsText = nullptr, long* pnStartCp = nullptr,
+ long* pnEndCp = nullptr, bool* pbContainsGraphics = nullptr,
+ SvxMSDffImportRec* pRecord = nullptr);
bool TxbxChainContainsRealText( sal_uInt16 nTxBxS,
long& rStartCp,
long& rEndCp );
@@ -1884,7 +1884,7 @@ public: // really private, but can only be done public
const OUString& GetBaseURL() const { return m_sBaseURL; }
// load a complete doc file
- sal_uLong LoadDoc(WW8Glossary *pGloss=0);
+ sal_uLong LoadDoc(WW8Glossary *pGloss=nullptr);
rtl_TextEncoding GetCurrentCharSet();
rtl_TextEncoding GetCurrentCJKCharSet();
rtl_TextEncoding GetCharSetFromLanguage();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index c4e1abfab91b..f774d41280a7 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -179,7 +179,7 @@ public:
WW8TabDesc( SwWW8ImplReader* pIoClass, WW8_CP nStartCp );
bool Ok() const { return bOk; }
- void CreateSwTable(SvxULSpaceItem* pULSpaceItem = 0);
+ void CreateSwTable(SvxULSpaceItem* pULSpaceItem = nullptr);
void UseSwTable();
void SetSizePosition(SwFrameFormat* pFrameFormat);
void TableCellEnd();
@@ -300,7 +300,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote()
sal_Int32 nPos = m_pPaM->GetPoint()->nContent.GetIndex();
OUString sChar;
- SwTextAttr* pFN = 0;
+ SwTextAttr* pFN = nullptr;
//There should have been a footnote char, we will replace this.
if (pText && nPos)
{
@@ -419,7 +419,7 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
int nLevel) const
{
WW8PLCFxDesc aRes;
- aRes.pMemPos = 0;
+ aRes.pMemPos = nullptr;
aRes.nEndPos = rStartCp;
bool bReadRes(false);
WW8PLCFxDesc aPrevRes;
@@ -431,8 +431,8 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
const sal_uInt8* pB = pPap->HasSprm(TabRowSprm(nLevel));
if (pB && *pB == 1)
{
- const sal_uInt8 *pLevel = 0;
- if (0 != (pLevel = pPap->HasSprm(0x6649)))
+ const sal_uInt8 *pLevel = nullptr;
+ if (nullptr != (pLevel = pPap->HasSprm(0x6649)))
{
if (nLevel + 1 == *pLevel)
return true;
@@ -446,7 +446,7 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
}
aRes.nStartPos = aRes.nEndPos;
- aRes.pMemPos = 0;
+ aRes.pMemPos = nullptr;
//Seek to our next block of properties
if (!(pPap->SeekPos(aRes.nStartPos)))
{
@@ -472,12 +472,12 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
const WW8_TablePos *pTabPos)
{
- const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : 0;
+ const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : nullptr;
ApoTestResults aRet;
// Frame in Style Definition (word appears to ignore them if inside an
// text autoshape)
if (!m_bTxbxFlySection && m_nAktColl < m_vColl.size())
- aRet.mpStyleApo = StyleExists(m_nAktColl) ? m_vColl[m_nAktColl].pWWFly : 0;
+ aRet.mpStyleApo = StyleExists(m_nAktColl) ? m_vColl[m_nAktColl].pWWFly : nullptr;
/*
#i1140#
@@ -500,7 +500,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
aRet.m_bHasSprm37 = m_pPlcxMan->HasParaSprm( m_bVer67 ? 37 : 0x2423 );
const sal_uInt8 *pSrpm29 = m_pPlcxMan->HasParaSprm( m_bVer67 ? 29 : 0x261B );
- aRet.m_bHasSprm29 = pSrpm29 != NULL;
+ aRet.m_bHasSprm29 = pSrpm29 != nullptr;
aRet.m_nSprm29 = pSrpm29 ? *pSrpm29 : 0;
// Is there some frame data here
@@ -760,7 +760,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const OUString aName( m_rDoc.GetUniqueNumRuleName( &aBaseName, false) );
// #i86652#
- sal_uInt16 nRul = m_rDoc.MakeNumRule( aName, 0, false,
+ sal_uInt16 nRul = m_rDoc.MakeNumRule( aName, nullptr, false,
SvxNumberFormat::LABEL_ALIGNMENT );
m_pStyles->pStyRule = m_rDoc.GetNumRuleTable()[nRul];
// Auto == false-> Nummerierungsvorlage
@@ -783,7 +783,7 @@ void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short
// only for SwTextFormatColl, not CharFormat
// WW: 0 = no Numbering
SwWW8StyInf * pColl = GetStyle(m_nAktColl);
- if (pColl != NULL && pColl->bColl && *pData)
+ if (pColl != nullptr && pColl->bColl && *pData)
{
// Range WW:1..9 -> SW:0..8 no bullets / numbering
@@ -847,7 +847,7 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor
m_pAktColl->SetFormatAttr( SwNumRuleItem( pNR->GetName() ) );
pStyInf = GetStyle(m_nAktColl);
- if (pStyInf != NULL)
+ if (pStyInf != nullptr)
pStyInf->bHasStyNumRule = true;
}
}
@@ -884,7 +884,7 @@ void SwWW8ImplReader::Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen
delete m_pNumOlst;
if (nLen <= 0)
{
- m_pNumOlst = 0;
+ m_pNumOlst = nullptr;
return;
}
m_pNumOlst = new WW8_OLST;
@@ -934,7 +934,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
SwNumRule *pNumRule = m_aANLDRules.GetNumRule(m_nWwNumType);
// check for COL numbering:
- const sal_uInt8* pS12 = 0;// sprmAnld
+ const sal_uInt8* pS12 = nullptr;// sprmAnld
OUString sNumRule;
if (m_pTableDesc)
@@ -956,7 +956,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
}
SwWW8StyInf * pStyInf = GetStyle(m_nAktColl);
- if (sNumRule.isEmpty() && pStyInf != NULL && pStyInf->bHasStyNumRule)
+ if (sNumRule.isEmpty() && pStyInf != nullptr && pStyInf->bHasStyNumRule)
{
sNumRule = pStyInf->pFormat->GetNumRule().GetValue();
pNumRule = m_rDoc.FindNumRulePtr(sNumRule);
@@ -970,7 +970,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
// #i86652#
pNumRule = m_rDoc.GetNumRuleTable()[
- m_rDoc.MakeNumRule( sNumRule, 0, false,
+ m_rDoc.MakeNumRule( sNumRule, nullptr, false,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
}
if (m_pTableDesc)
@@ -1073,7 +1073,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
else
m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE);
- m_aANLDRules.mpNumberingNumRule = 0;
+ m_aANLDRules.mpNumberingNumRule = nullptr;
/*
#i18816#
my take on this problem is that moving either way from an outline to a
@@ -1083,7 +1083,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
(((m_nWwNumType == WW8_Outline) && (nNewType == WW8_Numbering)) ||
((m_nWwNumType == WW8_Numbering) && (nNewType == WW8_Outline)));
if (!bNumberingNotStopOutline)
- m_aANLDRules.mpOutlineNumRule = 0;
+ m_aANLDRules.mpOutlineNumRule = nullptr;
m_nSwNumLevel = 0xff;
m_nWwNumType = WW8_None;
@@ -1135,9 +1135,9 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
nLen -= 2 * ( nCols + 1 );
if( nCols != nOldCols ) // different column count
{
- delete[] pTCs, pTCs = 0;
- delete[] pSHDs, pSHDs = 0;
- delete[] pNewSHDs, pNewSHDs = 0;
+ delete[] pTCs, pTCs = nullptr;
+ delete[] pSHDs, pSHDs = nullptr;
+ delete[] pNewSHDs, pNewSHDs = nullptr;
}
short nFileCols = nLen / ( bVer67 ? 10 : 20 ); // really saved
@@ -1589,7 +1589,7 @@ const sal_uInt8 *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
pParams = pPap->HasSprm(24);
else
{
- if (0 == (pParams = pPap->HasSprm(0x244B)))
+ if (nullptr == (pParams = pPap->HasSprm(0x244B)))
pParams = pPap->HasSprm(0x2416);
}
return pParams;
@@ -1718,17 +1718,17 @@ wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
}
WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
- mpOldRedlineStack(0),
+ mpOldRedlineStack(nullptr),
pIo(pIoClass),
- pFirstBand(0),
- pActBand(0),
- pTmpPos(0),
- pTableNd(0),
- pTabLines(0),
- pTabLine(0),
- pTabBoxes(0),
- pTabBox(0),
- pAktWWCell(0),
+ pFirstBand(nullptr),
+ pActBand(nullptr),
+ pTmpPos(nullptr),
+ pTableNd(nullptr),
+ pTabLines(nullptr),
+ pTabLine(nullptr),
+ pTabBoxes(nullptr),
+ pTabBox(nullptr),
+ pAktWWCell(nullptr),
nRows(0),
nDefaultSwCols(0),
nBands(0),
@@ -1746,9 +1746,9 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
nAktBandRow(0),
nAktCol(0),
nRowsToRepeat(0),
- pTable(0),
- pParentPos(0),
- pFlyFormat(0),
+ pTable(nullptr),
+ pParentPos(nullptr),
+ pFlyFormat(nullptr),
aItemSet(pIo->m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
{
pIo->m_bAktAND_fNumberAcross = false;
@@ -1777,12 +1777,12 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
short nTabeDxaNew = SHRT_MAX;
bool bTabRowJustRead = false;
- const sal_uInt8* pShadeSprm = 0;
- const sal_uInt8* pNewShadeSprm = 0;
- const sal_uInt8* pTableBorders = 0;
- const sal_uInt8* pTableBorders90 = 0;
+ const sal_uInt8* pShadeSprm = nullptr;
+ const sal_uInt8* pNewShadeSprm = nullptr;
+ const sal_uInt8* pTableBorders = nullptr;
+ const sal_uInt8* pTableBorders90 = nullptr;
std::vector<const sal_uInt8*> aTSetBrcs, aTSetBrc90s;
- WW8_TablePos *pTabPos = 0;
+ WW8_TablePos *pTabPos = nullptr;
// search end of a tab row
if(!(pIo->SearchRowEnd(pPap, nStartCp, pIo->m_nInTable)))
@@ -1801,7 +1801,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
bool bRepeatedSprm = false;
const sal_uInt8* pParams;
- while (aSprmIter.GetSprms() && 0 != (pParams = aSprmIter.GetAktParams()))
+ while (aSprmIter.GetSprms() && nullptr != (pParams = aSprmIter.GetAktParams()))
{
sal_uInt16 nId = aSprmIter.GetAktId();
wwTableSprm eSprm = GetTableSprm(nId, pIo->GetFib().GetFIBVersion());
@@ -1961,7 +1961,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
//Seek our pap to its next block of properties
WW8PLCFxDesc aRes;
- aRes.pMemPos = 0;
+ aRes.pMemPos = nullptr;
aRes.nStartPos = nStartCp;
if (!(pPap->SeekPos(aRes.nStartPos)))
@@ -1999,7 +1999,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pTabPos = &aTabPos;
//Move back to this cell
- aRes.pMemPos = 0;
+ aRes.pMemPos = nullptr;
aRes.nStartPos = nStartCp;
// PlcxMan currently points too far ahead so we need to bring
@@ -2050,7 +2050,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pNewBand->nRows = 1;
pActBand->pNextBand = pNewBand; // am Ende einschleifen
nBands++;
- pNewBand = 0; // do not delete
+ pNewBand = nullptr; // do not delete
}
CalcDefaults();
}
@@ -2400,7 +2400,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem)
{
if (const SfxItemSet* pSet = pNd->GetpSwAttrSet())
{
- SfxPoolItem *pSetAttr = 0;
+ SfxPoolItem *pSetAttr = nullptr;
const SfxPoolItem* pItem;
if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem))
{
@@ -2523,7 +2523,7 @@ void WW8TabDesc::MergeCells()
for( short j = 0; j < pActBand->nRows; j++, nRow++ )
for( short i = 0; i < pActBand->nWwCols; i++ )
{
- WW8SelBoxInfo* pActMGroup = 0;
+ WW8SelBoxInfo* pActMGroup = nullptr;
// start a new merge group if appropriate
@@ -2608,7 +2608,7 @@ void WW8TabDesc::MergeCells()
{
WW8SelBoxInfo* p = FindMergeGroup(
nX1, pActMGroup->nGroupWidth, false );
- if (p == 0)
+ if (p == nullptr)
{
break;
}
@@ -2633,14 +2633,14 @@ void WW8TabDesc::MergeCells()
//match, see #i23022#/#i18644#
void WW8TabDesc::ParkPaM()
{
- SwTableBox *pTabBox2 = 0;
+ SwTableBox *pTabBox2 = nullptr;
short nRow = nAktRow + 1;
if (nRow < (sal_uInt16)pTabLines->size())
{
if (SwTableLine *pLine = (*pTabLines)[nRow])
{
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- pTabBox2 = rBoxes.empty() ? 0 : rBoxes.front();
+ pTabBox2 = rBoxes.empty() ? nullptr : rBoxes.front();
}
}
@@ -2678,13 +2678,13 @@ void WW8TabDesc::FinishSwTable()
pIo->m_pRedlineStack->closeall(*pIo->m_pPaM->GetPoint());
delete pIo->m_pRedlineStack;
pIo->m_pRedlineStack = mpOldRedlineStack;
- mpOldRedlineStack = 0;
+ mpOldRedlineStack = nullptr;
WW8DupProperties aDup(pIo->m_rDoc,pIo->m_pCtrlStck);
pIo->m_pCtrlStck->SetAttr( *pIo->m_pPaM->GetPoint(), 0, false);
MoveOutsideTable();
- delete pTmpPos, pTmpPos = 0;
+ delete pTmpPos, pTmpPos = nullptr;
aDup.Insert(*pIo->m_pPaM->GetPoint());
@@ -2716,7 +2716,7 @@ void WW8TabDesc::FinishSwTable()
}
}
}
- pIo->m_pFormatOfJustInsertedApo = 0;
+ pIo->m_pFormatOfJustInsertedApo = nullptr;
m_MergeGroups.clear();
}
}
@@ -2778,7 +2778,7 @@ WW8SelBoxInfo* WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact)
}
}
}
- return 0;
+ return nullptr;
}
bool WW8TabDesc::IsValidCell(short nCol) const
@@ -2939,7 +2939,7 @@ void WW8TabDesc::InsertCells( short nIns )
pTabBox = (*pTabBoxes)[0];
pIo->m_rDoc.GetNodes().InsBoxen( pTableNd, pTabLine, static_cast<SwTableBoxFormat*>(pTabBox->GetFrameFormat()),
- const_cast<SwTextFormatColl*>(pIo->m_pDfltTextFormatColl), 0, pTabBoxes->size(), nIns );
+ const_cast<SwTextFormatColl*>(pIo->m_pDfltTextFormatColl), nullptr, pTabBoxes->size(), nIns );
// The third parameter contains the FrameFormat of the boxes.
// Here it is possible to optimize to save (reduce) FrameFormats.
}
@@ -3175,7 +3175,7 @@ void WW8TabDesc::AdjustNewBand()
if(nOldBoxRightLineWidth>nCurrentRightLineWidth)
aCurrentBox.SetLine(aOldBox.GetLine(SvxBoxItemLine::RIGHT), SvxBoxItemLine::LEFT);
- aOldBox.SetLine(0, SvxBoxItemLine::RIGHT);
+ aOldBox.SetLine(nullptr, SvxBoxItemLine::RIGHT);
pBox2->GetFrameFormat()->SetFormatAttr(aOldBox);
}
@@ -3261,7 +3261,7 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
sal_uInt16 nCol )
{
// set default for return
- SwTableBox* pResult = 0;
+ SwTableBox* pResult = nullptr;
// check if the box has to be merged
// If cell is the first one to be merged, a new merge group has to be provided.
@@ -3275,7 +3275,7 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
rCell.bVertRestart ) )
{
// detect appropriate merge group
- WW8SelBoxInfo* pTheMergeGroup = 0;
+ WW8SelBoxInfo* pTheMergeGroup = nullptr;
if( pActGroup )
// assign group
pTheMergeGroup = pActGroup;
@@ -3341,15 +3341,15 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem)
// #i33818# - determine absolute position object attributes,
// if possible. It's needed for nested tables.
- WW8FlyPara* pTableWFlyPara( 0L );
- WW8SwFlyPara* pTableSFlyPara( 0L );
+ WW8FlyPara* pTableWFlyPara( nullptr );
+ WW8SwFlyPara* pTableSFlyPara( nullptr );
// #i45301# - anchor nested table inside Writer fly frame
// only at-character, if absolute position object attributes are available.
// Thus, default anchor type is as-character anchored.
RndStdIds eAnchor( FLY_AS_CHAR );
if ( m_nInTable )
{
- WW8_TablePos* pNestedTabPos( 0L );
+ WW8_TablePos* pNestedTabPos( nullptr );
WW8_TablePos aNestedTabPos;
WW8PLCFxSave1 aSave;
m_pPlcxMan->GetPap()->Save( aSave );
@@ -3429,7 +3429,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem)
m_pTableDesc->pFlyFormat->SetFormatAttr( SwFormatFollowTextFlow( true ) );
}
else
- m_pTableDesc->SetSizePosition(0);
+ m_pTableDesc->SetSizePosition(nullptr);
m_pTableDesc->UseSwTable();
}
else
@@ -3439,7 +3439,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem)
delete pTableWFlyPara;
delete pTableSFlyPara;
- return 0 != m_pTableDesc;
+ return nullptr != m_pTableDesc;
}
void SwWW8ImplReader::TabCellEnd()
@@ -3473,7 +3473,7 @@ void SwWW8ImplReader::PopTableDesc()
delete m_pTableDesc;
if (m_aTableStack.empty())
- m_pTableDesc = 0;
+ m_pTableDesc = nullptr;
else
{
m_pTableDesc = m_aTableStack.top();
@@ -3536,7 +3536,7 @@ sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( OUString& rName ) const
{
- SwFormat* pRet = 0;
+ SwFormat* pRet = nullptr;
if( !m_vColl.empty() )
{
for(sal_uInt16 nI = 0; nI < m_pStyles->GetCount(); nI++ )
@@ -3555,7 +3555,7 @@ const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( OUString& rName ) const
const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
{
if( !pParaSprms || !nSprmsLen )
- return 0;
+ return nullptr;
return maSprmParser.findSprmData(nId, pParaSprms, nSprmsLen);
}
@@ -3578,7 +3578,7 @@ void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
aSprmIter.advance();
}
- pParaSprms = 0;
+ pParaSprms = nullptr;
nSprmsLen = 0;
}
@@ -3679,8 +3679,8 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI)
, maSprmParser(_rFib.GetFIBVersion())
, pIo(pI)
, pStStrm(pI->m_pTableStream)
- , pStyRule(0)
- , pParaSprms(0)
+ , pStyRule(nullptr)
+ , pParaSprms(nullptr)
, nSprmsLen(0)
, nWwNumLevel(0)
, bTextColChanged(false)
@@ -3812,7 +3812,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
rSI.nFollow = nNextStyle; // remember Follow
- pStyRule = 0; // recreate if necessary
+ pStyRule = nullptr; // recreate if necessary
bTextColChanged = bFontChanged = bCJKFontChanged = bCTLFontChanged =
bFSizeChanged = bFCTLSizeChanged = bWidowsChanged = false;
pIo->SetNAktColl( nThisStyle );
@@ -3835,7 +3835,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
Set1StyleDefaults();
}
- pStyRule = 0; // to be on the safe side
+ pStyRule = nullptr; // to be on the safe side
pIo->m_bStyNormal = false;
pIo->SetNAktColl( 0 );
pIo->m_bNoAttrImport = bOldNoImp;
@@ -3959,8 +3959,8 @@ void WW8RStyle::ScanStyles() // investigate style dependencies
SwWW8StyInf &rSI = pIo->m_vColl[i];
rSI.nFilePos = pStStrm->Tell(); // remember FilePos
- WW8_STD* pStd = Read1Style( nSkip, 0, 0 ); // read STD
- rSI.bValid = (0 != pStd);
+ WW8_STD* pStd = Read1Style( nSkip, nullptr, nullptr ); // read STD
+ rSI.bValid = (nullptr != pStd);
if (rSI.bValid)
{
rSI.nBase = pStd->istdBase; // remember Basis
@@ -4509,7 +4509,7 @@ void WW8RStyle::Import()
}
// we do not read styles anymore:
- pIo->m_pAktColl = 0;
+ pIo->m_pAktColl = nullptr;
}
rtl_TextEncoding SwWW8StyInf::GetCharSet() const
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 97670add2009..6d7750b0a8e0 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -140,7 +140,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr )
{
WW8PLCFx_Book* pB = m_pPlcxMan->GetBook();
OUString aBookmarkName;
- if (pB!=NULL) {
+ if (pB!=nullptr) {
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
@@ -155,7 +155,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr )
}
}
- if (pB!=NULL && aBookmarkName.isEmpty()) {
+ if (pB!=nullptr && aBookmarkName.isEmpty()) {
aBookmarkName=pB->GetUniqueBookmarkName(aFormula.msTitle);
}
@@ -191,7 +191,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr )
OUString aBookmarkName;
WW8PLCFx_Book* pB = m_pPlcxMan->GetBook();
- if (pB!=NULL) {
+ if (pB!=nullptr) {
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
@@ -206,7 +206,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr )
}
}
- if (pB!=NULL && aBookmarkName.isEmpty()) {
+ if (pB!=nullptr && aBookmarkName.isEmpty()) {
aBookmarkName=pB->GetUniqueBookmarkName(aFormula.msTitle);
}
@@ -215,8 +215,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr )
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
*m_pPaM, aBookmarkName, ODF_FORMCHECKBOX ) );
- OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
- if (pFieldmark!=NULL) {
+ OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
+ if (pFieldmark!=nullptr) {
IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
(*pParameters)[ODF_FORMCHECKBOX_NAME] = uno::makeAny(OUString(aFormula.msTitle));
@@ -263,7 +263,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
// TODO: review me
OUString aBookmarkName;
WW8PLCFx_Book* pB = m_pPlcxMan->GetBook();
- if (pB!=NULL)
+ if (pB!=nullptr)
{
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
@@ -279,7 +279,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
}
}
- if (pB!=NULL && aBookmarkName.isEmpty())
+ if (pB!=nullptr && aBookmarkName.isEmpty())
aBookmarkName=pB->GetUniqueBookmarkName(aFormula.msTitle);
if (!aBookmarkName.isEmpty())
@@ -287,8 +287,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>(
pMarksAccess->makeNoTextFieldBookmark( *m_pPaM, aBookmarkName, ODF_FORMDROPDOWN ) );
- OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
- if ( pFieldmark != NULL )
+ OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
+ if ( pFieldmark != nullptr )
{
uno::Sequence< OUString > vListEntries(aFormula.maListEntries.size());
::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), vListEntries.begin());
@@ -313,7 +313,7 @@ eF_ResT SwWW8ImplReader::Read_F_HTMLControl(WW8FieldDesc*, OUString&)
void SwWW8ImplReader::DeleteFormImpl()
{
- delete m_pFormImpl, m_pFormImpl = 0;
+ delete m_pFormImpl, m_pFormImpl = nullptr;
}
// Hilfs-Deklarationen
@@ -476,7 +476,7 @@ WW8LSTInfo* WW8ListManager::GetLSTByListId( sal_uInt32 nIdLst ) const
std::vector<WW8LSTInfo *>::const_iterator aResult =
std::find_if(maLSTInfos.begin(),maLSTInfos.end(),ListWithId(nIdLst));
if (aResult == maLSTInfos.end())
- return 0;
+ return nullptr;
return *aResult;
}
@@ -581,8 +581,8 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
// "sprmPDxaLeft" pap.dxaLeft;dxa;word;
sal_uInt8* pSprm;
if (
- (0 != (pSprm = GrpprlHasSprm(0x840F,aGrpprlPapx[0],aLVL.nLenGrpprlPapx))) ||
- (0 != (pSprm = GrpprlHasSprm(0x845E,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)))
+ (nullptr != (pSprm = GrpprlHasSprm(0x840F,aGrpprlPapx[0],aLVL.nLenGrpprlPapx))) ||
+ (nullptr != (pSprm = GrpprlHasSprm(0x845E,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)))
)
{
sal_uInt8 *pBegin = pSprm-2;
@@ -595,8 +595,8 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
// "sprmPDxaLeft1" pap.dxaLeft1;dxa;word;
if (
- (0 != (pSprm = GrpprlHasSprm(0x8411,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) ) ||
- (0 != (pSprm = GrpprlHasSprm(0x8460,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) )
+ (nullptr != (pSprm = GrpprlHasSprm(0x8411,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) ) ||
+ (nullptr != (pSprm = GrpprlHasSprm(0x8460,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) )
)
{
sal_uInt8 *pBegin = pSprm-2;
@@ -606,7 +606,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
}
// #i86652# - read tab setting
- if(0 != (pSprm = GrpprlHasSprm(0xC615,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) )
+ if(nullptr != (pSprm = GrpprlHasSprm(0xC615,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) )
{
bool bDone = false;
if (*(pSprm-1) == 5)
@@ -720,7 +720,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
}
// Reader-ItemSet-Pointer und Reader-Style zuruecksetzen
- rReader.SetAktItemSet( 0 );
+ rReader.SetAktItemSet( nullptr );
rReader.SetNAktColl( nOldColl );
rReader.SetToggleAttrFlags(nOldFlags1);
rReader.SetToggleBiDiAttrFlags(nOldFlags2);
@@ -1118,7 +1118,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
const OUString sPrefix("WW8Num" + OUString::number(nUniqueList++));
// #i86652#
sal_uInt16 nRul =
- rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, false,
+ rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), nullptr, false,
SvxNumberFormat::LABEL_ALIGNMENT );
SwNumRule* pMyNumRule = rDoc.GetNumRuleTable()[nRul];
pMyNumRule->SetAutoRule(false);
@@ -1131,7 +1131,7 @@ SwNumRule* WW8ListManager::GetNumRule(size_t i)
if (i < maLSTInfos.size())
return maLSTInfos[i]->pNumRule;
else
- return 0;
+ return nullptr;
}
// oeffentliche Methoden
@@ -1555,7 +1555,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTextNode *pNode)
{
if (m_LFOInfos.size() <= nLFOPosition)
- return 0;
+ return nullptr;
WW8LFOInfo& rLFOInfo = *m_LFOInfos[nLFOPosition];
@@ -1563,7 +1563,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
rLFOInfo.bUsedInDoc = true;
if( !rLFOInfo.pNumRule )
- return 0;
+ return nullptr;
// #i25545#
// #i100132# - a number format does not have to exist on given list level
@@ -1793,7 +1793,7 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle)
ItemGet<SvxLRSpaceItem>(*rStyleInf.pFormat, RES_LR_SPACE);
// Phase 2: aktualisieren der StyleDef nach einlesen aller Listen
- SwNumRule* pNmRule = 0;
+ SwNumRule* pNmRule = nullptr;
const sal_uInt16 nLFO = rStyleInf.nLFOIndex;
const sal_uInt8 nLevel = rStyleInf.nListLevel;
if (
@@ -1805,7 +1805,7 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle)
pNmRule = m_pLstManager->GetNumRuleForActivation(nLFO, nLevel,
aParaSprms);
- if (pNmRule != NULL)
+ if (pNmRule != nullptr)
{
if (rStyleInf.IsWW8BuiltInHeadingStyle()
&& rStyleInf.HasWW8OutlineLevel())
@@ -1845,9 +1845,9 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO,
std::vector<sal_uInt8> aParaSprms;
const SwNumRule* pRule = bSetAttr ?
m_pLstManager->GetNumRuleForActivation( nActLFO, nActLevel,
- aParaSprms, pTextNd) : 0;
+ aParaSprms, pTextNd) : nullptr;
- if (pRule != NULL || !bSetAttr)
+ if (pRule != nullptr || !bSetAttr)
{
if (bSetAttr && pTextNd->GetNumRule() != pRule
&& pTextNd->GetNumRule() != m_rDoc.GetOutlineNumRule())
@@ -2300,7 +2300,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
{ RES_CHRATR_UNDERLINE, "FontUnderline" },
{ RES_CHRATR_CROSSEDOUT, "FontStrikeout" },
{ RES_CHRATR_POSTURE, "FontSlant" },
- { 0, 0 }
+ { 0, nullptr }
};
vcl::Font aFont;
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index a8f4856627a6..586be7d8758e 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -202,11 +202,11 @@ SwFlyFrameFormat* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject,
SfxObjectShell *pPersist = m_rDoc.GetPersist();
OSL_ENSURE(pPersist, "No persist, cannot insert objects correctly");
if (!pPersist)
- return 0;
+ return nullptr;
- SwFlyFrameFormat *pRet = 0;
+ SwFlyFrameFormat *pRet = nullptr;
- SfxItemSet *pMathFlySet = 0;
+ SfxItemSet *pMathFlySet = nullptr;
uno::Reference < embed::XClassifiedObject > xClass( rObject.GetObjRef(), uno::UNO_QUERY );
if( xClass.is() )
{
@@ -235,7 +235,7 @@ SwFlyFrameFormat* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject,
if (bSuccess)
{
const SfxItemSet *pFlySet = pMathFlySet ? pMathFlySet : &rFlySet;
- pRet = m_rDoc.getIDocumentContentOperations().InsertOLE(*m_pPaM, sNewName, rObject.GetAspect(), pFlySet, rGrfSet, 0);
+ pRet = m_rDoc.getIDocumentContentOperations().InsertOLE(*m_pPaM, sNewName, rObject.GetAspect(), pFlySet, rGrfSet, nullptr);
}
delete pMathFlySet;
return pRet;
@@ -245,7 +245,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
const SfxItemSet* pFlySet, const SfxItemSet *pGrfSet, const Rectangle& aVisArea )
{
::SetProgressState(m_nProgress, m_pDocShell); // Update
- SwFrameFormat* pFormat = 0;
+ SwFrameFormat* pFormat = nullptr;
GrafikCtor();
@@ -253,7 +253,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
SdrObject* pRet = ImportOleBase(aGraph, pGrf, pFlySet, aVisArea );
// create flyset
- SfxItemSet* pTempSet = 0;
+ SfxItemSet* pTempSet = nullptr;
if( !pFlySet )
{
pTempSet = new SfxItemSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
@@ -300,7 +300,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
)
{
pFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &aGraph, pFlySet,
- pGrfSet, NULL);
+ pGrfSet, nullptr);
}
delete pTempSet;
return pFormat;
@@ -387,7 +387,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
}
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
if (!(m_bIsHeader || m_bIsFooter))
{
@@ -413,7 +413,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
{
sal_uLong nOldPos = m_pDataStream->Tell();
m_pDataStream->Seek(STREAM_SEEK_TO_END);
- SvStream *pTmpData = 0;
+ SvStream *pTmpData = nullptr;
if (m_nObjLocFc < m_pDataStream->Tell())
{
pTmpData = m_pDataStream;
@@ -490,18 +490,18 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
if( m_bVer67 )
{
m_pPlcxMan->HasCharSprm(69, aResult);
- pSprmCIbstRMark = aResult.empty() ? 0 : aResult.back();
+ pSprmCIbstRMark = aResult.empty() ? nullptr : aResult.back();
aResult.clear();
m_pPlcxMan->HasCharSprm(70, aResult);
- pSprmCDttmRMark = aResult.empty() ? 0 : aResult.back();
+ pSprmCDttmRMark = aResult.empty() ? nullptr : aResult.back();
}
else
{
m_pPlcxMan->HasCharSprm( bIns ? 0x4804 : 0x4863, aResult);
- pSprmCIbstRMark = aResult.empty() ? 0 : aResult.back();
+ pSprmCIbstRMark = aResult.empty() ? nullptr : aResult.back();
aResult.clear();
m_pPlcxMan->HasCharSprm( bIns ? 0x6805 : NS_sprm::LN_CDttmRMarkDel, aResult);
- pSprmCDttmRMark = aResult.empty() ? 0 : aResult.back();
+ pSprmCDttmRMark = aResult.empty() ? nullptr : aResult.back();
}
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 595ab85ef7a5..77960c9dc545 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -506,14 +506,14 @@ sal_uInt16 SwWW8ImplReader::End_Field()
switch (nRet)
{
case 70:
- if (bUseEnhFields && m_pPaM!=NULL && m_pPaM->GetPoint()!=NULL) {
+ if (bUseEnhFields && m_pPaM!=nullptr && m_pPaM->GetPoint()!=nullptr) {
SwPosition aEndPos = *m_pPaM->GetPoint();
SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.nContent.GetIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeFieldBookmark(
aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT ) );
- OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
- if (pFieldmark!=NULL) {
+ OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
+ if (pFieldmark!=nullptr) {
const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters();
pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end());
}
@@ -548,7 +548,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
{
*m_pPaM = *m_pPosAfterTOC;
delete m_pPosAfterTOC;
- m_pPosAfterTOC = 0;
+ m_pPosAfterTOC = nullptr;
}
}
}
@@ -713,18 +713,18 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
enum Limits {eMax = 96};
static const FNReadField aWW8FieldTab[eMax+1] =
{
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_Input,
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_Ref, // 3
- 0,
- 0,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_Set, // 6
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_Tox, // 8
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_Seq, // 12
&SwWW8ImplReader::Read_F_Tox, // 13
&SwWW8ImplReader::Read_F_DocInfo, // 14
@@ -747,71 +747,71 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
&SwWW8ImplReader::Read_F_DateTime, // 31
&SwWW8ImplReader::Read_F_DateTime, // 32
&SwWW8ImplReader::Read_F_CurPage, // 33
- 0,
- 0,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_IncludeText, // 36
&SwWW8ImplReader::Read_F_PgRef, // 37
&SwWW8ImplReader::Read_F_InputVar, // 38
&SwWW8ImplReader::Read_F_Input, // 39
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_DBNext, // 41
- 0,
- 0,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_DBNum, // 44
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_Equation, // 49
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_Macro, // 51
&SwWW8ImplReader::Read_F_ANumber, // 52
&SwWW8ImplReader::Read_F_ANumber, // 53
&SwWW8ImplReader::Read_F_ANumber, // 54
- 0,
+ nullptr,
- 0, // 56
+ nullptr, // 56
&SwWW8ImplReader::Read_F_Symbol, // 57
&SwWW8ImplReader::Read_F_Embedd, // 58
&SwWW8ImplReader::Read_F_DBField, // 59
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_DocInfo, // 64 - DOCVARIABLE
- 0,
- 0,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_IncludePicture, // 67
&SwWW8ImplReader::Read_F_IncludeText, // 68
- 0,
+ nullptr,
&SwWW8ImplReader::Read_F_FormTextBox, // 70
&SwWW8ImplReader::Read_F_FormCheckBox, // 71
&SwWW8ImplReader::Read_F_NoteReference, // 72
- 0, /*&SwWW8ImplReader::Read_F_Tox*/
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
+ nullptr, /*&SwWW8ImplReader::Read_F_Tox*/
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
&SwWW8ImplReader::Read_F_FormListBox, // 83
- 0, // 84
+ nullptr, // 84
&SwWW8ImplReader::Read_F_DocInfo, // 85
- 0, // 86
+ nullptr, // 86
&SwWW8ImplReader::Read_F_OCX, // 87
&SwWW8ImplReader::Read_F_Hyperlink, // 88
- 0, // 89
- 0, // 90
+ nullptr, // 89
+ nullptr, // 90
&SwWW8ImplReader::Read_F_HTMLControl, // 91
- 0, // 92
- 0, // 93
- 0, // 94
+ nullptr, // 92
+ nullptr, // 93
+ nullptr, // 94
&SwWW8ImplReader::Read_F_Shape, // 95
- 0 // eMax - Dummy leer Methode
+ nullptr // eMax - Dummy leer Methode
};
OSL_ENSURE( ( sizeof( aWW8FieldTab ) / sizeof( *aWW8FieldTab ) == eMax+1 ),
"FeldFunc-Tabelle stimmt nicht" );
@@ -1232,7 +1232,7 @@ filter itself.
SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pField,
SwFltStackEntry &rEntry)
{
- SwFltStackEntry *pRet=0;
+ SwFltStackEntry *pRet=nullptr;
if (pField && RES_GETREFFLD == pField->Which())
{
//Get the name of the ref field, and see if actually a variable
@@ -2324,9 +2324,9 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr )
m_pFlyFormatOfJustInsertedGraphic = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM,
aGrfName,
OUString(),
- 0, // Graphic*
+ nullptr, // Graphic*
&aFlySet,
- 0, 0); // SwFrameFormat*
+ nullptr, nullptr); // SwFrameFormat*
m_aGrfNameGenerator.SetUniqueGraphName(m_pFlyFormatOfJustInsertedGraphic,
INetURLObject(aGrfName).GetBase());
}
@@ -2389,7 +2389,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt
aSection.SetProtectFlag(true);
SwSection *const pSection =
- m_rDoc.InsertSwSection(*m_pPaM, aSection, 0, 0, false);
+ m_rDoc.InsertSwSection(*m_pPaM, aSection, nullptr, nullptr, false);
OSL_ENSURE(pSection, "no section inserted");
if (!pSection)
return FLD_TEXT;
@@ -2617,7 +2617,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
}
SwFormatRuby aRuby(sRuby);
- const SwCharFormat *pCharFormat=0;
+ const SwCharFormat *pCharFormat=nullptr;
//Make a guess at which of asian of western we should be setting
sal_uInt16 nScript;
if (g_pBreakIt->GetBreakIter().is())
@@ -2649,7 +2649,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
//Create a new char style if necessary
if (!pCharFormat)
{
- SwCharFormat *pFormat=0;
+ SwCharFormat *pFormat=nullptr;
OUString aNm;
//Take this as the base name
SwStyleNameMapper::FillUIName(RES_POOLCHR_RUBYTEXT,aNm);
@@ -2990,7 +2990,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
case 'o':
{
sal_Int32 nVal;
- if( !aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
+ if( !aReadParam.GetTokenSttFromTo(nullptr, &nVal, WW8ListManager::nMaxLevel) )
nVal = lcl_GetMaxValidWordTOCLevel(aOrigForm);
if( nMaxLevel < nVal )
nMaxLevel = nVal;
@@ -3003,7 +3003,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
case 'l':
{
sal_Int32 nVal;
- if( aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
+ if( aReadParam.GetTokenSttFromTo(nullptr, &nVal, WW8ListManager::nMaxLevel) )
{
if( nMaxLevel < nVal )
nMaxLevel = nVal;
@@ -3183,7 +3183,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
// In an ideal world we could handle the tab stop between the number and
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
- SwForm* pForm = 0;
+ SwForm* pForm = nullptr;
for (size_t nI = 0; nI < m_vColl.size(); ++nI)
{
const SwWW8StyInf& rSI = m_vColl[nI];
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 958f50680d6f..2d88ac7464eb 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -112,7 +112,7 @@ using namespace nsHdFtFlags;
static sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP* pPap,
- const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
+ const WW8RStyle* pSty = nullptr, const WW8PLCFx_SEPX* pSep = nullptr);
ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
@@ -661,16 +661,16 @@ SwSectionFormat *wwSectionManager::InsertSection(
aSection.SetProtectFlag(SectionIsProtected(rSection));
rSection.mpSection =
- mrReader.m_rDoc.InsertSwSection( rMyPaM, aSection, 0, & aSet );
+ mrReader.m_rDoc.InsertSwSection( rMyPaM, aSection, nullptr, & aSet );
OSL_ENSURE(rSection.mpSection, "section not inserted!");
if (!rSection.mpSection)
- return 0;
+ return nullptr;
- SwPageDesc *pPage = 0;
+ SwPageDesc *pPage = nullptr;
mySegrIter aEnd = maSegments.rend();
for (mySegrIter aIter = maSegments.rbegin(); aIter != aEnd; ++aIter)
{
- if (0 != (pPage = aIter->mpPage))
+ if (nullptr != (pPage = aIter->mpPage))
break;
}
@@ -680,12 +680,12 @@ SwSectionFormat *wwSectionManager::InsertSection(
pPage = &mrReader.m_rDoc.GetPageDesc(0);
if (!pPage)
- return 0;
+ return nullptr;
SwSectionFormat *pFormat = rSection.mpSection->GetFormat();
OSL_ENSURE(pFormat, "impossible");
if (!pFormat)
- return 0;
+ return nullptr;
SwFrameFormat& rFormat = pPage->GetMaster();
const SvxLRSpaceItem& rLR = rFormat.GetLRSpace();
@@ -755,8 +755,8 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
}
wwSection::wwSection(const SwPosition &rPos) : maStart(rPos.nNode)
- , mpSection(0)
- , mpPage(0)
+ , mpSection(nullptr)
+ , mpPage(nullptr)
, meDir(FRMDIR_HORI_LEFT_TOP)
, mLinkId(0)
, nPgWidth(SvxPaperInfo::GetPaperSize(PAPER_A4).Width())
@@ -834,7 +834,7 @@ void wwSectionManager::CreateSep(const long nTextPos, bool /*bMustHaveBreak*/)
aSection.SetLinkFileName( sSectionName );
aSection.SetProtectFlag(true);
// #i19922# - improvement: return value of method <Insert> not used.
- mrReader.m_rDoc.InsertSwSection(*mrReader.m_pPaM, aSection, 0, 0, false);
+ mrReader.m_rDoc.InsertSwSection(*mrReader.m_pPaM, aSection, nullptr, nullptr, false);
}
wwSection aLastSection(*mrReader.m_pPaM->GetPoint());
@@ -1112,7 +1112,7 @@ void wwSectionManager::CreateSep(const long nTextPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.pgbOffsetFrom = (pgbProp & 0x00E0) >> 5;
aNewSection.mnBorders =
- ::lcl_ReadBorders(eVer <= ww::eWW7, aNewSection.brc, 0, 0, pSep);
+ ::lcl_ReadBorders(eVer <= ww::eWW7, aNewSection.brc, nullptr, nullptr, pSep);
}
// check if Line Numbering must be activated or reset
@@ -1237,7 +1237,7 @@ static bool _SetWW8_BRC(int nBrcVer, WW8_BRCVer9& rVar, const sal_uInt8* pS)
rVar = WW8_BRCVer9(WW8_BRC(*reinterpret_cast<const WW8_BRCVer6*>(pS)));
}
- return 0 != pS;
+ return nullptr != pS;
}
static sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP* pPap,
@@ -1327,7 +1327,7 @@ static sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRCVer9* brc, WW8PLCFx_Cp_FKP*
void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
sal_uInt32 cv, short nIdx, SvxBoxItemLine nOOIndex, sal_uInt16 nWWIndex,
- short *pSize=0)
+ short *pSize=nullptr)
{
// LO cannot handle outset/inset (new in WW9 BRC) so fall back same as WW8
if ( nIdx == 0x1A || nIdx == 0x1B )
@@ -1418,7 +1418,7 @@ bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc,
border, so with a sprm set, but no border, then disable the
appropriate border
*/
- rBox.SetLine( 0, aIdArr[ i ].second );
+ rBox.SetLine( nullptr, aIdArr[ i ].second );
}
}
return bChange;
@@ -1494,7 +1494,7 @@ inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
*pVar = (sal_Int16)SVBT16ToShort( pS );
- return ( pS != 0 );
+ return ( pS != nullptr );
}
inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
@@ -1502,7 +1502,7 @@ inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId
const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
*pVar = (sal_Int16)SVBT16ToShort( pS );
- return ( pS != 0 );
+ return ( pS != nullptr );
}
/*
@@ -1561,7 +1561,7 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
// Read for normal text
void WW8FlyPara::Read(sal_uInt8 nOrigSp29, WW8PLCFx_Cp_FKP* pPap)
{
- const sal_uInt8* pS = 0;
+ const sal_uInt8* pS = nullptr;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-position //sprmPDxaAbs
@@ -1653,10 +1653,10 @@ void WW8FlyPara::ReadFull(sal_uInt8 nOrigSp29, SwWW8ImplReader* pIo)
}
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
- WW8FlyPara *pNowStyleApo=0;
+ WW8FlyPara *pNowStyleApo=nullptr;
sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
- while (eSti != ww::stiNil && nColl < pIo->m_vColl.size() && 0 == (pNowStyleApo = pIo->m_vColl[nColl].pWWFly))
+ while (eSti != ww::stiNil && nColl < pIo->m_vColl.size() && nullptr == (pNowStyleApo = pIo->m_vColl[nColl].pWWFly))
{
nColl = pIo->m_vColl[nColl].nBase;
eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
@@ -1679,7 +1679,7 @@ void WW8FlyPara::ReadFull(sal_uInt8 nOrigSp29, SwWW8ImplReader* pIo)
// read for Apo definitions in Styledefs
void WW8FlyPara::Read(sal_uInt8 nOrigSp29, WW8RStyle* pStyle)
{
- const sal_uInt8* pS = 0;
+ const sal_uInt8* pS = nullptr;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-position
@@ -1713,7 +1713,7 @@ void WW8FlyPara::Read(sal_uInt8 nOrigSp29, WW8RStyle* pStyle)
nSp37 = *pS;
}
- if (::lcl_ReadBorders(bVer67, brc, 0, pStyle)) // border
+ if (::lcl_ReadBorders(bVer67, brc, nullptr, pStyle)) // border
bBorderLines = ::lcl_IsBorder(brc);
/*
@@ -2162,7 +2162,7 @@ void WW8DupProperties::Insert(const SwPosition &rPos)
do
{
pCtrlStck->NewAttr(rPos, *pItem);
- }while( !aIter.IsAtEnd() && 0 != ( pItem = aIter.NextItem() ) );
+ }while( !aIter.IsAtEnd() && nullptr != ( pItem = aIter.NextItem() ) );
}
}
}
@@ -2263,7 +2263,7 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrameFormat *pFlyFormat,
WW8FlyPara *SwWW8ImplReader::ConstructApo(const ApoTestResults &rApo,
const WW8_TablePos *pTabPos)
{
- WW8FlyPara *pRet = 0;
+ WW8FlyPara *pRet = nullptr;
OSL_ENSURE(rApo.HasFrame() || pTabPos,
"If no frame found, *MUST* be in a table");
@@ -2276,7 +2276,7 @@ WW8FlyPara *SwWW8ImplReader::ConstructApo(const ApoTestResults &rApo,
pRet->ApplyTabPos(pTabPos);
if (pRet->IsEmpty())
- delete pRet, pRet = 0;
+ delete pRet, pRet = nullptr;
return pRet;
}
@@ -2285,7 +2285,7 @@ bool SwWW8ImplReader::IsDropCap()
// Find the DCS (Drop Cap Specifier) for the paragraph
// if does not exist or if the first three bits are 0
// then there is no dropcap on the paragraph
- WW8PLCFx_Cp_FKP *pPap = m_pPlcxMan ? m_pPlcxMan->GetPapPLCF() : 0;
+ WW8PLCFx_Cp_FKP *pPap = m_pPlcxMan ? m_pPlcxMan->GetPapPLCF() : nullptr;
if (pPap)
{
const sal_uInt8 *pDCS;
@@ -2313,7 +2313,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
const WW8_TablePos *pTabPos,
SvxULSpaceItem* pULSpaceItem)
{
- if (0 == (m_pWFlyPara = ConstructApo(rApo, pTabPos)))
+ if (nullptr == (m_pWFlyPara = ConstructApo(rApo, pTabPos)))
return false;
// <WW8SwFlyPara> constructor has changed - new 4th parameter
@@ -2345,7 +2345,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
if (pTabPos && pTabPos->bNoFly)
{
- m_pSFlyPara->pFlyFormat = 0;
+ m_pSFlyPara->pFlyFormat = nullptr;
if (pULSpaceItem)
{
// Word positioned tables can have a position (like a
@@ -2353,7 +2353,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
// pages. If we decide to import this as a normal table (so it
// can flow across multiple pages), then turn the vertical
// orientation position of the fly into a table upper margin.
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem))
{
const SwFormatVertOrient* pOrient = static_cast<const SwFormatVertOrient*>(pItem);
@@ -2582,7 +2582,7 @@ void SwWW8ImplReader::StopApo()
m_pSFlyPara->pFlyFormat->SetFormatAttr(aSize);
}
- delete m_pSFlyPara->pMainTextPos, m_pSFlyPara->pMainTextPos = 0;
+ delete m_pSFlyPara->pMainTextPos, m_pSFlyPara->pMainTextPos = nullptr;
// To create the SwFrms when inserting into an existing document, fltshell.cxx
// will call pFlyFrm->MakeFrms() when setting the FltAnchor attribute
@@ -2665,14 +2665,14 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
// fetches attribute from FormatColl / Stack / Doc
const SfxPoolItem* SwWW8ImplReader::GetFormatAttr( sal_uInt16 nWhich )
{
- const SfxPoolItem* pRet = 0;
+ const SfxPoolItem* pRet = nullptr;
if (m_pAktColl)
pRet = &(m_pAktColl->GetFormatAttr(nWhich));
else if (m_pAktItemSet)
{
pRet = m_pAktItemSet->GetItem(nWhich);
if (!pRet)
- pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : 0;
+ pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : nullptr;
if (!pRet)
pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich);
}
@@ -2688,7 +2688,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFormatAttr( sal_uInt16 nWhich )
}
}
if (!pRet)
- pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : 0;
+ pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : nullptr;
if (!pRet)
pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich);
}
@@ -2758,17 +2758,17 @@ void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLe
return;
}
- if (m_pAktColl != NULL)
+ if (m_pAktColl != nullptr)
{
SwWW8StyInf* pSI = GetStyle(m_nAktColl);
- if (pSI != NULL)
+ if (pSI != nullptr)
{
pSI->mnWW8OutlineLevel =
static_cast< sal_uInt8 >( ( pData ? *pData : 0 ) );
NewAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL, SwWW8StyInf::WW8OutlineLevelToOutlinelevel( pSI->mnWW8OutlineLevel ) ) );
}
}
- else if (m_pPaM != NULL)
+ else if (m_pPaM != nullptr)
{
const sal_uInt8 nOutlineLevel
= SwWW8StyInf::WW8OutlineLevelToOutlinelevel(
@@ -2821,7 +2821,7 @@ void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen
SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
- return const_cast<SwWW8StyInf *>(nColl < m_vColl.size() ? &m_vColl[nColl] : 0);
+ return const_cast<SwWW8StyInf *>(nColl < m_vColl.size() ? &m_vColl[nColl] : nullptr);
}
// Read_BoldUsw for italic, bold, small caps, majuscule, struck out,
@@ -3171,7 +3171,7 @@ SwFrameFormat *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion
contains only a single graphic, and if that graphic is anchored as
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
- SwFrameFormat *pRet=0;
+ SwFrameFormat *pRet=nullptr;
SwNodeIndex aBegin(rRegion.Start()->nNode);
const sal_Int32 nBegin(rRegion.Start()->nContent.GetIndex());
SwNodeIndex aEnd(rRegion.End()->nNode);
@@ -3180,8 +3180,8 @@ SwFrameFormat *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion
const SwTextAttr* pTFlyAttr;
if (
aBegin == aEnd && nBegin == nEnd - 1 &&
- 0 != (pTNd = aBegin.GetNode().GetTextNode()) &&
- 0 != (pTFlyAttr = pTNd->GetTextAttrForCharAt(nBegin, RES_TXTATR_FLYCNT))
+ nullptr != (pTNd = aBegin.GetNode().GetTextNode()) &&
+ nullptr != (pTFlyAttr = pTNd->GetTextAttrForCharAt(nBegin, RES_TXTATR_FLYCNT))
)
{
const SwFormatFlyCnt& rFly = pTFlyAttr->GetFlyCnt();
@@ -3213,10 +3213,10 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
SwFltPosition aMkPos((*m_pCtrlStck)[nPos].m_aMkPos);
SwFltPosition aPtPos(*m_pPaM->GetPoint());
- SwFrameFormat *pFlyFormat = 0;
+ SwFrameFormat *pFlyFormat = nullptr;
if (
SwFltStackEntry::MakeRegion(&m_rDoc,aRegion,false,aMkPos,aPtPos) &&
- 0 != (pFlyFormat = ContainsSingleInlineGraphic(aRegion))
+ nullptr != (pFlyFormat = ContainsSingleInlineGraphic(aRegion))
)
{
m_pCtrlStck->DeleteAndDestroy(nPos);
@@ -3247,7 +3247,7 @@ void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, sho
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
sal_Int32 nHeight = 240;
- if (pF != NULL && pF->GetHeight() != 0)
+ if (pF != nullptr && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... now in % (rounded)
if( nPos2 > 100 ) // for safety
@@ -3424,7 +3424,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
else
{
SvxUnderlineItem* pUnderlineAttr = const_cast<SvxUnderlineItem*>(static_cast<const SvxUnderlineItem*>(m_pCtrlStck->GetOpenStackAttr( *m_pPaM->GetPoint(), RES_CHRATR_UNDERLINE )));
- if( pUnderlineAttr != NULL )
+ if( pUnderlineAttr != nullptr )
pUnderlineAttr->SetColor( Color( msfilter::util::BGRToRGB(SVBT32ToUInt32( pData ))));
}
}
@@ -3917,7 +3917,7 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short
bool lcl_HasExplicitLeft(const WW8PLCFMan *pPlcxMan, bool bVer67)
{
- WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
+ WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : nullptr;
if (pPap)
{
if (bVer67)
@@ -4316,7 +4316,7 @@ bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
const sal_uInt8 *pDir =
- m_pPlcxMan ? m_pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
+ m_pPlcxMan ? m_pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : nullptr;
if (pDir)
bRTL = *pDir != 0;
else
@@ -4413,7 +4413,7 @@ void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short n
//Only the cjk language setting seems to matter to word, the western
//one is ignored
const sal_uInt8 *pLang =
- m_pPlcxMan ? m_pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
+ m_pPlcxMan ? m_pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : nullptr;
if (pLang)
nLang = SVBT16ToShort( pLang );
@@ -4759,9 +4759,9 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8*, short nLen)
sal_uInt8 nBorder;
if( m_pAktColl )
- nBorder = ::lcl_ReadBorders(m_bVer67, aBrcs, 0, m_pStyles);
+ nBorder = ::lcl_ReadBorders(m_bVer67, aBrcs, nullptr, m_pStyles);
else
- nBorder = ::lcl_ReadBorders(m_bVer67, aBrcs, m_pPlcxMan ? m_pPlcxMan->GetPapPLCF() : NULL);
+ nBorder = ::lcl_ReadBorders(m_bVer67, aBrcs, m_pPlcxMan ? m_pPlcxMan->GetPapPLCF() : nullptr);
if( nBorder ) // Border
{
@@ -4837,10 +4837,10 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, sh
// Border style is none -> no border, no shadow
if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != table::BorderLineStyle::NONE )
{
- Set1Border(aBoxItem, aBrc, SvxBoxItemLine::TOP, 0, 0, true);
- Set1Border(aBoxItem, aBrc, SvxBoxItemLine::BOTTOM, 0, 0, true);
- Set1Border(aBoxItem, aBrc, SvxBoxItemLine::LEFT, 0, 0, true);
- Set1Border(aBoxItem, aBrc, SvxBoxItemLine::RIGHT, 0, 0, true);
+ Set1Border(aBoxItem, aBrc, SvxBoxItemLine::TOP, 0, nullptr, true);
+ Set1Border(aBoxItem, aBrc, SvxBoxItemLine::BOTTOM, 0, nullptr, true);
+ Set1Border(aBoxItem, aBrc, SvxBoxItemLine::LEFT, 0, nullptr, true);
+ Set1Border(aBoxItem, aBrc, SvxBoxItemLine::RIGHT, 0, nullptr, true);
NewAttr( aBoxItem );
short aSizeArray[WW8_RIGHT+1]={0}; aSizeArray[WW8_RIGHT] = 1;
@@ -4976,34 +4976,34 @@ void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
m_vColl[m_nAktColl].pWWFly = pFly;
pFly->Read(*pData, m_pStyles);
if (pFly->IsEmpty())
- delete m_vColl[m_nAktColl].pWWFly, m_vColl[m_nAktColl].pWWFly = 0;
+ delete m_vColl[m_nAktColl].pWWFly, m_vColl[m_nAktColl].pWWFly = nullptr;
}
}
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const sal_uInt8 *pRes=0;
+ const sal_uInt8 *pRes=nullptr;
memset(pTabPos, 0, sizeof(WW8_TablePos));
- if (0 != (pRes = pPap->HasSprm(0x360D)))
+ if (nullptr != (pRes = pPap->HasSprm(0x360D)))
{
pTabPos->nSp29 = *pRes;
pTabPos->nSp37 = 2; //Possible fail area, always parallel wrap
- if (0 != (pRes = pPap->HasSprm(0x940E)))
+ if (nullptr != (pRes = pPap->HasSprm(0x940E)))
pTabPos->nSp26 = SVBT16ToShort(pRes);
- if (0 != (pRes = pPap->HasSprm(0x940F)))
+ if (nullptr != (pRes = pPap->HasSprm(0x940F)))
pTabPos->nSp27 = SVBT16ToShort(pRes);
- if (0 != (pRes = pPap->HasSprm(0x9410)))
+ if (nullptr != (pRes = pPap->HasSprm(0x9410)))
pTabPos->nLeMgn = SVBT16ToShort(pRes);
- if (0 != (pRes = pPap->HasSprm(0x941E)))
+ if (nullptr != (pRes = pPap->HasSprm(0x941E)))
pTabPos->nRiMgn = SVBT16ToShort(pRes);
- if (0 != (pRes = pPap->HasSprm(0x9411)))
+ if (nullptr != (pRes = pPap->HasSprm(0x9411)))
pTabPos->nUpMgn = SVBT16ToShort(pRes);
- if (0 != (pRes = pPap->HasSprm(0x941F)))
+ if (nullptr != (pRes = pPap->HasSprm(0x941F)))
pTabPos->nLoMgn = SVBT16ToShort(pRes);
bRet = true;
}
- if (0 != (pRes = pPap->HasSprm(NS_sprm::LN_TDefTable)))
+ if (nullptr != (pRes = pPap->HasSprm(NS_sprm::LN_TDefTable)))
{
WW8TabBandDesc aDesc;
aDesc.ReadDef(false, pRes);
@@ -5058,8 +5058,8 @@ void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
/* 0 (256) */ &SwWW8ImplReader::End_Footnote, // FootNote
/* 1 (257) */ &SwWW8ImplReader::End_Footnote, // EndNote
/* 2 (258) */ &SwWW8ImplReader::End_Field, // Feld
- /* 3 (259) */ 0, // Bookmark
- /* 4 (260) */ 0 // Annotation
+ /* 3 (259) */ nullptr, // Bookmark
+ /* 4 (260) */ nullptr // Annotation
};
sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
@@ -5090,25 +5090,25 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
- {0, 0}, // "0" Default bzw. Error
+ {0, nullptr}, // "0" Default bzw. Error
//wird uebersprungen! ,
{2, &SwWW8ImplReader::Read_StyleCode}, //"sprmPIstd", pap.istd
//(style code)
- {3, 0}, //"sprmPIstdPermute", pap.istd
+ {3, nullptr}, //"sprmPIstdPermute", pap.istd
//permutation
- {4, 0}, //"sprmPIncLv1",
+ {4, nullptr}, //"sprmPIncLv1",
//pap.istddifference
{5, &SwWW8ImplReader::Read_Justify}, //"sprmPJc", pap.jc
//(justification)
- {6, 0}, //"sprmPFSideBySide",
+ {6, nullptr}, //"sprmPFSideBySide",
//pap.fSideBySide
{7, &SwWW8ImplReader::Read_KeepLines}, //"sprmPFKeep", pap.fKeep
{8, &SwWW8ImplReader::Read_KeepParas}, //"sprmPFKeepFollow ",
//pap.fKeepFollow
{9, &SwWW8ImplReader::Read_BreakBefore}, //"sprmPPageBreakBefore",
//pap.fPageBreakBefore
- {10, 0}, //"sprmPBrcl", pap.brcl
- {11, 0}, //"sprmPBrcp ", pap.brcp
+ {10, nullptr}, //"sprmPBrcl", pap.brcl
+ {11, nullptr}, //"sprmPBrcp ", pap.brcp
{12, &SwWW8ImplReader::Read_ANLevelDesc}, //"sprmPAnld", pap.anld (ANLD
//structure)
{13, &SwWW8ImplReader::Read_ANLevelNo}, //"sprmPNLvlAnm", pap.nLvlAnm
@@ -5118,37 +5118,37 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
//pap.itbdMac, ...
{16, &SwWW8ImplReader::Read_LR}, //"sprmPDxaRight", pap.dxaRight
{17, &SwWW8ImplReader::Read_LR}, //"sprmPDxaLeft", pap.dxaLeft
- {18, 0}, //"sprmPNest", pap.dxaLeft
+ {18, nullptr}, //"sprmPNest", pap.dxaLeft
{19, &SwWW8ImplReader::Read_LR}, //"sprmPDxaLeft1", pap.dxaLeft1
{20, &SwWW8ImplReader::Read_LineSpace}, //"sprmPDyaLine", pap.lspd
//an LSPD
{21, &SwWW8ImplReader::Read_UL}, //"sprmPDyaBefore",
//pap.dyaBefore
{22, &SwWW8ImplReader::Read_UL}, //"sprmPDyaAfter", pap.dyaAfter
- {23, 0}, //"?sprmPChgTabs", pap.itbdMac,
+ {23, nullptr}, //"?sprmPChgTabs", pap.itbdMac,
//pap.rgdxaTab, ...
- {24, 0}, //"sprmPFInTable", pap.fInTable
+ {24, nullptr}, //"sprmPFInTable", pap.fInTable
{25, &SwWW8ImplReader::Read_TabRowEnd}, //"sprmPTtp", pap.fTtp
- {26, 0}, //"sprmPDxaAbs", pap.dxaAbs
- {27, 0}, //"sprmPDyaAbs", pap.dyaAbs
- {28, 0}, //"sprmPDxaWidth", pap.dxaWidth
+ {26, nullptr}, //"sprmPDxaAbs", pap.dxaAbs
+ {27, nullptr}, //"sprmPDyaAbs", pap.dyaAbs
+ {28, nullptr}, //"sprmPDxaWidth", pap.dxaWidth
{29, &SwWW8ImplReader::Read_ApoPPC}, //"sprmPPc", pap.pcHorz,
//pap.pcVert
- {30, 0}, //"sprmPBrcTop10", pap.brcTop
+ {30, nullptr}, //"sprmPBrcTop10", pap.brcTop
//BRC10
- {31, 0}, //"sprmPBrcLeft10",
+ {31, nullptr}, //"sprmPBrcLeft10",
//pap.brcLeft BRC10
- {32, 0}, //"sprmPBrcBottom10",
+ {32, nullptr}, //"sprmPBrcBottom10",
//pap.brcBottom BRC10
- {33, 0}, //"sprmPBrcRight10",
+ {33, nullptr}, //"sprmPBrcRight10",
//pap.brcRight BRC10
- {34, 0}, //"sprmPBrcBetween10",
+ {34, nullptr}, //"sprmPBrcBetween10",
//pap.brcBetween BRC10
- {35, 0}, //"sprmPBrcBar10", pap.brcBar
+ {35, nullptr}, //"sprmPBrcBar10", pap.brcBar
//BRC10
- {36, 0}, //"sprmPFromText10",
+ {36, nullptr}, //"sprmPFromText10",
//pap.dxaFromText dxa
- {37, 0}, //"sprmPWr", pap.wr wr
+ {37, nullptr}, //"sprmPWr", pap.wr wr
{38, &SwWW8ImplReader::Read_Border}, //"sprmPBrcTop", pap.brcTop BRC
{39, &SwWW8ImplReader::Read_Border}, //"sprmPBrcLeft",
//pap.brcLeft BRC
@@ -5158,30 +5158,30 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
//pap.brcRight BRC
{42, &SwWW8ImplReader::Read_Border}, //"sprmPBrcBetween",
//pap.brcBetween BRC
- {43, 0}, //"sprmPBrcBar", pap.brcBar
+ {43, nullptr}, //"sprmPBrcBar", pap.brcBar
//BRC word
{44, &SwWW8ImplReader::Read_Hyphenation}, //"sprmPFNoAutoHyph",
//pap.fNoAutoHyph
- {45, 0}, //"sprmPWHeightAbs",
+ {45, nullptr}, //"sprmPWHeightAbs",
//pap.wHeightAbs w
- {46, 0}, //"sprmPDcs", pap.dcs DCS
+ {46, nullptr}, //"sprmPDcs", pap.dcs DCS
{47, &SwWW8ImplReader::Read_Shade}, //"sprmPShd", pap.shd SHD
- {48, 0}, //"sprmPDyaFromText",
+ {48, nullptr}, //"sprmPDyaFromText",
//pap.dyaFromText dya
- {49, 0}, //"sprmPDxaFromText",
+ {49, nullptr}, //"sprmPDxaFromText",
//pap.dxaFromText dxa
- {50, 0}, //"sprmPFLocked", pap.fLocked
+ {50, nullptr}, //"sprmPFLocked", pap.fLocked
//0 or 1 byte
{51, &SwWW8ImplReader::Read_WidowControl}, //"sprmPFWidowControl",
//pap.fWidowControl 0 or 1 byte
- {52, 0}, //"?sprmPRuler 52",
- {53, 0}, //"??53",
- {54, 0}, //"??54",
- {55, 0}, //"??55",
- {56, 0}, //"??56",
- {57, 0}, //"??57",
- {58, 0}, //"??58",
- {59, 0}, //"??59",
+ {52, nullptr}, //"?sprmPRuler 52",
+ {53, nullptr}, //"??53",
+ {54, nullptr}, //"??54",
+ {55, nullptr}, //"??55",
+ {56, nullptr}, //"??56",
+ {57, nullptr}, //"??57",
+ {58, nullptr}, //"??58",
+ {59, nullptr}, //"??59",
{60, &SwWW8ImplReader::Read_BoldUsw}, //"sprmCFBold", chp.fBold 0,1,
//128, or 129 byte
@@ -5202,17 +5202,17 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
//0,1, 128, or 129 byte
{68, &SwWW8ImplReader::Read_FontCode}, //"sprmCFtc", chp.ftc ftc word
{69, &SwWW8ImplReader::Read_Underline}, // "sprmCKul", chp.kul kul byte
- {70, 0}, //"sprmCSizePos", chp.hps,
+ {70, nullptr}, //"sprmCSizePos", chp.hps,
//chp.hpsPos 3 bytes
{71, &SwWW8ImplReader::Read_Kern}, //"sprmCDxaSpace",
//chp.dxaSpace dxa word
{72, &SwWW8ImplReader::Read_Language}, //"sprmCLid", chp.lid LID word
{73, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco", chp.ico ico byte
{74, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps", chp.hps hps word!
- {75, 0}, //"sprmCHpsInc", chp.hps byte
+ {75, nullptr}, //"sprmCHpsInc", chp.hps byte
{76, &SwWW8ImplReader::Read_SubSuperProp}, //"sprmCHpsPos", chp.hpsPos
//hps byte
- {77, 0}, //"sprmCHpsPosAdj", chp.hpsPos
+ {77, nullptr}, //"sprmCHpsPosAdj", chp.hpsPos
//hps byte
{78, &SwWW8ImplReader::Read_Majority}, //"?sprmCMajority", chp.fBold,
//chp.fItalic, chp.fSmallCaps
@@ -5222,20 +5222,20 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
{83, &SwWW8ImplReader::Read_Language}, //sprmClidBi
{84, &SwWW8ImplReader::Read_TextColor}, //sprmCIcoBi
{85, &SwWW8ImplReader::Read_FontSize}, //sprmCHpsBi
- {86, 0}, //sprmCFBiDi
- {87, 0}, //sprmCFDiacColor
- {94, 0}, //"sprmPicBrcl", pic.brcl brcl
+ {86, nullptr}, //sprmCFBiDi
+ {87, nullptr}, //sprmCFDiacColor
+ {94, nullptr}, //"sprmPicBrcl", pic.brcl brcl
//(see PIC structure
//definition) byte
- {95, 0}, //"sprmPicScale", pic.mx,
+ {95, nullptr}, //"sprmPicScale", pic.mx,
//pic.my, pic.dxaCropleft,
- {96, 0}, //"sprmPicBrcTop", pic.brcTop
+ {96, nullptr}, //"sprmPicBrcTop", pic.brcTop
//BRC word
- {97, 0}, //"sprmPicBrcLeft",
+ {97, nullptr}, //"sprmPicBrcLeft",
//pic.brcLeft BRC word
- {98, 0}, //"sprmPicBrcBottom",
+ {98, nullptr}, //"sprmPicBrcBottom",
//pic.brcBottom BRC word
- {99, 0} //"sprmPicBrcRight",
+ {99, nullptr} //"sprmPicBrcRight",
};
static wwSprmDispatcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
@@ -5246,25 +5246,25 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
- {0, 0}, // "0" Default bzw. Error
+ {0, nullptr}, // "0" Default bzw. Error
//wird uebersprungen! ,
{2, &SwWW8ImplReader::Read_StyleCode}, //"sprmPIstd", pap.istd
//(style code)
- {3, 0}, //"sprmPIstdPermute", pap.istd
+ {3, nullptr}, //"sprmPIstdPermute", pap.istd
//permutation
- {4, 0}, //"sprmPIncLv1",
+ {4, nullptr}, //"sprmPIncLv1",
//pap.istddifference
{5, &SwWW8ImplReader::Read_Justify}, //"sprmPJc", pap.jc
//(justification)
- {6, 0}, //"sprmPFSideBySide",
+ {6, nullptr}, //"sprmPFSideBySide",
//pap.fSideBySide
{7, &SwWW8ImplReader::Read_KeepLines}, //"sprmPFKeep", pap.fKeep
{8, &SwWW8ImplReader::Read_KeepParas}, //"sprmPFKeepFollow ",
//pap.fKeepFollow
{9, &SwWW8ImplReader::Read_BreakBefore}, //"sprmPPageBreakBefore",
//pap.fPageBreakBefore
- {10, 0}, //"sprmPBrcl", pap.brcl
- {11, 0}, //"sprmPBrcp ", pap.brcp
+ {10, nullptr}, //"sprmPBrcl", pap.brcl
+ {11, nullptr}, //"sprmPBrcp ", pap.brcp
{12, &SwWW8ImplReader::Read_ANLevelDesc}, //"sprmPAnld", pap.anld (ANLD
//structure)
{13, &SwWW8ImplReader::Read_ANLevelNo}, //"sprmPNLvlAnm", pap.nLvlAnm
@@ -5274,37 +5274,37 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//pap.itbdMac, ...
{16, &SwWW8ImplReader::Read_LR}, //"sprmPDxaRight", pap.dxaRight
{17, &SwWW8ImplReader::Read_LR}, //"sprmPDxaLeft", pap.dxaLeft
- {18, 0}, //"sprmPNest", pap.dxaLeft
+ {18, nullptr}, //"sprmPNest", pap.dxaLeft
{19, &SwWW8ImplReader::Read_LR}, //"sprmPDxaLeft1", pap.dxaLeft1
{20, &SwWW8ImplReader::Read_LineSpace}, //"sprmPDyaLine", pap.lspd
//an LSPD
{21, &SwWW8ImplReader::Read_UL}, //"sprmPDyaBefore",
//pap.dyaBefore
{22, &SwWW8ImplReader::Read_UL}, //"sprmPDyaAfter", pap.dyaAfter
- {23, 0}, //"?sprmPChgTabs", pap.itbdMac,
+ {23, nullptr}, //"?sprmPChgTabs", pap.itbdMac,
//pap.rgdxaTab, ...
- {24, 0}, //"sprmPFInTable", pap.fInTable
+ {24, nullptr}, //"sprmPFInTable", pap.fInTable
{25, &SwWW8ImplReader::Read_TabRowEnd}, //"sprmPTtp", pap.fTtp
- {26, 0}, //"sprmPDxaAbs", pap.dxaAbs
- {27, 0}, //"sprmPDyaAbs", pap.dyaAbs
- {28, 0}, //"sprmPDxaWidth", pap.dxaWidth
+ {26, nullptr}, //"sprmPDxaAbs", pap.dxaAbs
+ {27, nullptr}, //"sprmPDyaAbs", pap.dyaAbs
+ {28, nullptr}, //"sprmPDxaWidth", pap.dxaWidth
{29, &SwWW8ImplReader::Read_ApoPPC}, //"sprmPPc", pap.pcHorz,
//pap.pcVert
- {30, 0}, //"sprmPBrcTop10", pap.brcTop
+ {30, nullptr}, //"sprmPBrcTop10", pap.brcTop
//BRC10
- {31, 0}, //"sprmPBrcLeft10",
+ {31, nullptr}, //"sprmPBrcLeft10",
//pap.brcLeft BRC10
- {32, 0}, //"sprmPBrcBottom10",
+ {32, nullptr}, //"sprmPBrcBottom10",
//pap.brcBottom BRC10
- {33, 0}, //"sprmPBrcRight10",
+ {33, nullptr}, //"sprmPBrcRight10",
//pap.brcRight BRC10
- {34, 0}, //"sprmPBrcBetween10",
+ {34, nullptr}, //"sprmPBrcBetween10",
//pap.brcBetween BRC10
- {35, 0}, //"sprmPBrcBar10", pap.brcBar
+ {35, nullptr}, //"sprmPBrcBar10", pap.brcBar
//BRC10
- {36, 0}, //"sprmPFromText10",
+ {36, nullptr}, //"sprmPFromText10",
//pap.dxaFromText dxa
- {37, 0}, //"sprmPWr", pap.wr wr
+ {37, nullptr}, //"sprmPWr", pap.wr wr
{38, &SwWW8ImplReader::Read_Border}, //"sprmPBrcTop", pap.brcTop BRC
{39, &SwWW8ImplReader::Read_Border}, //"sprmPBrcLeft",
//pap.brcLeft BRC
@@ -5314,34 +5314,34 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//pap.brcRight BRC
{42, &SwWW8ImplReader::Read_Border}, //"sprmPBrcBetween",
//pap.brcBetween BRC
- {43, 0}, //"sprmPBrcBar", pap.brcBar
+ {43, nullptr}, //"sprmPBrcBar", pap.brcBar
//BRC word
{44, &SwWW8ImplReader::Read_Hyphenation}, //"sprmPFNoAutoHyph",
//pap.fNoAutoHyph
- {45, 0}, //"sprmPWHeightAbs",
+ {45, nullptr}, //"sprmPWHeightAbs",
//pap.wHeightAbs w
- {46, 0}, //"sprmPDcs", pap.dcs DCS
+ {46, nullptr}, //"sprmPDcs", pap.dcs DCS
{47, &SwWW8ImplReader::Read_Shade}, //"sprmPShd", pap.shd SHD
- {48, 0}, //"sprmPDyaFromText",
+ {48, nullptr}, //"sprmPDyaFromText",
//pap.dyaFromText dya
- {49, 0}, //"sprmPDxaFromText",
+ {49, nullptr}, //"sprmPDxaFromText",
//pap.dxaFromText dxa
- {50, 0}, //"sprmPFLocked", pap.fLocked
+ {50, nullptr}, //"sprmPFLocked", pap.fLocked
//0 or 1 byte
{51, &SwWW8ImplReader::Read_WidowControl}, //"sprmPFWidowControl",
//pap.fWidowControl 0 or 1 byte
- {52, 0}, //"?sprmPRuler 52",
- {53, 0}, //"??53",
- {54, 0}, //"??54",
- {55, 0}, //"??55",
- {56, 0}, //"??56",
- {57, 0}, //"??57",
- {58, 0}, //"??58",
- {59, 0}, //"??59",
- {60, 0}, //"??60",
- {61, 0}, //"??61",
- {62, 0}, //"??62",
- {63, 0}, //"??63",
+ {52, nullptr}, //"?sprmPRuler 52",
+ {53, nullptr}, //"??53",
+ {54, nullptr}, //"??54",
+ {55, nullptr}, //"??55",
+ {56, nullptr}, //"??56",
+ {57, nullptr}, //"??57",
+ {58, nullptr}, //"??58",
+ {59, nullptr}, //"??59",
+ {60, nullptr}, //"??60",
+ {61, nullptr}, //"??61",
+ {62, nullptr}, //"??62",
+ {63, nullptr}, //"??63",
{64, &SwWW8ImplReader::Read_ParaBiDi}, //"rtl bidi ?
{65, &SwWW8ImplReader::Read_CFRMarkDel}, //"sprmCFStrikeRM",
//chp.fRMarkDel 1 or 0 bit
@@ -5351,14 +5351,14 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//chp.fFieldVanish 1 or 0 bit
{68, &SwWW8ImplReader::Read_PicLoc}, //"sprmCPicLocation",
//chp.fcPic and chp.fSpec
- {69, 0}, //"sprmCIbstRMark",
+ {69, nullptr}, //"sprmCIbstRMark",
//chp.ibstRMark index into
//sttbRMark
- {70, 0}, //"sprmCDttmRMark", chp.dttm
+ {70, nullptr}, //"sprmCDttmRMark", chp.dttm
//DTTM long
- {71, 0}, //"sprmCFData", chp.fData 1 or
+ {71, nullptr}, //"sprmCFData", chp.fData 1 or
//0 bit
- {72, 0}, //"sprmCRMReason",
+ {72, nullptr}, //"sprmCRMReason",
//chp.idslRMReason an index to
//a table
{73, &SwWW8ImplReader::Read_CharSet}, //"sprmCChse", chp.fChsDiff
@@ -5367,20 +5367,20 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//chp.chSym and chp.ftcSym
{75, &SwWW8ImplReader::Read_Obj}, //"sprmCFOle2", chp.fOle2 1
//or 0 bit
- {76, 0}, //"??76",
- {77, 0}, //"??77",
- {78, 0}, //"??78",
- {79, 0}, //"??79",
+ {76, nullptr}, //"??76",
+ {77, nullptr}, //"??77",
+ {78, nullptr}, //"??78",
+ {79, nullptr}, //"??79",
{80, &SwWW8ImplReader::Read_CColl}, //"sprmCIstd", chp.istd istd,
//see stylesheet definition
//short
- {81, 0}, //"sprmCIstdPermute", chp.istd
+ {81, nullptr}, //"sprmCIstdPermute", chp.istd
//permutation vector
- {82, 0}, //"sprmCDefault", whole CHP
+ {82, nullptr}, //"sprmCDefault", whole CHP
//none variable length
- {83, 0}, //"sprmCPlain", whole CHP
+ {83, nullptr}, //"sprmCPlain", whole CHP
//none 0
- {84, 0}, //"??84",
+ {84, nullptr}, //"??84",
{85, &SwWW8ImplReader::Read_BoldUsw}, //"sprmCFBold", chp.fBold 0,1,
//128, or 129 byte
{86, &SwWW8ImplReader::Read_BoldUsw}, //"sprmCFItalic", chp.fItalic
@@ -5400,25 +5400,25 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//0,1, 128, or 129 byte
{93, &SwWW8ImplReader::Read_FontCode}, //"sprmCFtc", chp.ftc ftc word
{94, &SwWW8ImplReader::Read_Underline}, // "sprmCKul", chp.kul kul byte
- {95, 0}, //"sprmCSizePos", chp.hps,
+ {95, nullptr}, //"sprmCSizePos", chp.hps,
//chp.hpsPos 3 bytes
{96, &SwWW8ImplReader::Read_Kern}, //"sprmCDxaSpace",
//chp.dxaSpace dxa word
{97, &SwWW8ImplReader::Read_Language}, //"sprmCLid", chp.lid LID word
{98, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco", chp.ico ico byte
{99, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps", chp.hps hps word!
- {100, 0}, //"sprmCHpsInc", chp.hps byte
+ {100, nullptr}, //"sprmCHpsInc", chp.hps byte
{101, &SwWW8ImplReader::Read_SubSuperProp}, //"sprmCHpsPos", chp.hpsPos
//hps byte
- {102, 0}, //"sprmCHpsPosAdj", chp.hpsPos
+ {102, nullptr}, //"sprmCHpsPosAdj", chp.hpsPos
//hps byte
{103, &SwWW8ImplReader::Read_Majority}, //"?sprmCMajority", chp.fBold,
//chp.fItalic, chp.fSmallCaps
{104, &SwWW8ImplReader::Read_SubSuper}, //"sprmCIss", chp.iss iss byte
- {105, 0}, //"sprmCHpsNew50", chp.hps hps
+ {105, nullptr}, //"sprmCHpsNew50", chp.hps hps
//variable width, length
//always recorded as 2
- {106, 0}, //"sprmCHpsInc1", chp.hps
+ {106, nullptr}, //"sprmCHpsInc1", chp.hps
//complex variable width,
//length always recorded as 2
{107, &SwWW8ImplReader::Read_FontKern}, //"sprmCHpsKern", chp.hpsKern
@@ -5426,9 +5426,9 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
{108, &SwWW8ImplReader::Read_Majority}, //"sprmCMajority50", chp.fBold,
//chp.fItalic, chp.fSmallCaps,
// chp.fVanish, ...
- {109, 0}, //"sprmCHpsMul", chp.hps
+ {109, nullptr}, //"sprmCHpsMul", chp.hps
//percentage to grow hps short
- {110, 0}, //"sprmCCondHyhen", chp.ysri
+ {110, nullptr}, //"sprmCCondHyhen", chp.ysri
//ysri short
{111, &SwWW8ImplReader::Read_FontCode}, //ww7 font
{112, &SwWW8ImplReader::Read_FontCode}, //ww7 CJK font
@@ -5440,164 +5440,164 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
//or 0 bit
{118, &SwWW8ImplReader::Read_Obj}, //"sprmCFObj", chp.fObj 1 or 0
//bit
- {119, 0}, //"sprmPicBrcl", pic.brcl brcl
+ {119, nullptr}, //"sprmPicBrcl", pic.brcl brcl
//(see PIC structure
//definition) byte
- {120, 0}, //"sprmPicScale", pic.mx,
+ {120, nullptr}, //"sprmPicScale", pic.mx,
//pic.my, pic.dxaCropleft,
- {121, 0}, //"sprmPicBrcTop", pic.brcTop
+ {121, nullptr}, //"sprmPicBrcTop", pic.brcTop
//BRC word
- {122, 0}, //"sprmPicBrcLeft",
+ {122, nullptr}, //"sprmPicBrcLeft",
//pic.brcLeft BRC word
- {123, 0}, //"sprmPicBrcBottom",
+ {123, nullptr}, //"sprmPicBrcBottom",
//pic.brcBottom BRC word
- {124, 0}, //"sprmPicBrcRight",
+ {124, nullptr}, //"sprmPicBrcRight",
//pic.brcRight BRC word
- {125, 0}, //"??125",
- {126, 0}, //"??126",
- {127, 0}, //"??127",
- {128, 0}, //"??128",
- {129, 0}, //"??129",
- {130, 0}, //"??130",
- {131, 0}, //"sprmSScnsPgn", sep.cnsPgn
+ {125, nullptr}, //"??125",
+ {126, nullptr}, //"??126",
+ {127, nullptr}, //"??127",
+ {128, nullptr}, //"??128",
+ {129, nullptr}, //"??129",
+ {130, nullptr}, //"??130",
+ {131, nullptr}, //"sprmSScnsPgn", sep.cnsPgn
//cns byte
- {132, 0}, //"sprmSiHeadingPgn",
+ {132, nullptr}, //"sprmSiHeadingPgn",
//sep.iHeadingPgn heading
//number level byte
{133, &SwWW8ImplReader::Read_OLST}, //"sprmSOlstAnm", sep.olstAnm
//OLST variable length
- {134, 0}, //"??135",
- {135, 0}, //"??135",
- {136, 0}, //"sprmSDxaColWidth",
+ {134, nullptr}, //"??135",
+ {135, nullptr}, //"??135",
+ {136, nullptr}, //"sprmSDxaColWidth",
//sep.rgdxaColWidthSpacing
//complex 3 bytes
- {137, 0}, //"sprmSDxaColSpacing",
+ {137, nullptr}, //"sprmSDxaColSpacing",
//sep.rgdxaColWidthSpacing
//complex 3 bytes
- {138, 0}, //"sprmSFEvenlySpaced",
+ {138, nullptr}, //"sprmSFEvenlySpaced",
//sep.fEvenlySpaced 1 or 0 byte
- {139, 0}, //"sprmSFProtected",
+ {139, nullptr}, //"sprmSFProtected",
//sep.fUnlocked 1 or 0 byte
- {140, 0}, //"sprmSDmBinFirst",
+ {140, nullptr}, //"sprmSDmBinFirst",
//sep.dmBinFirst word
- {141, 0}, //"sprmSDmBinOther",
+ {141, nullptr}, //"sprmSDmBinOther",
//sep.dmBinOther word
- {142, 0}, //"sprmSBkc", sep.bkc bkc
+ {142, nullptr}, //"sprmSBkc", sep.bkc bkc
//byte BreakCode
- {143, 0}, //"sprmSFTitlePage",
+ {143, nullptr}, //"sprmSFTitlePage",
//sep.fTitlePage 0 or 1 byte
- {144, 0}, //"sprmSCcolumns", sep.ccolM1
+ {144, nullptr}, //"sprmSCcolumns", sep.ccolM1
//# of cols - 1 word
- {145, 0}, //"sprmSDxaColumns",
+ {145, nullptr}, //"sprmSDxaColumns",
//sep.dxaColumns dxa word
- {146, 0}, //"sprmSFAutoPgn",
+ {146, nullptr}, //"sprmSFAutoPgn",
//sep.fAutoPgn obsolete byte
- {147, 0}, //"sprmSNfcPgn", sep.nfcPgn
+ {147, nullptr}, //"sprmSNfcPgn", sep.nfcPgn
//nfc byte
- {148, 0}, //"sprmSDyaPgn", sep.dyaPgn
+ {148, nullptr}, //"sprmSDyaPgn", sep.dyaPgn
//dya short
- {149, 0}, //"sprmSDxaPgn", sep.dxaPgn
+ {149, nullptr}, //"sprmSDxaPgn", sep.dxaPgn
//dya short
- {150, 0}, //"sprmSFPgnRestart",
+ {150, nullptr}, //"sprmSFPgnRestart",
//sep.fPgnRestart 0 or 1 byte
- {151, 0}, //"sprmSFEndnote", sep.fEndnote
+ {151, nullptr}, //"sprmSFEndnote", sep.fEndnote
//0 or 1 byte
- {152, 0}, //"sprmSLnc", sep.lnc lnc byte
- {153, 0}, //"sprmSGprfIhdt", sep.grpfIhdt
+ {152, nullptr}, //"sprmSLnc", sep.lnc lnc byte
+ {153, nullptr}, //"sprmSGprfIhdt", sep.grpfIhdt
//grpfihdt byte
- {154, 0}, //"sprmSNLnnMod", sep.nLnnMod
+ {154, nullptr}, //"sprmSNLnnMod", sep.nLnnMod
//non-neg int. word
- {155, 0}, //"sprmSDxaLnn", sep.dxaLnn
+ {155, nullptr}, //"sprmSDxaLnn", sep.dxaLnn
//dxa word
- {156, 0}, //"sprmSDyaHdrTop",
+ {156, nullptr}, //"sprmSDyaHdrTop",
//sep.dyaHdrTop dya word
- {157, 0}, //"sprmSDyaHdrBottom",
+ {157, nullptr}, //"sprmSDyaHdrBottom",
//sep.dyaHdrBottom dya word
- {158, 0}, //"sprmSLBetween",
+ {158, nullptr}, //"sprmSLBetween",
//sep.fLBetween 0 or 1 byte
- {159, 0}, //"sprmSVjc", sep.vjc vjc byte
- {160, 0}, //"sprmSLnnMin", sep.lnnMin
+ {159, nullptr}, //"sprmSVjc", sep.vjc vjc byte
+ {160, nullptr}, //"sprmSLnnMin", sep.lnnMin
//lnn word
- {161, 0}, //"sprmSPgnStart", sep.pgnStart
+ {161, nullptr}, //"sprmSPgnStart", sep.pgnStart
//pgn word
- {162, 0}, //"sprmSBOrientation",
+ {162, nullptr}, //"sprmSBOrientation",
//sep.dmOrientPage dm byte
- {163, 0}, //"?SprmSBCustomize 163", ?
- {164, 0}, //"sprmSXaPage", sep.xaPage xa
+ {163, nullptr}, //"?SprmSBCustomize 163", ?
+ {164, nullptr}, //"sprmSXaPage", sep.xaPage xa
//word
- {165, 0}, //"sprmSYaPage", sep.yaPage ya
+ {165, nullptr}, //"sprmSYaPage", sep.yaPage ya
//word
- {166, 0}, //"sprmSDxaLeft", sep.dxaLeft
+ {166, nullptr}, //"sprmSDxaLeft", sep.dxaLeft
//dxa word
- {167, 0}, //"sprmSDxaRight", sep.dxaRight
+ {167, nullptr}, //"sprmSDxaRight", sep.dxaRight
//dxa word
- {168, 0}, //"sprmSDyaTop", sep.dyaTop //dya word
- {169, 0}, //"sprmSDyaBottom",
+ {168, nullptr}, //"sprmSDyaTop", sep.dyaTop //dya word
+ {169, nullptr}, //"sprmSDyaBottom",
//sep.dyaBottom dya word
- {170, 0}, //"sprmSDzaGutter",
+ {170, nullptr}, //"sprmSDzaGutter",
//sep.dzaGutter dza word
- {171, 0}, //"sprmSDMPaperReq",
+ {171, nullptr}, //"sprmSDMPaperReq",
//sep.dmPaperReq dm word
- {172, 0}, //"??172",
- {173, 0}, //"??173",
- {174, 0}, //"??174",
- {175, 0}, //"??175",
- {176, 0}, //"??176",
- {177, 0}, //"??177",
- {178, 0}, //"??178",
- {179, 0}, //"??179",
- {180, 0}, //"??180",
- {181, 0}, //"??181",
- {182, 0}, //"sprmTJc", tap.jc jc word
+ {172, nullptr}, //"??172",
+ {173, nullptr}, //"??173",
+ {174, nullptr}, //"??174",
+ {175, nullptr}, //"??175",
+ {176, nullptr}, //"??176",
+ {177, nullptr}, //"??177",
+ {178, nullptr}, //"??178",
+ {179, nullptr}, //"??179",
+ {180, nullptr}, //"??180",
+ {181, nullptr}, //"??181",
+ {182, nullptr}, //"sprmTJc", tap.jc jc word
//(low order byte is
//significant)
- {183, 0}, //"sprmTDxaLeft",
+ {183, nullptr}, //"sprmTDxaLeft",
//tap.rgdxaCenter dxa word
- {184, 0}, //"sprmTDxaGapHalf",
+ {184, nullptr}, //"sprmTDxaGapHalf",
//tap.dxaGapHalf,
//tap.rgdxaCenter dxa word
- {185, 0}, //"sprmTFCantSplit"
+ {185, nullptr}, //"sprmTFCantSplit"
//tap.fCantSplit 1 or 0 byte
- {186, 0}, //"sprmTTableHeader",
+ {186, nullptr}, //"sprmTTableHeader",
//tap.fTableHeader 1 or 0 byte
- {187, 0}, //"sprmTTableBorders",
+ {187, nullptr}, //"sprmTTableBorders",
//tap.rgbrcTable complex
//12 bytes
- {188, 0}, //"sprmTDefTable10",
+ {188, nullptr}, //"sprmTDefTable10",
//tap.rgdxaCenter, tap.rgtc
//complex variable length
- {189, 0}, //"sprmTDyaRowHeight",
+ {189, nullptr}, //"sprmTDyaRowHeight",
//tap.dyaRowHeight dya word
- {190, 0}, //"?sprmTDefTable", tap.rgtc
+ {190, nullptr}, //"?sprmTDefTable", tap.rgtc
//complex
- {191, 0}, //"?sprmTDefTableShd",
+ {191, nullptr}, //"?sprmTDefTableShd",
//tap.rgshd complex
- {192, 0}, //"sprmTTlp", tap.tlp TLP
+ {192, nullptr}, //"sprmTTlp", tap.tlp TLP
//4 bytes
- {193, 0}, //"sprmTSetBrc",
+ {193, nullptr}, //"sprmTSetBrc",
//tap.rgtc[].rgbrc complex
//5 bytes
- {194, 0}, //"sprmTInsert",
+ {194, nullptr}, //"sprmTInsert",
//tap.rgdxaCenter,
//tap.rgtc complex 4 bytes
- {195, 0}, //"sprmTDelete",
+ {195, nullptr}, //"sprmTDelete",
//tap.rgdxaCenter,
//tap.rgtc complex word
- {196, 0}, //"sprmTDxaCol",
+ {196, nullptr}, //"sprmTDxaCol",
//tap.rgdxaCenter complex
//4 bytes
- {197, 0}, //"sprmTMerge",
+ {197, nullptr}, //"sprmTMerge",
//tap.fFirstMerged,
//tap.fMerged complex word
- {198, 0}, //"sprmTSplit",
+ {198, nullptr}, //"sprmTSplit",
//tap.fFirstMerged,
//tap.fMerged complex word
- {199, 0}, //"sprmTSetBrc10",
+ {199, nullptr}, //"sprmTSetBrc10",
//tap.rgtc[].rgbrc complex
//5 bytes
- {200, 0}, //"sprmTSetShd", tap.rgshd
+ {200, nullptr}, //"sprmTSetShd", tap.rgshd
//complex 4 bytes
- {207, 0}, //dunno
+ {207, nullptr}, //dunno
};
static wwSprmDispatcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
@@ -5608,20 +5608,20 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{
static SprmReadInfo aSprms[] =
{
- {0, 0}, // "0" Default bzw. Error
+ {0, nullptr}, // "0" Default bzw. Error
{0x4600, &SwWW8ImplReader::Read_StyleCode}, //"sprmPIstd" pap.istd;istd
//(style code);short;
- {0xC601, 0}, //"sprmPIstdPermute" pap.istd;
+ {0xC601, nullptr}, //"sprmPIstdPermute" pap.istd;
//permutation vector;
//variable length;
- {0x2602, 0}, //"sprmPIncLvl" pap.istd,
+ {0x2602, nullptr}, //"sprmPIncLvl" pap.istd,
//pap.lvl;difference between
//istd of base PAP and istd of
//PAP to be produced; byte;
{0x2403, &SwWW8ImplReader::Read_Justify}, //"sprmPJc" pap.jc;jc
//(justification);byte;
- {0x2404, 0}, //"sprmPFSideBySide"
+ {0x2404, nullptr}, //"sprmPFSideBySide"
//pap.fSideBySide;0 or 1;byte;
{0x2405, &SwWW8ImplReader::Read_KeepLines}, //"sprmPFKeep" pap.fKeep;0 or
//1;byte;
@@ -5630,9 +5630,9 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{0x2407, &SwWW8ImplReader::Read_BreakBefore},//"sprmPFPageBreakBefore"
//pap.fPageBreakBefore;0 or 1;
//byte;
- {0x2408, 0}, //"sprmPBrcl" pap.brcl;brcl;
+ {0x2408, nullptr}, //"sprmPBrcl" pap.brcl;brcl;
//byte;
- {0x2409, 0}, //"sprmPBrcp" pap.brcp;brcp;
+ {0x2409, nullptr}, //"sprmPBrcp" pap.brcp;brcp;
//byte;
{0x260A, &SwWW8ImplReader::Read_ListLevel}, //"sprmPIlvl" pap.ilvl;ilvl;
//byte;
@@ -5648,7 +5648,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//dxa;word;
{0x840F, &SwWW8ImplReader::Read_LR}, //Apparently Word 97 version of "sprmPDxaLeft" pap.dxaLeft;
//dxa;word;
- {0x4610, 0}, //"sprmPNest" pap.dxaLeft;
+ {0x4610, nullptr}, //"sprmPNest" pap.dxaLeft;
//dxa;word;
{0x8411, &SwWW8ImplReader::Read_LR}, //Word 97 version of "sprmPDxaLeft1" pap.dxaLeft1;
//dxa;word;
@@ -5662,36 +5662,36 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//pap.dyaBefore;dya;word;
{0xA414, &SwWW8ImplReader::Read_UL}, //"sprmPDyaAfter" pap.dyaAfter;
//dya;word;
- {0xC615, 0}, //"sprmPChgTabs" pap.itbdMac,
+ {0xC615, nullptr}, //"sprmPChgTabs" pap.itbdMac,
//pap.rgdxaTab, pap.rgtbd;
//complex;variable length;
- {0x2416, 0}, //"sprmPFInTable" pap.fInTable;
+ {0x2416, nullptr}, //"sprmPFInTable" pap.fInTable;
//0 or 1;byte;
{0x2417, &SwWW8ImplReader::Read_TabRowEnd}, //"sprmPFTtp" pap.fTtp;0 or 1;
//byte;
- {0x8418, 0}, //"sprmPDxaAbs" pap.dxaAbs;dxa;
+ {0x8418, nullptr}, //"sprmPDxaAbs" pap.dxaAbs;dxa;
//word;
- {0x8419, 0}, //"sprmPDyaAbs" pap.dyaAbs;dya;
+ {0x8419, nullptr}, //"sprmPDyaAbs" pap.dyaAbs;dya;
//word;
- {0x841A, 0}, //"sprmPDxaWidth" pap.dxaWidth;
+ {0x841A, nullptr}, //"sprmPDxaWidth" pap.dxaWidth;
//dxa;word;
{0x261B, &SwWW8ImplReader::Read_ApoPPC}, //"sprmPPc" pap.pcHorz,
//pap.pcVert;complex;byte;
- {0x461C, 0}, //"sprmPBrcTop10" pap.brcTop;
+ {0x461C, nullptr}, //"sprmPBrcTop10" pap.brcTop;
//BRC10;word;
- {0x461D, 0}, //"sprmPBrcLeft10" pap.brcLeft;
+ {0x461D, nullptr}, //"sprmPBrcLeft10" pap.brcLeft;
//BRC10;word;
- {0x461E, 0}, //"sprmPBrcBottom10"
+ {0x461E, nullptr}, //"sprmPBrcBottom10"
//pap.brcBottom;BRC10;word;
- {0x461F, 0}, //"sprmPBrcRight10"
+ {0x461F, nullptr}, //"sprmPBrcRight10"
//pap.brcRight;BRC10;word;
- {0x4620, 0}, //"sprmPBrcBetween10"
+ {0x4620, nullptr}, //"sprmPBrcBetween10"
//pap.brcBetween;BRC10;word;
- {0x4621, 0}, //"sprmPBrcBar10" pap.brcBar;
+ {0x4621, nullptr}, //"sprmPBrcBar10" pap.brcBar;
//BRC10;word;
- {0x4622, 0}, //"sprmPDxaFromText10"
+ {0x4622, nullptr}, //"sprmPDxaFromText10"
//pap.dxaFromText;dxa;word;
- {0x2423, 0}, //"sprmPWr" pap.wr;wr;byte;
+ {0x2423, nullptr}, //"sprmPWr" pap.wr;wr;byte;
{0x6424, &SwWW8ImplReader::Read_Border}, //"sprmPBrcTop80" pap.brcTop;BRC;
//long;
{0x6425, &SwWW8ImplReader::Read_Border}, //"sprmPBrcLeft80" pap.brcLeft;
@@ -5702,68 +5702,68 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//BRC;long;
{0x6428, &SwWW8ImplReader::Read_Border}, //"sprmPBrcBetween80"
//pap.brcBetween;BRC;long;
- {0x6629, 0}, //"sprmPBrcBar" pap.brcBar;BRC;
+ {0x6629, nullptr}, //"sprmPBrcBar" pap.brcBar;BRC;
//long;
{0x242A, &SwWW8ImplReader::Read_Hyphenation},//"sprmPFNoAutoHyph"
//pap.fNoAutoHyph;0 or 1;byte;
- {0x442B, 0}, //"sprmPWHeightAbs"
+ {0x442B, nullptr}, //"sprmPWHeightAbs"
//pap.wHeightAbs;w;word;
- {0x442C, 0}, //"sprmPDcs" pap.dcs;DCS;short;
+ {0x442C, nullptr}, //"sprmPDcs" pap.dcs;DCS;short;
{0x442D, &SwWW8ImplReader::Read_Shade}, //"sprmPShd" pap.shd;SHD;word;
- {0x842E, 0}, //"sprmPDyaFromText"
+ {0x842E, nullptr}, //"sprmPDyaFromText"
//pap.dyaFromText;dya;word;
- {0x842F, 0}, //"sprmPDxaFromText"
+ {0x842F, nullptr}, //"sprmPDxaFromText"
//pap.dxaFromText;dxa;word;
- {0x2430, 0}, //"sprmPFLocked" pap.fLocked;
+ {0x2430, nullptr}, //"sprmPFLocked" pap.fLocked;
//0 or 1;byte;
{0x2431, &SwWW8ImplReader::Read_WidowControl},//"sprmPFWidowControl"
//pap.fWidowControl;0 or 1;byte
- {0xC632, 0}, //"sprmPRuler" variable length;
+ {0xC632, nullptr}, //"sprmPRuler" variable length;
{0x2433, &SwWW8ImplReader::Read_BoolItem}, //"sprmPFKinsoku" pap.fKinsoku;
//0 or 1;byte;
- {0x2434, 0}, //"sprmPFWordWrap"
+ {0x2434, nullptr}, //"sprmPFWordWrap"
//pap.fWordWrap;0 or 1;byte;
{0x2435, &SwWW8ImplReader::Read_BoolItem}, //"sprmPFOverflowPunct"
//pap.fOverflowPunct; 0 or 1;
//byte;
- {0x2436, 0}, //"sprmPFTopLinePunct"
+ {0x2436, nullptr}, //"sprmPFTopLinePunct"
//pap.fTopLinePunct;0 or 1;byte
{0x2437, &SwWW8ImplReader::Read_BoolItem}, //"sprmPFAutoSpaceDE"
//pap.fAutoSpaceDE;0 or 1;byte;
- {0x2438, 0}, //"sprmPFAutoSpaceDN"
+ {0x2438, nullptr}, //"sprmPFAutoSpaceDN"
//pap.fAutoSpaceDN;0 or 1;byte;
{NS_sprm::LN_PWAlignFont, &SwWW8ImplReader::Read_AlignFont}, //"sprmPWAlignFont"
//pap.wAlignFont;iFa; word;
- {0x443A, 0}, //"sprmPFrameTextFlow"
+ {0x443A, nullptr}, //"sprmPFrameTextFlow"
//pap.fVertical pap.fBackward
//pap.fRotateFont;complex; word
- {0x243B, 0}, //"sprmPISnapBaseLine" obsolete
+ {0x243B, nullptr}, //"sprmPISnapBaseLine" obsolete
//not applicable in Word97
//and later versions;;byte;
{0xC63E, &SwWW8ImplReader::Read_ANLevelDesc},//"sprmPAnld" pap.anld;;
//variable length;
- {0xC63F, 0}, //"sprmPPropRMark"
+ {0xC63F, nullptr}, //"sprmPPropRMark"
//pap.fPropRMark;complex;
//variable length;
{0x2640, &SwWW8ImplReader::Read_POutLvl}, //"sprmPOutLvl" pap.lvl;has no
//effect if pap.istd is < 1 or
//is > 9;byte;
{0x2441, &SwWW8ImplReader::Read_ParaBiDi}, //"sprmPFBiDi" ;;byte;
- {0x2443, 0}, //"sprmPFNumRMIns"
+ {0x2443, nullptr}, //"sprmPFNumRMIns"
//pap.fNumRMIns;1 or 0;bit;
- {0x2444, 0}, //"sprmPCrLf" ;;byte;
- {0xC645, 0}, //"sprmPNumRM" pap.numrm;;
+ {0x2444, nullptr}, //"sprmPCrLf" ;;byte;
+ {0xC645, nullptr}, //"sprmPNumRM" pap.numrm;;
//variable length;
- {0x6645, 0}, //"sprmPHugePapx" ;fc in the
+ {0x6645, nullptr}, //"sprmPHugePapx" ;fc in the
//data stream to locate the
//huge grpprl; long;
- {0x6646, 0}, //"sprmPHugePapx" ;fc in the
+ {0x6646, nullptr}, //"sprmPHugePapx" ;fc in the
//data stream to locate the
//huge grpprl; long;
{0x2447, &SwWW8ImplReader::Read_UsePgsuSettings},//"sprmPFUsePgsuSettings"
//pap.fUsePgsuSettings;1 or 0;
//byte;
- {0x2448, 0}, //"sprmPFAdjustRight"
+ {0x2448, nullptr}, //"sprmPFAdjustRight"
//pap.fAdjustRight;1 or 0;byte;
{0x0800, &SwWW8ImplReader::Read_CFRMarkDel}, //"sprmCFRMarkDel"
//chp.fRMarkDel;1 or 0;bit;
@@ -5775,14 +5775,14 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//and chp.fSpec;variable
//length, length recorded is
//always 4;
- {0x4804, 0}, //"sprmCIbstRMark"
+ {0x4804, nullptr}, //"sprmCIbstRMark"
//chp.ibstRMark;index into
//sttbRMark;short;
- {0x6805, 0}, //"sprmCDttmRMark"
+ {0x6805, nullptr}, //"sprmCDttmRMark"
//chp.dttmRMark;DTTM;long;
- {0x0806, 0}, //"sprmCFData" chp.fData;1 or
+ {0x0806, nullptr}, //"sprmCFData" chp.fData;1 or
//0;bit;
- {0x4807, 0}, //"sprmCIdslRMark"
+ {0x4807, nullptr}, //"sprmCIdslRMark"
//chp.idslRMReason;an index to
//a table of strings defined in
//Word 6.0 executables;short;
@@ -5807,12 +5807,12 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//0x2A10, ? ? ?, //"sprmCFFtcAsciSymb"
{0x4A30, &SwWW8ImplReader::Read_CColl}, //"sprmCIstd" chp.istd;istd,
//short;
- {0xCA31, 0}, //"sprmCIstdPermute" chp.istd;
+ {0xCA31, nullptr}, //"sprmCIstdPermute" chp.istd;
//permutation vector; variable
//length;
- {0x2A32, 0}, //"sprmCDefault" whole CHP;none
+ {0x2A32, nullptr}, //"sprmCDefault" whole CHP;none
//;variable length;
- {0x2A33, 0}, //"sprmCPlain" whole CHP;none;
+ {0x2A33, nullptr}, //"sprmCPlain" whole CHP;none;
//Laenge: 0;
{0x2A34, &SwWW8ImplReader::Read_Emphasis}, //"sprmCKcd"
{0x0835, &SwWW8ImplReader::Read_BoldUsw}, //"sprmCFBold" chp.fBold;0,1,
@@ -5836,7 +5836,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//used internally, never
//stored in file;word;
{0x2A3E, &SwWW8ImplReader::Read_Underline}, //"sprmCKul" chp.kul;kul;byte;
- {0xEA3F, 0}, //"sprmCSizePos" chp.hps,
+ {0xEA3F, nullptr}, //"sprmCSizePos" chp.hps,
//chp.hpsPos;3 bytes;
{0x8840, &SwWW8ImplReader::Read_Kern}, //"sprmCDxaSpace" chp.dxaSpace;
//dxa;word;
@@ -5844,10 +5844,10 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//internally never stored;word;
{0x2A42, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco" chp.ico;ico;byte;
{0x4A43, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps" chp.hps;hps;byte;
- {0x2A44, 0}, //"sprmCHpsInc" chp.hps;byte;
+ {0x2A44, nullptr}, //"sprmCHpsInc" chp.hps;byte;
{0x4845, &SwWW8ImplReader::Read_SubSuperProp},//"sprmCHpsPos" chp.hpsPos;
//hps; byte;
- {0x2A46, 0}, //"sprmCHpsPosAdj" chp.hpsPos;
+ {0x2A46, nullptr}, //"sprmCHpsPosAdj" chp.hpsPos;
//hps; byte;
{0xCA47, &SwWW8ImplReader::Read_Majority}, //"sprmCMajority" chp.fBold,
//chp.fItalic, chp.fSmallCaps,
@@ -5859,10 +5859,10 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//length, length byte plus
//size of following grpprl;
{0x2A48, &SwWW8ImplReader::Read_SubSuper}, //"sprmCIss" chp.iss;iss;byte;
- {0xCA49, 0}, //"sprmCHpsNew50" chp.hps;hps;
+ {0xCA49, nullptr}, //"sprmCHpsNew50" chp.hps;hps;
//variable width, length
//always recorded as 2;
- {0xCA4A, 0}, //"sprmCHpsInc1" chp.hps;
+ {0xCA4A, nullptr}, //"sprmCHpsInc1" chp.hps;
//complex; variable width,
//length always recorded as 2;
{0x484B, &SwWW8ImplReader::Read_FontKern}, //"sprmCHpsKern" chp.hpsKern;
@@ -5874,9 +5874,9 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//chp.hpsPos, chp.kul,
//chp.dxaSpace, chp.ico;
//complex; variable length;
- {0x4A4D, 0}, //"sprmCHpsMul" chp.hps;
+ {0x4A4D, nullptr}, //"sprmCHpsMul" chp.hps;
//percentage to grow hps;short;
- {0x484E, 0}, //"sprmCYsri" chp.ysri;ysri;
+ {0x484E, nullptr}, //"sprmCYsri" chp.ysri;ysri;
//short;
{0x4A4F, &SwWW8ImplReader::Read_FontCode}, //"sprmCRgFtc0" chp.rgftc[0];
//ftc for ASCII text; short;
@@ -5905,36 +5905,36 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{0x2859, &SwWW8ImplReader::Read_TextAnim}, //"sprmCSfxText" chp.sfxtText;
//text animation;byte;
{0x085A, &SwWW8ImplReader::Read_Bidi}, //"sprmCFBiDi"
- {0x085B, 0}, //"sprmCFDiacColor"
+ {0x085B, nullptr}, //"sprmCFDiacColor"
{0x085C, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFBoldBi"
{0x085D, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFItalicBi"
{0x4A5E, &SwWW8ImplReader::Read_FontCode}, //"sprmCFtcBi"
{0x485F, &SwWW8ImplReader::Read_Language}, //"sprmCLidBi"
//0x4A60, ? ? ?, //"sprmCIcoBi",
{0x4A61, &SwWW8ImplReader::Read_FontSize}, //"sprmCHpsBi"
- {0xCA62, 0}, //"sprmCDispFieldRMark"
+ {0xCA62, nullptr}, //"sprmCDispFieldRMark"
//chp.fDispFieldRMark,
//chp.ibstDispFieldRMark,
//chp.dttmDispFieldRMark ;
//Complex;variable length
//always recorded as 39 bytes;
- {0x4863, 0}, //"sprmCIbstRMarkDel"
+ {0x4863, nullptr}, //"sprmCIbstRMarkDel"
//chp.ibstRMarkDel;index into
//sttbRMark;short;
- {NS_sprm::LN_CDttmRMarkDel, 0},
+ {NS_sprm::LN_CDttmRMarkDel, nullptr},
//chp.dttmRMarkDel;DTTM;long;
{0x6865, &SwWW8ImplReader::Read_CharBorder}, //"sprmCBrc80" chp.brc;BRC;long;
{0xca72, &SwWW8ImplReader::Read_CharBorder}, //"sprmCBrc" chp.brc;BRC;long;
{0x4866, &SwWW8ImplReader::Read_CharShadow}, //"sprmCShd80" chp.shd;SHD;short;
- {0x4867, 0}, //"sprmCIdslRMarkDel"
+ {0x4867, nullptr}, //"sprmCIdslRMarkDel"
//chp.idslRMReasonDel;an index
//to a table of strings
//defined in Word 6.0
//executables;short;
- {0x0868, 0}, //"sprmCFUsePgsuSettings"
+ {0x0868, nullptr}, //"sprmCFUsePgsuSettings"
//chp.fUsePgsuSettings; 1 or 0;
//bit;
- {0x486B, 0}, //"sprmCCpg" ;;word;
+ {0x486B, nullptr}, //"sprmCCpg" ;;word;
{0x486D, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid0_80" chp.rglid[0];
//LID: for non-Far East text;
//word;
@@ -5942,102 +5942,102 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//LID: for Far East text;word;
{0x286F, &SwWW8ImplReader::Read_IdctHint}, //"sprmCIdctHint" chp.idctHint;
//IDCT: byte;
- {0x2E00, 0}, //"sprmPicBrcl" pic.brcl;brcl
+ {0x2E00, nullptr}, //"sprmPicBrcl" pic.brcl;brcl
//(see PIC structure
//definition);byte;
- {0xCE01, 0}, //"sprmPicScale" pic.mx,
+ {0xCE01, nullptr}, //"sprmPicScale" pic.mx,
//pic.my, pic.dxaCropleft,
//pic.dyaCropTop
//pic.dxaCropRight,
//pic.dyaCropBottom;Complex;
//length byte plus 12 bytes;
- {0x6C02, 0}, //"sprmPicBrcTop80" pic.brcTop;
+ {0x6C02, nullptr}, //"sprmPicBrcTop80" pic.brcTop;
//BRC;long;
- {0x6C03, 0}, //"sprmPicBrcLeft80" pic.brcLeft;
+ {0x6C03, nullptr}, //"sprmPicBrcLeft80" pic.brcLeft;
//BRC;long;
- {0x6C04, 0}, //"sprmPicBrcBottom80"
+ {0x6C04, nullptr}, //"sprmPicBrcBottom80"
//pic.brcBottom;BRC;long;
- {0x6C05, 0}, //"sprmPicBrcRight80"
+ {0x6C05, nullptr}, //"sprmPicBrcRight80"
//pic.brcRight;BRC;long;
- {0x3000, 0}, //"sprmScnsPgn" sep.cnsPgn;cns;
+ {0x3000, nullptr}, //"sprmScnsPgn" sep.cnsPgn;cns;
//byte;
- {0x3001, 0}, //"sprmSiHeadingPgn"
+ {0x3001, nullptr}, //"sprmSiHeadingPgn"
//sep.iHeadingPgn;heading
//number level;byte;
{0xD202, &SwWW8ImplReader::Read_OLST}, //"sprmSOlstAnm" sep.olstAnm;
//OLST;variable length;
- {0xF203, 0}, //"sprmSDxaColWidth"
+ {0xF203, nullptr}, //"sprmSDxaColWidth"
//sep.rgdxaColWidthSpacing;
//complex; 3 bytes;
- {0xF204, 0}, //"sprmSDxaColSpacing"
+ {0xF204, nullptr}, //"sprmSDxaColSpacing"
//sep.rgdxaColWidthSpacing;
//complex; 3 bytes;
- {0x3005, 0}, //"sprmSFEvenlySpaced"
+ {0x3005, nullptr}, //"sprmSFEvenlySpaced"
//sep.fEvenlySpaced; 1 or 0;
//byte;
- {0x3006, 0}, //"sprmSFProtected"
+ {0x3006, nullptr}, //"sprmSFProtected"
//sep.fUnlocked;1 or 0;byte;
- {0x5007, 0}, //"sprmSDmBinFirst"
+ {0x5007, nullptr}, //"sprmSDmBinFirst"
//sep.dmBinFirst;;word;
- {0x5008, 0}, //"sprmSDmBinOther"
+ {0x5008, nullptr}, //"sprmSDmBinOther"
//sep.dmBinOther;;word;
- {0x3009, 0}, //"sprmSBkc" sep.bkc;bkc;byte;
- {0x300A, 0}, //"sprmSFTitlePage"
+ {0x3009, nullptr}, //"sprmSBkc" sep.bkc;bkc;byte;
+ {0x300A, nullptr}, //"sprmSFTitlePage"
//sep.fTitlePage;0 or 1;byte;
- {0x500B, 0}, //"sprmSCcolumns" sep.ccolM1;
+ {0x500B, nullptr}, //"sprmSCcolumns" sep.ccolM1;
//# of cols - 1;word;
- {0x900C, 0}, //"sprmSDxaColumns"
+ {0x900C, nullptr}, //"sprmSDxaColumns"
//sep.dxaColumns;dxa;word;
- {0x300D, 0}, //"sprmSFAutoPgn" sep.fAutoPgn;
+ {0x300D, nullptr}, //"sprmSFAutoPgn" sep.fAutoPgn;
//obsolete;byte;
- {0x300E, 0}, //"sprmSNfcPgn" sep.nfcPgn;nfc;
+ {0x300E, nullptr}, //"sprmSNfcPgn" sep.nfcPgn;nfc;
//byte;
- {0xB00F, 0}, //"sprmSDyaPgn" sep.dyaPgn;dya;
+ {0xB00F, nullptr}, //"sprmSDyaPgn" sep.dyaPgn;dya;
//short;
- {0xB010, 0}, //"sprmSDxaPgn" sep.dxaPgn;dya;
+ {0xB010, nullptr}, //"sprmSDxaPgn" sep.dxaPgn;dya;
//short;
- {0x3011, 0}, //"sprmSFPgnRestart"
+ {0x3011, nullptr}, //"sprmSFPgnRestart"
//sep.fPgnRestart;0 or 1;byte;
- {0x3012, 0}, //"sprmSFEndnote" sep.fEndnote;
+ {0x3012, nullptr}, //"sprmSFEndnote" sep.fEndnote;
//0 or 1;byte;
- {0x3013, 0}, //"sprmSLnc" sep.lnc;lnc;byte;
- {0x3014, 0}, //"sprmSGprfIhdt" sep.grpfIhdt;
+ {0x3013, nullptr}, //"sprmSLnc" sep.lnc;lnc;byte;
+ {0x3014, nullptr}, //"sprmSGprfIhdt" sep.grpfIhdt;
//grpfihdt; byte;
- {0x5015, 0}, //"sprmSNLnnMod" sep.nLnnMod;
+ {0x5015, nullptr}, //"sprmSNLnnMod" sep.nLnnMod;
//non-neg int.;word;
- {0x9016, 0}, //"sprmSDxaLnn" sep.dxaLnn;dxa;
+ {0x9016, nullptr}, //"sprmSDxaLnn" sep.dxaLnn;dxa;
//word;
- {0xB017, 0}, //"sprmSDyaHdrTop"
+ {0xB017, nullptr}, //"sprmSDyaHdrTop"
//sep.dyaHdrTop;dya;word;
- {0xB018, 0}, //"sprmSDyaHdrBottom"
+ {0xB018, nullptr}, //"sprmSDyaHdrBottom"
//sep.dyaHdrBottom;dya;word;
- {0x3019, 0}, //"sprmSLBetween"
+ {0x3019, nullptr}, //"sprmSLBetween"
//sep.fLBetween;0 or 1;byte;
{0x301A, &SwWW8ImplReader::Read_TextVerticalAdjustment}, //"sprmSVjc" sep.vjc;vjc;byte;
- {0x501B, 0}, //"sprmSLnnMin" sep.lnnMin;lnn;
+ {0x501B, nullptr}, //"sprmSLnnMin" sep.lnnMin;lnn;
//word;
- {0x501C, 0}, //"sprmSPgnStart" sep.pgnStart;
+ {0x501C, nullptr}, //"sprmSPgnStart" sep.pgnStart;
//pgn;word;
- {0x301D, 0}, //"sprmSBOrientation"
+ {0x301D, nullptr}, //"sprmSBOrientation"
//sep.dmOrientPage;dm;byte;
//0x301E, ? ? ?, //"sprmSBCustomize"
- {0xB01F, 0}, //"sprmSXaPage" sep.xaPage;xa;
+ {0xB01F, nullptr}, //"sprmSXaPage" sep.xaPage;xa;
//word;
- {0xB020, 0}, //"sprmSYaPage" sep.yaPage;ya;
+ {0xB020, nullptr}, //"sprmSYaPage" sep.yaPage;ya;
//word;
- {0x2205, 0}, //"sprmSDxaLeft" sep.dxaLeft;
+ {0x2205, nullptr}, //"sprmSDxaLeft" sep.dxaLeft;
//dxa;word;
- {0xB022, 0}, //"sprmSDxaRight" sep.dxaRight;
+ {0xB022, nullptr}, //"sprmSDxaRight" sep.dxaRight;
//dxa;word;
- {0x9023, 0}, //"sprmSDyaTop" sep.dyaTop;dya;
+ {0x9023, nullptr}, //"sprmSDyaTop" sep.dyaTop;dya;
//word;
- {0x9024, 0}, //"sprmSDyaBottom"
+ {0x9024, nullptr}, //"sprmSDyaBottom"
//sep.dyaBottom;dya;word;
- {0xB025, 0}, //"sprmSDzaGutter"
+ {0xB025, nullptr}, //"sprmSDzaGutter"
//sep.dzaGutter;dza;word;
- {0x5026, 0}, //"sprmSDmPaperReq"
+ {0x5026, nullptr}, //"sprmSDmPaperReq"
//sep.dmPaperReq;dm;word;
- {0xD227, 0}, //"sprmSPropRMark"
+ {0xD227, nullptr}, //"sprmSPropRMark"
//sep.fPropRMark,
//sep.ibstPropRMark,
//sep.dttmPropRMark ;complex;
@@ -6045,148 +6045,148 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//recorded as 7 bytes;
//0x3228, ? ? ?, //"sprmSFBiDi",
//0x3229, ? ? ?, //"sprmSFFacingCol"
- {0x322A, 0}, //"sprmSFRTLGutter", set to 1
+ {0x322A, nullptr}, //"sprmSFRTLGutter", set to 1
//if gutter is on the right.
- {0x702B, 0}, //"sprmSBrcTop80" sep.brcTop;BRC;
+ {0x702B, nullptr}, //"sprmSBrcTop80" sep.brcTop;BRC;
//long;
- {0x702C, 0}, //"sprmSBrcLeft80" sep.brcLeft;
+ {0x702C, nullptr}, //"sprmSBrcLeft80" sep.brcLeft;
//BRC;long;
- {0x702D, 0}, //"sprmSBrcBottom80"
+ {0x702D, nullptr}, //"sprmSBrcBottom80"
//sep.brcBottom;BRC;long;
- {0x702E, 0}, //"sprmSBrcRight80" sep.brcRight;
+ {0x702E, nullptr}, //"sprmSBrcRight80" sep.brcRight;
//BRC;long;
- {0x522F, 0}, //"sprmSPgbProp" sep.pgbProp;
+ {0x522F, nullptr}, //"sprmSPgbProp" sep.pgbProp;
//word;
- {0x7030, 0}, //"sprmSDxtCharSpace"
+ {0x7030, nullptr}, //"sprmSDxtCharSpace"
//sep.dxtCharSpace;dxt;long;
- {0x9031, 0}, //"sprmSDyaLinePitch"
+ {0x9031, nullptr}, //"sprmSDyaLinePitch"
//sep.dyaLinePitch;dya;
//WRONG:long; RIGHT:short; !
//0x5032, ? ? ?, //"sprmSClm"
- {0x5033, 0}, //"sprmSTextFlow"
+ {0x5033, nullptr}, //"sprmSTextFlow"
//sep.wTextFlow;complex ;short
- {0x5400, 0}, //"sprmTJc90" tap.jc;jc;word (low
+ {0x5400, nullptr}, //"sprmTJc90" tap.jc;jc;word (low
//order byte is significant);
- {0x9601, 0}, //"sprmTDxaLeft"
+ {0x9601, nullptr}, //"sprmTDxaLeft"
//tap.rgdxaCenter; dxa; word;
- {0x9602, 0}, //"sprmTDxaGapHalf"
+ {0x9602, nullptr}, //"sprmTDxaGapHalf"
//tap.dxaGapHalf,
//tap.rgdxaCenter; dxa; word;
- {0x3403, 0}, //"sprmTFCantSplit"
+ {0x3403, nullptr}, //"sprmTFCantSplit"
//tap.fCantSplit;1 or 0;byte;
- {0x3404, 0}, //"sprmTTableHeader"
+ {0x3404, nullptr}, //"sprmTTableHeader"
//tap.fTableHeader;1 or 0;byte;
- {0x3466, 0}, //"sprmTFCantSplit90"
+ {0x3466, nullptr}, //"sprmTFCantSplit90"
//tap.fCantSplit90;1 or 0;byte;
- {0xD605, 0}, //"sprmTTableBorders80"
+ {0xD605, nullptr}, //"sprmTTableBorders80"
//tap.rgbrcTable;complex;
//24 bytes;
- {0xD606, 0}, //"sprmTDefTable10"
+ {0xD606, nullptr}, //"sprmTDefTable10"
//tap.rgdxaCenter,
//tap.rgtc;complex; variable
//length;
- {0x9407, 0}, //"sprmTDyaRowHeight"
+ {0x9407, nullptr}, //"sprmTDyaRowHeight"
//tap.dyaRowHeight;dya;word;
- {0xD608, 0}, //"sprmTDefTable"
+ {0xD608, nullptr}, //"sprmTDefTable"
//tap.rgtc;complex
- {0xD609, 0}, //"sprmTDefTableShd80"
+ {0xD609, nullptr}, //"sprmTDefTableShd80"
//tap.rgshd;complex
- {0x740A, 0}, //"sprmTTlp" tap.tlp;TLP;
+ {0x740A, nullptr}, //"sprmTTlp" tap.tlp;TLP;
//4 bytes;
//0x560B, ? ? ?, //"sprmTFBiDi"
//0x740C, ? ? ?, //"sprmTHTMLProps"
- {0xD620, 0}, //"sprmTSetBrc80"
+ {0xD620, nullptr}, //"sprmTSetBrc80"
//tap.rgtc[].rgbrc;complex;
//5 bytes;
- {0x7621, 0}, //"sprmTInsert"
+ {0x7621, nullptr}, //"sprmTInsert"
//tap.rgdxaCenter,
//tap.rgtc;complex ;4 bytes;
- {0x5622, 0}, //"sprmTDelete"
+ {0x5622, nullptr}, //"sprmTDelete"
//tap.rgdxaCenter,
//tap.rgtc;complex ;word;
- {0x7623, 0}, //"sprmTDxaCol"
+ {0x7623, nullptr}, //"sprmTDxaCol"
//tap.rgdxaCenter;complex;
//4 bytes;
- {0x5624, 0}, //"sprmTMerge"
+ {0x5624, nullptr}, //"sprmTMerge"
//tap.fFirstMerged,
//tap.fMerged;complex; word;
- {0x5625, 0}, //"sprmTSplit"
+ {0x5625, nullptr}, //"sprmTSplit"
//tap.fFirstMerged,
//tap.fMerged;complex ;word;
- {0xD626, 0}, //"sprmTSetBrc10"
+ {0xD626, nullptr}, //"sprmTSetBrc10"
//tap.rgtc[].rgbrc;complex;
//5 bytes;
- {0x7627, 0}, //"sprmTSetShd80" tap.rgshd;
+ {0x7627, nullptr}, //"sprmTSetShd80" tap.rgshd;
//complex; 4 bytes;
- {0x7628, 0}, //"sprmTSetShdOdd80"
+ {0x7628, nullptr}, //"sprmTSetShdOdd80"
//tap.rgshd;complex;4 bytes;
- {0x7629, 0}, //"sprmTTextFlow"
+ {0x7629, nullptr}, //"sprmTTextFlow"
//tap.rgtc[].fVertical
//tap.rgtc[].fBackward
//tap.rgtc[].fRotateFont
//0 or 10 or 10 or 1;word;
//0xD62A, ? ? ? , //"sprmTDiagLine"
- {0xD62B, 0}, //"sprmTVertMerge"
+ {0xD62B, nullptr}, //"sprmTVertMerge"
//tap.rgtc[].vertMerge;complex;
//variable length always
//recorded as 2 bytes;
- {0xD62C, 0}, //"sprmTVertAlign"
+ {0xD62C, nullptr}, //"sprmTVertAlign"
//tap.rgtc[].vertAlign;complex
//variable length always
//recorded as 3 byte;
{NS_sprm::LN_CFELayout, &SwWW8ImplReader::Read_DoubleLine_Rotate},
- {0x6649, 0}, //undocumented
- {0xF614, 0}, //"sprmTTableWidth"
+ {0x6649, nullptr}, //undocumented
+ {0xF614, nullptr}, //"sprmTTableWidth"
//recorded as 3 bytes;
- {0xD612, 0}, //"sprmTCellShd"
- {0xD613, 0}, //"sprmTTableBorders"
- {0xD61A, 0}, //undocumented
- {0xD61B, 0}, //undocumented
- {0xD61C, 0}, //undocumented
- {0xD61D, 0}, //undocumented
- {0xD634, 0}, //undocumented
- {0xD632, 0}, //undocumented
- {0xD238, 0}, //undocumented sep
+ {0xD612, nullptr}, //"sprmTCellShd"
+ {0xD613, nullptr}, //"sprmTTableBorders"
+ {0xD61A, nullptr}, //undocumented
+ {0xD61B, nullptr}, //undocumented
+ {0xD61C, nullptr}, //undocumented
+ {0xD61D, nullptr}, //undocumented
+ {0xD634, nullptr}, //undocumented
+ {0xD632, nullptr}, //undocumented
+ {0xD238, nullptr}, //undocumented sep
{0xC64E, &SwWW8ImplReader::Read_Border}, //"sprmPBrcTop"
{0xC64F, &SwWW8ImplReader::Read_Border}, //"sprmPBrcLeft"
{0xC650, &SwWW8ImplReader::Read_Border}, //"sprmPBrcBottom"
{0xC651, &SwWW8ImplReader::Read_Border}, //"sprmPBrcRight"
{0xC652, &SwWW8ImplReader::Read_Border}, //"sprmPBorderBetween"
- {0xF661, 0}, //undocumented
+ {0xF661, nullptr}, //undocumented
{0x4873, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid0" chp.rglid[0];
//LID: for non-Far East text;
//(like a duplicate of 486D)
- {0x4874, 0}, //"sprmCRgLid1" chp.rglid[1];
+ {0x4874, nullptr}, //"sprmCRgLid1" chp.rglid[1];
//LID: for Far East text
//(like a duplicate of 486E)
- {0x6463, 0}, //undocumented
+ {0x6463, nullptr}, //undocumented
{0x2461, &SwWW8ImplReader::Read_RTLJustify}, //undoc, must be asian version
//of "sprmPJc"
{0x845E, &SwWW8ImplReader::Read_LR}, //Apparently post-Word 97 version of "sprmPDxaLeft"
{0x8460, &SwWW8ImplReader::Read_LR}, //Post-Word 97 version of "sprmPDxaLeft1"
{0x845D, &SwWW8ImplReader::Read_LR}, //Post-Word 97 version of "sprmPDxaRight"
- {0x3615, 0}, //undocumented
- {0x360D, 0}, //undocumented
- {0x940E, 0}, //undocumented
- {0x940F, 0}, //undocumented
- {0x9410, 0}, //undocumented
- {0x703A, 0}, //undocumented
- {0x303B, 0}, //undocumented
+ {0x3615, nullptr}, //undocumented
+ {0x360D, nullptr}, //undocumented
+ {0x940E, nullptr}, //undocumented
+ {0x940F, nullptr}, //undocumented
+ {0x9410, nullptr}, //undocumented
+ {0x703A, nullptr}, //undocumented
+ {0x303B, nullptr}, //undocumented
{0x244B, &SwWW8ImplReader::Read_TabCellEnd}, //undocumented, must be
//subtable "sprmPFInTable"
{0x244C, &SwWW8ImplReader::Read_TabRowEnd}, //undocumented, must be
// subtable "sprmPFTtp"
- {0x6815, 0}, //undocumented
- {0x6816, 0}, //undocumented
+ {0x6815, nullptr}, //undocumented
+ {0x6816, nullptr}, //undocumented
{NS_sprm::LN_CCv, &SwWW8ImplReader::Read_TextForeColor},
{NS_sprm::LN_CCvUl, &SwWW8ImplReader::Read_UnderlineColor},
{0xC64D, &SwWW8ImplReader::Read_ParaBackColor},
- {0x6467, 0}, //undocumented
- {0xF617, 0}, //undocumented
- {0xD660, 0}, //undocumented
- {0xD670, 0}, //undocumented
+ {0x6467, nullptr}, //undocumented
+ {0xF617, nullptr}, //undocumented
+ {0xD660, nullptr}, //undocumented
+ {0xD670, nullptr}, //undocumented
{0xCA71, &SwWW8ImplReader::Read_TextBackColor},//"sprmCShd"
- {0x303C, 0}, //undocumented
+ {0x303C, nullptr}, //undocumented
{0x245B, &SwWW8ImplReader::Read_ParaAutoBefore},//undocumented, para
{0x245C, &SwWW8ImplReader::Read_ParaAutoAfter},//undocumented, para
{0x246D, &SwWW8ImplReader::Read_ParaContextualSpacing} //"sprmPFContextualSpacing"
@@ -6209,7 +6209,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
else
pDispatcher = GetWW8SprmDispatcher();
- SprmReadInfo aSrch = {0, 0};
+ SprmReadInfo aSrch = {0, nullptr};
aSrch.nId = nId;
const SprmReadInfo* pFound = pDispatcher->search(aSrch);
@@ -6231,7 +6231,7 @@ void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
const SprmReadInfo& rSprm = GetSprmReadInfo( nId );
if (rSprm.pReadFnc)
- (this->*rSprm.pReadFnc)( nId, 0, -1 );
+ (this->*rSprm.pReadFnc)( nId, nullptr, -1 );
}
short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1faafca00c94..350d9abc9d49 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -791,7 +791,7 @@ wwSprmParser::wwSprmParser(ww::WordVersion eVersion) : meVersion(eVersion)
SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
{
const SprmInfo* pFound = mpKnownSprms->search(nId);
- if (pFound != 0)
+ if (pFound != nullptr)
{
return *pFound;
}
@@ -909,7 +909,7 @@ void WW8SprmIter::UpdateMyMembers()
if (!bValid)
{
nAktId = 0;
- pAktParams = 0;
+ pAktParams = nullptr;
nAktSize = 0;
nRemLen = 0;
}
@@ -924,7 +924,7 @@ const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
advance();
}
- return 0; // SPRM _not_ found
+ return nullptr; // SPRM _not_ found
}
// temporary test
@@ -970,7 +970,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
// PLCF fully processed
p->nStartPos = p->nEndPos = WW8_CP_MAX;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
return;
}
@@ -985,7 +985,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
// Invalid Index
p->nStartPos = p->nEndPos = WW8_CP_MAX;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
return;
}
@@ -1013,7 +1013,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
}
else
{
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
@@ -1498,12 +1498,12 @@ WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
{
if ( ((8 > pWw8Fib->nVersion) && !pWwF->fComplex) || !pWwF->lcbClx )
- return NULL;
+ return nullptr;
WW8_FC nClxPos = pWwF->fcClx;
if (!checkSeek(*pStr, nClxPos))
- return NULL;
+ return nullptr;
sal_Int32 nClxLen = pWwF->lcbClx;
sal_Int32 nLeft = nClxLen;
@@ -1519,19 +1519,19 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
pStr->ReadUInt16( nLen );
nLeft -= 2 + nLen;
if( nLeft < 0 )
- return NULL; // gone wrong
+ return nullptr; // gone wrong
if( 1 == clxt ) // clxtGrpprl ?
{
if (aPieceGrpprls.size() == SHRT_MAX)
- return NULL;
+ return nullptr;
if (nLen > pStr->remainingSize())
- return NULL;
+ return nullptr;
sal_uInt8* p = new sal_uInt8[nLen+2]; // allocate
ShortToSVBT16(nLen, p); // add length
if (!checkRead(*pStr, p+2, nLen)) // read grpprl
{
delete[] p;
- return NULL;
+ return nullptr;
}
aPieceGrpprls.push_back(p); // add to array
}
@@ -1561,9 +1561,9 @@ void WW8ScannerBase::DeletePieceTable()
WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTableSt,
SvStream* pDataSt, WW8Fib* pWwFib )
- : pWw8Fib(pWwFib), pMainFdoa(0), pHdFtFdoa(0), pMainTxbx(0),
- pMainTxbxBkd(0), pHdFtTxbx(0), pHdFtTxbxBkd(0), pMagicTables(0),
- pSubdocs(0), pExtendedAtrds(0)
+ : pWw8Fib(pWwFib), pMainFdoa(nullptr), pHdFtFdoa(nullptr), pMainTxbx(nullptr),
+ pMainTxbxBkd(nullptr), pHdFtTxbx(nullptr), pHdFtTxbxBkd(nullptr), pMagicTables(nullptr),
+ pSubdocs(nullptr), pExtendedAtrds(nullptr)
{
pPiecePLCF = OpenPieceTable( pTableSt, pWw8Fib ); // Complex
if( pPiecePLCF )
@@ -1576,9 +1576,9 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTableSt,
}
else
{
- pPieceIter = 0;
- pPLCFx_PCD = 0;
- pPLCFx_PCDAttrs = 0;
+ pPieceIter = nullptr;
+ pPLCFx_PCD = nullptr;
+ pPLCFx_PCDAttrs = nullptr;
}
// pChpPLCF and pPapPLCF may NOT be created before pPLCFx_PCD !!
@@ -1949,7 +1949,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, sal_uInt32 nFilePos,
if( nStruct ) // Pointer to content array
pPLCF_Contents = reinterpret_cast<sal_uInt8*>(&pPLCF_PosArray[nIMax + 1]);
else
- pPLCF_Contents = 0; // no content
+ pPLCF_Contents = nullptr; // no content
pSt->Seek(nOldPos);
}
@@ -2037,7 +2037,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
return false;
}
rPos = pPLCF_PosArray[nInIdx];
- rpValue = pPLCF_Contents ? static_cast<void*>(&pPLCF_Contents[nInIdx * nStru]) : 0;
+ rpValue = pPLCF_Contents ? static_cast<void*>(&pPLCF_Contents[nInIdx * nStru]) : nullptr;
return true;
}
@@ -2045,7 +2045,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
// Ctor for *others* than Fkps
// With nStartPos < 0, the first element of PLCFs will be taken
WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
- WW8_CP nStartPos) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
+ WW8_CP nStartPos) : pPLCF_PosArray(nullptr), nIdx(0), nStru(nStruct)
{
OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF is zero!" );
@@ -2063,7 +2063,7 @@ WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
// lack of resources and for WordPad (W95).
// With nStartPos < 0, the first element of the PLCFs is taken.
WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
- WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN): pPLCF_PosArray(0), nIdx(0),
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN): pPLCF_PosArray(nullptr), nIdx(0),
nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2547,7 +2547,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
if (bOk)
{
const sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0;
- sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0;
+ sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : nullptr;
aEntry.mnLen = nLen;
aEntry.mpData =
@@ -2695,7 +2695,7 @@ sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32&
if (mnIdx >= mnIMax)
{
rStart = WW8_FC_MAX;
- return 0;
+ return nullptr;
}
rStart = maEntries[mnIdx].mnFC;
@@ -2724,7 +2724,7 @@ sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if (mnIdx >= mnIMax)
- return 0;
+ return nullptr;
sal_Int32 nLen;
sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
@@ -2757,7 +2757,7 @@ void WW8PLCFx::GetSprms( WW8PLCFxDesc* p )
{
OSL_ENSURE( false, "Called wrong GetSprms" );
p->nStartPos = p->nEndPos = WW8_CP_MAX;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
p->bRealLineEnd = false;
return;
@@ -2832,7 +2832,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
if (!pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ))
{
- pFkp = 0;
+ pFkp = nullptr;
return false; // PLCF completely processed
}
pPLCF->advance();
@@ -2872,7 +2872,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream* pSt, SvStream* pTableSt,
SvStream* pDataSt, const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL)
: WW8PLCFx(rFib.GetFIBVersion(), true), pFKPStrm(pSt), pDataStrm(pDataSt),
- pFkp(0), ePLCF(ePl), pPCDAttrs(0)
+ pFkp(nullptr), ePLCF(ePl), pPCDAttrs(nullptr)
{
SetStartFc(nStartFcL);
long nLenStruct = (8 > rFib.nVersion) ? 2 : 4;
@@ -2910,7 +2910,7 @@ void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
if( !( nIdx & 0xffffff00L ) )
{
pPLCF->SetIdx( nIdx >> 8 );
- pFkp = 0;
+ pFkp = nullptr;
}
else
{ // there was a Fkp
@@ -2940,7 +2940,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
long nPo = SVBT16ToShort( static_cast<sal_uInt8 *>(pPage) );
nPo <<= 9; // shift as LONG
if (nPo != pFkp->GetFilePos())
- pFkp = 0;
+ pFkp = nullptr;
else
pFkp->SeekPos( nFcPos );
}
@@ -2958,7 +2958,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
if( nP != WW8_FC_MAX )
return nP;
- pFkp = 0; // FKP finished -> get new
+ pFkp = nullptr; // FKP finished -> get new
return Where(); // easiest way: do it recursively
}
@@ -2970,12 +2970,12 @@ sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int
if( !pFkp ) // Fkp not there ?
{
if( !NewFkp() )
- return 0;
+ return nullptr;
}
- sal_uInt8* pPos = pFkp ? pFkp->Get( rStart, rEnd, rLen ) : NULL;
+ sal_uInt8* pPos = pFkp ? pFkp->Get( rStart, rEnd, rLen ) : nullptr;
if( rStart == WW8_FC_MAX ) //Not found
- return 0;
+ return nullptr;
return pPos;
}
@@ -3002,7 +3002,7 @@ sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
{
- rDesc.pMemPos = 0;
+ rDesc.pMemPos = nullptr;
rDesc.nSprmsLen = 0;
if( pPCDAttrs )
{
@@ -3024,11 +3024,11 @@ const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
OSL_FAIL( "+Motz: HasSprm: NewFkp needed ( no const possible )" );
// happens in BugDoc 31722
if( !NewFkp() )
- return 0;
+ return nullptr;
}
if (!pFkp)
- return 0;
+ return nullptr;
const sal_uInt8* pRes = pFkp->HasSprm( nId );
@@ -3091,7 +3091,7 @@ WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTableSt,
ResetAttrStartEnd();
pPcd = rSBase.pPiecePLCF ? new WW8PLCFx_PCD(GetFIBVersion(),
- rBase.pPiecePLCF, 0, IsSevenMinus(GetFIBVersion())) : 0;
+ rBase.pPiecePLCF, 0, IsSevenMinus(GetFIBVersion())) : nullptr;
/*
Make a copy of the piece attributes for so that the calls to HasSprm on a
@@ -3102,7 +3102,7 @@ WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTableSt,
if (pPcd)
{
pPCDAttrs = rSBase.pPLCFx_PCDAttrs ? new WW8PLCFx_PCDAttrs(
- rSBase.pWw8Fib->GetFIBVersion(), pPcd, &rSBase) : 0;
+ rSBase.pWw8Fib->GetFIBVersion(), pPcd, &rSBase) : nullptr;
}
pPieceIter = rSBase.pPieceIter;
@@ -3232,7 +3232,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
character is at the FKP FC minus 1.
*/
WW8_CP nCpStart, nCpEnd;
- void* pData=NULL;
+ void* pData=nullptr;
bool bOk = pPieceIter->Get(nCpStart, nCpEnd, pData);
if (!bOk)
@@ -3377,7 +3377,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTableSt,
pPLCF = rFib.lcbPlcfsed
? new WW8PLCF(*pTableSt, rFib.fcPlcfsed, rFib.lcbPlcfsed,
GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp)
- : 0;
+ : nullptr;
pSprms = new sal_uInt8[nArrMax]; // maximum length
}
@@ -3418,7 +3418,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
if (!pPLCF->Get( p->nStartPos, p->nEndPos, pData ))
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // PLCF completely processed
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
}
else
@@ -3427,7 +3427,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
if (nPo == 0xFFFFFFFF)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // Sepx empty
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
}
else
@@ -3478,7 +3478,7 @@ const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const sal_uInt8 *pRet = 0;
+ const sal_uInt8 *pRet = nullptr;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3494,10 +3494,10 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,s
return false;
bool bFound = false;
- p1 = 0;
- p2 = 0;
- p3 = 0;
- p4 = 0;
+ p1 = nullptr;
+ p2 = nullptr;
+ p3 = nullptr;
+ p4 = nullptr;
sal_uInt8* pSp = pSprms;
sal_uInt16 i=0;
@@ -3528,7 +3528,7 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,s
const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
- return 0;
+ return nullptr;
sal_uInt8* pSp = pSprms;
@@ -3549,13 +3549,13 @@ const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
pSp += x;
}
- return 0; // Sprm not found
+ return nullptr; // Sprm not found
}
WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion,
WW8_CP nStartCp, long nFcRef, long nLenRef, long nFcText, long nLenText,
long nStruct)
- : WW8PLCFx(eVersion, true), pRef(0), pText(0)
+ : WW8PLCFx(eVersion, true), pRef(nullptr), pText(nullptr)
{
if( nLenRef && nLenText )
{
@@ -3601,7 +3601,7 @@ WW8_CP WW8PLCFx_SubDoc::Where()
void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
p->bRealLineEnd = false;
@@ -3646,7 +3646,7 @@ void WW8PLCFx_SubDoc::advance()
// fields
WW8PLCFx_FLD::WW8PLCFx_FLD( SvStream* pSt, const WW8Fib& rMyFib, short nType)
- : WW8PLCFx(rMyFib.GetFIBVersion(), true), pPLCF(0), rFib(rMyFib)
+ : WW8PLCFx(rMyFib.GetFIBVersion(), true), pPLCF(nullptr), rFib(rMyFib)
{
long nFc, nLen;
@@ -3751,7 +3751,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd(WW8_CP& nCP)
void WW8PLCFx_FLD::GetSprms(WW8PLCFxDesc* p)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
p->bRealLineEnd = false;
@@ -3946,7 +3946,7 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTableSt, const WW8Fib& rFib)
if( !rFib.fcPlcfbkf || !rFib.lcbPlcfbkf || !rFib.fcPlcfbkl ||
!rFib.lcbPlcfbkl || !rFib.fcSttbfbkmk || !rFib.lcbSttbfbkmk )
{
- pBook[0] = pBook[1] = 0;
+ pBook[0] = pBook[1] = nullptr;
nIMax = 0;
}
else
@@ -4062,7 +4062,7 @@ void WW8PLCFx_Book::advance()
else
{
const void * p = pBook[0]->GetData(pBook[0]->GetIdx());
- long nPairFor = (p == NULL)? 0L : SVBT16ToShort(*static_cast<SVBT16 const *>(p));
+ long nPairFor = (p == nullptr)? 0L : SVBT16ToShort(*static_cast<SVBT16 const *>(p));
if (nPairFor == pBook[1]->GetIdx())
nIsEnd = 0;
else
@@ -4201,7 +4201,7 @@ bool WW8PLCFx_Book::MapName(OUString& rName)
const OUString* WW8PLCFx_Book::GetName() const
{
- const OUString *pRet = 0;
+ const OUString *pRet = nullptr;
if (!nIsEnd && (pBook[0]->GetIdx() < nIMax))
pRet = &(aBookNames[pBook[0]->GetIdx()]);
return pRet;
@@ -4213,7 +4213,7 @@ WW8PLCFx_AtnBook::WW8PLCFx_AtnBook(SvStream* pTableSt, const WW8Fib& rFib)
{
if (!rFib.fcPlcfAtnbkf || !rFib.lcbPlcfAtnbkf || !rFib.fcPlcfAtnbkl || !rFib.lcbPlcfAtnbkl)
{
- m_pBook[0] = m_pBook[1] = 0;
+ m_pBook[0] = m_pBook[1] = nullptr;
nIMax = 0;
}
else
@@ -4309,7 +4309,7 @@ void WW8PLCFx_AtnBook::advance()
else
{
const void * p = m_pBook[0]->GetData(m_pBook[0]->GetIdx());
- long nPairFor = (p == NULL)? 0L : SVBT16ToShort(*static_cast<SVBT16 const *>(p));
+ long nPairFor = (p == nullptr)? 0L : SVBT16ToShort(*static_cast<SVBT16 const *>(p));
if (nPairFor == m_pBook[1]->GetIdx())
m_bIsEnd = false;
else
@@ -4487,9 +4487,9 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
pFootnote = &aD[3];
pAnd = &aD[4];
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0;
+ pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : nullptr;
//pPcdA index == pPcd index + 1
- pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : 0;
+ pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : nullptr;
pChp = &aD[7];
pPap = &aD[8];
@@ -4509,17 +4509,17 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
// search order of the attributes
nPLCF = 7;
pField = &aD[0];
- pBkm = ( pBase->pBook ) ? &aD[1] : 0;
+ pBkm = ( pBase->pBook ) ? &aD[1] : nullptr;
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[2] : 0;
+ pPcd = ( pBase->pPLCFx_PCD ) ? &aD[2] : nullptr;
//pPcdA index == pPcd index + 1
- pPcdA= ( pBase->pPLCFx_PCDAttrs ) ? &aD[3] : 0;
+ pPcdA= ( pBase->pPLCFx_PCDAttrs ) ? &aD[3] : nullptr;
pChp = &aD[4];
pPap = &aD[5];
pSep = &aD[6]; // Dummy
- pAnd = pAtnBkm = pFootnote = pEdn = 0; // not used at SpezText
+ pAnd = pAtnBkm = pFootnote = pEdn = nullptr; // not used at SpezText
}
pChp->pPLCFx = pBase->pChpPLCF;
@@ -4545,27 +4545,27 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
break;
case MAN_FTN:
pField->pPLCFx = pBase->pFieldFootnotePLCF;
- pFdoa = pTxbx = pTxbxBkd = 0;
+ pFdoa = pTxbx = pTxbxBkd = nullptr;
break;
case MAN_EDN:
pField->pPLCFx = pBase->pFieldEdnPLCF;
- pFdoa = pTxbx = pTxbxBkd = 0;
+ pFdoa = pTxbx = pTxbxBkd = nullptr;
break;
case MAN_AND:
pField->pPLCFx = pBase->pFieldAndPLCF;
- pFdoa = pTxbx = pTxbxBkd = 0;
+ pFdoa = pTxbx = pTxbxBkd = nullptr;
break;
case MAN_TXBX:
pField->pPLCFx = pBase->pFieldTxbxPLCF;
pTxbx = pBase->pMainTxbx;
pTxbxBkd = pBase->pMainTxbxBkd;
- pFdoa = 0;
+ pFdoa = nullptr;
break;
case MAN_TXBX_HDFT:
pField->pPLCFx = pBase->pFieldTxbxHdFtPLCF;
pTxbx = pBase->pHdFtTxbx;
pTxbxBkd = pBase->pHdFtTxbxBkd;
- pFdoa = 0;
+ pFdoa = nullptr;
break;
default:
pField->pPLCFx = pBase->pFieldPLCF;
@@ -4601,7 +4601,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
p->nCp2OrIdx = 0;
p->bFirstSprm = false;
- p->pIdStk = 0;
+ p->pIdStk = nullptr;
if ((p == pChp) || (p == pPap))
p->nStartPos = p->nEndPos = nStartCp;
@@ -4626,7 +4626,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
p->nStartPos = nTemp;
if (!(*p->pPLCFx).SeekPos(p->nStartPos))
@@ -4696,7 +4696,7 @@ sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
WW8_CP WW8PLCFMan::Where() const
{
long l;
- WhereIdx(0, &l);
+ WhereIdx(nullptr, &l);
return l;
}
@@ -4872,7 +4872,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if (p->nSprmsLen < maSprmParser.MinSprmLen())
{
// preventively set to 0, because the end follows!
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
}
else
@@ -4892,7 +4892,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
{
if ( (p == pChp) || (p == pPap) )
{
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
p->nStartPos = p->nOrigEndPos+p->nCpOfs;
@@ -4947,7 +4947,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
else
{
p->pPLCFx->advance(); // next Group of Sprms
- p->pMemPos = 0; // !!!
+ p->pMemPos = nullptr; // !!!
p->nSprmsLen = 0;
GetNewSprms( *p );
}
@@ -4986,7 +4986,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
*/
if (pTemp->GetClipStart() == -1)
p->pPLCFx->advance();
- p->pMemPos = 0;
+ p->pMemPos = nullptr;
p->nSprmsLen = 0;
GetNewSprms( aD[nIdx+1] );
GetNewNoSprms( *p );
@@ -5007,7 +5007,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
else
{ // NoSprm without end
p->pPLCFx->advance();
- p->pMemPos = 0; // MemPos invalid
+ p->pMemPos = nullptr; // MemPos invalid
p->nSprmsLen = 0;
GetNewNoSprms( *p );
}
@@ -6205,7 +6205,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// it will return a null pointer.
WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
- WW8_STD* pStd = 0;
+ WW8_STD* pStd = nullptr;
sal_uInt16 cbStd(0);
rSt.ReadUInt16( cbStd ); // read length
@@ -6467,7 +6467,7 @@ namespace
}
WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
- : pFontA(0), nMax(0)
+ : pFontA(nullptr), nMax(0)
{
// Attention: MacWord-Documents have their Fontnames
// always in ANSI, even if eStructCharSet == CHARSET_MAC !!
@@ -6721,7 +6721,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
- return 0;
+ return nullptr;
return &pFontA[ nNum ];
}
@@ -7654,7 +7654,7 @@ sal_uInt8* wwSprmParser::findSprmData(sal_uInt16 nId, sal_uInt8* pSprms,
nLen -= nSize;
}
// Sprm not found
- return 0;
+ return nullptr;
}
SEPr::SEPr() :
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index c74624ab2103..b0ec865217e5 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -82,7 +82,7 @@ public:
SprmInfo const * search(sal_uInt16 id) const {
Map::const_iterator i(map_.find(id));
- return i == map_.end() ? 0 : &i->second;
+ return i == map_.end() ? nullptr : &i->second;
}
private:
@@ -170,7 +170,7 @@ class WW8PLCFx_PCD;
*/
void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<OUString> &rArray,
- ::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<OUString>* pValueArray = 0);
+ ::std::vector<ww::bytes>* pExtraArray = nullptr, ::std::vector<OUString>* pValueArray = nullptr);
struct WW8FieldDesc
{
@@ -228,7 +228,7 @@ public:
const void* GetData( long nInIdx ) const
{
- return ( nInIdx >= nIMax ) ? 0
+ return ( nInIdx >= nIMax ) ? nullptr
: static_cast<const void*>(&pPLCF_Contents[nInIdx * nStru]);
}
sal_Int32 GetPos( long nInIdx ) const
@@ -263,7 +263,7 @@ public:
const sal_uInt8* FindSprm(sal_uInt16 nId);
void advance();
const sal_uInt8* GetSprms() const
- { return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
+ { return ( pSprms && (0 < nRemLen) ) ? pSprms : nullptr; }
const sal_uInt8* GetAktParams() const { return pAktParams; }
sal_uInt16 GetAktId() const { return nAktId; }
@@ -314,7 +314,7 @@ public:
const void* GetData( sal_Int32 nInIdx ) const
{
- return ( nInIdx >= nIMax ) ? 0 :
+ return ( nInIdx >= nIMax ) ? nullptr :
static_cast<const void*>(&pPLCF_Contents[nInIdx * nStru]);
}
};
@@ -491,7 +491,7 @@ public:
sal_uInt16 mnIStd; // only for Fkp.Papx (actually Style-Nr)
bool mbMustDelete;
- explicit Entry(WW8_FC nFC) : mnFC(nFC), mpData(0), mnLen(0),
+ explicit Entry(WW8_FC nFC) : mnFC(nFC), mpData(nullptr), mnLen(0),
mnIStd(0), mbMustDelete(false) {}
Entry(const Entry &rEntry);
~Entry();
@@ -596,7 +596,7 @@ public:
void GetPCDSprms( WW8PLCFxDesc& rDesc );
const sal_uInt8* HasSprm( sal_uInt16 nId );
bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
- bool HasFkp() const { return (0 != pFkp); }
+ bool HasFkp() const { return (nullptr != pFkp); }
};
/// iterator for Piece Table Exceptions of Fkps works on CPs (high-level)
@@ -685,7 +685,7 @@ public:
// returns reference descriptors
const void* GetData( long nIdx = -1 ) const
{
- return pRef ? pRef->GetData( -1L == nIdx ? pRef->GetIdx() : nIdx ) : 0;
+ return pRef ? pRef->GetData( -1L == nIdx ? pRef->GetIdx() : nIdx ) : nullptr;
}
virtual void GetSprms(WW8PLCFxDesc* p) override;
@@ -851,9 +851,9 @@ struct WW8PLCFxDesc
//GetSprms will not search for the sprms, but instead take the
//existing ones.
WW8PLCFxDesc()
- : pPLCFx(0)
- , pIdStk(0)
- , pMemPos(0)
+ : pPLCFx(nullptr)
+ , pIdStk(nullptr)
+ , pMemPos(nullptr)
, nOrigSprmsLen(0)
, nStartPos(WW8_CP_MAX)
, nEndPos(WW8_CP_MAX)
@@ -896,7 +896,7 @@ private:
const WW8Fib* pWwFib;
- sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const;
+ sal_uInt16 WhereIdx(bool* pbStart=nullptr, long* pPos=nullptr) const;
void AdjustEnds(WW8PLCFxDesc& rDesc);
void GetNewSprms(WW8PLCFxDesc& rDesc);
static void GetNewNoSprms(WW8PLCFxDesc& rDesc);
@@ -1024,8 +1024,8 @@ public:
//given that we never write fastsaved files you can use it, otherwise
//I will beat you with a stick
WW8_CP WW8Fc2Cp(WW8_FC nFcPos) const ;
- WW8_FC WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode = 0,
- WW8_CP* pNextPieceCp = 0, bool* pTestFlag = 0) const;
+ WW8_FC WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode = nullptr,
+ WW8_CP* pNextPieceCp = nullptr, bool* pTestFlag = nullptr) const;
sal_Int32 WW8ReadString(SvStream& rStrm, OUString& rStr, WW8_CP nAktStartCp,
long nTotalLen, rtl_TextEncoding eEnc ) const;
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 98754fd82551..5d0f0fc0e010 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -311,7 +311,7 @@ struct WW8_BRC // BoRder Code (WW8 version)
explicit WW8_BRC(const WW8_BRCVer6& brcVer6);
// Returns LO border width in twips=1/20pt, taking into account brcType
- short DetermineBorderProperties(short *pSpace=0) const;
+ short DetermineBorderProperties(short *pSpace=nullptr) const;
};
typedef WW8_BRC WW8_BRC5[5]; // 5 * Border Code
@@ -363,7 +363,7 @@ struct WW8_BRCVer9 // BoRder Code (WW9 version)
explicit WW8_BRCVer9(const WW8_BRC& brcVer8);
// Returns LO border width in twips=1/20pt, taking into account brcType
- short DetermineBorderProperties(short *pSpace=0) const;
+ short DetermineBorderProperties(short *pSpace=nullptr) const;
};
typedef WW8_BRCVer9 WW8_BRCVer9_5[5]; // 5 * Border Code
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 7f833e4256ad..c447e35e48d4 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -91,13 +91,13 @@ SwCTBWrapper::~SwCTBWrapper()
Customization* SwCTBWrapper::GetCustomizaton( sal_Int16 index )
{
if ( index < 0 || index >= static_cast<sal_Int16>( rCustomizations.size() ) )
- return NULL;
+ return nullptr;
return &rCustomizations[ index ];
}
SwCTB* SwCTBWrapper::GetCustomizationData( const OUString& sTBName )
{
- SwCTB* pCTB = NULL;
+ SwCTB* pCTB = nullptr;
for ( std::vector< Customization >::iterator it = rCustomizations.begin(); it != rCustomizations.end(); ++it )
{
if ( it->GetCustomizationData() && it->GetCustomizationData()->GetName() == sTBName )
@@ -177,7 +177,7 @@ SwTBC* SwCTBWrapper::GetTBCAtOffset( sal_uInt32 nStreamOffset )
if ( (*it).GetOffset() == nStreamOffset )
return &(*it);
}
- return NULL;
+ return nullptr;
}
#if OSL_DEBUG_LEVEL > 1
@@ -832,7 +832,7 @@ Tcg255::~Tcg255()
bool Tcg255::processSubStruct( sal_uInt8 nId, SvStream &rS )
{
- Tcg255SubStruct* pSubStruct = NULL;
+ Tcg255SubStruct* pSubStruct = nullptr;
switch ( nId )
{
case 0x1:
@@ -985,7 +985,7 @@ void PlfMcd::Print( FILE* fp )
PlfAcd::PlfAcd( bool bReadId ) : Tcg255SubStruct( bReadId )
,iMac(0)
-,rgacd(NULL)
+,rgacd(nullptr)
{
}
@@ -1037,7 +1037,7 @@ void PlfAcd::Print( FILE* fp )
PlfKme::PlfKme( bool bReadId ) : Tcg255SubStruct( bReadId )
,iMac( 0 )
-,rgkme( NULL )
+,rgkme( nullptr )
{
}
@@ -1103,7 +1103,7 @@ void TcgSttbf::Print( FILE* fp )
TcgSttbfCore::TcgSttbfCore() : fExtend( 0 )
,cData( 0 )
,cbExtra( 0 )
-,dataItems( NULL )
+,dataItems( nullptr )
{
}
@@ -1151,7 +1151,7 @@ void TcgSttbfCore::Print( FILE* fp )
MacroNames::MacroNames( bool bReadId ) : Tcg255SubStruct( bReadId )
,iMac( 0 )
-,rgNames( NULL )
+,rgNames( nullptr )
{
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 099d0c6e8318..73b6d293d3f3 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -55,7 +55,7 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextCursor> & rCursor )
OTextCursorHelper *const pXCursor =
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xTunnel);
OSL_ENSURE( pXCursor, "OTextCursorHelper missing" );
- return (pXCursor) ? pXCursor->GetDoc() : 0;
+ return (pXCursor) ? pXCursor->GetDoc() : nullptr;
}
static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
@@ -66,7 +66,7 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
::sw::UnoTunnelGetImplementation<SwXTextRange>(xTunnel);
// #i115174#: this may be a SvxUnoTextRange
// OSL_ENSURE( pXRange, "SwXTextRange missing" );
- return (pXRange) ? &pXRange->GetDoc() : 0;
+ return (pXRange) ? &pXRange->GetDoc() : nullptr;
}
// XTextRangeOrNodeIndexPosition: store a position into the text
@@ -97,8 +97,8 @@ public:
};
XTextRangeOrNodeIndexPosition::XTextRangeOrNodeIndexPosition() :
- xRange(NULL),
- pIndex(NULL)
+ xRange(nullptr),
+ pIndex(nullptr)
{
}
@@ -110,21 +110,21 @@ XTextRangeOrNodeIndexPosition::~XTextRangeOrNodeIndexPosition()
void XTextRangeOrNodeIndexPosition::Set( Reference<XTextRange> & rRange )
{
xRange = rRange->getStart(); // set bookmark
- if (NULL != pIndex)
+ if (nullptr != pIndex)
{
delete pIndex;
- pIndex = NULL;
+ pIndex = nullptr;
}
}
void XTextRangeOrNodeIndexPosition::Set( SwNodeIndex& rIndex )
{
- if (NULL != pIndex)
+ if (nullptr != pIndex)
delete pIndex;
pIndex = new SwNodeIndex(rIndex);
(*pIndex)-- ; // previous node!!!
- xRange = NULL;
+ xRange = nullptr;
}
void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
@@ -154,7 +154,7 @@ XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc)
OSL_ENSURE(IsValid(), "Can't get Position");
// create PAM from start cursor (if no node index is present)
- if (NULL == pIndex)
+ if (nullptr == pIndex)
{
SwUnoInternalPaM aUnoPaM(rDoc);
bool bSuccess = ::sw::XTextRangeToSwPaM(aUnoPaM, xRange);
@@ -174,12 +174,12 @@ SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
{
OSL_ENSURE(IsValid(), "Can't get Doc");
- return (NULL != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
+ return (nullptr != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
}
bool XTextRangeOrNodeIndexPosition::IsValid()
{
- return ( xRange.is() || (pIndex != NULL) );
+ return ( xRange.is() || (pIndex != nullptr) );
}
// RedlineInfo: temporary storage for redline data
@@ -224,8 +224,8 @@ RedlineInfo::RedlineInfo() :
bMergeLastParagraph( false ),
aAnchorStart(),
aAnchorEnd(),
- pContentIndex(NULL),
- pNextRedline(NULL),
+ pContentIndex(nullptr),
+ pNextRedline(nullptr),
bNeedsAdjustment( false )
{
}
@@ -428,7 +428,7 @@ void XMLRedlineImportHelper::Add(
// find last element
RedlineInfo* pInfoChain;
for( pInfoChain = aRedlineMap[rId];
- NULL != pInfoChain->pNextRedline;
+ nullptr != pInfoChain->pNextRedline;
pInfoChain = pInfoChain->pNextRedline) ; // empty loop
// insert as last element
@@ -456,7 +456,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
{
OSL_TRACE("XMLRedlineImportHelper::CreateRedlineTextSection: "
"no SwDoc => cannot create section.");
- return 0;
+ return nullptr;
}
// create text section for redline
@@ -577,7 +577,7 @@ inline bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
{
- OSL_ENSURE(NULL != pRedlineInfo, "need redline info");
+ OSL_ENSURE(nullptr != pRedlineInfo, "need redline info");
OSL_ENSURE(IsReady(pRedlineInfo), "redline info not complete yet!");
// this method will modify the document directly -> lock SolarMutex
@@ -615,7 +615,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// a) bIgnoreRedline (e.g. insert mode)
// b) illegal PaM range (CheckNodesRange())
// 3) normal case: insert redline
- if( !aPaM.HasMark() && (pRedlineInfo->pContentIndex == NULL) )
+ if( !aPaM.HasMark() && (pRedlineInfo->pContentIndex == nullptr) )
{
// these redlines have no function, and will thus be ignored (just as
// in sw3io), so no action here
@@ -632,7 +632,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
// And what about the "deleted nodes"?
// They have to be deleted as well (#i80689)!
- if( bIgnoreRedlines && pRedlineInfo->pContentIndex != NULL )
+ if( bIgnoreRedlines && pRedlineInfo->pContentIndex != nullptr )
{
SwNodeIndex aIdx( *pRedlineInfo->pContentIndex );
const SwNode* pEnd = aIdx.GetNode().EndOfSectionNode();
@@ -663,7 +663,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
}
// set content node (if necessary)
- if (NULL != pRedlineInfo->pContentIndex)
+ if (nullptr != pRedlineInfo->pContentIndex)
{
sal_uLong nPoint = aPaM.GetPoint()->nNode.GetIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
@@ -688,7 +688,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
{
// convert info:
// 1) Author String -> Author ID (default to zero)
- sal_uInt16 nAuthorId = (NULL == pDoc) ? 0 :
+ sal_uInt16 nAuthorId = (nullptr == pDoc) ? 0 :
pDoc->getIDocumentRedlineAccess().InsertRedlineAuthor( pRedlineInfo->sAuthor );
// 2) util::DateTime -> DateTime
@@ -703,8 +703,8 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
// 3) recursively convert next redline
// ( check presence and sanity of hierarchical redline info )
- SwRedlineData* pNext = NULL;
- if ( (NULL != pRedlineInfo->pNextRedline) &&
+ SwRedlineData* pNext = nullptr;
+ if ( (nullptr != pRedlineInfo->pNextRedline) &&
(nsRedlineType_t::REDLINE_DELETE == pRedlineInfo->eType) &&
(nsRedlineType_t::REDLINE_INSERT == pRedlineInfo->pNextRedline->eType) )
{
@@ -716,7 +716,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
nAuthorId, aDT,
pRedlineInfo->sComment,
pNext, // next data (if available)
- NULL); // no extra data
+ nullptr); // no extra data
return pData;
}
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index c0a265443363..1812e511639d 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::lang;
static void lcl_EnsureValidPam( SwPaM& rPam )
{
- if( rPam.GetContentNode() != NULL )
+ if( rPam.GetContentNode() != nullptr )
{
// set proper point content
if( rPam.GetContentNode() != rPam.GetPoint()->nContent.GetIdxReg() )
@@ -95,7 +95,7 @@ static void lcl_EnsureValidPam( SwPaM& rPam )
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetContentNode( false ) == NULL ) ||
+ if( ( rPam.GetContentNode( false ) == nullptr ) ||
( rPam.GetContentNode( false ) != rPam.GetMark()->nContent.GetIdxReg() ) )
{
rPam.DeleteMark();
@@ -139,7 +139,7 @@ sal_Int32 ReadThroughComponent(
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rxContext.is(), "factory missing");
- OSL_ENSURE(NULL != pFilterName,"I need a service name for the component!");
+ OSL_ENSURE(nullptr != pFilterName,"I need a service name for the component!");
// prepare ParserInputSrouce
xml::sax::InputSource aParserInput;
@@ -288,7 +288,7 @@ sal_Int32 ReadThroughComponent(
bool bMustBeSuccessfull)
{
OSL_ENSURE(xStorage.is(), "Need storage!");
- OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
+ OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!");
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
@@ -307,7 +307,7 @@ sal_Int32 ReadThroughComponent(
// if no stream can be opened, return immediately with OK signal
// do we even have an alternative name?
- if ( NULL == pCompatibilityStreamName )
+ if ( nullptr == pCompatibilityStreamName )
return 0;
// if so, does the stream exist?
@@ -398,7 +398,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
aOutlineLevelAssigned[ i ] = false;
- aCreatedDefaultOutlineStyles[ i ] = 0L;
+ aCreatedDefaultOutlineStyles[ i ] = nullptr;
}
}
@@ -415,7 +415,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
- if ( aCreatedDefaultOutlineStyles[ i ] == 0L &&
+ if ( aCreatedDefaultOutlineStyles[ i ] == nullptr &&
pColl->GetName() == aDefOutlStyleNames[i] )
{
aCreatedDefaultOutlineStyles[ i ] = pColl;
@@ -433,7 +433,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
// Do not change assignment of already created default outline style
// to a certain outline level.
if ( !aOutlineLevelAssigned[ i ] &&
- aCreatedDefaultOutlineStyles[ i ] != 0 &&
+ aCreatedDefaultOutlineStyles[ i ] != nullptr &&
! aCreatedDefaultOutlineStyles[ i ]->IsAssignedToListLevelOfOutlineStyle() )
{
// apply outline level at created default outline style
@@ -498,9 +498,9 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
uno::Reference< io::XActiveDataSource > xSource;
uno::Reference< XInterface > xPipe;
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
- SvXMLGraphicHelper *pGraphicHelper = 0;
+ SvXMLGraphicHelper *pGraphicHelper = nullptr;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
// get the input stream (storage or stream)
uno::Reference<io::XInputStream> xInputStream;
@@ -721,14 +721,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
else if( bInsertMode )
{
const uno::Reference<text::XTextRange> xInsertTextRange =
- SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), 0);
+ SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), nullptr);
xInfoSet->setPropertyValue( "TextInsertModeRange",
makeAny(xInsertTextRange) );
}
else
{
- rPaM.GetBound().nContent.Assign(0, 0);
- rPaM.GetBound(false).nContent.Assign(0, 0);
+ rPaM.GetBound().nContent.Assign(nullptr, 0);
+ rPaM.GetBound(false).nContent.Assign(nullptr, 0);
}
if( IsBlockMode() )
@@ -851,14 +851,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
bInsertMode) )
{
nWarn2 = ReadThroughComponent(
- xStorage, xModelComp, "settings.xml", NULL, xContext,
+ xStorage, xModelComp, "settings.xml", nullptr, xContext,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsImporter"
: "com.sun.star.comp.Writer.XMLSettingsImporter"),
aFilterArgs, rName, false );
}
nRet = ReadThroughComponent(
- xStorage, xModelComp, "styles.xml", NULL, xContext,
+ xStorage, xModelComp, "styles.xml", nullptr, xContext,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesImporter"
: "com.sun.star.comp.Writer.XMLStylesImporter"),
aFilterArgs, rName, true );
@@ -923,10 +923,10 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
- xGraphicResolver = 0;
+ xGraphicResolver = nullptr;
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
- xObjectResolver = 0;
+ xObjectResolver = nullptr;
(void)rDoc.release();
if ( !bOASIS )
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index c7bdb8367088..0f5392f39b0c 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -80,9 +80,9 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
uno::Reference< io::XOutputStream > xOut;
tools::SvRef<SotStorageStream> xDocStream;
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
- SvXMLGraphicHelper *pGraphicHelper = 0;
+ SvXMLGraphicHelper *pGraphicHelper = nullptr;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
OSL_ENSURE( xStg.is(), "Where is my storage?" );
pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
@@ -393,11 +393,11 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
- xGraphicResolver = 0;
+ xGraphicResolver = nullptr;
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
- xObjectResolver = 0;
+ xObjectResolver = nullptr;
// restore redline mode
aAny = xInfoSet->getPropertyValue( sShowChanges );
@@ -469,8 +469,8 @@ bool SwXMLWriter::WriteThroughComponent(
const Sequence<beans::PropertyValue> & rMediaDesc )
{
OSL_ENSURE( xStg.is(), "Need storage!" );
- OSL_ENSURE( NULL != pStreamName, "Need stream name!" );
- OSL_ENSURE( NULL != pServiceName, "Need service name!" );
+ OSL_ENSURE( nullptr != pStreamName, "Need stream name!" );
+ OSL_ENSURE( nullptr != pServiceName, "Need service name!" );
SAL_INFO( "sw.filter", "SwXMLWriter::WriteThroughComponent : stream " << pStreamName );
// open stream
@@ -529,7 +529,7 @@ bool SwXMLWriter::WriteThroughComponent(
{
OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
OSL_ENSURE( xComponent.is(), "Need component!" );
- OSL_ENSURE( NULL != pServiceName, "Need component name!" );
+ OSL_ENSURE( nullptr != pServiceName, "Need component name!" );
// get component
uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(rxContext);
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 78bf7b0208a3..a9a45bcfec15 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -51,7 +51,7 @@ public:
SwXMLWriter( const OUString& rBaseURL );
virtual ~SwXMLWriter();
- virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = 0 ) override;
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = nullptr ) override;
private:
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index 4e07c24a1fe2..9b1bcc5960c0 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -115,7 +115,7 @@ SvXMLImportContext *SwXMLBrushItemImportContext::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( xmloff::token::IsXMLToken( rLocalName,
xmloff::token::XML_BINARY_DATA ) )
{
@@ -146,7 +146,7 @@ void SwXMLBrushItemImportContext::EndElement()
if( xBase64Stream.is() )
{
const OUString sURL( GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream ) );
- xBase64Stream = 0;
+ xBase64Stream = nullptr;
SvXMLImportItemMapper::PutXMLValue( *pItem, sURL, MID_GRAPHIC_LINK, GetImport().GetMM100UnitConverter() );
}
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 67289a7b40ae..dfce3ca52921 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -87,12 +87,12 @@ SwXMLExport::SwXMLExport(
OUString const & implementationName, SvXMLExportFlags nExportFlags)
: SvXMLExport( util::MeasureUnit::INCH, rContext, implementationName, XML_TEXT,
nExportFlags ),
- pTableItemMapper( 0 ),
- pTableLines( 0 ),
+ pTableItemMapper( nullptr ),
+ pTableLines( nullptr ),
bBlock( false ),
bShowProgress( true ),
bSavedShowChanges( false ),
- doc( NULL ),
+ doc( nullptr ),
sNumberFormat("NumberFormat"),
sIsProtected("IsProtected"),
sCell("Cell")
@@ -163,7 +163,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
for( sal_uInt32 i = 0; i < nItems; ++i )
{
const SfxPoolItem* const pItem = rPool.GetItem2( nWhichId , i );
- if( 0 != pItem )
+ if( nullptr != pItem )
{
const SvXMLAttrContainerItem *pUnknown =
dynamic_cast<const SvXMLAttrContainerItem*>( pItem );
@@ -250,7 +250,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
// we don't need it here.
// else: keep default pClass that we received
- SvXMLGraphicHelper *pGraphicResolver = 0;
+ SvXMLGraphicHelper *pGraphicResolver = nullptr;
if( !GetGraphicResolver().is() )
{
pGraphicResolver = SvXMLGraphicHelper::Create( GRAPHICHELPER_MODE_WRITE );
@@ -258,7 +258,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
SetGraphicResolver( xGraphicResolver );
}
- SvXMLEmbeddedObjectHelper *pEmbeddedResolver = 0;
+ SvXMLEmbeddedObjectHelper *pEmbeddedResolver = nullptr;
if( !GetEmbeddedResolver().is() )
{
SfxObjectShell *pPersist = pDoc->GetPersist();
@@ -523,7 +523,7 @@ sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId )
SwDoc* SwXMLExport::getDoc()
{
- if( doc != NULL )
+ if( doc != nullptr )
return doc;
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
@@ -531,9 +531,9 @@ SwDoc* SwXMLExport::getDoc()
assert( xTextTunnel.is());
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- assert( pText != NULL );
+ assert( pText != nullptr );
doc = pText->GetDoc();
- assert( doc != NULL );
+ assert( doc != nullptr );
return doc;
}
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 637ec9e17a83..c556a4da7983 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -149,7 +149,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
}
if( dynamic_cast<const SvXMLAttrContainerItem*>( &rItem) != nullptr )
{
- SvXMLNamespaceMap *pNewNamespaceMap = 0;
+ SvXMLNamespaceMap *pNewNamespaceMap = nullptr;
const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap;
const SvXMLAttrContainerItem *pUnknown =
@@ -274,7 +274,7 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet,
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -594,8 +594,8 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case TOP_BORDER:
case BOTTOM_BORDER:
{
- bool bEqual = ( NULL == pTop && NULL == pBottom &&
- NULL == pLeft && NULL == pRight ) ||
+ bool bEqual = ( nullptr == pTop && nullptr == pBottom &&
+ nullptr == pLeft && nullptr == pRight ) ||
( pTop && pBottom && pLeft && pRight &&
*pTop == *pBottom && *pTop == *pLeft &&
*pTop == *pRight );
@@ -617,10 +617,10 @@ bool SvXMLExportItemMapper::QueryXMLValue(
if( !pTop && !pBottom && !pLeft && !pRight )
return false;
- bool bEqual = NULL != pTop &&
- NULL != pBottom &&
- NULL != pLeft &&
- NULL != pRight;
+ bool bEqual = nullptr != pTop &&
+ nullptr != pBottom &&
+ nullptr != pLeft &&
+ nullptr != pRight;
if( bEqual )
{
@@ -651,25 +651,25 @@ bool SvXMLExportItemMapper::QueryXMLValue(
return false;
break;
case LEFT_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pLeft ||
+ if( bEqual || nullptr == pLeft ||
0 == pLeft->GetDistance() ||
!lcl_isOdfDoubleLine( pLeft ) )
return false;
break;
case RIGHT_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pRight ||
+ if( bEqual || nullptr == pRight ||
0 == pRight->GetDistance() ||
!lcl_isOdfDoubleLine( pRight ) )
return false;
break;
case TOP_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pTop ||
+ if( bEqual || nullptr == pTop ||
0 == pTop->GetDistance() ||
!lcl_isOdfDoubleLine( pTop ) )
return false;
break;
case BOTTOM_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pBottom ||
+ if( bEqual || nullptr == pBottom ||
0 == pBottom->GetDistance() ||
!lcl_isOdfDoubleLine( pBottom ) )
return false;
@@ -721,11 +721,11 @@ bool SvXMLExportItemMapper::QueryXMLValue(
pLine = pBottom;
break;
default:
- pLine = NULL;
+ pLine = nullptr;
break;
}
- if( NULL != pLine )
+ if( nullptr != pLine )
{
sal_Int32 nWidth = pLine->GetWidth();
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index 4ae4612d1dc1..66ab4202b52f 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -82,7 +82,7 @@ public:
const SfxPoolItem& rItem,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const SfxItemSet *pSet = NULL ) const;
+ const SfxItemSet *pSet = nullptr ) const;
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_EXPORT flag set */
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index f8e9e33ddc0b..acf62efd26a6 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -316,7 +316,7 @@ SwXMLTextStyleContext_Impl::SwXMLTextStyleContext_Impl( SwXMLImport& rImport,
sal_uInt16 nFamily,
SvXMLStylesContext& rStyles ) :
XMLTextStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily ),
- pConditions( 0 )
+ pConditions( nullptr )
{
}
@@ -339,7 +339,7 @@ SvXMLImportContext *SwXMLTextStyleContext_Impl::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MAP ) )
{
@@ -374,7 +374,7 @@ void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite )
if( !xStyle.is() )
return;
- const SwXStyle* pStyle = 0;
+ const SwXStyle* pStyle = nullptr;
uno::Reference<lang::XUnoTunnel> xStyleTunnel( xStyle, uno::UNO_QUERY);
if( xStyleTunnel.is() )
{
@@ -510,7 +510,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
OSL_ENSURE( !pItemSet,
"SwXMLItemSetStyleContext_Impl::CreateItemSetContext: item set exists" );
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
SwDoc* pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
@@ -541,7 +541,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
if( !pContext )
{
delete pItemSet;
- pItemSet = 0;
+ pItemSet = nullptr;
}
return pContext;
@@ -555,8 +555,8 @@ SwXMLItemSetStyleContext_Impl::SwXMLItemSetStyleContext_Impl( SwXMLImport& rImpo
SvXMLStylesContext& rStylesC,
sal_uInt16 nFamily ) :
SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily ),
- pItemSet( 0 ),
- pTextStyle( 0 ),
+ pItemSet( nullptr ),
+ pTextStyle( nullptr ),
rStyles( rStylesC ),
bHasMasterPageName( false ),
bPageDescConnected( false ),
@@ -580,7 +580,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_STYLE == nPrefix )
{
@@ -653,7 +653,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
}
const SfxPoolItem *pItem;
- SwFormatPageDesc *pFormatPageDesc = 0;
+ SwFormatPageDesc *pFormatPageDesc = nullptr;
if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false,
&pItem ) )
{
@@ -750,7 +750,7 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateStyleStyleChildContext(
sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLStyleContext *pStyle = 0;
+ SvXMLStyleContext *pStyle = nullptr;
switch( nFamily )
{
@@ -786,7 +786,7 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateDefaultStyleStyleChildContext(
sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLStyleContext *pStyle = 0;
+ SvXMLStyleContext *pStyle = nullptr;
switch( nFamily )
{
@@ -1041,7 +1041,7 @@ bool SwXMLImport::FindAutomaticStyle(
const SfxItemSet **ppItemSet,
OUString *pParent ) const
{
- SwXMLItemSetStyleContext_Impl *pStyle = 0;
+ SwXMLItemSetStyleContext_Impl *pStyle = nullptr;
if( GetAutoStyles() )
{
pStyle = const_cast<SwXMLItemSetStyleContext_Impl*>(dynamic_cast< const SwXMLItemSetStyleContext_Impl* >(
@@ -1072,7 +1072,7 @@ bool SwXMLImport::FindAutomaticStyle(
}
}
- return pStyle != 0;
+ return pStyle != nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index a59ae3a3aa15..73bee7ba6d89 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -58,7 +58,7 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
sal_uInt32 nItems = rPool.GetItemCount2( nWhichId );
for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
+ if( nullptr != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont =
static_cast<const SvxFontItem *>(pItem);
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index bd8d5538e209..78ee5864f0fa 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -196,7 +196,7 @@ SvXMLImportContext *SwXMLDocContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetSwImport().GetDocElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLocalName ) )
@@ -368,7 +368,7 @@ SvXMLImportContext *SwXMLImport::CreateContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
// #i69629# - own subclasses for <office:document> and <office:document-styles>
if( XML_NAMESPACE_OFFICE==nPrefix &&
@@ -406,13 +406,13 @@ SwXMLImport::SwXMLImport(
const uno::Reference< uno::XComponentContext >& rContext,
OUString const & implementationName, SvXMLImportFlags nImportFlags)
: SvXMLImport( rContext, implementationName, nImportFlags ),
- pSttNdIdx( 0 ),
- pTableItemMapper( 0 ),
- pDocElemTokenMap( 0 ),
- pTableElemTokenMap( 0 ),
- pTableCellAttrTokenMap( 0 ),
- pGraphicResolver( 0 ),
- pEmbeddedResolver( 0 ),
+ pSttNdIdx( nullptr ),
+ pTableItemMapper( nullptr ),
+ pDocElemTokenMap( nullptr ),
+ pTableElemTokenMap( nullptr ),
+ pTableCellAttrTokenMap( nullptr ),
+ pGraphicResolver( nullptr ),
+ pEmbeddedResolver( nullptr ),
nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ),
bLoadDoc( true ),
bInsert( false ),
@@ -421,7 +421,7 @@ SwXMLImport::SwXMLImport(
bOrganizerMode( false ),
bInititedXForms( false ),
bPreserveRedlineMode( true ),
- doc( NULL )
+ doc( nullptr )
{
_InitItemImport();
@@ -491,7 +491,7 @@ static OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCurso
Reference<XUnoTunnel> xCrsrTunnel( rTextCursor, UNO_QUERY );
OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xCrsrTunnel.is() )
- return 0;
+ return nullptr;
OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" );
@@ -596,7 +596,7 @@ void SwXMLImport::startDocument()
// We also might change into the insert mode later, so we have to make
// sure to first set the insert mode and then create the text import
// helper. Otherwise it won't have the insert flag set!
- OTextCursorHelper *pTextCrsr = 0;
+ OTextCursorHelper *pTextCrsr = nullptr;
Reference < XTextCursor > xTextCursor;
if( HasTextImport() )
xTextCursor = GetTextImport()->GetCursor();
@@ -605,8 +605,8 @@ void SwXMLImport::startDocument()
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
xTextCursor = xText->createTextCursor();
- SwCrsrShell *pCrsrSh = 0;
- SwDoc *pDoc = 0;
+ SwCrsrShell *pCrsrSh = nullptr;
+ SwDoc *pDoc = nullptr;
if( SvXMLImportFlags::ALL == getImportFlags() )
{
pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor );
@@ -629,10 +629,10 @@ void SwXMLImport::startDocument()
{
const uno::Reference<text::XTextRange> xInsertTextRange(
SwXTextRange::CreateXTextRange(
- *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) );
+ *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), nullptr ) );
setTextInsertMode( xInsertTextRange );
xTextCursor = GetTextImport()->GetCursor();
- pTextCrsr = 0;
+ pTextCrsr = nullptr;
}
else
GetTextImport()->SetCursor( xTextCursor );
@@ -730,7 +730,7 @@ void SwXMLImport::endDocument()
if( HasShapeImport() )
ClearShapeImport();
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
if( (getImportFlags() & SvXMLImportFlags::CONTENT) && !IsStylesOnlyMode() )
{
Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(),
@@ -819,13 +819,13 @@ void SwXMLImport::endDocument()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- pPaM->GetBound().nContent.Assign( 0, 0 );
- pPaM->GetBound(false).nContent.Assign( 0, 0 );
+ pPaM->GetBound().nContent.Assign( nullptr, 0 );
+ pPaM->GetBound(false).nContent.Assign( nullptr, 0 );
pDoc->GetNodes().Delete( pPaM->GetPoint()->nNode );
}
}
}
- else if( 0 != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTextNode()) )
+ else if( nullptr != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTextNode()) )
{
// Id we're in insert mode, the empty node is joined with
// the next and the previous one.
@@ -846,7 +846,7 @@ void SwXMLImport::endDocument()
}
else if (pCurrNd->GetText().isEmpty())
{
- pPos->nContent.Assign( 0, 0 );
+ pPos->nContent.Assign( nullptr, 0 );
pPaM->SetMark(); pPaM->DeleteMark();
pDoc->GetNodes().Delete( pPos->nNode );
pPaM->Move( fnMoveBackward );
@@ -870,7 +870,7 @@ void SwXMLImport::endDocument()
GetTextImport()->ResetCursor();
delete pSttNdIdx;
- pSttNdIdx = 0;
+ pSttNdIdx = nullptr;
// SJ: #i49801# -> now permitting repaints
if ( pDoc )
@@ -1168,10 +1168,10 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bPropLineSpacingShrinksFirstLine = false;
bool bSubtractFlysAnchoredAtFlys = false;
- const PropertyValue* currentDatabaseDataSource = NULL;
- const PropertyValue* currentDatabaseCommand = NULL;
- const PropertyValue* currentDatabaseCommandType = NULL;
- const PropertyValue* embeddedDatabaseName = 0;
+ const PropertyValue* currentDatabaseDataSource = nullptr;
+ const PropertyValue* currentDatabaseCommand = nullptr;
+ const PropertyValue* currentDatabaseCommandType = nullptr;
+ const PropertyValue* embeddedDatabaseName = nullptr;
while( nCount-- )
{
@@ -1274,11 +1274,11 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
try
{
- if( currentDatabaseDataSource != NULL )
+ if( currentDatabaseDataSource != nullptr )
xProps->setPropertyValue( currentDatabaseDataSource->Name, currentDatabaseDataSource->Value );
- if( currentDatabaseCommand != NULL )
+ if( currentDatabaseCommand != nullptr )
xProps->setPropertyValue( currentDatabaseCommand->Name, currentDatabaseCommand->Value );
- if( currentDatabaseCommandType != NULL )
+ if( currentDatabaseCommandType != nullptr )
xProps->setPropertyValue( currentDatabaseCommandType->Name, currentDatabaseCommandType->Value );
if (embeddedDatabaseName)
xProps->setPropertyValue(embeddedDatabaseName->Name, embeddedDatabaseName->Value);
@@ -1530,7 +1530,7 @@ void SwXMLImport::initXForms()
return;
SwXTextDocument* pXTextDocument = reinterpret_cast<SwXTextDocument*>(
xDocTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ) );
- if( pXTextDocument == NULL )
+ if( pXTextDocument == nullptr )
return;
SwDoc *pDoc = pXTextDocument->GetDocShell()->GetDoc();
@@ -1545,7 +1545,7 @@ void SwXMLImport::initXForms()
SwDoc* SwXMLImport::getDoc()
{
- if( doc != NULL )
+ if( doc != nullptr )
return doc;
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
@@ -1553,9 +1553,9 @@ SwDoc* SwXMLImport::getDoc()
assert( xTextTunnel.is());
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- assert( pText != NULL );
+ assert( pText != nullptr );
doc = pText->GetDoc();
- assert( doc != NULL );
+ assert( doc != nullptr );
return doc;
}
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index c5e461445c7c..28ea68aeb946 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -166,8 +166,8 @@ public:
bool FindAutomaticStyle( sal_uInt16 nFamily,
const OUString& rName,
- const SfxItemSet **ppItemSet=0,
- OUString *pParent=0 ) const;
+ const SfxItemSet **ppItemSet=nullptr,
+ OUString *pParent=nullptr ) const;
virtual void SetStatistics(
const css::uno::Sequence< css::beans::NamedValue> & i_rStats) override;
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 90a17b7c2c73..2a0d155f9f93 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -83,7 +83,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
sal_Int16 nAttr = xAttrList->getLength();
- SvXMLAttrContainerItem *pUnknownItem = 0;
+ SvXMLAttrContainerItem *pUnknownItem = nullptr;
for( sal_Int16 i=0; i < nAttr; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
@@ -106,7 +106,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
MID_SW_FLAG_ELEMENT_ITEM_IMPORT)) )
{
// first get item from itemset
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, true,
&pItem );
@@ -154,7 +154,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
if( !pUnknownItem )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( nUnknownWhich, true,
&pItem ) )
{
@@ -231,14 +231,14 @@ struct BoxHolder : private boost::noncopyable
explicit BoxHolder(SvxBoxItem& rBox)
{
- pTop = rBox.GetTop() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetTop() );
- pBottom = rBox.GetBottom() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetBottom() );
- pLeft = rBox.GetLeft() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetLeft() );
- pRight = rBox.GetRight() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetRight() );
+ pTop = rBox.GetTop() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetTop() );
+ pBottom = rBox.GetBottom() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetBottom() );
+ pLeft = rBox.GetLeft() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetLeft() );
+ pRight = rBox.GetRight() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetRight() );
}
~BoxHolder()
@@ -932,7 +932,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
const XMLPropertyHandler* pWritingModeHandler =
XMLPropertyHandlerFactory::CreatePropertyHandler(
XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT );
- if( pWritingModeHandler != NULL )
+ if( pWritingModeHandler != nullptr )
{
Any aAny;
bOk = pWritingModeHandler->importXML( rValue, aAny,
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 2b28b352f7df..538e720388cb 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -75,7 +75,7 @@ public:
const SfxPoolItem& rItem,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const SfxItemSet *pSet = NULL ) const override;
+ const SfxItemSet *pSet = nullptr ) const override;
virtual void handleElementItem(
SvXMLExport& rExport,
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index ddecdccc0c35..b2030a6ad5c5 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -212,7 +212,7 @@ void SwXMLImportTableItemMapper_Impl::finished(
continue; // already read fo:margin-top etc.
}
// first get item from itemset
- SfxPoolItem const* pItem = 0;
+ SfxPoolItem const* pItem = nullptr;
SfxItemState eState =
rSet.GetItemState(Ids[i][0], true, &pItem);
@@ -294,7 +294,7 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext(
const SvXMLItemMapEntry& rEntry,
const SvXMLUnitConverter& _rUnitConv )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
switch( rEntry.nWhichId )
{
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 2ad46ab74ee5..9d57fb6c7cd4 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -165,11 +165,11 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
if( (bHasStyle && API_LINE_NONE == nStyle) ||
(bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
{
- bool bRet = 0 != rpLine;
+ bool bRet = nullptr != rpLine;
if( rpLine )
{
delete rpLine;
- rpLine = 0;
+ rpLine = nullptr;
}
return bRet;
diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx
index d9738a83c7c3..00c7fcac027d 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -66,7 +66,7 @@ public:
SvXMLItemMapEntry* getByName( sal_uInt16 nNameSpace,
const OUString& rString,
- SvXMLItemMapEntry* pStartAt = NULL ) const;
+ SvXMLItemMapEntry* pStartAt = nullptr ) const;
SvXMLItemMapEntry& getByIndex( sal_uInt16 nIndex ) const;
sal_uInt16 getCount() const;
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index 7a119e7d0885..cec6e645f8fb 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -64,7 +64,7 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
pMap++;
}
- return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : NULL;
+ return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : nullptr;
}
SvXMLItemMapEntry& SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 9a201702688f..b79dcc5a2764 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -46,7 +46,7 @@ SwXMLImport::GetDocumentProperties() const
if (IsOrganizerMode() || IsStylesOnlyMode() ||
IsBlockMode() || IsInsertMode())
{
- return 0;
+ return nullptr;
}
uno::Reference<document::XDocumentPropertiesSupplier> const xDPS(
GetModel(), UNO_QUERY_THROW);
@@ -56,7 +56,7 @@ SwXMLImport::GetDocumentProperties() const
SvXMLImportContext *SwXMLImport::CreateMetaContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (getImportFlags() & SvXMLImportFlags::META)
{
@@ -94,15 +94,15 @@ struct statistic {
};
static const struct statistic s_stats [] = {
- { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTable, 0 },
- { XML_TOK_META_STAT_IMAGE, "ImageCount", &SwDocStat::nGrf, 0 },
- { XML_TOK_META_STAT_OLE, "ObjectCount", &SwDocStat::nOLE, 0 },
- { XML_TOK_META_STAT_PAGE, "PageCount", 0, &SwDocStat::nPage },
- { XML_TOK_META_STAT_PARA, "ParagraphCount", 0, &SwDocStat::nPara },
- { XML_TOK_META_STAT_WORD, "WordCount", 0, &SwDocStat::nWord },
- { XML_TOK_META_STAT_CHAR, "CharacterCount", 0, &SwDocStat::nChar },
- { XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR, "NonWhitespaceCharacterCount", 0, &SwDocStat::nCharExcludingSpaces },
- { XML_TOK_META_STAT_END, 0, 0, 0 }
+ { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTable, nullptr },
+ { XML_TOK_META_STAT_IMAGE, "ImageCount", &SwDocStat::nGrf, nullptr },
+ { XML_TOK_META_STAT_OLE, "ObjectCount", &SwDocStat::nOLE, nullptr },
+ { XML_TOK_META_STAT_PAGE, "PageCount", nullptr, &SwDocStat::nPage },
+ { XML_TOK_META_STAT_PARA, "ParagraphCount", nullptr, &SwDocStat::nPara },
+ { XML_TOK_META_STAT_WORD, "WordCount", nullptr, &SwDocStat::nWord },
+ { XML_TOK_META_STAT_CHAR, "CharacterCount", nullptr, &SwDocStat::nChar },
+ { XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR, "NonWhitespaceCharacterCount", nullptr, &SwDocStat::nCharExcludingSpaces },
+ { XML_TOK_META_STAT_END, nullptr, nullptr, nullptr }
};
void SwXMLImport::SetStatistics(
@@ -119,12 +119,12 @@ void SwXMLImport::SetStatistics(
sal_uInt32 nTokens = 0;
for (sal_Int32 i = 0; i < i_rStats.getLength(); ++i) {
- for (struct statistic const* pStat = s_stats; pStat->name != 0;
+ for (struct statistic const* pStat = s_stats; pStat->name != nullptr;
++pStat) {
if (i_rStats[i].Name.equalsAscii(pStat->name)) {
sal_Int32 val = 0;
if (i_rStats[i].Value >>= val) {
- if (pStat->target16 != 0) {
+ if (pStat->target16 != nullptr) {
aDocStat.*(pStat->target16)
= static_cast<sal_uInt16> (val);
} else {
diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx
index 39b8dda5a884..7b514596fcb8 100644
--- a/sw/source/filter/xml/xmlscript.cxx
+++ b/sw/source/filter/xml/xmlscript.cxx
@@ -29,7 +29,7 @@ using namespace ::com::sun::star;
SvXMLImportContext *SwXMLImport::CreateScriptContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !(IsStylesOnlyMode() || IsInsertMode()) )
{
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 66b1388b377c..1852787fb193 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -191,9 +191,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nLine )
{
- const SwFormatFrmSize *pFrmSize = 0;
- const SwFormatRowSplit* pRowSplit = 0;
- const SvxBrushItem *pBrush = 0;
+ const SwFormatFrmSize *pFrmSize = nullptr;
+ const SwFormatRowSplit* pRowSplit = nullptr;
+ const SvxBrushItem *pBrush = nullptr;
const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet();
const SfxPoolItem *pItem;
@@ -215,9 +215,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
- const SwFormatFrmSize *pTestFrmSize = 0;
- const SwFormatRowSplit* pTestRowSplit = 0;
- const SvxBrushItem *pTestBrush = 0;
+ const SwFormatFrmSize *pTestFrmSize = nullptr;
+ const SwFormatRowSplit* pTestRowSplit = nullptr;
+ const SvxBrushItem *pTestBrush = nullptr;
const SwFrameFormat *pTestFormat = *i;
const SfxItemSet& rTestSet = pTestFormat->GetAttrSet();
if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false,
@@ -307,11 +307,11 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
- const SwFormatVertOrient *pVertOrient = 0;
- const SvxBrushItem *pBrush = 0;
- const SvxBoxItem *pBox = 0;
- const SwTableBoxNumFormat *pNumFormat = 0;
- const SvxFrameDirectionItem *pFrameDir = 0;
+ const SwFormatVertOrient *pVertOrient = nullptr;
+ const SvxBrushItem *pBrush = nullptr;
+ const SvxBoxItem *pBox = nullptr;
+ const SwTableBoxNumFormat *pNumFormat = nullptr;
+ const SvxFrameDirectionItem *pFrameDir = nullptr;
const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet();
const SfxPoolItem *pItem;
@@ -346,11 +346,11 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
- const SwFormatVertOrient *pTestVertOrient = 0;
- const SvxBrushItem *pTestBrush = 0;
- const SvxBoxItem *pTestBox = 0;
- const SwTableBoxNumFormat *pTestNumFormat = 0;
- const SvxFrameDirectionItem *pTestFrameDir = 0;
+ const SwFormatVertOrient *pTestVertOrient = nullptr;
+ const SvxBrushItem *pTestBrush = nullptr;
+ const SvxBoxItem *pTestBox = nullptr;
+ const SwTableBoxNumFormat *pTestNumFormat = nullptr;
+ const SvxFrameDirectionItem *pTestFrameDir = nullptr;
const SwFrameFormat* pTestFormat = *i;
const SfxItemSet& rTestSet = pTestFormat->GetAttrSet();
if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false,
@@ -948,7 +948,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
if( !pTableLines || pTableLines->empty() )
return;
- SwXMLTableLines_Impl* pLines = NULL;
+ SwXMLTableLines_Impl* pLines = nullptr;
size_t nInfoPos;
for( nInfoPos=0; nInfoPos < pTableLines->size(); nInfoPos++ )
{
@@ -972,7 +972,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
if( pTableLines->empty() )
{
delete pTableLines ;
- pTableLines = NULL;
+ pTableLines = nullptr;
}
// pass 2: export columns
@@ -980,12 +980,12 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
size_t nColumn = 0U;
const size_t nColumns = rCols.size();
sal_Int32 nColRep = 1;
- SwXMLTableColumn_Impl *pColumn = (nColumns > 0) ? rCols[0U] : 0;
+ SwXMLTableColumn_Impl *pColumn = (nColumns > 0) ? rCols[0U] : nullptr;
while( pColumn )
{
nColumn++;
SwXMLTableColumn_Impl *pNextColumn =
- (nColumn < nColumns) ? rCols[nColumn] : 0;
+ (nColumn < nColumns) ? rCols[nColumn] : nullptr;
if( pNextColumn &&
pNextColumn->GetStyleName() == pColumn->GetStyleName() )
{
@@ -1128,7 +1128,7 @@ void SwXMLTextParagraphExport::exportTable(
OSL_ENSURE( xTextTable.is(), "text table missing" );
if( xTextTable.is() )
{
- const SwXTextTable *pXTable = 0;
+ const SwXTextTable *pXTable = nullptr;
Reference<XUnoTunnel> xTableTunnel( rTextContent, UNO_QUERY);
if( xTableTunnel.is() )
{
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 386326a22f88..8999e9c7c285 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -188,7 +188,7 @@ public:
SwXMLTableCell_Impl( sal_uInt32 nRSpan=1UL, sal_uInt32 nCSpan=1UL ) :
dValue( 0.0 ),
- pStartNode( 0 ),
+ pStartNode( nullptr ),
nRowSpan( nRSpan ),
nColSpan( nCSpan ),
bProtected( false ),
@@ -208,7 +208,7 @@ public:
OUString const*const pStringValue,
OUString const& i_rXmlId);
- bool IsUsed() const { return pStartNode!=0 ||
+ bool IsUsed() const { return pStartNode!=nullptr ||
xSubTable.Is() || bProtected;}
sal_uInt32 GetRowSpan() const { return nRowSpan; }
@@ -222,7 +222,7 @@ public:
bool IsCovered() const { return mbCovered; }
bool HasStringValue() const { return m_bHasStringValue; }
OUString const* GetStringValue() const {
- return (m_bHasStringValue) ? &m_StringValue : 0;
+ return (m_bHasStringValue) ? &m_StringValue : nullptr;
}
const SwStartNode *GetStartNode() const { return pStartNode; }
@@ -257,7 +257,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
{
m_StringValue = *pStringValue;
}
- m_bHasStringValue = (pStringValue != 0);
+ m_bHasStringValue = (pStringValue != nullptr);
bProtected = bProtect;
if (!mbCovered) // ensure uniqueness
@@ -266,7 +266,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
}
// set formula, if valid
- if (pFormula != NULL)
+ if (pFormula != nullptr)
{
sFormula = *pFormula;
}
@@ -275,7 +275,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
inline void SwXMLTableCell_Impl::SetStartNode( const SwStartNode *pSttNd )
{
pStartNode = pSttNd;
- xSubTable = 0;
+ xSubTable = nullptr;
}
inline SwXMLTableContext *SwXMLTableCell_Impl::GetSubTable() const
@@ -286,7 +286,7 @@ inline SwXMLTableContext *SwXMLTableCell_Impl::GetSubTable() const
inline void SwXMLTableCell_Impl::Dispose()
{
if( xSubTable.Is() )
- xSubTable = 0;
+ xSubTable = nullptr;
}
class SwXMLTableRow_Impl
@@ -300,7 +300,7 @@ class SwXMLTableRow_Impl
public:
SwXMLTableRow_Impl( const OUString& rStyleName, sal_uInt32 nCells,
- const OUString *pDfltCellStyleName = 0,
+ const OUString *pDfltCellStyleName = nullptr,
const OUString& i_rXmlId = OUString() );
~SwXMLTableRow_Impl() {}
@@ -576,14 +576,14 @@ SwXMLTableCellContext_Impl::~SwXMLTableCellContext_Impl()
inline void SwXMLTableCellContext_Impl::_InsertContent()
{
- SwStartNode const*const pStartNode( GetTable()->InsertTableSection(0,
+ SwStartNode const*const pStartNode( GetTable()->InsertTableSection(nullptr,
(m_bHasStringValue && m_bValueTypeIsString &&
- !aStyleName.isEmpty()) ? & aStyleName : 0) );
+ !aStyleName.isEmpty()) ? & aStyleName : nullptr) );
GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan,
pStartNode,
mXmlId,
- NULL, bProtect, &sFormula, bHasValue, fValue,
- (m_bHasStringValue && m_bValueTypeIsString) ? &m_StringValue : 0);
+ nullptr, bProtect, &sFormula, bHasValue, fValue,
+ (m_bHasStringValue && m_bValueTypeIsString) ? &m_StringValue : nullptr);
}
inline void SwXMLTableCellContext_Impl::InsertContent()
@@ -602,7 +602,7 @@ inline void SwXMLTableCellContext_Impl::InsertContentIfNotThere()
inline void SwXMLTableCellContext_Impl::InsertContent(
SwXMLTableContext *pTable )
{
- GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan, 0, mXmlId, pTable, bProtect );
+ GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan, nullptr, mXmlId, pTable, bProtect );
bHasTableContent = true;
}
@@ -611,7 +611,7 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
OUString sXmlId;
bool bSubTable = false;
@@ -793,7 +793,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
if( !aStyleName.isEmpty() )
{
const SfxPoolItem *pItem;
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_COLUMN,
aStyleName, &pAutoItemSet ) &&
@@ -859,7 +859,7 @@ SvXMLImportContext *SwXMLTableColsContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix &&
IsXMLToken( rLocalName, XML_TABLE_COLUMN ) &&
@@ -970,7 +970,7 @@ SvXMLImportContext *SwXMLTableRowContext_Impl::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix )
{
@@ -1040,7 +1040,7 @@ SvXMLImportContext *SwXMLTableRowsContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix &&
IsXMLToken( rLocalName, XML_TABLE_ROW ) &&
@@ -1163,7 +1163,7 @@ static OUString lcl_GenerateFieldTypeName(const OUString& sPrefix, SwTableNode*
++nCount;
sName = sPrefixStr + OUString::number(nCount);
}
- while (NULL != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
+ while (nullptr != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
return sName;
}
@@ -1186,7 +1186,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
OUString sName(pContext->GetConnectionName());
// field type to be returned
- SwDDEFieldType* pType = NULL;
+ SwDDEFieldType* pType = nullptr;
// valid name?
if (sName.isEmpty())
@@ -1198,7 +1198,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
{
// check for existing DDE field type with the same name
SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
- if (NULL != pOldType)
+ if (nullptr != pOldType)
{
// same values -> return old type
if ( (pOldType->GetCmd() == sCommand) &&
@@ -1218,7 +1218,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
}
// create new field type (unless we already have one)
- if (NULL == pType)
+ if (nullptr == pType)
{
// create new field type and return
SwDDEFieldType aDDEFieldType(sName, sCommand, nType);
@@ -1226,7 +1226,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
GetDoc()->getIDocumentFieldsAccess().InsertFieldType(aDDEFieldType));
}
- OSL_ENSURE(NULL != pType, "We really want a SwDDEFieldType here!");
+ OSL_ENSURE(nullptr != pType, "We really want a SwDDEFieldType here!");
return pType;
}
@@ -1280,15 +1280,15 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- pColumnDefaultCellStyleNames( 0 ),
+ pColumnDefaultCellStyleNames( nullptr ),
m_pRows( new SwXMLTableRows_Impl ),
- pTableNode( 0 ),
- pBox1( 0 ),
- pSttNd1( 0 ),
- pBoxFormat( 0 ),
- pLineFormat( 0 ),
- pSharedBoxFormats(NULL),
- pDDESource(NULL),
+ pTableNode( nullptr ),
+ pBox1( nullptr ),
+ pSttNd1( nullptr ),
+ pBoxFormat( nullptr ),
+ pLineFormat( nullptr ),
+ pSharedBoxFormats(nullptr),
+ pDDESource(nullptr),
bFirstSection( true ),
bRelWidth( true ),
bHasSubTables( false ),
@@ -1346,7 +1346,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
}
Reference< XTextTable > xTable;
- const SwXTextTable *pXTable = 0;
+ const SwXTextTable *pXTable = nullptr;
Reference<XMultiServiceFactory> xFactory( GetImport().GetModel(),
UNO_QUERY );
OSL_ENSURE( xFactory.is(), "factory missing" );
@@ -1370,7 +1370,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
}
catch( IllegalArgumentException& )
{
- xTable = 0;
+ xTable = nullptr;
}
}
@@ -1420,16 +1420,16 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
const Reference< xml::sax::XAttributeList > &,
SwXMLTableContext *pTable ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- pColumnDefaultCellStyleNames( 0 ),
+ pColumnDefaultCellStyleNames( nullptr ),
m_pRows( new SwXMLTableRows_Impl ),
pTableNode( pTable->pTableNode ),
- pBox1( 0 ),
- pSttNd1( 0 ),
- pBoxFormat( 0 ),
- pLineFormat( 0 ),
- pSharedBoxFormats(NULL),
+ pBox1( nullptr ),
+ pSttNd1( nullptr ),
+ pBoxFormat( nullptr ),
+ pLineFormat( nullptr ),
+ pSharedBoxFormats(nullptr),
xParentTable( pTable ),
- pDDESource(NULL),
+ pDDESource(nullptr),
bFirstSection( false ),
bRelWidth( true ),
bHasSubTables( false ),
@@ -1454,7 +1454,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetSwImport().GetTableElemTokenMap();
bool bHeader = false;
@@ -1491,7 +1491,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
// save context for later processing (discard old context, if approp.)
if( IsValid() )
{
- if (pDDESource != NULL)
+ if (pDDESource != nullptr)
{
pDDESource->ReleaseRef();
}
@@ -1730,7 +1730,7 @@ void SwXMLTableContext::InsertRepRows( sal_uInt32 nCount )
pSrcCell->GetColSpan(),
InsertTableSection(),
OUString(),
- 0, pSrcCell->IsProtected(),
+ nullptr, pSrcCell->IsProtected(),
&pSrcCell->GetFormula(),
pSrcCell->HasValue(), pSrcCell->GetValue(),
pSrcCell->GetStringValue() );
@@ -1757,7 +1757,7 @@ void SwXMLTableContext::FinishRow()
const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
sal_uInt32 nCol ) const
{
- const SwXMLTableCell_Impl *pPrevCell = 0;
+ const SwXMLTableCell_Impl *pPrevCell = nullptr;
if( GetColumnCount() == nCol )
{
// The last cell is the right one here.
@@ -1774,7 +1774,7 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
pPrevCell = GetCell( nRow-1UL, GetColumnCount()-1UL );
}
- const SwStartNode *pSttNd = 0;
+ const SwStartNode *pSttNd = nullptr;
if( pPrevCell )
{
if( pPrevCell->GetStartNode() )
@@ -1784,7 +1784,7 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
else if ( pPrevCell->GetSubTable() )
pSttNd = pPrevCell->GetSubTable()->GetLastStartNode();
- OSL_ENSURE( pSttNd != 0,
+ OSL_ENSURE( pSttNd != nullptr,
"table corrupt" );
}
@@ -1803,7 +1803,7 @@ void SwXMLTableContext::FixRowSpan( sal_uInt32 nRow, sal_uInt32 nCol,
while( pCell && pCell->GetRowSpan() > 1UL )
{
pCell->SetRowSpan( nRowSpan++ );
- pCell = j > 0UL ? GetCell( --j, i ) : 0;
+ pCell = j > 0UL ? GetCell( --j, i ) : nullptr;
}
}
}
@@ -1844,7 +1844,7 @@ SwTableBox *SwXMLTableContext::NewTableBox( const SwStartNode *pStNd,
// created box, we use this box
pBox = pBox1;
pBox->SetUpper( pUpper );
- pBox1 = 0;
+ pBox1 = nullptr;
}
else
pBox = new SwTableBox( pBoxFormat, *pStNd, pUpper );
@@ -1861,7 +1861,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat(
bool& bNew,
bool* pModifyLocked )
{
- if ( pSharedBoxFormats == NULL )
+ if ( pSharedBoxFormats == nullptr )
pSharedBoxFormats = new map_BoxFormat();
SwTableBoxFormat* pBoxFormat2;
@@ -1897,7 +1897,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat(
}
// lock format (if so desired)
- if ( pModifyLocked != NULL )
+ if ( pModifyLocked != nullptr )
{
(*pModifyLocked) = pBoxFormat2->IsModifyLocked();
pBoxFormat2->LockModify();
@@ -2039,7 +2039,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
if ( bNew )
{
// set style
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( pCell->GetStartNode() && !sStyleName.isEmpty() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
@@ -2078,13 +2078,13 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
!sStyleName.isEmpty() )
{
// default num format?
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pBoxFormat2->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
== SfxItemState::SET )
{
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( ( pNumFormat != NULL ) && ( pNumFormat->GetValue() == 0 ) )
+ if( ( pNumFormat != nullptr ) && ( pNumFormat->GetValue() == 0 ) )
{
// only one text node?
SwNodeIndex aNodeIndex( *(pCell->GetStartNode()), 1 );
@@ -2092,7 +2092,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
aNodeIndex.GetNode().StartOfSectionIndex() ) == 2 )
{
SwTextNode* pTextNode= aNodeIndex.GetNode().GetTextNode();
- if( pTextNode != NULL )
+ if( pTextNode != nullptr )
{
// check text: does it look like some form of 0.0?
const OUString& rText = pTextNode->GetText();
@@ -2133,16 +2133,16 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// No value but a non-textual format, i.e. a number format
// Solution: the number format will be removed,
// the cell gets the default text format.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pBoxFormat->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
== SfxItemState::SET )
{
const SwDoc* pDoc = pBoxFormat->GetDoc();
const SvNumberFormatter* pNumberFormatter = pDoc ?
- pDoc->GetNumberFormatter() : 0;
+ pDoc->GetNumberFormatter() : nullptr;
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( pNumFormat != NULL && pNumberFormatter &&
+ if( pNumFormat != nullptr && pNumberFormatter &&
!pNumberFormatter->GetEntry( pNumFormat->GetValue() )->IsTextFormat() )
pBoxFormat->ResetFormatAttr( RES_BOXATR_FORMAT );
}
@@ -2199,7 +2199,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed
pFrameFormat->SetFormatAttr( aFillOrder );
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
const OUString& rStyleName = (*m_pRows)[nTopRow]->GetStyleName();
if( 1UL == (nBottomRow - nTopRow) &&
!rStyleName.isEmpty() &&
@@ -2266,7 +2266,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
SwXMLTableCell_Impl *pCell = GetCell(nTopRow,nCol);
// #i95726# - some fault tolerance
- if ( pCell == 0 )
+ if ( pCell == nullptr )
{
OSL_FAIL( "table seems to be corrupt." );
break;
@@ -2297,7 +2297,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
if( bSplit )
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
SwXMLTableCell_Impl *pCell = GetCell( nTopRow, nStartCol );
// #i95726# - some fault tolerance
if( ( !bHasSubTables || ( pCell->GetRowSpan() == (nBottomRow-nTopRow) ) ) &&
@@ -2646,9 +2646,9 @@ void SwXMLTableContext::MakeTable()
{
OSL_FAIL("invalid table: no cells; deleting...");
pTableNode->GetDoc()->getIDocumentContentOperations().DeleteSection( pTableNode );
- pTableNode = 0;
- pBox1 = 0;
- pSttNd1 = 0;
+ pTableNode = nullptr;
+ pBox1 = nullptr;
+ pSttNd1 = nullptr;
return;
}
@@ -2664,14 +2664,14 @@ void SwXMLTableContext::MakeTable()
pTableNode->GetTable().SetRowsToRepeat( nHeaderRows );
pTableNode->GetTable().SetTableModel( !bHasSubTables );
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( !aStyleName.isEmpty() &&
rSwImport.FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_TABLE, aStyleName, &pAutoItemSet ) &&
pAutoItemSet )
{
const SfxPoolItem *pItem;
- const SvxLRSpaceItem *pLRSpace = 0;
+ const SvxLRSpaceItem *pLRSpace = nullptr;
if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false,
&pItem ) )
pLRSpace = static_cast<const SvxLRSpaceItem *>(pItem);
@@ -2705,7 +2705,7 @@ void SwXMLTableContext::MakeTable()
bSetHoriOrient = true;
}
- const SwFormatFrmSize *pSize = 0;
+ const SwFormatFrmSize *pSize = nullptr;
if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
&pItem ) )
pSize = static_cast<const SwFormatFrmSize *>(pItem);
@@ -2788,7 +2788,7 @@ void SwXMLTableContext::MakeTable()
(*m_pRows)[i]->Dispose();
// now that table is complete, change into DDE table (if appropriate)
- if (NULL != pDDESource)
+ if (nullptr != pDDESource)
{
// change existing table into DDE table:
// 1) Get DDE field type (get data from dde-source context),
@@ -2876,7 +2876,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
pStNd = pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode,
pColl );
// Consider the case that a table is defined without a row.
- if( !pPrevSttNd && pBox1 != NULL )
+ if( !pPrevSttNd && pBox1 != nullptr )
{
pBox1->m_pStartNode = pStNd;
@@ -2886,7 +2886,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
aPos.nContent.Assign( pCNd, 0U );
const uno::Reference< text::XTextRange > xTextRange =
- SwXTextRange::CreateXTextRange( *pDoc, aPos, 0 );
+ SwXTextRange::CreateXTextRange( *pDoc, aPos, nullptr );
Reference < XText > xText = xTextRange->getText();
Reference < XTextCursor > xTextCursor =
xText->createTextCursorByRange( xTextRange );
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index a8662e8864a8..ff23336ce92d 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -103,7 +103,7 @@ class SwXMLTableContext : public XMLTextTableContext
sal_uInt32 nTopRow, sal_uInt32 nLeftCol,
sal_uInt32 nBottomRow, sal_uInt32 nRightCol );
- void _MakeTable( SwTableBox *pBox=0 );
+ void _MakeTable( SwTableBox *pBox=nullptr );
void MakeTable( SwTableBox *pBox, sal_Int32 nWidth );
void MakeTable();
@@ -146,7 +146,7 @@ public:
SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
void InsertColumn( sal_Int32 nWidth, bool bRelWidth,
- const OUString *pDfltCellStyleName = 0 );
+ const OUString *pDfltCellStyleName = nullptr );
sal_Int32 GetColumnWidth( sal_uInt32 nCol, sal_uInt32 nColSpan=1UL ) const;
OUString GetColumnDefaultCellStyleName( sal_uInt32 nCol ) const;
inline sal_uInt32 GetColumnCount() const;
@@ -155,18 +155,18 @@ public:
bool IsInsertCellPossible() const { return nCurCol < GetColumnCount(); }
bool IsInsertColPossible() const { return nCurCol < USHRT_MAX; }
bool IsInsertRowPossible() const { return nCurRow < USHRT_MAX; }
- bool IsValid() const { return pTableNode != 0; }
+ bool IsValid() const { return pTableNode != nullptr; }
void InsertCell( const OUString& rStyleName,
sal_uInt32 nRowSpan=1U, sal_uInt32 nColSpan=1U,
- const SwStartNode *pStNd=0,
+ const SwStartNode *pStNd=nullptr,
const OUString & i_rXmlId = OUString(),
- SwXMLTableContext *pTable=0,
+ SwXMLTableContext *pTable=nullptr,
bool bIsProtected = false,
- const OUString *pFormula=0,
+ const OUString *pFormula=nullptr,
bool bHasValue = false,
double fValue = 0.0,
- OUString const*const pStringValue = 0);
+ OUString const*const pStringValue = nullptr);
void InsertRow( const OUString& rStyleName,
const OUString& rDfltCellStyleName,
bool bInHead,
@@ -175,8 +175,8 @@ public:
void InsertRepRows( sal_uInt32 nCount );
const SwXMLTableCell_Impl *GetCell( sal_uInt32 nRow, sal_uInt32 nCol ) const;
SwXMLTableCell_Impl *GetCell( sal_uInt32 nRow, sal_uInt32 nCol );
- const SwStartNode *InsertTableSection(const SwStartNode *pPrevSttNd = 0,
- OUString const* pStringValueStyleName = 0);
+ const SwStartNode *InsertTableSection(const SwStartNode *pPrevSttNd = nullptr,
+ OUString const* pStringValueStyleName = nullptr);
virtual void EndElement() override;
@@ -200,7 +200,7 @@ inline const SwStartNode *SwXMLTableContext::GetLastStartNode() const
inline bool SwXMLTableContext::HasColumnDefaultCellStyleNames() const
{
- return pColumnDefaultCellStyleNames != 0;
+ return pColumnDefaultCellStyleNames != nullptr;
}
#endif
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index debc85c5fd6e..e20a181cb769 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -58,7 +58,7 @@ SvXMLImportContext *SwXMLBodyContentContext_Impl::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
pContext = GetSwImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
@@ -78,7 +78,7 @@ void SwXMLBodyContentContext_Impl::EndElement()
SvXMLImportContext *SwXMLImport::CreateBodyContentContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !IsStylesOnlyMode() )
pContext = new SwXMLBodyContentContext_Impl( *this, XML_NAMESPACE_OFFICE,
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index fe2a0730b91d..1091ddd46739 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -83,7 +83,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
const Reference< XStyle > & rStyle )
{
- const SwXStyle* pStyle = 0;
+ const SwXStyle* pStyle = nullptr;
Reference<XUnoTunnel> xStyleTunnel( rStyle, UNO_QUERY);
if( xStyleTunnel.is() )
{
@@ -326,7 +326,7 @@ void SwXMLTextParagraphExport::_collectTextEmbeddedAutoStyles(
if( !rObjRef.is() )
return;
- const XMLPropertyState *aStates[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
SvGlobalName aClassId( rObjRef->getClassID() );
if( aIFrameClassId == aClassId )
@@ -395,7 +395,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
aAny >>= sStyle;
}
- const XMLPropertyState *aStates[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
switch( nType )
{
case SV_EMBEDDED_FRAME:
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index deaf437e6ca9..7f7a3481ac9d 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -91,11 +91,11 @@ const XMLServiceMapEntry_Impl aServiceMap[] =
SERVICE_MAP_ENTRY( IMPRESS, SIMPRESS ),
SERVICE_MAP_ENTRY( CHART, SCH ),
SERVICE_MAP_ENTRY( MATH, SM ),
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { nullptr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
sal_Int32 nHeight, sal_Int32 nWidth,
- long *pTwipHeight=0, long *pTwipWidth=0 )
+ long *pTwipHeight=nullptr, long *pTwipWidth=nullptr )
{
if( nWidth > 0 && nHeight > 0 )
{
@@ -151,7 +151,7 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
bool /*bPreserveRedlineMode*/ ) :
XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, _bProgress,
bBlockM, bOrganizerM ),
- pRedlineHelper( NULL )
+ pRedlineHelper( nullptr )
{
uno::Reference<XPropertySet> xDocPropSet( rModel, UNO_QUERY );
pRedlineHelper = new XMLRedlineImportHelper(
@@ -189,14 +189,14 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const
OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing");
- SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : NULL;
+ SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : nullptr;
return pDoc && pDoc->IsInHeaderFooter( pTextCrsr->GetPaM()->GetPoint()->nNode );
}
static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat )
{
- SwOLENode *pOLENd = 0;
+ SwOLENode *pOLENd = nullptr;
if( pFrameFormat )
{
const SwFormatContent& rContent = pFrameFormat->GetContent();
@@ -242,8 +242,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
&aTwipSize.Height(), &aTwipSize.Width() );
- SwFrameFormat *pFrameFormat = 0;
- SwOLENode *pOLENd = 0;
+ SwFrameFormat *pFrameFormat = nullptr;
+ SwOLENode *pOLENd = nullptr;
if( rHRef.copy( 0, nPos ) == "vnd.sun.star.ServiceName" )
{
bool bInsert = false;
@@ -291,8 +291,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
pOLENd = lcl_GetOLENode( pFrameFormat );
}
@@ -344,7 +344,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
// TODO/LATER: Actually it should be set here
if( pTextCrsr )
{
- pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, NULL, NULL );
+ pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr, nullptr );
pOLENd = lcl_GetOLENode( pFrameFormat );
}
aObjName = aName;
@@ -445,7 +445,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
}
sal_Int64 nDrawAspect = 0;
- const XMLPropStyleContext *pStyle = 0;
+ const XMLPropStyleContext *pStyle = nullptr;
bool bHasSizeProps = false;
if( !rStyleName.isEmpty() )
{
@@ -596,8 +596,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
// TODO/LATER: in future may need a way to set replacement image url to the link ( may be even to the object ), needs oasis cws???
@@ -658,8 +658,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&aAppletImpl.GetItemSet(),
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -733,8 +733,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -775,7 +775,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
bool bHasBorder = false;
bool bIsBorderSet = false;
Size aMargin( SIZE_NOT_SET, SIZE_NOT_SET );
- const XMLPropStyleContext *pStyle = 0;
+ const XMLPropStyleContext *pStyle = nullptr;
if( !rStyleName.isEmpty() )
{
pStyle = FindAutoFrameStyle( rStyleName );
@@ -886,8 +886,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -976,8 +976,8 @@ void SwXMLTextImportHelper::RedlineAdd(
bool bMergeLastPara)
{
// create redline helper on demand
- OSL_ENSURE(NULL != pRedlineHelper, "helper should have been created in constructor");
- if (NULL != pRedlineHelper)
+ OSL_ENSURE(nullptr != pRedlineHelper, "helper should have been created in constructor");
+ if (nullptr != pRedlineHelper)
pRedlineHelper->Add(rType, rId, rAuthor, rComment, rDateTime,
bMergeLastPara);
}
@@ -988,7 +988,7 @@ uno::Reference<XTextCursor> SwXMLTextImportHelper::RedlineCreateText(
{
uno::Reference<XTextCursor> xRet;
- if (NULL != pRedlineHelper)
+ if (nullptr != pRedlineHelper)
{
xRet = pRedlineHelper->CreateRedlineTextSection(rOldCursor, rId);
}
@@ -1001,7 +1001,7 @@ void SwXMLTextImportHelper::RedlineSetCursor(
bool bStart,
bool bIsOutsideOfParagraph)
{
- if (NULL != pRedlineHelper) {
+ if (nullptr != pRedlineHelper) {
uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
pRedlineHelper->SetCursor(rId, bStart, xTextRange,
bIsOutsideOfParagraph);
@@ -1013,7 +1013,7 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor(
bool bStart)
{
OUString rId = GetOpenRedlineId();
- if ((NULL != pRedlineHelper) && !rId.isEmpty())
+ if ((nullptr != pRedlineHelper) && !rId.isEmpty())
{
uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
pRedlineHelper->AdjustStartNodeCursor(rId, bStart, xTextRange );
@@ -1024,20 +1024,20 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor(
void SwXMLTextImportHelper::SetShowChanges( bool bShowChanges )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetShowChanges( bShowChanges );
}
void SwXMLTextImportHelper::SetRecordChanges( bool bRecordChanges )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetRecordChanges( bRecordChanges );
}
void SwXMLTextImportHelper::SetChangesProtectionKey(
const Sequence<sal_Int8> & rKey )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetProtectionKey( rKey );
}
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index bdadb73b990f..e994fc267774 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -197,7 +197,7 @@ void SwBreakDlg::CheckEnable()
m_pPageCollBox->Enable(false);
bEnable = false;
}
- else if(rSh.GetFrmType(0,true)
+ else if(rSh.GetFrmType(nullptr,true)
& (FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE))
{
m_pPageBtn->Enable(false);
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 81be5088c0f0..1a6209e15b9e 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -61,8 +61,8 @@ using namespace ::sfx2;
SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, const OUString* pStr)
- : SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
- "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
+ : SfxTabDialog(nullptr, pParent, "CharacterPropertiesDialog",
+ "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != nullptr)
, m_rView(rVw)
, m_nDialogMode(nDialogMode)
{
@@ -72,13 +72,13 @@ SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreS
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nCharStdId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), 0);
- m_nCharExtId = AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), 0);
- m_nCharPosId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
- m_nCharTwoId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
- m_nCharUrlId = AddTabPage("hyperlink", SwCharURLPage::Create, 0);
- m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- m_nCharBrdId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
+ m_nCharStdId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr);
+ m_nCharExtId = AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr);
+ m_nCharPosId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), nullptr );
+ m_nCharTwoId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), nullptr );
+ m_nCharUrlId = AddTabPage("hyperlink", SwCharURLPage::Create, nullptr);
+ m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
+ m_nCharBrdId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr );
SvtCJKOptions aCJKOptions;
if(m_nDialogMode == DLG_CHAR_DRAW || m_nDialogMode == DLG_CHAR_ANN)
@@ -135,7 +135,7 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
: SfxTabPage(pParent, "CharURLPage", "modules/swriter/ui/charurlpage.ui", &rCoreSet)
- , pINetItem(0)
+ , pINetItem(nullptr)
, bModified(false)
{
@@ -153,8 +153,8 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) ||
- ( 0 != ( pShell = SfxObjectShell::Current()) &&
- 0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
+ ( nullptr != ( pShell = SfxObjectShell::Current()) &&
+ nullptr != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index f6c75f66bd36..ea8de1164edc 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -105,13 +105,13 @@ public:
SwDropCapsPict(vcl::Window *pParent, WinBits nBits)
: Control(pParent, nBits)
- , mpPage(NULL)
+ , mpPage(nullptr)
, mnLines(0)
, mnTotLineH(0)
, mnLineH(0)
, mnTextH(0)
, mnDistance(0)
- , mpPrinter(NULL)
+ , mpPrinter(nullptr)
, mbDelPrinter(false)
{}
@@ -800,7 +800,7 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
// set attributes
const SfxPoolItem* pOldItem;
- if (0 == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFormat != *pOldItem)
+ if (nullptr == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFormat != *pOldItem)
rSet.Put(aFormat);
// hard text formatting
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 287dfde6c67d..e7786598734d 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -80,8 +80,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) ||
- ( 0 != ( pObjSh = SfxObjectShell::Current()) &&
- 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
+ ( nullptr != ( pObjSh = SfxObjectShell::Current()) &&
+ nullptr != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
const sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -150,7 +150,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
if(m_pNumberStyleLB->GetSelectEntryPos())
aStyle = m_pNumberStyleLB->GetSelectEntry();
const SfxStringItem* pOldRule = static_cast<const SfxStringItem*>(GetOldItem( *rSet, SID_ATTR_PARA_NUMRULE));
- SfxStringItem* pRule = pOldRule ? static_cast<SfxStringItem*>(pOldRule->Clone()) : NULL;
+ SfxStringItem* pRule = pOldRule ? static_cast<SfxStringItem*>(pOldRule->Clone()) : nullptr;
if (pRule)
{
pRule->SetValue(aStyle);
@@ -364,7 +364,7 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
if( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* mpItem = rDispatcher.Execute(
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 6d9738f7a8b6..d3b72a0222aa 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -54,7 +54,7 @@ SwParaDlg::SwParaDlg(vcl::Window *pParent,
: SfxTabDialog(pParent,
"ParagraphPropertiesDialog",
"modules/swriter/ui/paradialog.ui",
- &rCoreSet, 0 != pTitle)
+ &rCoreSet, nullptr != pTitle)
, rView(rVw)
, nDlgMode(nDialogMode)
, bDrawParaDlg(bDraw)
@@ -208,7 +208,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if( m_nParaExt == nId )
{
// pagebreak only when the cursor is in the body-area and not in a table
- const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true);
if( !(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
@@ -226,7 +226,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
nHtmlMode & HTMLMODE_SOME_STYLES)
{
// pagebreak only when the cursor is in the body-area and not in a table
- const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true);
if(!(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL)
{
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 533f2fce92b3..8e74408a5972 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -56,7 +56,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
,
m_rSh(::GetActiveView()->GetWrtShell()),
m_pCmds( SwCondCollItem::GetCmds() ),
- m_pFormat(0),
+ m_pFormat(nullptr),
m_bNewTemplate(false)
{
@@ -97,7 +97,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pTbLinks->SetSpaceBetweenEntries( 0 );
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
- const SfxStyleFamilyItem* pFamilyItem = 0;
+ const SfxStyleFamilyItem* pFamilyItem = nullptr;
size_t nCount = aFamilies.size();
for( size_t i = 0; i < nCount; ++i )
@@ -197,10 +197,10 @@ void SwCondCollPage::Reset(const SfxItemSet *)
{
OUString aEntry( m_aStrArr[n] + "\t" );
- const SwCollCondition* pCond = 0;
+ const SwCollCondition* pCond = nullptr;
if( m_pFormat && RES_CONDTXTFMTCOLL == m_pFormat->Which() &&
- 0 != ( pCond = static_cast<SwConditionTextFormatColl*>(m_pFormat)->
- HasCondition( SwCollCondition( 0, m_pCmds[n].nCnd, m_pCmds[n].nSubCond ) ) )
+ nullptr != ( pCond = static_cast<SwConditionTextFormatColl*>(m_pFormat)->
+ HasCondition( SwCollCondition( nullptr, m_pCmds[n].nCnd, m_pCmds[n].nSubCond ) ) )
&& pCond->GetTextFormatColl() )
{
aEntry += pCond->GetTextFormatColl()->GetName();
@@ -225,7 +225,7 @@ IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void )
m_pRemovePB->Enable( bEnable );
m_pAssignPB->Enable( bEnable );
if( bEnable )
- SelectHdl(0);
+ SelectHdl(nullptr);
}
IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index a0edd7784b21..620bc6e5059e 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -496,7 +496,7 @@ IMPL_LINK_TYPED( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, Button*, pBox
bool bChecked = static_cast<CheckBox*>(pBox)->IsChecked();
m_pSeparateAuthenticationRB->Enable(bChecked);
m_pSMTPAfterPOPRB->Enable(bChecked);
- RadioButtonHdl_Impl( 0 );
+ RadioButtonHdl_Impl( nullptr );
}
IMPL_LINK_NOARG_TYPED(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl, Button*, void)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 4cf969f803f3..d0452ab76430 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -94,7 +94,7 @@ struct SwCompatibilityOptPage_Impl
SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptCompatPage",
"modules/swriter/ui/optcompatpage.ui", &rSet)
- , m_pWrtShell(NULL)
+ , m_pWrtShell(nullptr)
, m_pImpl(new SwCompatibilityOptPage_Impl)
, m_nSavedOptions(0)
{
@@ -199,8 +199,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
{
// init objectshell and detect document name
OUString sDocTitle;
- const SfxPoolItem* pItem = NULL;
- SfxObjectShell* pObjShell = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxObjectShell* pObjShell = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) )
m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
if ( m_pWrtShell )
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 784206bcfa82..5637b5b3f3ef 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -64,7 +64,7 @@ using namespace ::com::sun::star;
SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptGeneralPage", "modules/swriter/ui/optgeneralpage.ui", &rSet)
- , m_pWrtShell(NULL)
+ , m_pWrtShell(nullptr)
, m_nLastTab(0)
, m_nOldLinkMode(MANUAL)
{
@@ -672,7 +672,7 @@ void SwCaptionOptPage::DelUserData()
while (pEntry)
{
delete static_cast<InsCaptionOpt*>(pEntry->GetUserData());
- pEntry->SetUserData(0);
+ pEntry->SetUserData(nullptr);
pEntry = m_pCheckLB->Next(pEntry);
}
}
@@ -827,7 +827,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, ModifyHdl, Edit&, void)
const OUString sFieldTypeName = m_pCategoryBox->GetText();
SfxSingleTabDialog *pDlg = dynamic_cast<SfxSingleTabDialog*>(GetParentDialog());
- PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
+ PushButton *pBtn = pDlg ? pDlg->GetOKButton() : nullptr;
if (pBtn)
pBtn->Enable(!sFieldTypeName.isEmpty());
bool bEnable = m_pCategoryBox->IsEnabled() && sFieldTypeName != m_sNone;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 5d5d7bf14be3..5ba760542653 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -213,7 +213,7 @@ static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemS
void SwContentOptPage::Reset(const SfxItemSet* rSet)
{
- const SwElemItem* pElemAttr = 0;
+ const SwElemItem* pElemAttr = nullptr;
rSet->GetItemState( FN_PARAM_ELEM , false,
reinterpret_cast<const SfxPoolItem**>(&pElemAttr) );
@@ -255,7 +255,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet)
bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
- bRet = 0 != rSet->Put(aElem);
+ bRet = nullptr != rSet->Put(aElem);
sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos();
sal_Int32 nGlobalMetricPos = nMPos;
@@ -447,7 +447,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
void SwAddPrinterTabPage::Reset( const SfxItemSet* )
{
const SfxItemSet& rSet = GetItemSet();
- const SwAddPrinterItem* pAddPrinterAttr = 0;
+ const SwAddPrinterItem* pAddPrinterAttr = nullptr;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false,
reinterpret_cast<const SfxPoolItem**>(&pAddPrinterAttr) ))
@@ -536,10 +536,10 @@ void SwAddPrinterTabPage::PageCreated( const SfxAllItemSet& aSet)
SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage( pParent, "OptFontTabPage" , "modules/swriter/ui/optfonttabpage.ui" , &rSet),
- m_pPrt(0),
- m_pFontList(0),
- m_pFontConfig(0),
- m_pWrtShell(0),
+ m_pPrt(nullptr),
+ m_pFontList(nullptr),
+ m_pFontConfig(nullptr),
+ m_pWrtShell(nullptr),
m_eLanguage( GetAppLanguage() ),
m_bListDefault(false),
@@ -1061,7 +1061,7 @@ IMPL_LINK_TYPED( SwStdFontTabPage, ModifyHeightHdl, Edit&, rBox, void )
IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void )
{
ComboBox* pBox = static_cast<ComboBox*>(&rControl);
- FontSizeBox* pHeightLB = 0;
+ FontSizeBox* pHeightLB = nullptr;
const OUString sEntry = pBox->GetText();
if(pBox == m_pStandardBox)
{
@@ -1096,7 +1096,7 @@ void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet)
SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, "OptTablePage", "modules/swriter/ui/opttablepage.ui", &rSet),
- pWrtShell(0),
+ pWrtShell(nullptr),
bHTMLMode(false)
{
get(pHeaderCB,"header");
@@ -1294,7 +1294,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
pNumFormatFormattingCB->SaveValue();
pNumAlignmentCB->SaveValue();
- CheckBoxHdl(0);
+ CheckBoxHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwTableOptionsTabPage, CheckBoxHdl, Button*, void)
@@ -1315,7 +1315,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent,
const SfxItemSet& rSet )
: SfxTabPage(pParent, "OptFormatAidsPage",
"modules/swriter/ui/optformataidspage.ui", &rSet),
- m_pWrtShell( NULL )
+ m_pWrtShell( nullptr )
{
get(m_pParaCB, "paragraph");
get(m_pSHyphCB, "hyphens");
@@ -1341,7 +1341,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent,
get(m_pMathBaselineAlignmentCB, "mathbaseline");
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SwShadowCursorItem aOpt;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
@@ -1433,7 +1433,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet )
aOpt.SetMode( eMode );
bool bRet = false;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )
|| static_cast<const SwShadowCursorItem&>(*pItem) != aOpt )
{
@@ -1478,14 +1478,14 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet )
bRet |= (!pOldAttr || aDisp != *pOldAttr);
if(bRet)
- bRet = 0 != rSet->Put(aDisp);
+ bRet = nullptr != rSet->Put(aDisp);
return bRet;
}
void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SwShadowCursorItem aOpt;
if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
@@ -1513,7 +1513,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet )
m_pIgnoreProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue());
m_pIgnoreProtCB->SaveValue();
- const SwDocDisplayItem* pDocDisplayAttr = 0;
+ const SwDocDisplayItem* pDocDisplayAttr = nullptr;
rSet->GetItemState( FN_PARAM_DOCDISP, false,
reinterpret_cast<const SfxPoolItem**>(&pDocDisplayAttr) );
@@ -2075,7 +2075,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet* )
IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
{
- SvxFontPrevWindow *pPrev = 0;
+ SvxFontPrevWindow *pPrev = nullptr;
ColorListBox *pColorLB;
if (&rLB == pInsertLB)
@@ -2181,7 +2181,7 @@ IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
IMPL_LINK_TYPED( SwRedlineOptionsTabPage, ColorHdl, ListBox&, rListBox, void )
{
ColorListBox* pColorLB = static_cast<ColorListBox*>(&rListBox);
- SvxFontPrevWindow *pPrev = 0;
+ SvxFontPrevWindow *pPrev = nullptr;
ListBox* pLB;
if (pColorLB == pInsertColorLB)
@@ -2513,7 +2513,7 @@ bool SwTestTabPage::FillItemSet( SfxItemSet* rCoreSet )
void SwTestTabPage::Reset( const SfxItemSet* )
{
const SfxItemSet& rSet = GetItemSet();
- const SwTestItem* pTestAttr = 0;
+ const SwTestItem* pTestAttr = nullptr;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SWTEST , false,
reinterpret_cast<const SfxPoolItem**>(&pTestAttr) ))
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index cd44b5614d03..4a878f2dae79 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -168,7 +168,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
,
- m_pCreatedDataSource(0),
+ m_pCreatedDataSource(nullptr),
m_bInSelectHdl(false),
m_pAddressPage(pParent)
{
@@ -259,7 +259,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
m_pOK->Enable(m_pListLB->GetEntryCount()>0 && bEnableOK);
m_pEditPB->Enable(bEnableEdit);
m_pListLB->SetSelectHdl(LINK(this, SwAddressListDialog, ListBoxSelectHdl_Impl));
- TableSelectHdl_Impl(NULL);
+ TableSelectHdl_Impl(nullptr);
}
SwAddressListDialog::~SwAddressListDialog()
@@ -328,7 +328,7 @@ IMPL_LINK_NOARG_TYPED(SwAddressListDialog, FilterHdl_Impl, Button*, void)
if ( RET_OK == xDialog->execute() )
{
- WaitObject aWO( NULL );
+ WaitObject aWO( nullptr );
pUserData->sFilter = xComposer->getFilter();
}
::comphelper::disposeComponent(xRowSet);
@@ -345,7 +345,7 @@ IMPL_LINK_NOARG_TYPED(SwAddressListDialog, LoadHdl_Impl, Button*, void)
{
SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
- const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : 0);
+ const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : nullptr);
if(!sNewSource.isEmpty())
{
SvTreeListEntry* pNewSource = m_pListLB->InsertEntry(sNewSource);
@@ -439,7 +439,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
IMPL_LINK_TYPED(SwAddressListDialog, EditHdl_Impl, Button*, pButton, void)
{
SvTreeListEntry* pEntry = m_pListLB->FirstSelected();
- AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : 0;
+ AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : nullptr;
if(pUserData && !pUserData->sURL.isEmpty())
{
if(pUserData->xResultSet.is())
@@ -447,7 +447,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, EditHdl_Impl, Button*, pButton, void)
SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
if(rConfigItem.GetResultSet() != pUserData->xResultSet)
::comphelper::disposeComponent( pUserData->xResultSet );
- pUserData->xResultSet = 0;
+ pUserData->xResultSet = nullptr;
rConfigItem.DisposeResultSet();
}
@@ -482,7 +482,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, StaticListBoxSelectHdl_Impl, void*, p, void
return;
EnterWait();
m_bInSelectHdl = true;
- AddressUserData_Impl* pUserData = 0;
+ AddressUserData_Impl* pUserData = nullptr;
if(pSelect)
{
const OUString sTable(SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1));
@@ -547,7 +547,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
pUserData->xSource.set(xComplConnection, UNO_QUERY);
uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
+ uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY );
pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) );
}
if(pUserData->xConnection.is())
@@ -639,7 +639,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, TableSelectHdl_Impl, Button*, pButton, void
const OUString sTable = SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1);
if( pUserData->nTableAndQueryCount > 1 || pUserData->nTableAndQueryCount == -1)
{
- DetectTablesAndQueries(pSelect, (pButton != 0) || sTable.isEmpty());
+ DetectTablesAndQueries(pSelect, (pButton != nullptr) || sTable.isEmpty());
}
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 9f9fb7fbce30..d85bac57b4fe 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -88,7 +88,7 @@ SwAddressControl_Impl::SwAddressControl_Impl(vcl::Window* pParent, WinBits nBits
Control(pParent, nBits),
m_pScrollBar(VclPtr<ScrollBar>::Create(this)),
m_pWindow(VclPtr<vcl::Window>::Create(this, WB_DIALOGCONTROL)),
- m_pData(0),
+ m_pData(nullptr),
m_nLineHeight(0),
m_nCurrentDataSet(0),
m_bNoDataSet(true)
@@ -175,7 +175,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
Link<Edit&,void> aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
- Edit* pLastEdit = 0;
+ Edit* pLastEdit = nullptr;
sal_Int32 nVisibleLines = 0;
sal_uIntPtr nLines = 0;
for(aHeaderIter = m_pData->aDBColumnHeaders.begin();
@@ -334,7 +334,7 @@ void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
{
- HandleScrollCommand( rCEvt, 0, m_pScrollBar );
+ HandleScrollCommand( rCEvt, nullptr, m_pScrollBar );
}
}
break;
@@ -395,7 +395,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
m_sAddressListFilterName( SW_RES( ST_FILTERNAME)),
m_sURL(rURL),
m_pCSVData( new SwCSVData ),
- m_pFindDlg(0)
+ m_pFindDlg(nullptr)
{
get(m_pNewPB, "NEW");
get(m_pDeletePB, "DELETE");
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 550e48450761..866c799bddee 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -123,14 +123,14 @@ struct DB_Column
DB_Column()
{
- pColInfo = 0;
- DB_ColumnData.pText = 0;
+ pColInfo = nullptr;
+ DB_ColumnData.pText = nullptr;
eColType = DB_SPLITPARA;
}
explicit DB_Column( const OUString& rText )
{
- pColInfo = 0;
+ pColInfo = nullptr;
DB_ColumnData.pText = new OUString( rText );
eColType = DB_FILLTEXT;
}
@@ -197,9 +197,9 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
, aDBData(rData)
, sNoTmpl(SW_RESSTR(SW_STR_NONE))
, pView(&rView)
- , pTAutoFormat(0)
- , pTableSet(0)
- , pRep(0)
+ , pTAutoFormat(nullptr)
+ , pTableSet(nullptr)
+ , pRep(nullptr)
{
get(m_pRbAsTable, "astable");
get(m_pRbAsField, "asfields");
@@ -486,7 +486,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, PageHdl, Button*, pButton, void )
IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton, void )
{
ListBox& rBox = m_pRbAsTable->IsChecked()
- ? ( 0 == m_pLbTableCol->GetEntryData( 0 )
+ ? ( nullptr == m_pLbTableCol->GetEntryData( 0 )
? *m_pLbTableDbColumn
: *m_pLbTableCol )
: *m_pLbTextDbColumn;
@@ -644,7 +644,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton, void
IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DblClickHdl, ListBox&, rBox, void )
{
- Button* pButton = 0;
+ Button* pButton = nullptr;
if( &rBox == m_pLbTextDbColumn )
pButton = m_pIbDbcolToEdit;
else if( &rBox == m_pLbTableDbColumn && m_pIbDbcolOneTo->IsEnabled() )
@@ -716,7 +716,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void
}
else
nWidth = rSh.GetAnyCurRect(
- FrmTypeFlags::FLY_ANY & rSh.GetFrmType( 0, true )
+ FrmTypeFlags::FLY_ANY & rSh.GetFrmType( nullptr, true )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
@@ -769,8 +769,8 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void
pTableSet->Put( *pDlg->GetOutputItemSet() );
else if( bNewSet )
{
- delete pTableSet, pTableSet = 0;
- delete pRep, pRep = 0;
+ delete pTableSet, pTableSet = nullptr;
+ delete pRep, pRep = nullptr;
}
}
@@ -789,7 +789,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void )
{
ListBox* pGetBox = &rBox == m_pLbDbFormatFromUsr
? ( m_pRbAsTable->IsChecked()
- ? ( 0 == m_pLbTableCol->GetEntryData( 0 )
+ ? ( nullptr == m_pLbTableCol->GetEntryData( 0 )
? m_pLbTableDbColumn.get()
: m_pLbTableCol.get() )
: m_pLbTextDbColumn.get() )
@@ -840,7 +840,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void )
// to know later on, what ListBox was the "active", a Flag
// is remembered in the 1st entry
- void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : 0;
+ void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : nullptr;
m_pLbTableCol->SetEntryData( 0, pPtr );
}
}
@@ -955,7 +955,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
Reference< XConnection> xConnection,
Reference< sdbc::XResultSet > xResultSet )
{
- const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : 0;
+ const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : nullptr;
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
@@ -1032,7 +1032,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTableFlags(bHTML),
- nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : 0) );
+ nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : nullptr) );
rSh.MoveTable( GetfnTablePrev(), GetfnTableStart() );
if( pSelection && pTableSet )
@@ -1199,7 +1199,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.DoUndo( false );
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
{
const OUString sTmplNm( m_pLbDbParaColl->GetSelectEntry() );
if( sNoTmpl != sTmplNm )
@@ -1249,7 +1249,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
bool bSetCrsr = true;
const size_t nCols = aColArr.size();
- ::sw::mark::IMark* pMark = NULL;
+ ::sw::mark::IMark* pMark = nullptr;
for( sal_Int32 i = 0 ; ; ++i )
{
bool bBreak = false;
@@ -1396,7 +1396,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pWait.reset(new SwWait( *pView->GetDocShell(), true ));
}
- if( !bSetCrsr && pMark != NULL)
+ if( !bSetCrsr && pMark != nullptr)
{
rSh.SetMark();
rSh.GotoMark( pMark );
@@ -1754,7 +1754,7 @@ void SwInsertDBColAutoPilot::Load()
else
m_pLbDbParaColl->SelectEntryPos( 0 );
- delete pTAutoFormat, pTAutoFormat = 0;
+ delete pTAutoFormat, pTAutoFormat = nullptr;
sTmp = pNewData->sTAutoFormatNm;
if( !sTmp.isEmpty() )
{
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index fd9e2eb34f5c..6b07ce4b4cfc 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -88,7 +88,7 @@ void SwDBTablePreviewDialog::dispose()
{
if(m_xFrame.is())
{
- m_xFrame->setComponent(NULL, NULL);
+ m_xFrame->setComponent(nullptr, nullptr);
m_xFrame->dispose();
}
m_pDescriptionFI.clear();
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index fe8c59a3543b..84a7564ade1f 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -148,7 +148,7 @@ void SwMailMergeAddressBlockPage::ActivatePage()
m_pAddressCB->Check(rConfigItem.IsAddressBlock());
AddressBlockHdl_Impl(m_pAddressCB);
m_pSettingsWIN->SetLayout(1, 2);
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
}
}
@@ -174,7 +174,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*,
xAddrDialog->GetDBData());
OUString sFilter = xAddrDialog->GetFilter();
rConfigItem.SetFilter( sFilter );
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
GetWizard()->UpdateRoadmap();
GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
}
@@ -205,7 +205,7 @@ IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton,
m_pSettingsWIN->SelectAddress(0);
m_pSettingsWIN->Invalidate(); // #i40408
rConfig.SetCountrySettings(pDlg->IsIncludeCountry(), pDlg->GetCountry());
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
}
pDlg.reset();
GetWizard()->UpdateRoadmap();
@@ -222,7 +222,7 @@ IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, AssignHdl_Impl, Button*, pButton, v
if(RET_OK == pDlg->Execute())
{
//preview update
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
GetWizard()->UpdateRoadmap();
GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
}
@@ -684,7 +684,7 @@ IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, Address
{
//search in ListBox if it's one of the first entries
OUString sSelect;
- ::std::vector<OUString>* pVector = 0;
+ ::std::vector<OUString>* pVector = nullptr;
switch(nSelected) {
case USER_DATA_SALUTATION:
sSelect = m_sCurrentSalutation;
@@ -840,7 +840,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits
m_aVScroll(VclPtr<ScrollBar>::Create(this)),
m_aHeaderHB(VclPtr<HeaderBar>::Create(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER)),
m_aWindow(VclPtr<vcl::Window>::Create(this, WB_BORDER | WB_DIALOGCONTROL)),
- m_rConfigItem(NULL),
+ m_rConfigItem(nullptr),
m_nLBStartTopPos(0),
m_nYOffset(0),
m_nFirstYPos(0)
@@ -872,7 +872,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
//get the actual data
uno::Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY);
//get the name of the actual columns
- uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
uno::Sequence< OUString > aFields;
if(xColAccess.is())
aFields = xColAccess->getElementNames();
@@ -1044,7 +1044,7 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
{
- HandleScrollCommand( rCEvt, 0, m_aVScroll.get() );
+ HandleScrollCommand( rCEvt, nullptr, m_aVScroll.get() );
}
}
break;
@@ -1103,7 +1103,7 @@ IMPL_LINK_TYPED(SwAssignFieldsControl, MatchHdl_Impl, ListBox&, rBox, void)
{
const OUString sColumn = rBox.GetSelectEntry();
uno::Reference< XColumnsSupplier > xColsSupp( m_rConfigItem->GetResultSet(), uno::UNO_QUERY);
- uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
OUString sPreview;
if(xColAccess.is() && xColAccess->hasByName(sColumn))
{
@@ -1130,7 +1130,7 @@ IMPL_LINK_TYPED(SwAssignFieldsControl, MatchHdl_Impl, ListBox&, rBox, void)
break;
}
}
- m_aModifyHdl.Call(0);
+ m_aModifyHdl.Call(nullptr);
}
IMPL_LINK_TYPED(SwAssignFieldsControl, GotFocusHdl_Impl, Control&, rControl, void)
@@ -1244,7 +1244,7 @@ IMPL_LINK_NOARG_TYPED(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, LinkParamN
DDListBox::DDListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
- , m_pParentDialog(NULL)
+ , m_pParentDialog(nullptr)
{
SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
@@ -1305,7 +1305,7 @@ void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
AddressMultiLineEdit::AddressMultiLineEdit(vcl::Window* pParent, WinBits nBits)
: VclMultiLineEdit(pParent, nBits)
- , m_pParentDialog(NULL)
+ , m_pParentDialog(nullptr)
{
GetTextView()->SupportProtectAttribute(true);
StartListening(*GetTextEngine());
@@ -1429,7 +1429,7 @@ void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr )
sal_Int32 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
- if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
+ if(nullptr != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
nIndex = pAttrib->GetEnd();
InsertNewEntryAtPosition( rStr, nPara, nIndex );
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 87cbd05e3038..40c4307adbc6 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -162,7 +162,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
const OUString sFemaleValue = m_pFemaleFieldCB->GetText();
const OUString sFemaleColumn = m_pFemaleColumnLB->GetSelectEntry();
Reference< sdbcx::XColumnsSupplier > xColsSupp( m_pWizard->GetConfigItem().GetResultSet(), UNO_QUERY);
- Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
if(!sFemaleValue.isEmpty() && !sFemaleColumn.isEmpty() &&
xColAccess.is() &&
xColAccess->hasByName(sFemaleColumn))
@@ -284,7 +284,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
m_pGreetingLineCB->Check(rConfig.IsGreetingLine(false));
m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(false));
ContainsHdl_Impl(m_pGreetingLineCB);
- aIndividualLink.Call(0);
+ aIndividualLink.Call(nullptr);
lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE);
@@ -459,7 +459,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* _pWi
m_pGreetingLineCB->Check(rConfig.IsGreetingLine(true));
m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(true));
ContainsHdl_Impl(m_pGreetingLineCB);
- aIndividualLink.Call(0);
+ aIndividualLink.Call(nullptr);
lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE);
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index b0438805205b..10fbcdc0752f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -76,9 +76,9 @@ using namespace ::com::sun::star::view;
SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage(_pParent, "MMLayoutPage",
"modules/swriter/ui/mmlayoutpage.ui")
- , m_pExampleFrame(0)
- , m_pExampleWrtShell(0)
- , m_pAddressBlockFormat(0)
+ , m_pExampleFrame(nullptr)
+ , m_pExampleWrtShell(nullptr)
+ , m_pAddressBlockFormat(nullptr)
, m_bIsGreetingInserted(false)
, m_pWizard(_pParent)
{
@@ -206,14 +206,14 @@ void SwMailMergeLayoutPage::ActivatePage()
}
}
if(!rConfigItem.IsAddressInserted() &&
- rConfigItem.IsAddressBlock() != ( 0 != m_pAddressBlockFormat ))
+ rConfigItem.IsAddressBlock() != ( nullptr != m_pAddressBlockFormat ))
{
if( m_pAddressBlockFormat )
{
m_pExampleWrtShell->Push();
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
- m_pAddressBlockFormat = 0;
+ m_pAddressBlockFormat = nullptr;
m_pExampleWrtShell->Pop(false);
}
else
@@ -252,7 +252,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
const Point& rAddressPosition,
bool bAlignToBody)
{
- SwFrameFormat* pAddressBlockFormat = 0;
+ SwFrameFormat* pAddressBlockFormat = nullptr;
pView->GetWrtShell().StartUndo(UNDO_INSERT);
if(rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted())
{
@@ -617,7 +617,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
//put the cursor to the start of the paragraph
rShell.SttPara();
- OSL_ENSURE(0 == rShell.GetTableFormat(), "What to do with a table here?");
+ OSL_ENSURE(nullptr == rShell.GetTableFormat(), "What to do with a table here?");
}
IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExampleFrame&, void)
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 11b7e5321a79..1ab325949492 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -229,7 +229,7 @@ SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent)
, m_sConfigureMail(SW_RES(ST_CONFIGUREMAIL))
, m_bCancelSaving(false)
, m_pWizard(_pParent)
- , m_pTempPrinter(0)
+ , m_pTempPrinter(nullptr)
{
get(m_pSaveStartDocRB, "savestarting");
get(m_pSaveMergedDocRB, "savemerged");
@@ -404,7 +404,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSendAsFT, m_pSendAsLB, m_pSendAsPB,
m_pAttachmentGroup,
m_pSendAllRB, m_pSendDocumentsPB,
- 0
+ nullptr
};
SetUpdateMode(true);
vcl::Window** pControl = aControls;
@@ -427,7 +427,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSaveAsOneRB, m_pSaveIndividualRB,
m_pFromRB, m_pFromNF, m_pToFT, m_pToNF,
m_pSaveNowPB,
- 0
+ nullptr
};
Control** pSaveMergeControl = aSaveMergedControls;
do
@@ -448,7 +448,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pFromRB, m_pFromNF, m_pToFT, m_pToNF,
m_pPrinterFT, m_pPrinterLB, m_pPrinterSettingsPB, m_pPrintAllRB,
m_pPrintNowPB,
- 0
+ nullptr
};
Control** pPrinterControl = aPrintControls;
do
@@ -470,7 +470,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSubjectFT, m_pSubjectED,
m_pSendAsFT, m_pSendAsLB, m_pSendAsPB,
m_pAttachmentGroup,
- m_pSendAllRB, m_pSendDocumentsPB, 0
+ m_pSendAllRB, m_pSendDocumentsPB, nullptr
};
vcl::Window** pMailControl = aMailControls;
do
@@ -498,7 +498,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
//select first column
uno::Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY);
//get the name of the actual columns
- uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
uno::Sequence< OUString > aFields;
if(xColAccess.is())
aFields = xColAccess->getElementNames();
@@ -520,7 +520,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
SendTypeHdl_Impl(*m_pSendAsLB);
}
}
- m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : 0);
+ m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : nullptr);
SetUpdateMode(false);
}
@@ -906,7 +906,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void)
pTargetView->ExecPrint( aProps, false, true );
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh));
- pTargetView->SetMailMergeConfigItem(0, 0, false);
+ pTargetView->SetMailMergeConfigItem(nullptr, 0, false);
m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true);
m_pWizard->enableButtons(WizardButtonFlags::FINISH, true);
}
@@ -998,7 +998,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton,
bool bAsBody = false;
rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
- const SfxFilter *pSfxFlt = 0;
+ const SfxFilter *pSfxFlt = nullptr;
sal_uLong nDocType = reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData());
OUString sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
@@ -1099,7 +1099,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton,
OUString sEMailColumn = m_pMailToLB->GetSelectEntry();
OSL_ENSURE( !sEMailColumn.isEmpty(), "No email column selected");
Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
- Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
if(sEMailColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn))
return;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 36e20a8002ba..a3c8526751a7 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -130,7 +130,7 @@ const SwMailDescriptor* SwSendMailDialog_Impl::GetNextDescriptor()
++nCurrentDescriptor;
return &aDescriptors[nCurrentDescriptor - 1];
}
- return 0;
+ return nullptr;
}
using namespace ::com::sun::star;
@@ -182,7 +182,7 @@ void SwMailDispatcherListener_Impl::mailDelivered(
uno::Reference< mail::XMailMessage> xMailMessage)
{
SolarMutexGuard aGuard;
- m_pSendMailDialog->DocumentSent( xMailMessage, true, 0 );
+ m_pSendMailDialog->DocumentSent( xMailMessage, true, nullptr );
DeleteAttachments( xMailMessage );
}
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 706bf0549637..1c7e2bb87ef7 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -162,7 +162,7 @@ IMPL_LINK_TYPED(SwSelectDBTableDialog, PreviewHdl, Button*, pButton, void)
if(pEntry)
{
OUString sTableOrQuery = SvTabListBox::GetEntryText(pEntry, 0);
- sal_Int32 nCommandType = 0 == pEntry->GetUserData() ? 0 : 1;
+ sal_Int32 nCommandType = nullptr == pEntry->GetUserData() ? 0 : 1;
OUString sDataSourceName;
Reference<XChild> xChild(m_xConnection, UNO_QUERY);
@@ -204,7 +204,7 @@ void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsT
while(pEntry)
{
if((SvTabListBox::GetEntryText(pEntry, 0) == rTable) &&
- ((pEntry->GetUserData() == 0 ) == bIsTable))
+ ((pEntry->GetUserData() == nullptr ) == bIsTable))
{
m_pTable->Select(pEntry);
break;
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 918addc6883f..e92a5c2333ae 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -174,7 +174,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
{
bool bDelPrinter = false;
- VclPtr<SfxPrinter> pPrt = pDoc ? pDoc->getIDocumentDeviceAccess().getPrinter(false) : 0;
+ VclPtr<SfxPrinter> pPrt = pDoc ? pDoc->getIDocumentDeviceAccess().getPrinter(false) : nullptr;
if( !pPrt )
{
SfxItemSet* pSet = new SfxItemSet( rDocSh.GetPool(),
@@ -225,7 +225,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
}
// initialize character set
- m_pCharSetLB->FillFromTextEncodingTable( pStream != NULL );
+ m_pCharSetLB->FillFromTextEncodingTable( pStream != nullptr );
m_pCharSetLB->SelectTextEncoding( aOpt.GetCharSet() );
m_pCharSetLB->SetSelectHdl( LINK( this, SwAsciiFilterDlg, CharSetSelHdl ));
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 18adafa64d49..f71c8ee3fecb 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -121,7 +121,7 @@ void SwDocStatPage::SetData(const SwDocStat &rStat)
void SwDocStatPage::Update()
{
SfxViewShell *pVSh = SfxViewShell::Current();
- SwViewShell *pSh = 0;
+ SwViewShell *pSh = nullptr;
if ( dynamic_cast< const SwView *>( pVSh ) != nullptr )
pSh = static_cast<SwView*>(pVSh)->GetWrtShellPtr();
else if ( dynamic_cast< const SwPagePreview *>( pVSh ) != nullptr )
diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx
index 405e083a77cc..16f11e0ca3c6 100644
--- a/sw/source/ui/dialog/swdialmgr.cxx
+++ b/sw/source/ui/dialog/swdialmgr.cxx
@@ -21,7 +21,7 @@
#include <tools/resmgr.hxx>
#ifndef DISABLE_DYNLOADING
-ResMgr* pSwResMgr=0;
+ResMgr* pSwResMgr=nullptr;
#else
static ResMgr *pSwResMgr;
#endif
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index f0c9c8a66a75..fb2fb83e5a7f 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -164,7 +164,7 @@ OUString AbstractTabDialog_Impl::GetText() const
IMPL_LINK_NOARG_TYPED(AbstractApplyTabDialog_Impl, ApplyHdl, Button*, void)
{
if (pDlg->Apply())
- m_aHandler.Call(NULL);
+ m_aHandler.Call(nullptr);
}
void AbstractApplyTabDialog_Impl::SetApplyHdl( const Link<LinkParamNone*,void>& rLink )
@@ -640,7 +640,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* p
sal_uInt32 nResId
)
{
- SfxModalDialog* pDlg=NULL;
+ SfxModalDialog* pDlg=nullptr;
switch ( nResId )
{
case RC_DLG_ADDR :
@@ -661,7 +661,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* p
if ( pDlg )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( vcl::Window* pParent,
@@ -677,7 +677,7 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl:
SfxRequest& rReq,
int nResId )
{
- Dialog* pDlg=NULL;
+ Dialog* pDlg=nullptr;
switch ( nResId )
{
case DLG_INSERT_BOOKMARK :
@@ -690,7 +690,7 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl:
if ( pDlg )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg(vcl::Window *pParent,
@@ -734,7 +734,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( vcl::W
if ( pDlg.get() )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
@@ -813,7 +813,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( vcl:
if ( pDlg.get() )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTableDialog ( vcl::Window *pParent, SwWrtShell &rSh )
@@ -848,7 +848,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg(vcl::Window*
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId )
@@ -865,7 +865,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window*
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc)
@@ -901,7 +901,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg ( SwView
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(vcl::Window* pParent,
@@ -1014,7 +1014,7 @@ AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nRe
}
if ( pDlg.get() )
return new AbstractMailMergeDlg_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(vcl::Window* pParent)
@@ -1055,7 +1055,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
}
if ( pDlg.get() )
return new AbstractTabDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(
@@ -1139,7 +1139,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc()
// Factories for TabPages
CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
- CreateTabPage pRet = 0;
+ CreateTabPage pRet = nullptr;
switch ( nId )
{
case RID_SW_TP_OPTCOMPATIBILITY_PAGE :
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 8610414e4cd9..ec09b278f765 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -382,7 +382,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) override;
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) override;
virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const OUString* pFormatStr = 0) override;
+ sal_uInt8 nDialogMode, const OUString* pFormatStr = nullptr) override;
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) override;
virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) override;
@@ -403,7 +403,7 @@ public:
SwView& rVw,
const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode,
- const OUString *pCollName = 0,
+ const OUString *pCollName = nullptr,
bool bDraw = false,
const OString& sDefPage = OString() ) override;
@@ -413,7 +413,7 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
- const SwTableAutoFormat* pSelFormat = 0 ) override;
+ const SwTableAutoFormat* pSelFormat = nullptr ) override;
virtual SfxAbstractDialog * CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) override;
virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) override;
@@ -434,13 +434,13 @@ public:
bool bNewFrm = true,
bool bFormat = false,
const OString& sDefPage = OString(),
- const OUString* pFormatStr = 0) override;
+ const OUString* pFormatStr = nullptr) override;
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
vcl::Window* pParent,
SfxStyleSheetBase& rBase,
sal_uInt16 nRegion,
const OString& sPage = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
bool bNew = false) override;
virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
@@ -460,7 +460,7 @@ public:
const OUString& rTableName,
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection,
- css::uno::Sequence< css::uno::Any >* pSelection = 0 ) override;
+ css::uno::Sequence< css::uno::Any >* pSelection = nullptr ) override;
virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg(vcl::Window* pParent) override;
virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) override;
virtual VclAbstractDialog* CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr) override;
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index dbbac541e03a..b53ee82b5921 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -48,7 +48,7 @@
namespace swui
{
- static SwAbstractDialogFactory_Impl* pFactory=NULL;
+ static SwAbstractDialogFactory_Impl* pFactory=nullptr;
SwAbstractDialogFactory * GetFactory()
{
if ( !pFactory )
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index a057cf513c1b..a185fbdee869 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -118,7 +118,7 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva
static void lcl_FillSubRegionList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames )
{
- lcl_FillList( rSh, rSubRegions, pAvailNames, 0 );
+ lcl_FillList( rSh, rSubRegions, pAvailNames, nullptr );
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
for( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getBookmarksBegin();
ppMark != pMarkAccess->getBookmarksEnd();
@@ -307,8 +307,8 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
, m_bSubRegionsFilled(false)
, aImageIL(SW_RES(IL_SECTION_BITMAPS))
, rSh(rWrtSh)
- , m_pDocInserter(NULL)
- , m_pOldDefDlgParent(NULL)
+ , m_pDocInserter(nullptr)
+ , m_pOldDefDlgParent(nullptr)
, bDontCheckPasswd(true)
{
get(m_pCurName, "curname");
@@ -378,7 +378,7 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
m_pDDECB->SetClickHdl(LINK(this, SwEditRegionDlg, DDEHdl));
pCurrSect = rSh.GetCurrSection();
- RecurseList( 0, 0 );
+ RecurseList( nullptr, nullptr );
// if the cursor is not in a region
// the first one will always be selected
if( !m_pTree->FirstSelected() && m_pTree->First() )
@@ -435,7 +435,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
// recursively look for child-sections
void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry )
{
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if (!pFormat)
{
const size_t nCount=rSh.GetSectionFormatCount();
@@ -491,7 +491,7 @@ void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEnt
}
}
}
- if(0 != pSelEntry)
+ if(nullptr != pSelEntry)
{
m_pTree->MakeVisible(pSelEntry);
m_pTree->Select(pSelEntry);
@@ -766,7 +766,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void)
rSh.StartAllAction();
rSh.StartUndo();
- rSh.ResetSelect( 0,false );
+ rSh.ResetSelect( nullptr,false );
SvTreeListEntry* pEntry = m_pTree->First();
while( pEntry )
@@ -804,7 +804,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void)
pSet->Put( pRepr->GetLRSpace());
rSh.UpdateSection( nNewPos, pRepr->GetSectionData(),
- pSet->Count() ? pSet.get() : 0 );
+ pSet->Count() ? pSet.get() : nullptr );
}
pEntry = m_pTree->Next( pEntry );
}
@@ -917,13 +917,13 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, ChangeDismissHdl, Button*, void)
while(pEntry)
{
SectRepr* const pSectRepr = static_cast<SectRepr*>(pEntry->GetUserData());
- SvTreeListEntry* pRemove = 0;
+ SvTreeListEntry* pRemove = nullptr;
bool bRestart = false;
if(pSectRepr->IsSelected())
{
m_SectReprs.insert(std::make_pair(pSectRepr->GetArrPos(),
std::unique_ptr<SectRepr>(pSectRepr)));
- while( (pChild = m_pTree->FirstChild(pEntry) )!= 0 )
+ while( (pChild = m_pTree->FirstChild(pEntry) )!= nullptr )
{
// because of the repositioning we have to start at the beginning again
bRestart = true;
@@ -940,7 +940,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, ChangeDismissHdl, Button*, void)
m_pTree->GetModel()->Remove( pRemove );
}
- if ( m_pTree->FirstSelected() == 0 )
+ if ( m_pTree->FirstSelected() == nullptr )
{
m_pConditionFT->Enable(false);
m_pConditionED->Enable(false);
@@ -1368,7 +1368,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, vo
::lcl_ReadSections(aMedium, *m_pSubRegionED);
}
else
- lcl_FillSubRegionList(rSh, *m_pSubRegionED, 0);
+ lcl_FillSubRegionList(rSh, *m_pSubRegionED, nullptr);
m_bSubRegionsFilled = true;
}
}
@@ -1407,11 +1407,11 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, 0);
- m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
- m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0);
- m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
+ m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, nullptr);
+ m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
+ m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr);
+ m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
@@ -1502,9 +1502,9 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
vcl::Window *pParent, const SfxItemSet &rAttrSet)
: SfxTabPage(pParent, "SectionPage",
"modules/swriter/ui/sectionpage.ui", &rAttrSet)
- , m_pWrtSh(0)
- , m_pDocInserter(NULL)
- , m_pOldDefDlgParent(NULL)
+ , m_pWrtSh(nullptr)
+ , m_pDocInserter(nullptr)
+ , m_pOldDefDlgParent(nullptr)
{
get(m_pCurName, "sectionnames");
m_pCurName->SetStyle(m_pCurName->GetStyle() | WB_SORT);
@@ -2088,10 +2088,10 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0);
- m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
+ m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
+ m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr);
+ m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index bebfe4f3870a..befd3a534aa3 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -37,7 +37,7 @@
IMPL_STATIC_LINK_NOARG_TYPED(SwWordCountFloatDlg, CloseHdl, Button*, void)
{
SfxViewFrame* pVFrame = ::GetActiveView()->GetViewFrame();
- if (pVFrame != NULL)
+ if (pVFrame != nullptr)
{
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
}
@@ -50,7 +50,7 @@ SwWordCountFloatDlg::~SwWordCountFloatDlg()
void SwWordCountFloatDlg::dispose()
{
- SwViewShell::SetCareWin( 0 );
+ SwViewShell::SetCareWin( nullptr );
m_pCurrentWordFT.clear();
m_pCurrentCharacterFT.clear();
m_pCurrentCharacterExcludingSpacesFT.clear();
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 61220e376e12..7d3bbb9b0dfd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -326,7 +326,7 @@ IMPL_LINK_TYPED( SwEnvFormatPage, EditHdl, MenuButton *, pButton, void )
if ( pDlg->Execute() == RET_OK )
{
// maybe relocate defaults
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemSet* pOutputSet = const_cast<SfxItemSet*>(pDlg->GetOutputItemSet());
sal_uInt16 nNewDist;
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 2abd1c2576fb..51a98ae6c716 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -65,7 +65,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwEnvItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 89d7f9d749da..4aeb134907c4 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -133,8 +133,8 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet,
, aEnvItem(static_cast<const SwEnvItem&>( rSet.Get(FN_ENVELOP)))
, pSh(pWrtSh)
, pPrinter(pPrt)
- , pAddresseeSet(0)
- , pSenderSet(0)
+ , pAddresseeSet(nullptr)
+ , pSenderSet(nullptr)
, m_nEnvPrintId(0)
{
if (!bInsert)
@@ -142,9 +142,9 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet,
GetUserButton()->SetText(get<PushButton>("modify")->GetText());
}
- AddTabPage("envelope", SwEnvPage ::Create, 0);
- AddTabPage("format", SwEnvFormatPage::Create, 0);
- m_nEnvPrintId = AddTabPage("printer", SwEnvPrtPage::Create, 0);
+ AddTabPage("envelope", SwEnvPage ::Create, nullptr);
+ AddTabPage("format", SwEnvFormatPage::Create, nullptr);
+ m_nEnvPrintId = AddTabPage("printer", SwEnvPrtPage::Create, nullptr);
}
SwEnvDlg::~SwEnvDlg()
@@ -269,7 +269,7 @@ IMPL_LINK_NOARG_TYPED(SwEnvPage, FieldHdl, Button*, void)
{
OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." +
m_pTableLB->GetSelectEntry() + "." +
- OUString(m_pTableLB->GetSelectEntryData() == 0 ? '0' : '1') + "." +
+ OUString(m_pTableLB->GetSelectEntryData() == nullptr ? '0' : '1') + "." +
m_pDBFieldLB->GetSelectEntry() + ">");
m_pAddrEdit->ReplaceSelected(aStr);
Selection aSel = m_pAddrEdit->GetSelection();
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 9a3d59448c7f..2b8516d0c425 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -31,7 +31,7 @@
SwEnvPrtPage::SwEnvPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "EnvPrinterPage",
"modules/swriter/ui/envprinterpage.ui", &rSet)
- , pPrt(NULL)
+ , pPrt(nullptr)
{
get(m_pAlignBox, "alignbox");
get(m_pTopButton, "top");
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index cd964ba758a0..d68991d311e8 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -64,7 +64,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwEnvItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 0b5711bf367d..63e03d19da67 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -94,7 +94,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
: SfxTabDialog(pParent, "LabelDialog",
"modules/swriter/ui/labeldialog.ui", &rSet)
, pDBManager(pDBManager_)
- , pPrtPage(0)
+ , pPrtPage(nullptr)
, aTypeIds(50, 10)
, m_pRecs(new SwLabRecs)
, m_bLabel(bLabel)
@@ -107,9 +107,9 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
{
WaitObject aWait( pParent );
- m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, 0);
- m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, 0);
- m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, 0);
+ m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, nullptr);
+ m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr);
+ m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, nullptr);
m_sBusinessCardDlg = GetPageText(m_nCardsId);
if (m_bLabel)
@@ -118,15 +118,15 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
RemoveTabPage("private");
RemoveTabPage("cards");
RemoveTabPage("medium");
- m_nLabelId = AddTabPage("labels", SwLabPage::Create, 0);
+ m_nLabelId = AddTabPage("labels", SwLabPage::Create, nullptr);
}
else
{
RemoveTabPage("labels");
RemoveTabPage("cards");
- m_nLabelId = AddTabPage("medium", SwLabPage::Create, 0);
- m_nBusinessId = AddTabPage("business", SwBusinessDataPage::Create, 0 );
- m_nPrivateId = AddTabPage("private", SwPrivateDataPage::Create, 0);
+ m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr);
+ m_nBusinessId = AddTabPage("business", SwBusinessDataPage::Create, nullptr );
+ m_nPrivateId = AddTabPage("private", SwPrivateDataPage::Create, nullptr);
SetText(m_sBusinessCardDlg);
}
// Read user label from writer.cfg
@@ -201,7 +201,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont)
{
- SwLabRec* pRec = NULL;
+ SwLabRec* pRec = nullptr;
bool bFound = false;
const OUString sCustom(SW_RES(STR_CUSTOM));
@@ -227,13 +227,13 @@ Printer *SwLabDlg::GetPrt()
if (pPrtPage)
return pPrtPage->GetPrt();
else
- return NULL;
+ return nullptr;
}
SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "CardMediumPage",
"modules/swriter/ui/cardmediumpage.ui", &rSet)
- , pDBManager(NULL)
+ , pDBManager(nullptr)
, aItem(static_cast<const SwLabItem&>(rSet.Get(FN_LABEL)))
, m_bLabel(false)
{
@@ -352,7 +352,7 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void)
{
OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." +
m_pTableLB->GetSelectEntry() + "." +
- (m_pTableLB->GetSelectEntryData() == 0 ? OUString("0") : OUString("1")) + "." +
+ (m_pTableLB->GetSelectEntryData() == nullptr ? OUString("0") : OUString("1")) + "." +
m_pDBFieldLB->GetSelectEntry() + ">");
m_pWritingEdit->ReplaceSelected(aStr);
Selection aSel = m_pWritingEdit->GetSelection();
@@ -584,7 +584,7 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
SwVisitingCardPage::SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "CardFormatPage",
"modules/swriter/ui/cardformatpage.ui", &rSet)
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
{
get(m_pAutoTextLB, "treeview");
m_pAutoTextLB->set_height_request(m_pAutoTextLB->GetTextHeight() * 16);
@@ -613,7 +613,7 @@ void SwVisitingCardPage::dispose()
{
for(sal_Int32 i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); ++i)
delete static_cast<OUString*>(m_pAutoTextGroupLB->GetEntryData( i ));
- m_xAutoText = 0;
+ m_xAutoText = nullptr;
ClearUserData();
delete pExampleFrame;
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 2834e504ac85..f027de2d9dca 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -211,7 +211,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel,
{ "BC_COMP_FAX" , &SwLabItem::m_aCompFax },
{ "BC_COMP_WWW" , &SwLabItem::m_aCompWWW },
{ "BC_COMP_MAIL" , &SwLabItem::m_aCompMail },
- { 0, 0 }
+ { nullptr, nullptr }
};
try
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index dab095f3b155..d8d8ef4545fe 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -401,7 +401,7 @@ IMPL_LINK_NOARG_TYPED(SwLabFormatPage, PreviewHdl, Idle *, void)
IMPL_LINK_TYPED( SwLabFormatPage, LoseFocusHdl, Control&, rControl, void )
{
if (static_cast<Edit*>( &rControl)->IsModified())
- PreviewHdl(0);
+ PreviewHdl(nullptr);
}
void SwLabFormatPage::ChangeMinMax()
@@ -560,7 +560,7 @@ void SwLabFormatPage::Reset(const SfxItemSet* )
m_pRowsField->SetValue(aItem.m_nRows);
m_pMakeFI->SetText(aItem.m_aMake);
m_pTypeFI->SetText(aItem.m_aType);
- PreviewHdl(0);
+ PreviewHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwLabFormatPage, SaveHdl, Button*, void)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 1e4675cb13d4..da680899cb7e 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -105,7 +105,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 922e32592ac2..d5a95de387ca 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -30,7 +30,7 @@
SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "LabelOptionsPage",
"modules/swriter/ui/labeloptionspage.ui", &rSet)
- , pPrinter(0)
+ , pPrinter(nullptr)
{
get(m_pPageButton, "entirepage");
get(m_pSingleButton, "singlelabel");
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 97a09666b857..d7dbc5b78b93 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -59,7 +59,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index fe75d2fd1820..5f55838598bf 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -372,7 +372,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
void SwMailMergeDlg::dispose()
{
if(m_xFrame.is()) {
- m_xFrame->setComponent(NULL, NULL);
+ m_xFrame->setComponent(nullptr, nullptr);
m_xFrame->dispose();
}
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index aa83f306507e..c7aff3e5dd66 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -69,7 +69,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -123,7 +123,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
@@ -162,7 +162,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
@@ -199,7 +199,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 083b7efe6214..2df5ba1199ba 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -35,7 +35,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &r
: SvxStandardDialog(pParent, "DropdownFieldDialog",
"modules/swriter/ui/dropdownfielddialog.ui")
, rSh( rS )
- , pDropField(0)
+ , pDropField(nullptr)
{
get(m_pListItemsLB, "list");
m_pListItemsLB->SetDropDownLineCount(12);
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 3911cd579a5c..85b3ad829cc5 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -81,7 +81,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw)
m_pUsedDBTLB->SetDeselectHdl(aLink);
m_pAvailDBTLB->SetSelectHdl(aLink);
m_pAvailDBTLB->SetSelectHdl(aLink);
- TreeSelectHdl(NULL);
+ TreeSelectHdl(nullptr);
}
// initialise database listboxes
@@ -107,8 +107,8 @@ void SwChangeDBDlg::FillDBPopup()
size_t nCount = aDBNameList.size();
m_pUsedDBTLB->Clear();
- SvTreeListEntry *pFirst = 0;
- SvTreeListEntry *pLast = 0;
+ SvTreeListEntry *pFirst = nullptr;
+ SvTreeListEntry *pLast = nullptr;
for(size_t k = 0; k < nCount; k++)
{
@@ -140,11 +140,11 @@ SvTreeListEntry* SwChangeDBDlg::Insert(const OUString& rDBName)
Image aDBImg = aImageList.GetImage(IMG_DB);
Image aQueryImg = aImageList.GetImage(IMG_DBQUERY);
Image& rToInsert = nCommandType ? aQueryImg : aTableImg;
- while ((pParent = m_pUsedDBTLB->GetEntry(nParent++)) != NULL)
+ while ((pParent = m_pUsedDBTLB->GetEntry(nParent++)) != nullptr)
{
if (sDBName == m_pUsedDBTLB->GetEntryText(pParent))
{
- while ((pChild = m_pUsedDBTLB->GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = m_pUsedDBTLB->GetEntry(pParent, nChild++)) != nullptr)
{
if (sTableName == m_pUsedDBTLB->GetEntryText(pChild))
return pChild;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 3e0c7620ccab..45fe095adea5 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -180,7 +180,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
}
}
}
- TypeHdl(0);
+ TypeHdl(nullptr);
m_pTypeLB->SetUpdateMode(true);
m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeListBoxHdl));
@@ -420,7 +420,7 @@ void SwFieldDBPage::CheckInsert()
if (nTypeId == TYP_DBFLD && pEntry)
pEntry = m_pDatabaseTLB->GetParent(pEntry);
- bInsert &= pEntry != 0;
+ bInsert &= pEntry != nullptr;
}
else
bInsert = false;
@@ -453,7 +453,7 @@ IMPL_LINK_TYPED( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox, void )
{
bool bNumFormat = false;
- if (pEntry != 0)
+ if (pEntry != nullptr)
{
OUString sTableName;
OUString sColumnName;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 3bdc85d99755..58ea65708db5 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -50,7 +50,7 @@ using namespace com::sun::star;
SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
: SwFieldPage(pParent, "FieldDocInfoPage",
"modules/swriter/ui/flddocinfopage.ui", rCoreSet)
- , pSelEntry(0)
+ , pSelEntry(nullptr)
, nOldSel(0)
, nOldFormat(0)
{
@@ -110,12 +110,12 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
// initialise TypeListBox
m_pTypeTLB->SetUpdateMode(false);
m_pTypeTLB->Clear();
- pSelEntry = 0;
+ pSelEntry = nullptr;
// display SubTypes in TypeLB
- SvTreeListEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = nullptr;
- SvTreeListEntry* pInfo = 0;
+ SvTreeListEntry* pInfo = nullptr;
sal_uInt16 nSubType = USHRT_MAX;
if (IsFieldEdit())
@@ -189,7 +189,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
}
// select old Pos
- if (pSelEntry != 0)
+ if (pSelEntry != nullptr)
{
m_pTypeTLB->Select(pSelEntry);
nSubType = (sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData());
@@ -202,7 +202,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
FillSelectionLB(nSubType);
if ( pSelEntry )
- TypeHdl(NULL);
+ TypeHdl(nullptr);
m_pTypeTLB->SetUpdateMode(true);
m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl));
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 4d4131039c62..c339618a5ef2 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -89,7 +89,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr)
}
SwFieldEditDlg::SwFieldEditDlg(SwView& rVw)
- : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0,
+ : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), nullptr,
"EditFieldDialog", "modules/swriter/ui/editfielddialog.ui")
, pSh(rVw.GetWrtShellPtr())
{
@@ -167,13 +167,13 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
switch (nGroup)
{
case GRP_DOC:
- pTabPage = SwFieldDokPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldDokPage::Create(get_content_area(), nullptr);
break;
case GRP_FKT:
- pTabPage = SwFieldFuncPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldFuncPage::Create(get_content_area(), nullptr);
break;
case GRP_REF:
- pTabPage = SwFieldRefPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldRefPage::Create(get_content_area(), nullptr);
break;
case GRP_REG:
{
@@ -192,11 +192,11 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
break;
}
case GRP_DB:
- pTabPage = SwFieldDBPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldDBPage::Create(get_content_area(), nullptr);
static_cast<SwFieldDBPage*>(pTabPage.get())->SetWrtShell(*pSh);
break;
case GRP_VAR:
- pTabPage = SwFieldVarPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldVarPage::Create(get_content_area(), nullptr);
break;
}
@@ -219,7 +219,7 @@ SwFieldEditDlg::~SwFieldEditDlg()
void SwFieldEditDlg::dispose()
{
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
pSh->EnterStdMode();
m_pPrevBT.clear();
m_pNextBT.clear();
@@ -246,7 +246,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldEditDlg, OKHdl, Button*, void)
{
VclPtr<SfxTabPage> pTabPage = GetTabPage();
if (pTabPage)
- pTabPage->FillItemSet(0);
+ pTabPage->FillItemSet(nullptr);
EndDialog( RET_OK );
}
}
@@ -264,13 +264,13 @@ IMPL_LINK_TYPED( SwFieldEditDlg, NextPrevHdl, Button *, pButton, void )
pSh->EnterStdMode();
- SwFieldType *pOldTyp = 0;
+ SwFieldType *pOldTyp = nullptr;
VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage());
//#112462# FillItemSet may delete the current field
//that's why it has to be called before accessing the current field
if( GetOKButton()->IsEnabled() )
- pTabPage->FillItemSet(0);
+ pTabPage->FillItemSet(nullptr);
SwFieldMgr& rMgr = pTabPage->GetFieldMgr();
SwField *pCurField = rMgr.GetCurField();
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index a9f672f14c8d..afd645ac8bcc 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -44,8 +44,8 @@ using namespace ::com::sun::star;
SwFieldPage::SwFieldPage(vcl::Window *pParent, const OString& rID,
const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet)
: SfxTabPage(pParent, rID, rUIXMLDescription, &rAttrSet)
- , m_pCurField(0)
- , m_pWrtShell(0)
+ , m_pCurField(nullptr)
+ , m_pWrtShell(nullptr)
, m_nTypeSel(LISTBOX_ENTRY_NOTFOUND)
, m_nSelectionSel(LISTBOX_ENTRY_NOTFOUND)
, m_bFieldEdit(false)
@@ -66,7 +66,7 @@ void SwFieldPage::Init()
SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current());
bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
- m_bFieldEdit = 0 == GetTabDialog();
+ m_bFieldEdit = nullptr == GetTabDialog();
// newly initialise FieldManager. important for
// Dok-Switch (fldtdlg:ReInitTabPage)
@@ -110,7 +110,7 @@ void SwFieldPage::EditNewField( bool bOnlyActivate )
}
m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND;
m_bRefresh = true;
- Reset(0);
+ Reset(nullptr);
m_bRefresh = false;
}
@@ -125,7 +125,7 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
if (!IsFieldEdit()) // insert new field
{
- SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator, bIsAutomaticLanguage );
+ SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, nullptr, cSeparator, bIsAutomaticLanguage );
//#i26566# provide parent for SwWrtShell::StartInputFieldDlg
aData.m_pParent = &GetTabDialog()->GetOKButton();
bRet = m_aMgr.InsertField( aData );
@@ -237,7 +237,7 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
case TYP_INPUTFLD:
{
// User- or SetField ?
- if (m_aMgr.GetFieldType(RES_USERFLD, sPar1) == 0 &&
+ if (m_aMgr.GetFieldType(RES_USERFLD, sPar1) == nullptr &&
!(pTmpField->GetSubType() & INP_TXT)) // SETEXPFLD
{
SwSetExpField* pField = static_cast<SwSetExpField*>(pTmpField);
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 5bf7ed29211e..68580af6d0fc 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -61,10 +61,10 @@ protected:
void Init();
void SavePos( const ListBox* pLst1,
- const ListBox* pLst2 = 0,
- const ListBox* pLst3 = 0);
- void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
- ListBox* pLst3 = 0 );
+ const ListBox* pLst2 = nullptr,
+ const ListBox* pLst3 = nullptr);
+ void RestorePos( ListBox* pLst1, ListBox* pLst2 = nullptr,
+ ListBox* pLst3 = nullptr );
void EnableInsert(bool bEnable = true);
inline bool IsFieldEdit() const { return m_bFieldEdit; }
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4b38523b2d73..66a5a42d43bf 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -52,7 +52,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
"modules/swriter/ui/fldrefpage.ui", rCoreSet)
, maOutlineNodes()
, maNumItems()
- , mpSavedSelectedTextNode(0)
+ , mpSavedSelectedTextNode(nullptr)
, mnSavedSelectedPos(0)
{
get(m_pTypeLB, "type");
@@ -127,7 +127,7 @@ void SwFieldRefPage::dispose()
// #i83479#
void SwFieldRefPage::SaveSelectedTextNode()
{
- mpSavedSelectedTextNode = 0;
+ mpSavedSelectedTextNode = nullptr;
mnSavedSelectedPos = 0;
if ( m_pSelectionToolTipLB->IsVisible() )
{
@@ -642,12 +642,12 @@ void SwFieldRefPage::UpdateSubType()
bool bEnable = m_pSelectionToolTipLB->GetEntryCount() != 0;
m_pSelection->Enable( bEnable );
- if ( m_pSelectionToolTipLB->GetCurEntry() != 0 )
+ if ( m_pSelectionToolTipLB->GetCurEntry() != nullptr )
{
m_pSelectionToolTipLB->MakeVisible( m_pSelectionToolTipLB->GetCurEntry() );
}
- if ( IsFieldEdit() && m_pSelectionToolTipLB->GetCurEntry() == 0 )
+ if ( IsFieldEdit() && m_pSelectionToolTipLB->GetCurEntry() == nullptr )
{
m_pNameED->SetText(sOldSel);
}
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index ca4a4fa7f0cb..abb00aaefccb 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -66,14 +66,14 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
GetOKButton().SetClickHdl(LINK(this, SwFieldDlg, OKHdl));
- m_nDokId = AddTabPage("document", SwFieldDokPage::Create, 0);
- m_nVarId = AddTabPage("variables", SwFieldVarPage::Create, 0);
- m_nDokInf = AddTabPage("docinfo", SwFieldDokInfPage::Create, 0);
+ m_nDokId = AddTabPage("document", SwFieldDokPage::Create, nullptr);
+ m_nVarId = AddTabPage("variables", SwFieldVarPage::Create, nullptr);
+ m_nDokInf = AddTabPage("docinfo", SwFieldDokInfPage::Create, nullptr);
if (!m_bHtmlMode)
{
- m_nRefId = AddTabPage("ref", SwFieldRefPage::Create, 0);
- m_nFuncId = AddTabPage("functions", SwFieldFuncPage::Create, 0);
+ m_nRefId = AddTabPage("ref", SwFieldRefPage::Create, nullptr);
+ m_nFuncId = AddTabPage("functions", SwFieldFuncPage::Create, nullptr);
utl::OConfigurationTreeRoot aCfgRoot
= utl::OConfigurationTreeRoot::createWithComponentContext(
@@ -87,7 +87,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
OUString("DatabaseFields")) >>= bDatabaseFields;
if (bDatabaseFields)
- m_nDbId = AddTabPage("database", SwFieldDBPage::Create, 0);
+ m_nDbId = AddTabPage("database", SwFieldDBPage::Create, nullptr);
else
RemoveTabPage("database");
}
@@ -175,7 +175,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet( sal_uInt16 nID )
return pISet;
}
else
- return 0;
+ return nullptr;
}
// kick off inserting of new fields
@@ -184,7 +184,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldDlg, OKHdl, Button*, void)
if (GetOKButton().IsEnabled())
{
SfxTabPage* pPage = GetTabPage(GetCurPageId());
- pPage->FillItemSet(0);
+ pPage->FillItemSet(nullptr);
GetOKButton().GrabFocus(); // because of InputField-Dlg
}
@@ -304,7 +304,7 @@ void SwFieldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
if (nId == m_nDbId)
{
SfxDispatcher* pDispatch = m_pBindings->GetDispatcher();
- SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : 0;
+ SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : nullptr;
if(pViewFrame)
{
SfxViewShell* pViewShell = SfxViewShell::GetFirst( true, checkSfxViewShell<SwView> );
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 3dcbf74e2cb6..81e38b8aaf3d 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -354,7 +354,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
}
}
}
- if (GetCurField() != NULL && IsFieldEdit())
+ if (GetCurField() != nullptr && IsFieldEdit())
{
// GetFormula leads to problems with date formats because
// only the numeric value without formatting is returned.
@@ -498,7 +498,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
pFieldTyp = GetFieldMgr().GetFieldType( RES_SETEXPFLD,
sFieldTypeName );
else
- pFieldTyp = 0;
+ pFieldTyp = nullptr;
}
if( GetCurField() && IsFieldEdit() )
@@ -650,7 +650,7 @@ void SwFieldVarPage::UpdateSubType()
case TYP_SETREFPAGEFLD:
{
- if (GetCurField() != NULL
+ if (GetCurField() != nullptr
&& ((static_cast<SwRefPageSetField*>(GetCurField())->IsOn()
&& i) || (!static_cast<SwRefPageSetField*>(GetCurField())
->IsOn() && !i)))
@@ -682,7 +682,7 @@ void SwFieldVarPage::UpdateSubType()
}
const bool bEnable = m_pSelectionLB->GetEntryCount() != 0;
- ListBox *pLB = 0;
+ ListBox *pLB = nullptr;
if (bEnable)
{
@@ -723,7 +723,7 @@ sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
if( TYP_GETREFPAGEFLD != nTypeId )
{
- if (GetCurField() != NULL && IsFieldEdit())
+ if (GetCurField() != nullptr && IsFieldEdit())
{
bSpecialFormat = GetCurField()->GetFormat() == SAL_MAX_UINT32;
@@ -994,7 +994,7 @@ IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void )
else if (nCurId == m_nApplyId)
{
OUString sName(m_pNameED->GetText()), sValue(m_pValueED->GetText());
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
sal_uInt16 nId = 0;
sal_Int32 nNumFormatPos = m_pNumFormatLB->GetSelectEntryPos();
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index c261f584830a..171bfec91edb 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -36,9 +36,9 @@ SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS,
: SvxStandardDialog( pParent, "InputFieldDialog",
"modules/swriter/ui/inputfielddialog.ui")
, rSh( rS )
- , pInpField(0)
- , pSetField(0)
- , pUsrType(0)
+ , pInpField(nullptr)
+ , pSetField(nullptr)
+ , pUsrType(nullptr)
{
get(m_pLabelED, "name");
get(m_pEditED, "text");
@@ -73,7 +73,7 @@ SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS,
case INP_USR:
// user field
- if( 0 != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType(
+ if( nullptr != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType(
RES_USERFLD, pInpField->GetPar1() ) ) ) )
aStr = pUsrType->GetContent();
break;
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index ef953516cedd..de2b334556ac 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -45,8 +45,8 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
bIsUrl(false),
pSh(pWrtSh),
- pFileDlg(NULL),
- pOldDefDlgParent(NULL)
+ pFileDlg(nullptr),
+ pOldDefDlgParent(nullptr)
{
get(m_pTypeED, "scripttype");
get(m_pUrlRB, "url");
@@ -83,7 +83,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
if( !bNew )
SetText( SW_RES( STR_JAVA_EDIT ) );
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
SwJavaEditDialog::~SwJavaEditDialog()
@@ -118,7 +118,7 @@ IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, PrevHdl, Button*, void)
pMgr->GoPrev();
pField = static_cast<SwScriptField*>(pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, NextHdl, Button*, void)
@@ -129,7 +129,7 @@ IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, NextHdl, Button*, void)
pMgr->GoNext();
pField = static_cast<SwScriptField*>(pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, OKHdl, Button*, void)
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 5463e135a3f8..21475b35f5e7 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -258,7 +258,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
m_nColumnId = AddTabPage("columns", SwColumnPage::Create,
SwColumnPage::GetRanges );
- m_nMacroId = AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
+ m_nMacroId = AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
break;
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 1e63bb8e6a81..9afdb5f318b0 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -89,10 +89,10 @@ inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
: SfxModalDialog(pParent, "ColumnDialog", "modules/swriter/ui/columndialog.ui")
, rWrtShell(rSh)
- , pPageSet(0)
- , pSectionSet(0)
- , pSelectionSet(0)
- , pFrameSet(0)
+ , pPageSet(nullptr)
+ , pSectionSet(nullptr)
+ , pSelectionSet(nullptr)
+ , pFrameSet(nullptr)
, nOldSelection(0)
, nSelectionWidth(0)
, bPageChanged(false)
@@ -105,7 +105,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
nSelectionWidth = aRect.Width();
- SfxItemSet* pColPgSet = 0;
+ SfxItemSet* pColPgSet = nullptr;
static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
@@ -202,7 +202,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
m_pApplyToLB->RemoveEntry( nPagePos );
m_pApplyToLB->SelectEntryPos(0);
- ObjectHdl(0);
+ ObjectHdl(nullptr);
m_pApplyToLB->SetSelectHdl(LINK(this, SwColumnDlg, ObjectListBoxHdl));
OKButton *pOK = get<OKButton>("ok");
@@ -236,7 +236,7 @@ IMPL_LINK_TYPED(SwColumnDlg, ObjectListBoxHdl, ListBox&, rBox, void)
}
void SwColumnDlg::ObjectHdl(ListBox* pBox)
{
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
switch(nOldSelection)
{
case LISTBOX_SELECTION :
@@ -299,7 +299,7 @@ void SwColumnDlg::ObjectHdl(ListBox* pBox)
IMPL_LINK_NOARG_TYPED(SwColumnDlg, OkHdl, Button*, void)
{
// evaluate current selection
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
switch(nOldSelection)
{
case LISTBOX_SELECTION :
@@ -407,10 +407,10 @@ void SwColumnPage::ResetColWidth()
// Now as TabPage
SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "ColumnPage", "modules/swriter/ui/columnpage.ui", &rSet)
- , pColMgr(0)
+ , pColMgr(nullptr)
, nFirstVis(0)
, nMinWidth(MINLAY)
- , pModifiedField(0)
+ , pModifiedField(nullptr)
, bFormat(false)
, bFrm(false)
, bHtmlMode(false)
@@ -535,7 +535,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
if ( pDocSh )
{
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != NULL )
+ if ( pItem != nullptr )
pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
}
@@ -678,7 +678,7 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
const SfxPoolItem* pOldItem;
const SwFormatCol& rCol = pColMgr->GetColumns();
- if(0 == (pOldItem = GetOldItem( *rSet, RES_COL )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, RES_COL )) ||
rCol != *pOldItem )
rSet->Put(rCol);
@@ -859,7 +859,7 @@ void SwColumnPage::Init()
}
UpdateCols();
- Update(NULL);
+ Update(nullptr);
// set maximum number of columns
// values below 1 are not allowed
@@ -996,7 +996,7 @@ void SwColumnPage::ColModify(NumericField* pNF)
SetLabels( nFirstVis );
UpdateCols();
ResetColWidth();
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1098,7 +1098,7 @@ IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void )
}
pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
- Update(NULL);
+ Update(nullptr);
}
// scroll up the contents of the edits
@@ -1108,7 +1108,7 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void)
{
--nFirstVis;
SetLabels( nFirstVis );
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1119,7 +1119,7 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void)
{
++nFirstVis;
SetLabels( nFirstVis );
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1162,10 +1162,10 @@ void SwColumnPage::Timeout()
}
}
nColWidth[nChanged] = nNewWidth;
- pModifiedField = 0;
+ pModifiedField = nullptr;
}
- Update(pField ? pField->get() : NULL);
+ Update(pField ? pField->get() : nullptr);
}
// Update the view
@@ -1265,7 +1265,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
if( pColMgr->GetActualSize() != nActWidth)
{
pColMgr->SetActualWidth(nActWidth);
- ColModify( 0 );
+ ColModify( nullptr );
UpdateColMgr( *m_pLineWidthEdit );
}
}
@@ -1325,7 +1325,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd1.SetMetricFieldMin(0);
aDistEd2.SetMetricFieldMin(0);
}
- Update(NULL);
+ Update(nullptr);
}
SfxTabPage::sfxpg SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
@@ -1344,7 +1344,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
m_pCLNrEdt->SetValue( nItem );
m_pAutoWidthBox->Check();
aDistEd1.SetPrcntValue(0);
- ColModify(0);
+ ColModify(nullptr);
}
else
{
@@ -1352,7 +1352,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
m_pCLNrEdt->SetValue( 2 );
m_pAutoWidthBox->Check(false);
aDistEd1.SetPrcntValue(0);
- ColModify(0);
+ ColModify(nullptr);
// now set the width ratio to 2 : 1 or 1 : 2 respectively
const long nSmall = static_cast< long >(pColMgr->GetActualSize() / 3);
if(nItem == 4)
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 2008493285b1..d07c7fb3bd0a 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -318,7 +318,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionDialog, ModifyHdl, Edit&, void)
bool bNone = sFieldTypeName == m_sNone;
SwFieldType* pType = (bCorrectFieldName && !bNone)
? rSh.GetFieldType( RES_SETEXPFLD, sFieldTypeName )
- : 0;
+ : nullptr;
m_pOKButton->Enable( bCorrectFieldName &&
(!pType ||
static_cast<SwSetExpFieldType*>(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 84b88ae6638a..7979913241bd 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -56,7 +56,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
: SfxTabDialog(pViewFrame, pParent, sResType,
"modules/swriter/ui/" +
sResType.toAsciiLowerCase() +
- (".ui"), &rCoreSet, pStr != 0)
+ (".ui"), &rCoreSet, pStr != nullptr)
, m_bFormat(bFormat)
, m_bNew(bNewFrm)
, m_rSet(rCoreSet)
@@ -85,18 +85,18 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")");
}
- m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
- m_nAddId = AddTabPage("options", SwFrmAddPage::Create, 0);
- m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, 0);
- m_nUrlId = AddTabPage("hyperlink", SwFrmURLPage::Create, 0);
+ m_nStdId = AddTabPage("type", SwFrmPage::Create, nullptr);
+ m_nAddId = AddTabPage("options", SwFrmAddPage::Create, nullptr);
+ m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, nullptr);
+ m_nUrlId = AddTabPage("hyperlink", SwFrmURLPage::Create, nullptr);
if (m_sDlgType == "PictureDialog")
{
- m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, 0);
+ m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, nullptr);
m_nCropId = AddTabPage("crop", RID_SVXPAGE_GRFCROP);
}
if (m_sDlgType == "FrameDialog")
{
- m_nColumnId = AddTabPage("columns", SwColumnPage::Create, 0);
+ m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr);
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
@@ -108,8 +108,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
- m_nMacroId = AddTabPage("macro", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0);
+ m_nMacroId = AddTabPage("macro", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
+ m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr);
if(m_bHTMLMode)
{
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index f3b0f1d5ab0b..81d391b4e62c 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -614,14 +614,14 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet)
nUpperBorder(0),
nLowerBorder(0),
fWidthHeightRatio(1.0),
- mpToCharContentPos( NULL ),
+ mpToCharContentPos( nullptr ),
nOldH(text::HoriOrientation::CENTER),
nOldHRel(text::RelOrientation::FRAME),
nOldV(text::VertOrientation::TOP),
nOldVRel(text::RelOrientation::PRINT_AREA),
- pVMap( 0 ),
- pHMap( 0 ),
+ pVMap( nullptr ),
+ pHMap( nullptr ),
m_bAllowVertPositioning( true ),
m_bIsMathOLE( false ),
m_bIsMathBaselineAlignment( true )
@@ -900,7 +900,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet )
SetMetric( *m_pAtHorzPosED, aMetric );
SetMetric( *m_pAtVertPosED, aMetric );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
const SwFormatAnchor& rAnchor = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR));
if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem))
@@ -1067,7 +1067,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
: getFrmDlgParentShell();
OSL_ENSURE( pSh , "shell not found");
const SfxItemSet& rOldSet = GetItemSet();
- const SfxPoolItem* pOldItem = 0;
+ const SfxPoolItem* pOldItem = nullptr;
RndStdIds eAnchorId = (RndStdIds)GetAnchor();
@@ -1077,7 +1077,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
if (bNew || !pOldItem || eAnchorId != static_cast<const SwFormatAnchor*>(pOldItem)->GetAnchorId())
{
SwFormatAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() );
- bRet = 0 != rSet->Put( aAnc );
+ bRet = nullptr != rSet->Put( aAnc );
}
}
@@ -1112,7 +1112,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame))
{
- bRet |= 0 != rSet->Put( aHoriOrient );
+ bRet |= nullptr != rSet->Put( aHoriOrient );
}
}
@@ -1155,7 +1155,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
if( ( bNew && !bFormat ) || ((bAtVertPosModified || bMod) && !bSame ))
{
- bRet |= 0 != rSet->Put( aVertOrient );
+ bRet |= nullptr != rSet->Put( aVertOrient );
}
}
@@ -1234,7 +1234,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
}
if( !bFormat && m_pFixedRatioCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, m_pFixedRatioCB->IsChecked()));
+ bRet |= nullptr != rSet->Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, m_pFixedRatioCB->IsChecked()));
pOldItem = GetOldItem(*rSet, RES_FRM_SIZE);
@@ -1246,11 +1246,11 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
if (aSz.GetHeightSizeType() == ATT_VAR_SIZE) // there is no VAR_SIZE in frames
aSz.SetHeightSizeType(ATT_MIN_SIZE);
- bRet |= 0 != rSet->Put( aSz );
+ bRet |= nullptr != rSet->Put( aSz );
}
if(m_pFollowTextFlowCB->IsValueChangedFromSaved())
{
- bRet |= 0 != rSet->Put(SwFormatFollowTextFlow(m_pFollowTextFlowCB->IsChecked()));
+ bRet |= nullptr != rSet->Put(SwFormatFollowTextFlow(m_pFollowTextFlowCB->IsChecked()));
}
return bRet;
}
@@ -1326,7 +1326,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
else if ( eId == FLY_AS_CHAR )
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
- pHMap = 0;
+ pHMap = nullptr;
bEnable = false;
}
m_pHorizontalDLB->Enable( bEnable );
@@ -2374,7 +2374,7 @@ void SwFrmPage::EnableVerticalPositioning( bool bEnable )
SwGrfExtPage::SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "PicturePage",
"modules/swriter/ui/picturepage.ui", &rSet)
- , pGrfDlg(0)
+ , pGrfDlg(nullptr)
, bHtmlMode(false)
{
get(m_pMirror, "flipframe");
@@ -2440,7 +2440,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet.Get(RES_PROTECT));
bool bProtContent = rProt.IsContentProtected();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bEnable = false;
bool bEnableMirrorRB = false;
@@ -2499,7 +2499,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
OUString referer;
SfxStringItem const * it = static_cast<SfxStringItem const *>(
rSet.GetItem(SID_REFERER));
- if (it != 0) {
+ if (it != nullptr) {
referer = it->GetValue();
}
const Graphic* pGrf = rBrush.GetGraphic(referer);
@@ -2784,8 +2784,8 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet )
INetURLObject::DECODE_UNAMBIGUOUS ));
pNameED->SetText( pFormatURL->GetName());
- pClientCB->Enable( pFormatURL->GetMap() != 0 );
- pClientCB->Check ( pFormatURL->GetMap() != 0 );
+ pClientCB->Enable( pFormatURL->GetMap() != nullptr );
+ pClientCB->Check ( pFormatURL->GetMap() != nullptr );
pServerCB->Check ( pFormatURL->IsServerMap() );
pFrameCB->SetText(pFormatURL->GetTargetFrameName());
@@ -2821,9 +2821,9 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet)
}
}
- if(!pClientCB->IsChecked() && pFormatURL->GetMap() != 0)
+ if(!pClientCB->IsChecked() && pFormatURL->GetMap() != nullptr)
{
- pFormatURL->SetMap(0);
+ pFormatURL->SetMap(nullptr);
bModified = true;
}
@@ -2864,7 +2864,7 @@ IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void)
SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", &rSet)
- , pWrtSh(0)
+ , pWrtSh(nullptr)
, bHtmlMode(false)
, bFormat(false)
, bNew(false)
@@ -3010,12 +3010,12 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet )
const SwFormatChain &rChain = pFormat->GetChain();
const SwFlyFrameFormat* pFlyFormat;
OUString sNextChain, sPrevChain;
- if ((pFlyFormat = rChain.GetPrev()) != 0)
+ if ((pFlyFormat = rChain.GetPrev()) != nullptr)
{
sPrevChain = pFlyFormat->GetName();
}
- if ((pFlyFormat = rChain.GetNext()) != 0)
+ if ((pFlyFormat = rChain.GetNext()) != nullptr)
{
sNextChain = pFlyFormat->GetName();
}
@@ -3120,24 +3120,24 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
{
bool bRet = false;
if (pNameED->IsValueChangedFromSaved())
- bRet |= 0 != rSet->Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
if (pAltNameED->IsValueChangedFromSaved())
- bRet |= 0 != rSet->Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText()));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText()));
const SfxPoolItem* pOldItem;
SvxProtectItem aProt ( static_cast<const SvxProtectItem& >(GetItemSet().Get(RES_PROTECT)) );
aProt.SetContentProtect( pProtectContentCB->IsChecked() );
aProt.SetSizeProtect ( pProtectSizeCB->IsChecked() );
aProt.SetPosProtect ( pProtectFrameCB->IsChecked() );
- if ( 0 == (pOldItem = GetOldItem(*rSet, FN_SET_PROTECT)) ||
+ if ( nullptr == (pOldItem = GetOldItem(*rSet, FN_SET_PROTECT)) ||
aProt != *pOldItem )
- bRet |= 0 != rSet->Put( aProt);
+ bRet |= nullptr != rSet->Put( aProt);
if ( pEditInReadonlyCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put( SwFormatEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked()));
+ bRet |= nullptr != rSet->Put( SwFormatEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked()));
if ( pPrintFrameCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked()));
+ bRet |= nullptr != rSet->Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked()));
// textflow
if( pTextFlowLB->IsVisible() )
@@ -3146,7 +3146,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
if( pTextFlowLB->IsValueChangedFromSaved() )
{
sal_uInt16 nData = (sal_uInt16)reinterpret_cast<sal_IntPtr>(pTextFlowLB->GetEntryData( nPos ));
- bRet |= 0 != rSet->Put( SvxFrameDirectionItem(
+ bRet |= nullptr != rSet->Put( SvxFrameDirectionItem(
(SvxFrameDirection)nData, RES_FRAMEDIR ));
}
}
@@ -3163,15 +3163,15 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
const SwFormatChain &rChain = pFormat->GetChain();
const SwFlyFrameFormat* pFlyFormat;
OUString sNextChain, sPrevChain;
- if ((pFlyFormat = rChain.GetPrev()) != 0)
+ if ((pFlyFormat = rChain.GetPrev()) != nullptr)
sPrevChain = pFlyFormat->GetName();
- if ((pFlyFormat = rChain.GetNext()) != 0)
+ if ((pFlyFormat = rChain.GetNext()) != nullptr)
sNextChain = pFlyFormat->GetName();
if(sPrevChain != sCurrentPrevChain)
- bRet |= 0 != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_PREVIOUS, sCurrentPrevChain));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_PREVIOUS, sCurrentPrevChain));
if(sNextChain != sCurrentNextChain)
- bRet |= 0 != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_NEXT, sCurrentNextChain));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_NEXT, sCurrentNextChain));
}
}
@@ -3185,7 +3185,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
case 1 : nAdjust = SDRTEXTVERTADJUST_CENTER; break;
case 2 : nAdjust = SDRTEXTVERTADJUST_BOTTOM; break;
}
- bRet |= 0 != rSet->Put(SdrTextVertAdjustItem(nAdjust, RES_TEXT_VERT_ADJUST));
+ bRet |= nullptr != rSet->Put(SdrTextVertAdjustItem(nAdjust, RES_TEXT_VERT_ADJUST));
}
return bRet;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index d30e3edc58a3..2f56c86bd372 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -71,7 +71,7 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet)
, m_nOldLowerMargin(0)
, m_nAnchorId(FLY_AT_PARA)
, m_nHtmlMode(0)
- , m_pWrtSh(0)
+ , m_pWrtSh(nullptr)
, m_bFormat(false)
, m_bNew(true)
, m_bHtmlMode(false)
@@ -222,7 +222,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
m_pWrapThroughRB->Enable(!m_pWrapOutlineCB->IsChecked());
m_bContourImage = !bContour;
- RadioButton* pBtn = NULL;
+ RadioButton* pBtn = nullptr;
switch (nSur)
{
@@ -286,7 +286,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
m_pTopMarginED->SetValue(m_pTopMarginED->Normalize(rUL.GetUpper()), FUNIT_TWIP);
m_pBottomMarginED->SetValue(m_pBottomMarginED->Normalize(rUL.GetLower()), FUNIT_TWIP);
- ContourHdl(0);
+ ContourHdl(nullptr);
ActivatePage( *rSet );
}
@@ -331,7 +331,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bContour )
aSur.SetOutside(m_pWrapOutsideCB->IsChecked());
- if(0 == (pOldItem = GetOldItem( *rSet, RES_SURROUND )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, RES_SURROUND )) ||
aSur != *pOldItem )
{
rSet->Put(aSur);
@@ -340,7 +340,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if (!m_bDrawMode)
{
- if(0 == (pOldItem = GetOldItem( *rSet, FN_OPAQUE )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, FN_OPAQUE )) ||
aOp != *pOldItem )
{
rSet->Put(aOp);
@@ -357,7 +357,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bTopMod || bBottomMod )
{
- if(0 == (pOldItem = GetOldItem(*rSet, RES_UL_SPACE)) ||
+ if(nullptr == (pOldItem = GetOldItem(*rSet, RES_UL_SPACE)) ||
aUL != *pOldItem )
{
rSet->Put( aUL, RES_UL_SPACE );
@@ -374,7 +374,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bLeftMod || bRightMod )
{
- if( 0 == (pOldItem = GetOldItem(*rSet, RES_LR_SPACE)) ||
+ if( nullptr == (pOldItem = GetOldItem(*rSet, RES_LR_SPACE)) ||
aLR != *pOldItem )
{
rSet->Put(aLR, RES_LR_SPACE);
@@ -386,7 +386,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
{
bool bChecked = m_pWrapTransparentCB->IsChecked() && m_pWrapTransparentCB->IsEnabled();
if ((m_pWrapTransparentCB->GetSavedValue() == 1) != bChecked)
- bModified |= 0 != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
+ bModified |= nullptr != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
return bModified;
@@ -448,7 +448,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.nHeight = aSize.Height();
m_aFrmSize = aSize;
- aMgr.ValidateMetrics(aVal, 0);
+ aMgr.ValidateMetrics(aVal, nullptr);
SwTwips nLeft;
SwTwips nRight;
@@ -575,7 +575,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
- ContourHdl(0);
+ ContourHdl(nullptr);
}
SfxTabPage::sfxpg SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
@@ -595,7 +595,7 @@ IMPL_LINK_TYPED( SwWrapTabPage, RangeModifyHdl, SpinField&, rSpin, void )
{
MetricField& rEdit = static_cast<MetricField&>(rSpin);
sal_Int64 nValue = rEdit.GetValue();
- MetricField *pOpposite = 0;
+ MetricField *pOpposite = nullptr;
if (&rEdit == m_pLeftMarginED)
pOpposite = m_pRightMarginED;
else if (&rEdit == m_pRightMarginED)
@@ -627,7 +627,7 @@ IMPL_LINK_TYPED( SwWrapTabPage, WrapTypeHdl, Button *, pBtn, void )
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR)) &&
(pBtn != m_pNoWrapRB) );
- ContourHdl(0);
+ ContourHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwWrapTabPage, ContourHdl, Button*, void)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b77979663e4f..b0b938ef575c 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -226,7 +226,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
"modules/swriter/ui/tocdialog.ui", &rSet)
, pMgr( new SwTOXMgr( &rShell ) )
, rSh(rShell)
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
, pParamTOXBase(pCurTOX)
, sUserDefinedIndex(SW_RESSTR(STR_USER_DEFINED_INDEX))
, nInitialTOXType(nToxType)
@@ -257,8 +257,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
}
for(int i = nTypeCount - 1; i > -1; i--)
{
- pFormArr[i] = 0;
- pDescArr[i] = 0;
+ pFormArr[i] = nullptr;
+ pDescArr[i] = nullptr;
pxIndexSectionsArr[i] = new SwIndexSections_Impl;
if(pCurTOX)
{
@@ -303,11 +303,11 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, 0);
- m_nStylesId = AddTabPage("styles", SwTOXStylesTabPage::Create, 0);
- m_nColumnId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
- m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create, 0);
+ m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, nullptr);
+ m_nStylesId = AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr);
+ m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
+ m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create, nullptr);
if(!pCurTOX)
SetCurPageId(m_nSelectId);
@@ -322,7 +322,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
if(!m_pShowExampleCB->IsChecked())
SetViewWindow(m_pExampleContainerWIN);
- ShowPreviewHdl(0);
+ ShowPreviewHdl(nullptr);
}
SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
@@ -393,7 +393,7 @@ short SwMultiTOXTabDialog::Ok()
rDesc.ApplyTo(aNewDef);
if(!bGlobalFlag)
pMgr->UpdateOrInsertTOX(
- rDesc, 0, GetOutputItemSet());
+ rDesc, nullptr, GetOutputItemSet());
else if(bEditTOX)
pMgr->UpdateOrInsertTOX(
rDesc, &pParamTOXBase, GetOutputItemSet());
@@ -506,7 +506,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
if(!pExampleFrame->IsServiceAvailable())
{
- SwOneExampleFrame::CreateErrorMessage(0);
+ SwOneExampleFrame::CreateErrorMessage(nullptr);
}
}
m_pShowExampleCB->Show(pExampleFrame && pExampleFrame->IsServiceAvailable());
@@ -516,7 +516,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
&& pExampleFrame && pExampleFrame->IsServiceAvailable();
m_pExampleContainerWIN->Show( bSetViewWindow );
- SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : 0 );
+ SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : nullptr );
setOptimalLayoutSize();
}
@@ -693,7 +693,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
}
// now the other styles
- const SwTextFormatColl *pColl = 0;
+ const SwTextFormatColl *pColl = nullptr;
const sal_uInt16 nSz = rWrtSh.GetTextFormatCollCount();
for ( sal_uInt16 j = 0;j < nSz; ++j )
@@ -790,7 +790,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
: SfxTabPage(pParent, "TocIndexPage",
"modules/swriter/ui/tocindexpage.ui", &rAttrSet)
, aFromNames(SW_RES(RES_SRCTYPES))
- , pIndexRes(0)
+ , pIndexRes(nullptr)
, sAutoMarkType(SW_RESSTR(STR_AUTOMARK_TYPE))
, m_bWaitingInitialSettings(true)
{
@@ -852,7 +852,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
//Default mode is arranged to be the tallest mode
//of alphabetical index, lock that height in now
- LanguageHdl(0); //fill sort algorithm list
+ LanguageHdl(nullptr); //fill sort algorithm list
Size aPrefSize(get_preferred_size());
set_height_request(aPrefSize.Height());
@@ -1133,7 +1133,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
aStyleArr[i] = rDesc.GetStyleNames(i);
m_pLanguageLB->SelectLanguage(rDesc.GetLanguage());
- LanguageHdl(0);
+ LanguageHdl(nullptr);
for( sal_Int32 nCnt = 0; nCnt < m_pSortAlgorithmLB->GetEntryCount(); ++nCnt )
{
const OUString* pEntryData = static_cast<const OUString*>(m_pSortAlgorithmLB->GetEntryData( nCnt ));
@@ -1450,13 +1450,13 @@ void SwTOXSelectTabPage::LanguageHdl( ListBox* pBox )
OUString sOldString;
void* pUserData;
- if( 0 != (pUserData = m_pSortAlgorithmLB->GetSelectEntryData()) )
+ if( nullptr != (pUserData = m_pSortAlgorithmLB->GetSelectEntryData()) )
sOldString = *static_cast<OUString*>(pUserData);
sal_Int32 nEnd = m_pSortAlgorithmLB->GetEntryCount();
for( sal_Int32 n = 0; n < nEnd; ++n )
{
void* pDel = m_pSortAlgorithmLB->GetEntryData( n );
- if( 0 != pDel )
+ if( nullptr != pDel )
delete static_cast<OUString*>(pDel);
}
m_pSortAlgorithmLB->Clear();
@@ -1745,7 +1745,7 @@ void SwTOXButton::RequestHelp( const HelpEvent& rHEvt )
SwIdxTreeListBox::SwIdxTreeListBox(vcl::Window* pPar, WinBits nStyle)
: SvTreeListBox(pPar, nStyle)
- , pParent(NULL)
+ , pParent(nullptr)
{
}
@@ -1813,7 +1813,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt
, sDelimStr(SW_RESSTR(STR_DELIM))
, sNoCharStyle(SW_RESSTR(STR_NO_CHAR_STYLE))
, sNoCharSortKey(SW_RESSTR(STR_NOSORTKEY))
- , m_pCurrentForm(0)
+ , m_pCurrentForm(nullptr)
, bInLevelHdl(false)
{
get(m_pLevelFT, "levelft");
@@ -2265,7 +2265,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, RemoveInsertAuthHdl, Button*, pButton, void)
m_pTokenWIN->RemoveControl(static_cast<SwTOXButton*>(pCtrl));
}
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
@@ -2353,7 +2353,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, InsertTokenHdl, Button*, pBtn, void)
aInsert.nTabStopPosition = 0;
aInsert.nChapterFormat = nChapterFormat; // i89791
m_pTokenWIN->InsertAtSelection(sText, aInsert);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, AllLevelsHdl, Button*, void)
@@ -2561,7 +2561,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, StyleSelectHdl, ListBox&, rBox, void)
static_cast<SwTOXButton*>(pCtrl)->SetCharStyleName(sEntry, nId);
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
@@ -2574,7 +2574,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetChapterInfo(nPos);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
}
@@ -2587,7 +2587,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoOutlineHdl, Edit&, rEdit, void)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetOutlineLevel(nLevel);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
@@ -2602,7 +2602,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
{
static_cast<SwTOXButton*>(pCtrl)->SetEntryNumberFormat(nPos);//i89791
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
}
@@ -2618,7 +2618,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, TabPosHdl, Edit&, rEdit, void)
static_cast<SwTOXButton*>(pCtrl)->SetTabPosition( static_cast< SwTwips >(
pField->Denormalize( pField->GetValue( FUNIT_TWIP ))));
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
@@ -2636,7 +2636,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
cSet = ' ';
static_cast<SwTOXButton*>(pCtrl)->SetFillChar( cSet );
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
@@ -2654,7 +2654,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
bChecked ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT);
m_pTabPosFT->Enable(!bChecked);
m_pTabPosMF->Enable(!bChecked);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
@@ -2694,12 +2694,12 @@ OUString SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
SwTokenWindow::SwTokenWindow(vcl::Window* pParent)
: VclHBox(pParent)
- , pForm(0)
+ , pForm(nullptr)
, nLevel(0)
, bValid(false)
, sCharStyle(SW_RESSTR(STR_CHARSTYLE))
- , pActiveCtrl(0)
- , m_pParent(NULL)
+ , pActiveCtrl(nullptr)
+ , m_pParent(nullptr)
{
m_pUIBuilder = new VclBuilder(this, getUIRootDir(),
"modules/swriter/ui/tokenwidget.ui", "TokenWidget");
@@ -2776,7 +2776,7 @@ void SwTokenWindow::dispose()
void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
{
- SetActiveControl(0);
+ SetActiveControl(nullptr);
bValid = true;
if(pForm)
@@ -2799,7 +2799,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
SwFormTokens::iterator aIt = aPattern.begin();
bool bLastWasText = false; //assure alternating text - code - text
- Control* pSetActiveControl = 0;
+ Control* pSetActiveControl = nullptr;
while(aIt != aPattern.end()) // #i21237#
{
SwFormToken aToken(*aIt); // #i21237#
@@ -2878,7 +2878,7 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken& rToken)
{
- Control* pRet = 0;
+ Control* pRet = nullptr;
Size aControlSize(m_pCtrlParentWin->GetSizePixel());
Point aControlPos;
@@ -2981,8 +2981,8 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
bool bPreStartLinkFound = false;
bool bPreEndLinkFound = false;
- const Control* pControl = 0;
- const Control* pExchange = 0;
+ const Control* pControl = nullptr;
+ const Control* pExchange = nullptr;
ctrl_const_iterator it = aControlList.begin();
for( ; it != aControlList.end() && pActiveCtrl != (*it); ++it )
@@ -2997,7 +2997,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
if( TOKEN_LINK_START == rNewToken.eTokenType )
{
bPreStartLinkFound = true;
- pExchange = 0;
+ pExchange = nullptr;
}
else if(TOKEN_LINK_END == rNewToken.eTokenType)
{
@@ -3038,7 +3038,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
if(bPostLinkStartFound)
{
bPostLinkStartFound = false;
- pExchange = 0;
+ pExchange = nullptr;
}
break;
}
@@ -3197,7 +3197,7 @@ void SwTokenWindow::RemoveControl(SwTOXButton* pDel, bool bInternalCall )
SetActiveControl(pLeftEdit);
AdjustPositions();
- aModifyHdl.Call(0);
+ aModifyHdl.Call(nullptr);
}
void SwTokenWindow::AdjustPositions()
@@ -3369,7 +3369,7 @@ IMPL_LINK_TYPED(SwTokenWindow, ScrollHdl, Button*, pBtn, void )
// move the complete list
MoveControls(nMove);
- Control *pCtrl = 0;
+ Control *pCtrl = nullptr;
pCtrl = *(aControlList.begin());
m_pLeftScrollWin->Enable(pCtrl->GetPosPixel().X() < 0);
@@ -3464,7 +3464,7 @@ IMPL_LINK_TYPED(SwTokenWindow, EditResize, Edit&, rEdit, void)
{
static_cast<SwTOXEdit*>(&rEdit)->AdjustSize();
AdjustPositions();
- aModifyHdl.Call(0);
+ aModifyHdl.Call(nullptr);
}
IMPL_LINK_TYPED(SwTokenWindow, NextItemHdl, SwTOXEdit&, rEdit, void)
@@ -3611,7 +3611,7 @@ sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType) const
SwTOXStylesTabPage::SwTOXStylesTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet )
: SfxTabPage(pParent, "TocStylesPage",
"modules/swriter/ui/tocstylespage.ui", &rAttrSet)
- , m_pCurrentForm(0)
+ , m_pCurrentForm(nullptr)
{
get(m_pLevelLB, "levels");
get(m_pAssignBT, "assign");
@@ -4002,7 +4002,7 @@ bool SwEntryBrowseBox::SaveModified()
OUString sNew;
bool bVal = false;
- ::svt::CellController* pController = 0;
+ ::svt::CellController* pController = nullptr;
if(nCol < ITEM_CASE)
{
pController = xController;
@@ -4059,7 +4059,7 @@ void SwEntryBrowseBox::InitController(
void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{
- AutoMarkEntry* pToInsert = 0;
+ AutoMarkEntry* pToInsert = nullptr;
rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
while( !rInStr.GetError() && !rInStr.IsEof() )
{
@@ -4092,7 +4092,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
pToInsert->bWord = !sStr.isEmpty() && sStr != "0";
m_Entries.push_back(std::unique_ptr<AutoMarkEntry>(pToInsert));
- pToInsert = 0;
+ pToInsert = nullptr;
}
else
{
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index c2f4fa4aca09..9acc2be6a841 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -87,8 +87,8 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg,
, bPhoneticED2_ChangedByUser(false)
, nLangForPhoneticReading(LANGUAGE_CHINESE_SIMPLIFIED)
, bIsPhoneticReadingEnabled(false)
- , xExtendedIndexEntrySupplier(NULL)
- , pTOXMgr(0)
+ , xExtendedIndexEntrySupplier(nullptr)
+ , pTOXMgr(nullptr)
, pSh(&rWrtShell)
{
rDialog.get(m_pFrame, "frame");
@@ -266,7 +266,7 @@ void SwIndexMarkPane::InitControls()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
@@ -354,7 +354,7 @@ void SwIndexMarkPane::Activate()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
@@ -371,7 +371,7 @@ void SwIndexMarkPane::Apply()
{
InsertUpdate();
if(bSelected)
- pSh->ResetSelect(0, false);
+ pSh->ResetSelect(nullptr, false);
}
// apply changes
@@ -488,7 +488,7 @@ void SwIndexMarkPane::InsertMark()
void SwIndexMarkPane::UpdateMark()
{
OUString aAltText(m_pEntryED->GetText());
- OUString* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : 0;
+ OUString* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : nullptr;
//empty alternative texts are not allowed
if(pAltText && pAltText->isEmpty())
return;
@@ -977,7 +977,7 @@ void SwIndexMarkModalDlg::Apply()
void SwIndexMarkModalDlg::dispose()
{
- SwViewShell::SetCareWin(0);
+ SwViewShell::SetCareWin(nullptr);
SvxStandardDialog::dispose();
}
@@ -1063,7 +1063,7 @@ SwAuthorMarkPane::SwAuthorMarkPane(Dialog &rDialog, bool bNewDlg)
: m_rDialog(rDialog)
, bNewEntry(bNewDlg)
, bBibAccessInitialized(false)
- , pSh(0)
+ , pSh(nullptr)
{
m_rDialog.get(m_pFromComponentRB, "frombibliography");
m_rDialog.get(m_pFromDocContentRB, "fromdocument");
@@ -1165,7 +1165,7 @@ IMPL_LINK_TYPED( SwAuthorMarkPane, CompEntryHdl, ListBox&, rBox, void)
{
const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>(
pSh->GetFieldType(RES_AUTHORITY, OUString()));
- const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier(sEntry) : 0;
+ const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier(sEntry) : nullptr;
for(int i = 0; i < AUTH_FIELD_END; i++)
m_sFields[i] = pEntry ?
pEntry->GetAuthorField((ToxAuthorityField)i) : OUString();
@@ -1193,7 +1193,7 @@ IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void)
pSh->GetFieldType(RES_AUTHORITY, OUString()));
const SwAuthEntry* pEntry = pFType ?
pFType->GetEntryByIdentifier( m_sFields[AUTH_FIELD_IDENTIFIER])
- : 0;
+ : nullptr;
if(pEntry)
{
for(int i = 0; i < AUTH_FIELD_END && !bDifferent; i++)
@@ -1230,7 +1230,7 @@ IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void)
}
}
if(!bNewEntry)
- CloseHdl(0);
+ CloseHdl(nullptr);
}
IMPL_LINK_TYPED(SwAuthorMarkPane, CreateEntryHdl, Button*, pButton, void)
@@ -1417,8 +1417,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
,
- pTypeListBox(0),
- pIdentifierBox(0),
+ pTypeListBox(nullptr),
+ pIdentifierBox(nullptr),
rWrtSh(rSh),
m_bNewEntryMode(bNewEntry),
m_bNameAllowed(true)
@@ -1440,7 +1440,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
pFixedTexts[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow);
pFixedTexts[nIndex]->SetText(SW_RES(STR_AUTH_FIELD_START + aCurInfo.nToxField));
pFixedTexts[nIndex]->Show();
- pEdits[nIndex] = 0;
+ pEdits[nIndex] = nullptr;
if( AUTH_FIELD_AUTHORITY_TYPE == aCurInfo.nToxField )
{
pTypeListBox = VclPtr<ListBox>::Create(bLeft ? pLeft : pRight, WB_DROPDOWN|WB_BORDER|WB_VCENTER);
@@ -1634,7 +1634,7 @@ SwAuthMarkModalDlg::SwAuthMarkModalDlg(vcl::Window *pParent, SwWrtShell& rSh)
void SwAuthMarkModalDlg::Apply()
{
- m_aContent.InsertHdl(0);
+ m_aContent.InsertHdl(nullptr);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 86fde7dbe628..5f32002007d0 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -47,8 +47,8 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rS)
aOldOkHdl = GetOKButton().GetClickHdl();
GetOKButton().SetClickHdl( LINK( this, SwFootNoteOptionDlg, OkHdl ) );
- m_nFootNoteId = AddTabPage( "footnotes", SwFootNoteOptionPage::Create, 0 );
- m_nEndNoteId = AddTabPage( "endnotes", SwEndNoteOptionPage::Create, 0 );
+ m_nFootNoteId = AddTabPage( "footnotes", SwFootNoteOptionPage::Create, nullptr );
+ m_nEndNoteId = AddTabPage( "endnotes", SwEndNoteOptionPage::Create, nullptr );
}
void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
@@ -74,13 +74,13 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN,
bEN ? OString("EndnotePage") : OString("FootnotePage"),
bEN ? OUString("modules/swriter/ui/endnotepage.ui") : OUString("modules/swriter/ui/footnotepage.ui"),
&rSet)
- , m_pNumCountBox(NULL)
- , m_pPosFT(NULL)
- , m_pPosPageBox(NULL)
- , m_pPosChapterBox(NULL)
- , m_pContEdit(NULL)
- , m_pContFromEdit(NULL)
- , pSh(0)
+ , m_pNumCountBox(nullptr)
+ , m_pPosFT(nullptr)
+ , m_pPosPageBox(nullptr)
+ , m_pPosChapterBox(nullptr)
+ , m_pContEdit(nullptr)
+ , m_pContFromEdit(nullptr)
+ , pSh(nullptr)
, bPosDoc(false)
, bEndNote(bEN)
{
@@ -338,7 +338,7 @@ IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, PosChapterHdl, Button*, void)
static SwCharFormat* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFormatName )
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
const sal_uInt16 nChCount = pSh->GetCharFormatCount();
for(sal_uInt16 i = 0; i< nChCount; i++)
{
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 6f94e2c7c6a0..3b62c88e7ee2 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -192,7 +192,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
: SvxStandardDialog(&pViewFrame->GetWindow(), "AutoTextDialog",
"modules/swriter/ui/autotext.ui")
, sReadonlyPath(SW_RESSTR(STR_READONLY_PATH))
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
, pGlossaryHdl(pGlosHdl)
, bResume(false)
, bSelection(pWrtShell->IsSelection())
@@ -367,7 +367,7 @@ SvTreeListEntry* SwGlossaryDlg::DoesBlockExist(const OUString& rBlock,
}
}
}
- return 0;
+ return nullptr;
}
IMPL_LINK_TYPED( SwGlossaryDlg, NameModify, Edit&, rEdit, void )
@@ -423,7 +423,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, EnableHdl, Menu *, pMn, bool )
const OUString aEditText(m_pNameED->GetText());
const bool bHasEntry = !aEditText.isEmpty() && !m_pShortNameEdit->GetText().isEmpty();
- const bool bExists = 0 != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
+ const bool bExists = nullptr != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
const bool bIsGroup = pEntry && !m_pCategoryBox->GetParent(pEntry);
pMn->EnableItem("new", bSelection && bHasEntry && !bExists);
pMn->EnableItem("newtext", bSelection && bHasEntry && !bExists);
@@ -693,7 +693,7 @@ void SwGlossaryDlg::Init()
m_pCategoryBox->Clear();
// display text block regions
const size_t nCnt = pGlossaryHdl->GetGroupCnt();
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
const OUString sSelStr(::GetCurrGlosGroup().getToken(0, GLOS_DELIM));
const sal_Int32 nSelPath = ::GetCurrGlosGroup().getToken(1, GLOS_DELIM).toInt32();
// #i66304# - "My AutoText" comes from mytexts.bau, but should be translated
@@ -836,7 +836,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, CheckBoxHdl, Button *, pBox, void )
SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits)
: SvTreeListBox(pParent, nBits)
, sReadonly(SW_RESSTR(SW_STR_READONLY)),
- pDragEntry(0)
+ pDragEntry(nullptr)
{
SetDragDropMode( DragDropMode::CTRL_MOVE|DragDropMode::CTRL_COPY );
}
@@ -970,7 +970,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
SvTreeListEntry* pEntry,
bool bIsMove)
{
- pDragEntry = 0;
+ pDragEntry = nullptr;
// 1. move in different groups?
// 2. allowed to write to both groups?
if(!pTarget) // move to the beginning
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 8f0f7247e7e0..5565cb7aa6de 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -68,7 +68,7 @@ void SwInsFootNoteDlg::Apply()
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
rSh.Left(CRSR_SKIP_CHARS, false, 1, false );
}
rSh.EndUndo( UNDO_END );
@@ -143,7 +143,7 @@ IMPL_LINK_TYPED( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn, void )
Apply();
// go to the next foot/endnote here
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
if (pBtn == m_pNextBT)
rSh.GotoNextFootnoteAnchor();
else
@@ -198,10 +198,10 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
void SwInsFootNoteDlg::dispose()
{
- SwViewShell::SetCareWin(0);
+ SwViewShell::SetCareWin(nullptr);
if (bEdit)
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
m_pNumberFrame.clear();
m_pNumberAutoBtn.clear();
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 2589db7bbb9d..008dd90f91cd 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -43,7 +43,7 @@ static rtl::Reference<SwDocStyleSheet> lcl_getDocStyleSheet(const OUString& rNam
SfxStyleSheetBase* pStyle = mpBase->Find(rName, (SfxStyleFamily)nFamily);
SAL_WARN_IF( !pStyle, "linenumbering.ui", "Style not found" );
if(!pStyle)
- return NULL;
+ return nullptr;
return new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pStyle));
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 6b15cf6a57a5..e6281bafe1e3 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -63,10 +63,10 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
const SfxItemSet& rSet)
: SfxTabPage(pParent, "OutlinePositionPage",
"modules/swriter/ui/outlinepositionpage.ui", &rSet)
- , pActNum(0)
- , pSaveNum(0)
- , pWrtSh(0)
- , pOutlineDlg(0)
+ , pActNum(nullptr)
+ , pSaveNum(nullptr)
+ , pWrtSh(nullptr)
+ , pOutlineDlg(nullptr)
, nActNumLvl(0)
, bModified(false)
, bPreset(false)
@@ -205,9 +205,9 @@ void SwNumPositionTabPage::InitControls()
USHRT_MAX != nActNumLvl;
m_pDistBorderMF->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) );
m_pDistBorderFT->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) );
bool bSetDistEmpty = false;
bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive;
@@ -491,7 +491,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet )
void SwNumPositionTabPage::InitPosAndSpaceMode()
{
- if ( pActNum == 0 )
+ if ( pActNum == nullptr )
{
OSL_FAIL( "<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" );
return;
@@ -945,7 +945,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(vcl::Window* pParent,
, rWrtSh(rSh)
{
GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
- GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCrsrPos() != NULL);
+ GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCrsrPos() != nullptr);
m_nSingleNumPageId = AddTabPage("singlenum", RID_SVXPAGE_PICK_SINGLE_NUM );
m_nBulletPageId = AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET );
AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 325fb6682afe..0c691319bb1d 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -170,8 +170,8 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p
pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() );
GetCancelButton().SetClickHdl(LINK(this, SwOutlineTabDialog, CancelHdl));
- m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, 0);
- m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, 0);
+ m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, nullptr);
+ m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, nullptr);
OUString sHeadline;
sal_uInt16 i;
@@ -287,7 +287,7 @@ IMPL_LINK_TYPED( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool )
if(pRules)
aStrArr[i] = &pRules->GetName();
else
- aStrArr[i] = 0;
+ aStrArr[i] = nullptr;
}
pDlg->SetUserNames(aStrArr);
if(RET_OK == pDlg->Execute())
@@ -419,9 +419,9 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent,
: SfxTabPage(pParent, "OutlineNumberingPage",
"modules/swriter/ui/outlinenumberingpage.ui", &rSet)
, aNoFormatName(SW_RESSTR(SW_STR_NONE))
- , pSh(NULL)
- , pNumRule(NULL)
- , pCollNames(NULL)
+ , pSh(nullptr)
+ , pNumRule(nullptr)
+ , pCollNames(nullptr)
, nActLevel(1)
{
get(m_pLevelLB, "level");
@@ -464,7 +464,7 @@ void SwOutlineSettingsTabPage::Update()
bool bSameCharFormat = true;
const SwNumFormat* aNumFormatArr[MAXLEVEL];
- const SwCharFormat* pFirstFormat = 0;
+ const SwCharFormat* pFirstFormat = nullptr;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
@@ -703,7 +703,7 @@ IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
OUString sEntry = m_pCharFormatLB->GetSelectEntry();
sal_uInt16 nMask = 1;
bool bFormatNone = sEntry == SwViewShell::GetShellRes()->aStrNone;
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if(!bFormatNone)
{
sal_uInt16 nChCount = pSh->GetCharFormatCount();
@@ -734,7 +734,7 @@ IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
{
SwNumFormat aNumFormat(pNumRule->Get(i));
if(bFormatNone)
- aNumFormat.SetCharFormat(0);
+ aNumFormat.SetCharFormat(nullptr);
else
aNumFormat.SetCharFormat(pFormat);
pNumRule->Set(i, aNumFormat);
@@ -1097,7 +1097,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
pVDev->SetFont(aStdFont);
pVDev->DrawText(
Point(nXStart + nTextOffset, nYStart),
- (pOutlineNames == 0
+ (pOutlineNames == nullptr
? utl::ConfigManager::getProductName()
: pOutlineNames[nLevel]));
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index cf875f1ce3e6..2ab8e3cd5b83 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -219,7 +219,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
if ( pDocSh )
{
const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pColorItem != NULL )
+ if ( pColorItem != nullptr )
pColorList = static_cast<const SvxColorListItem*>(pColorItem)->GetColorList();
}
@@ -303,7 +303,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
rFootnoteInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100));
const SfxPoolItem* pOldItem;
- if(0 == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) ||
aItem != *pOldItem )
rSet->Put(aItem);
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index d4410caf9953..1ce914db8290 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -220,7 +220,7 @@ void SwTextGridPage::Reset(const SfxItemSet *rSet)
if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID))
{
const SwTextGridItem& rGridItem = static_cast<const SwTextGridItem&>(rSet->Get(RES_TEXTGRID));
- RadioButton* pButton = 0;
+ RadioButton* pButton = nullptr;
switch(rGridItem.GetGridType())
{
case GRID_NONE : pButton = m_pNoGridRB; break;
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index a75f46504e51..7cbc05f5bacf 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -87,7 +87,7 @@ static bool lcl_GetSelTable( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
if( !pTableNd )
return false;
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
// look for all boxes / lines
{
@@ -112,7 +112,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
, aRowText(SW_RES(STR_ROW))
, aNumericText(SW_RES(STR_NUMERIC))
, rSh(rShell)
- , pColRes(0)
+ , pColRes(nullptr)
, nX(99)
, nY(99)
{
@@ -208,7 +208,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
m_pLangLB->SetLanguageList( SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, true );
m_pLangLB->SelectLanguage( nLang );
- LanguageHdl( 0 );
+ LanguageHdl( nullptr );
m_pLangLB->SetSelectHdl( LINK( this, SwSortDlg, LanguageListBoxHdl ));
m_pSortUp1RB->Check(bAsc1);
@@ -332,7 +332,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB1->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB1->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB1->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol1, sEntry,
@@ -345,7 +345,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB2->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB2->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB2->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol2, sEntry,
@@ -358,7 +358,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB3->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB3->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB3->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol3, sEntry,
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 05a4fb555f09..bfe7bdfdf8e1 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -82,7 +82,7 @@ void SwModalRedlineAcceptDlg::AcceptAll( bool bAccept )
pFilterTP->CheckAuthor(false);
pFilterTP->CheckRange(false);
pFilterTP->CheckAction(false);
- pImplDlg->FilterChangedHdl(NULL);
+ pImplDlg->FilterChangedHdl(nullptr);
}
pImplDlg->CallAcceptReject( false, bAccept );
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 2ebdd8725fd3..2e7f901f0cc6 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -35,7 +35,7 @@ namespace
SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
if (pSh->GetCurAttr( aSet ))
{
- const SfxPoolItem* pItem(0);
+ const SfxPoolItem* pItem(nullptr);
if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem)
{
::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc *>(pItem)->GetNumOffset();
@@ -55,7 +55,7 @@ namespace
const size_t nCurIdx = pSh->GetCurPageDesc();
const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
- const SwFormatPageDesc *pPageFormatDesc(0);
+ const SwFormatPageDesc *pPageFormatDesc(nullptr);
sal_uInt16 nDontCare;
lcl_GetPageDesc(pSh, nDontCare, &pPageFormatDesc);
@@ -152,7 +152,7 @@ sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
SfxModalDialog( pParent, "DLG_TITLEPAGE", "modules/swriter/ui/titlepage.ui"),
- mpPageFormatDesc(0)
+ mpPageFormatDesc(nullptr)
{
get(m_pUseExistingPagesRB, "RB_USE_EXISTING_PAGES");
get(m_pPageCountNF, "NF_PAGE_COUNT");
@@ -199,7 +199,7 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
if (mpIndexDesc != &rPageDesc)
{
mpNormalDesc = &rPageDesc;
- bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
+ bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, nullptr);
break;
}
++nTitlePages;
@@ -333,7 +333,7 @@ IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, OKHdl, Button*, void)
if (m_pRestartNumberingCB->IsChecked() || nNoPages > 1)
{
sal_uInt16 nPgNo = m_pRestartNumberingCB->IsChecked() ? m_pRestartNumberingNF->GetValue() : 0;
- const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
+ const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : nullptr;
mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
lcl_ChangePage(mpSh, nPgNo, pNewDesc);
}
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 8c429de2032d..d245ca3bfdbd 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -96,7 +96,7 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
: SfxModalDialog(&rView.GetViewFrame()->GetWindow(), "ConvertTextTableDialog", "modules/swriter/ui/converttexttable.ui" )
, sConvertTextTable(SW_RES(STR_CONVERT_TEXT_TABLE))
- , pTAutoFormat(0)
+ , pTAutoFormat(nullptr)
, pShell(&rView.GetWrtShell())
{
get(mpTabBtn, "tabs");
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 8b4c845d3af9..81cbe188b460 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -69,7 +69,7 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
: SfxModalDialog(rView.GetWindow(), "InsertTableDialog", "modules/swriter/ui/inserttable.ui")
, m_aTextFilter(" .<>")
, pShell(&rView.GetWrtShell())
- , pTAutoFormat(0)
+ , pTAutoFormat(nullptr)
, nEnteredValRepeatHeaderNF(-1)
{
get(m_pNameEdit, "nameedit");
@@ -165,7 +165,7 @@ IMPL_LINK_TYPED( SwInsTableDlg, ModifyName, Edit&, rEdit, void )
rEdit.SetText(sTableName);
}
- m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == 0);
+ m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == nullptr);
}
IMPL_LINK_TYPED( SwInsTableDlg, ModifyRowCol, Edit&, rEdit, void )
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index ed324912bd68..597fc6985bed 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -66,7 +66,7 @@ using namespace ::com::sun::star;
SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "FormatTablePage", "modules/swriter/ui/formattablepage.ui", &rSet)
, m_aTextFilter(" .<>")
- , pTableData(0)
+ , pTableData(nullptr)
, nSaveWidth(0)
, nMinTableWidth(MINLAY)
, bModified(false)
@@ -738,7 +738,7 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "TableColumnPage",
"modules/swriter/ui/tablecolumnpage.ui", &rSet)
- , pTableData(0)
+ , pTableData(nullptr)
, nTableWidth(0)
, nMinWidth(MINLAY)
, nNoOfCols(0)
@@ -958,7 +958,7 @@ bool SwTableColumnPage::FillItemSet( SfxItemSet* )
void SwTableColumnPage::ModifyHdl( MetricField* pField )
{
- PercentField *pEdit = NULL;
+ PercentField *pEdit = nullptr;
sal_uInt16 i;
for( i = 0; i < MET_FIELDS; i++)
@@ -1235,17 +1235,17 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
SwTableTabDlg::SwTableTabDlg(vcl::Window* pParent, SfxItemPool&,
const SfxItemSet* pItemSet, SwWrtShell* pSh)
- : SfxTabDialog(0, pParent, "TablePropertiesDialog",
+ : SfxTabDialog(nullptr, pParent, "TablePropertiesDialog",
"modules/swriter/ui/tableproperties.ui", pItemSet)
, pShell(pSh)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- AddTabPage("table", &SwFormatTablePage::Create, 0);
- m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, 0);
- AddTabPage("columns", &SwTableColumnPage::Create, 0);
- m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), 0);
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), 0);
+ AddTabPage("table", &SwFormatTablePage::Create, nullptr);
+ m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, nullptr);
+ AddTabPage("columns", &SwTableColumnPage::Create, nullptr);
+ m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), nullptr);
+ m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), nullptr);
}
void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
@@ -1265,7 +1265,7 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if (nId == m_nTextFlowId)
{
static_cast<SwTextFlowPage&>(rPage).SetShell(pShell);
- const FrmTypeFlags eType = pShell->GetFrmType(0,true);
+ const FrmTypeFlags eType = pShell->GetFrmType(nullptr,true);
if( !(FrmTypeFlags::BODY & eType) )
static_cast<SwTextFlowPage&>(rPage).DisablePageBreak();
}
@@ -1274,7 +1274,7 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
SwTextFlowPage::SwTextFlowPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "TableTextFlowPage",
"modules/swriter/ui/tabletextflowpage.ui", &rSet)
- , pShell(0)
+ , pShell(nullptr)
, bPageBreak(true)
, bHtmlMode(false)
{
@@ -1380,17 +1380,17 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
if(m_pHeadLineCB->IsValueChangedFromSaved() ||
m_pRepeatHeaderNF->IsValueChangedFromSaved() )
{
- bModified |= 0 != rSet->Put(
+ bModified |= nullptr != rSet->Put(
SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, m_pHeadLineCB->IsChecked()? sal_uInt16(m_pRepeatHeaderNF->GetValue()) : 0 ));
}
if(m_pKeepCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SvxFormatKeepItem( m_pKeepCB->IsChecked(), RES_KEEP));
+ bModified |= nullptr != rSet->Put( SvxFormatKeepItem( m_pKeepCB->IsChecked(), RES_KEEP));
if(m_pSplitCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SwFormatLayoutSplit( m_pSplitCB->IsChecked()));
+ bModified |= nullptr != rSet->Put( SwFormatLayoutSplit( m_pSplitCB->IsChecked()));
if(m_pSplitRowCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SwFormatRowSplit( m_pSplitRowCB->IsChecked()));
+ bModified |= nullptr != rSet->Put( SwFormatRowSplit( m_pSplitRowCB->IsChecked()));
const SvxFormatBreakItem* pBreak = static_cast<const SvxFormatBreakItem*>(GetOldItem( *rSet, RES_BREAK ));
const SwFormatPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(GetOldItem( *rSet, RES_PAGEDESC ));
@@ -1417,7 +1417,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
{
SwFormatPageDesc aFormat( pShell->FindPageDescByName( sPage, true ) );
aFormat.SetNumOffset(bState ? nPgNum : 0);
- bModified |= 0 != rSet->Put( aFormat );
+ bModified |= nullptr != rSet->Put( aFormat );
bPageItemPut = bState;
}
}
@@ -1457,13 +1457,13 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
if ( !pBreak || !( *pBreak == aBreak ) )
{
- bModified |= 0 != rSet->Put( aBreak );
+ bModified |= nullptr != rSet->Put( aBreak );
}
}
if(m_pTextDirectionLB->IsValueChangedFromSaved())
{
- bModified |= 0 != rSet->Put(
+ bModified |= nullptr != rSet->Put(
SvxFrameDirectionItem(
(SvxFrameDirection)reinterpret_cast<sal_uLong>(m_pTextDirectionLB->GetSelectEntryData())
, FN_TABLE_BOX_TEXTORIENTATION));
@@ -1479,7 +1479,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
case 2 : nOrient = text::VertOrientation::BOTTOM; break;
}
if(nOrient != USHRT_MAX)
- bModified |= 0 != rSet->Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, nOrient));
+ bModified |= nullptr != rSet->Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, nOrient));
}
return bModified;
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index a0b297db58f1..8b35ec0c77e3 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -271,7 +271,7 @@ void SwAutoFormatDlg::FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const
rToFill = new SwTableAutoFormat( (*pTableTable)[ nIndex ] );
}
else
- delete rToFill, rToFill = 0;
+ delete rToFill, rToFill = nullptr;
}
// Handler:
diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx
index ee83a331f895..e9b0cd34942d 100644
--- a/sw/source/ui/vba/vbadialog.cxx
+++ b/sw/source/ui/vba/vbadialog.cxx
@@ -34,7 +34,7 @@ static const WordDialogTable aWordDialogTable[] =
{ word::WdWordDialog::wdDialogFileOpen, ".uno:Open" },
{ word::WdWordDialog::wdDialogFilePrint, ".uno:Print" },
{ word::WdWordDialog::wdDialogFileSaveAs, ".uno:SaveAs" },
- { 0, 0 }
+ { 0, nullptr }
};
OUString
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index a44c14702421..c7fe27b75ef6 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -284,7 +284,7 @@ class StatisticPropertyGetSetHelper : public PropertGetSetHelper
SwDocShell* mpDocShell;
uno::Reference< beans::XPropertySet > mxModelProps;
public:
- explicit StatisticPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) , mpDocShell( NULL )
+ explicit StatisticPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) , mpDocShell( nullptr )
{
mxModelProps.set( m_xModel, uno::UNO_QUERY_THROW );
mpDocShell = word::getDocShell( xModel );
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index 5d3e4f8c69a2..38243c4d9870 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -386,32 +386,32 @@ struct DocPropertyTable
static const DocPropertyTable aDocPropertyTables[] =
{
{ "Author", "com.sun.star.text.textfield.docinfo.CreateAuthor" },
- { "Bytes", NULL },
- { "Category", NULL },
- { "Characters",NULL },
- { "CharactersWithSpaces", NULL },
+ { "Bytes", nullptr },
+ { "Category", nullptr },
+ { "Characters",nullptr },
+ { "CharactersWithSpaces", nullptr },
{ "Comments", "com.sun.star.text.textfield.docinfo.Description" },
- { "Company", NULL },
+ { "Company", nullptr },
{ "CreateTime", "com.sun.star.text.textfield.docinfo.CreateDateTime" },
- { "HyperlinkBase", NULL },
+ { "HyperlinkBase", nullptr },
{ "Keywords", "com.sun.star.text.textfield.docinfo.Keywords" },
{ "LastPrinted", "com.sun.star.text.textfield.docinfo.PrintDateTime" },
{ "LastSavedBy", "com.sun.star.text.textfield.docinfo.ChangeAuthor" },
{ "LastSavedTime", "com.sun.star.text.textfield.docinfo.ChangeDateTime" },
- { "Lines", NULL },
- { "Manager", NULL },
- { "NameofApplication", NULL },
- { "ODMADocID", NULL },
+ { "Lines", nullptr },
+ { "Manager", nullptr },
+ { "NameofApplication", nullptr },
+ { "ODMADocID", nullptr },
{ "Pages", "com.sun.star.text.textfield.PageCount" },
{ "Paragraphs", "com.sun.star.text.textfield.ParagraphCount" },
{ "RevisionNumber", "com.sun.star.text.textfield.docinfo.Revision" },
- { "Security", NULL },
+ { "Security", nullptr },
{ "Subject", "com.sun.star.text.textfield.docinfo.Subject" },
{ "Template", "com.sun.star.text.textfield.TemplateName" },
{ "Title", "com.sun.star.text.textfield.docinfo.Title" },
{ "TotalEditingTime", "com.sun.star.text.textfield.docinfo.EditTime" },
{ "Words", "com.sun.star.text.textfield.WordCount" },
- { NULL, NULL }
+ { nullptr, nullptr }
};
uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString& _text ) throw (uno::RuntimeException)
@@ -443,11 +443,11 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
bool bCustom = true;
OUString sFieldService;
// find the build in document properties
- for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != NULL; pTable++ )
+ for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != nullptr; pTable++ )
{
if( aDocProperty.equalsIgnoreAsciiCaseAscii( pTable->sDocPropertyName ) )
{
- if( pTable->sFieldService != NULL )
+ if( pTable->sFieldService != nullptr )
sFieldService = OUString::createFromAscii(pTable->sFieldService);
bCustom = false;
break;
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 5d58b2225a6a..2cebd3e771c1 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -141,7 +141,7 @@ static const BuiltinStyleTable aBuiltinStyleTable[] =
{ word::WdBuiltinStyle::wdStyleTOC7, "Contents 7", word::WdStyleType::wdStyleTypeParagraph },
{ word::WdBuiltinStyle::wdStyleTOC8, "Contents 8", word::WdStyleType::wdStyleTypeParagraph },
{ word::WdBuiltinStyle::wdStyleTOC9, "Contents 9", word::WdStyleType::wdStyleTypeParagraph },
- { 0, 0, 0 }
+ { 0, nullptr, 0 }
};
struct MSOStyleNameTable
@@ -154,7 +154,7 @@ struct MSOStyleNameTable
static const MSOStyleNameTable aMSOStyleNameTable[] =
{
{ "Normal", "Default", "ParagraphStyles" },
- { 0, 0, 0 }
+ { nullptr, nullptr, nullptr }
};
class StyleCollectionHelper : public ::cppu::WeakImplHelper< container::XNameAccess,
@@ -190,7 +190,7 @@ public:
virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException, std::exception) override
{
// search in the MSOStyleName table first
- for( const MSOStyleNameTable* pTable = aMSOStyleNameTable; pTable->pMSOStyleName != NULL; pTable++ )
+ for( const MSOStyleNameTable* pTable = aMSOStyleNameTable; pTable->pMSOStyleName != nullptr; pTable++ )
{
if( aName.equalsIgnoreAsciiCaseAscii( pTable->pMSOStyleName ) )
{
@@ -300,7 +300,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 )
sal_Int32 nIndex = 0;
if( ( Index1 >>= nIndex ) && ( nIndex < 0 ) )
{
- for( const BuiltinStyleTable* pTable = aBuiltinStyleTable; pTable != NULL; pTable++ )
+ for( const BuiltinStyleTable* pTable = aBuiltinStyleTable; pTable != nullptr; pTable++ )
{
if( nIndex == pTable->wdBuiltinStyle )
{
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 229afa1309c1..63582f924907 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -48,13 +48,13 @@ SwDocShell* getDocShell( const uno::Reference< frame::XModel>& xModel )
{
uno::Reference< lang::XUnoTunnel > xTunnel( xModel, uno::UNO_QUERY_THROW );
SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
- return pXDoc ? pXDoc->GetDocShell() : 0;
+ return pXDoc ? pXDoc->GetDocShell() : nullptr;
}
SwView* getView( const uno::Reference< frame::XModel>& xModel )
{
SwDocShell* pDocShell = getDocShell( xModel );
- return pDocShell? pDocShell->GetView() : 0;
+ return pDocShell? pDocShell->GetView() : nullptr;
}
uno::Reference< text::XTextViewCursor > getXTextViewCursor( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
@@ -86,7 +86,7 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame
sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
{
SwDocShell* pDocShell = getDocShell( xModel );
- SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() : 0;
+ SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() : nullptr;
return pViewSh ? pViewSh->GetPageCount() : 0;
}
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index efa59c5fd6fd..cb1436177854 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -156,7 +156,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Get current shell
pMyDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());
- pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
+ pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : nullptr;
// Create new document (don't show!)
SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
@@ -207,7 +207,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
- vcl::Window *pParent = pOldSh ? pOldSh->GetWin() : 0;
+ vcl::Window *pParent = pOldSh ? pOldSh->GetWin() : nullptr;
std::unique_ptr<SfxAbstractTabDialog> pDlg;
short nMode = ENV_INSERT;
@@ -250,7 +250,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
SwWrtShell *pTmp = nMode == ENV_INSERT ? pOldSh : pSh;
- const SwPageDesc* pFollow = 0;
+ const SwPageDesc* pFollow = nullptr;
SwTextFormatColl *pSend = pTmp->GetTextCollFromPool( RES_POOLCOLL_SENDADRESS ),
*pAddr = pTmp->GetTextCollFromPool( RES_POOLCOLL_JAKETADRESS);
const OUString sSendMark = pSend->GetName();
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 4d600a4db9a6..42ea0433027e 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -181,7 +181,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
break;
case FN_EDIT_FORMULA:
{
- SwWrtShell* pSh = 0;
+ SwWrtShell* pSh = nullptr;
int nSelection = 0;
if( pActView )
pSh = &pActView->GetWrtShell();
@@ -217,7 +217,7 @@ namespace
SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
{
- SwView* pNewView = 0;
+ SwView* pNewView = nullptr;
if(!rURL.isEmpty())
{
SfxStringItem aURL(SID_FILE_NAME, rURL);
@@ -227,14 +227,14 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
const SfxObjectItem* pItem = static_cast<const SfxObjectItem*>(pView->GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SfxCallMode::SYNCHRON,
&aURL, &aHidden, &aReferer, &aTargetFrameName, 0L));
- SfxShell* pShell = pItem ? pItem->GetShell() : 0;
+ SfxShell* pShell = pItem ? pItem->GetShell() : nullptr;
if(pShell)
{
SfxViewShell* pViewShell = pShell->GetViewShell();
if(pViewShell)
{
- if( 0!= dynamic_cast<SwView*>(pViewShell) )
+ if( nullptr!= dynamic_cast<SwView*>(pViewShell) )
{
pNewView = dynamic_cast< SwView* >(pViewShell);
pNewView->GetViewFrame()->GetFrame().Appear();
@@ -252,9 +252,9 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>(
pView->GetViewFrame()->GetDispatcher()->Execute(SID_NEWDOCDIRECT,
SfxCallMode::SYNCHRON, &aFactory, 0L));
- SfxFrame* pFrm = pItem ? pItem->GetFrame() : 0;
- SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : 0;
- pNewView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : 0;
+ SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr;
+ SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr;
+ pNewView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : nullptr;
}
return pNewView;
@@ -284,17 +284,17 @@ public:
};
SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
- : m_pView( 0 ),
- m_pView2Close( NULL ),
- m_pMMConfig( 0 ),
- m_pWizard( 0 )
+ : m_pView( nullptr ),
+ m_pView2Close( nullptr ),
+ m_pMMConfig( nullptr ),
+ m_pWizard( nullptr )
{
}
SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
{
- OSL_ENSURE( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
- OSL_ENSURE( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
+ OSL_ENSURE( m_pWizard == nullptr, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
+ OSL_ENSURE( m_pMMConfig == nullptr, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
}
void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs )
@@ -310,7 +310,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
OUString sInteraction;
xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
SolarMutexGuard aGuard;
- executeRestartDialog(comphelper::getProcessComponentContext(), NULL, RESTART_REASON_MAILMERGE_INSTALL);
+ executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL);
}
catch (const css::uno::Exception & e)
{
@@ -345,7 +345,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
nRestartPage = m_pView->GetMailMergeRestartPage();
if(m_pView->IsMailMergeSourceView())
m_pMMConfig->SetSourceView( m_pView );
- m_pView->SetMailMergeConfigItem(0, 0, true);
+ m_pView->SetMailMergeConfigItem(nullptr, 0, true);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
@@ -358,7 +358,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView(m_pView);
//set the first used database as default source on the config item
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(
FN_PARAM_DATABASE_PROPERTIES, false, &pItem))
{
@@ -424,7 +424,7 @@ void SwMailMergeWizardExecutor::ExecutionFinished( bool bDeleteConfigItem )
if ( bDeleteConfigItem ) // owner?
delete m_pMMConfig;
- m_pMMConfig = 0;
+ m_pMMConfig = nullptr;
// release/destroy asynchronously
Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, DestroyDialogHdl ) );
@@ -523,7 +523,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate();
// the current view has be set when the target is destroyed
m_pView = pSourceView;
- m_pMMConfig->SetTargetView(0);
+ m_pMMConfig->SetTargetView(nullptr);
// destroy wizard asynchronously
Application::PostUserEvent(
@@ -571,7 +571,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void)
{
delete m_pWizard;
- m_pWizard = 0;
+ m_pWizard = nullptr;
release();
}
@@ -586,16 +586,16 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void)
if(m_pMMConfig->GetTargetView())
{
m_pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
- m_pMMConfig->SetTargetView(0);
+ m_pMMConfig->SetTargetView(nullptr);
}
if(m_pMMConfig->GetSourceView())
m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
m_pMMConfig->Commit();
delete m_pMMConfig;
- m_pMMConfig = 0;
+ m_pMMConfig = nullptr;
// m_pWizard already deleted by closing the target view
- m_pWizard = 0;
+ m_pWizard = nullptr;
release();
}
@@ -604,7 +604,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void)
if ( m_pView2Close )
{
m_pView2Close->GetViewFrame()->DoClose();
- m_pView2Close = NULL;
+ m_pView2Close = nullptr;
}
}
@@ -615,7 +615,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void)
void SwModule::ExecOther(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nWhich = rReq.GetSlot();
switch (nWhich)
@@ -703,7 +703,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
const SfxBoolItem* pTemplateItem = SfxItemSet::GetItem<SfxBoolItem>(pDocSh->GetMedium()->GetItemSet(), SID_TEMPLATE, false);
if (pTemplateItem && pTemplateItem->GetValue())
{
- pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(false, 0);
+ pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(false, nullptr);
}
}
break;
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 68a46258cd04..2ed4f30e23e8 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -159,7 +159,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
#if HAVE_FEATURE_DBCONNECTIVITY
// Create DB-Manager
- std::unique_ptr<SwDBManager> pDBManager(new SwDBManager(0));
+ std::unique_ptr<SwDBManager> pDBManager(new SwDBManager(nullptr));
#endif
// Read SwLabItem from Config
@@ -172,7 +172,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(0, aSet,
+ std::unique_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(nullptr, aSet,
#if HAVE_FEATURE_DBCONNECTIVITY
pDBManager.get(),
#else
@@ -301,7 +301,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
pFormat->SetFormatAttr( aFrmNoULSpace );
pFormat->SetFormatAttr( aFrmNoLRSpace );
- const SwFrameFormat *pFirstFlyFormat = 0;
+ const SwFrameFormat *pFirstFlyFormat = nullptr;
if ( rItem.m_bPage )
{
SwFormatVertOrient aFrmVertOrient( pFormat->GetVertOrient() );
@@ -327,7 +327,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
// don't leave the fly!!!
pSh->Push();
pSh->SttDoc();
- bool bInFly = 0 != pSh->WizardGetFly();
+ bool bInFly = nullptr != pSh->WizardGetFly();
pSh->Pop( bInFly );
if( bInFly )
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index f39e02c1159b..51ca86c97b31 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -81,7 +81,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
// no MakeUsrPref, because only options from textdoks can be used here
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
- pAppView = 0;
+ pAppView = nullptr;
if(pAppView)
{
// if Text then no WebView and vice versa
@@ -91,7 +91,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
}
else
- pAppView = 0; // with View, there's nothing to win here
+ pAppView = nullptr; // with View, there's nothing to win here
}
// Options/Edit
@@ -170,7 +170,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
}
if(bTextDialog)
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
- if( dynamic_cast<SwPagePreview*>( SfxViewShell::Current())!=0 )
+ if( dynamic_cast<SwPagePreview*>( SfxViewShell::Current())!=nullptr )
{
SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, true));
pRet->Put(aBool);
@@ -219,7 +219,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
// Options for PrintTabPage
const SwPrintData* pOpt = pAppView ?
&pAppView->GetWrtShell().getIDocumentDeviceAccess().getPrintData() :
- 0;
+ nullptr;
if(!pOpt)
pOpt = GetPrtOptions(!bTextDialog);
@@ -243,13 +243,13 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
- pAppView = 0;
+ pAppView = nullptr;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
bool bWebView = dynamic_cast<SwWebView*>( pAppView ) != nullptr;
if(bWebView == bTextDialog)
- pAppView = 0;
+ pAppView = nullptr;
}
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -257,7 +257,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
const SfxPoolItem* pItem;
SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame()->GetBindings()
- : NULL;
+ : nullptr;
// Interpret the page Documentview
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem ))
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index e88a8e88f8c8..3a6fb3e4c8fb 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -150,8 +150,8 @@ bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium,
if (!::sw::XTextRangeToSwPaM(aPam, xInsertPosition))
return false;
// similar to SwView::InsertMedium
- SwReader *pReader(0);
- Reader *const pRead = StartConvertFrom(rMedium, &pReader, 0, &aPam);
+ SwReader *pReader(nullptr);
+ Reader *const pRead = StartConvertFrom(rMedium, &pReader, nullptr, &aPam);
if (!pRead)
return false;
sal_uLong const nError = pReader->Read(*pRead);
@@ -167,7 +167,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
bool bAPICall = false;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
- if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
+ if( nullptr != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pMedSet->GetItemState( FN_API_CALL, true, &pApiItem ) )
bAPICall = static_cast<const SfxBoolItem*>(pApiItem)->GetValue();
@@ -178,12 +178,12 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR(STR_CANTOPEN))->Execute();
}
- return 0;
+ return nullptr;
}
OUString aFileName( rMedium.GetName() );
SwRead pRead = SwReaderWriter::GetReader( pFlt->GetUserData() );
if( !pRead )
- return 0;
+ return nullptr;
if( rMedium.IsStorage()
? SW_STORAGE_READER & pRead->GetReaderType()
@@ -195,7 +195,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
: new SwReader( rMedium, aFileName, m_pDoc );
}
else
- return 0;
+ return nullptr;
// #i30171# set the UpdateDocMode at the SwDocShell
const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
@@ -204,13 +204,13 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
if (!pFlt->GetDefaultTemplate().isEmpty())
pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
- if( pRead == ReadAscii && 0 != rMedium.GetInStream() &&
+ if( pRead == ReadAscii && nullptr != rMedium.GetInStream() &&
pFlt->GetUserData() == FILTER_TEXT_DLG )
{
SwAsciiOptions aOpt;
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
- if( 0 != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
+ if( nullptr != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
aOpt.ReadUserData( static_cast<const SfxStringItem*>(pItem)->GetValue() );
@@ -270,7 +270,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
}
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
delete pRdr;
@@ -529,7 +529,7 @@ static SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
{
// are we in SourceView?
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( pSh );
- SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
return dynamic_cast<SwSrcView*>( pViewShell );
}
@@ -702,7 +702,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
OUString sItemOpt;
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
- if( 0 != ( pSet = rMedium.GetItemSet() ) )
+ if( nullptr != ( pSet = rMedium.GetItemSet() ) )
{
if( SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
true, &pItem ) )
@@ -815,7 +815,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
// reconnect it after PrtOle2. We don't use an empty JobSetup because
// that would only lead to questionable results after expensive
// reformatting (Preview!)
- JobSetup *pOrig = 0;
+ JobSetup *pOrig = nullptr;
if ( !rSetup.GetPrinterName().isEmpty() && ASPECT_THUMBNAIL != nAspect )
{
pOrig = const_cast<JobSetup*>(m_pDoc->getIDocumentDeviceAccess().getJobsetup());
@@ -907,7 +907,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
if ( pNewPrinter )
GetDoc()->getIDocumentDeviceAccess().setJobsetup( pNewPrinter->GetJobSetup() );
else
- GetDoc()->getIDocumentDeviceAccess().setPrinter( 0, true, true );
+ GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, true, true );
}
sal_uLong SwDocShell::GetMiscStatus() const
@@ -1104,7 +1104,7 @@ void SwDocShell::SetView(SwView* pVw)
if (m_pView)
m_pWrtShell = &m_pView->GetWrtShell();
else
- m_pWrtShell = 0;
+ m_pWrtShell = nullptr;
}
void SwDocShell::PrepareReload()
@@ -1262,7 +1262,7 @@ OUString SwDocShell::GetEventName( sal_Int32 nIndex )
const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const
{
- return m_pDoc ? &m_pDoc->GetXmlIdRegistry() : 0;
+ return m_pDoc ? &m_pDoc->GetXmlIdRegistry() : nullptr;
}
bool SwDocShell::IsChangeRecording() const
@@ -1290,7 +1290,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword();
@@ -1325,7 +1325,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPas
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswdHash( rIDRA.GetRedlinePassword() );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 484b86b9c0e7..5b2d95aa3b3e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -150,7 +150,7 @@ VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg->AddFontTabPage();
- pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),0);
+ pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),nullptr);
}
}
return pDlg;
@@ -366,12 +366,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxItemSet aSet( pApp->GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG, SID_OPEN_SMARTTAGOPTIONS, SID_OPEN_SMARTTAGOPTIONS, 0 );
aSet.Put( aSwOptions );
- const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
+ const SfxPoolItem* pOpenSmartTagOptionsItem = nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
+ SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, nullptr, &aSet, nullptr );
pDlg->Execute();
delete pDlg;
@@ -384,7 +384,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
rACW.CheckChangedList( aTmpLst );
// clear the temp WordList pointer
- pAFlags->m_pAutoCompleteList = 0;
+ pAFlags->m_pAutoCompleteList = nullptr;
}
// remove all pointer we never delete the strings
aTmpLst.clear();
@@ -638,8 +638,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
// the SourceView is not the 1 for SwWebDocShell
sal_uInt16 nSlot = SID_VIEWSHELL1;
bool bSetModified = false;
- SfxPrinter* pSavePrinter = 0;
- if( 0 != pSrcView)
+ SfxPrinter* pSavePrinter = nullptr;
+ if( nullptr != pSrcView)
{
SfxPrinter* pTemp = GetDoc()->getIDocumentDeviceAccess().getPrinter( false );
if(pTemp)
@@ -692,7 +692,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(0));
+ std::unique_ptr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(nullptr));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
{
@@ -814,7 +814,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pClipCntnr->CopyAnyData( SotClipboardFormatId::RTF, static_cast<sal_Char const *>(
pStrm->GetData()), pStrm->GetEndOfData() );
pClipCntnr->CopyToClipboard(
- GetView()? &GetView()->GetEditWin() : 0 );
+ GetView()? &GetView()->GetEditWin() : nullptr );
delete pStrm;
}
}
@@ -832,7 +832,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
//pWrtShell is not set in page preview
if (m_pWrtShell)
m_pWrtShell->StartAllAction();
- m_pDoc->getIDocumentFieldsAccess().UpdateFields( NULL, false );
+ m_pDoc->getIDocumentFieldsAccess().UpdateFields( nullptr, false );
m_pDoc->getIDocumentLinksAdministration().EmbedAllLinks();
m_IsRemovedInvisibleContent
= officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get();
@@ -1057,7 +1057,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
else
{
- const SwTextFormatColl* pSplitColl = 0;
+ const SwTextFormatColl* pSplitColl = nullptr;
if ( !aTemplateName.isEmpty() )
pSplitColl = m_pDoc->FindTextFormatCollByName(aTemplateName);
bDone = bCreateHtml
@@ -1110,7 +1110,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
// iterate over Views and put the State to FormShells
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
- SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
SwView* pCurrView = dynamic_cast< SwView* >( pViewShell );
while(pCurrView)
{
@@ -1118,7 +1118,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if(pFormShell)
pFormShell->SetY2KState(nYear2K);
pVFrame = SfxViewFrame::GetNext( *pVFrame, this );
- pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
m_pDoc->GetNumberFormatter()->SetYear2000(nYear2K);
@@ -1382,7 +1382,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
// search for filter in WebDocShell, too
SfxMedium aMed( rURL, STREAM_STD_READ );
- const SfxFilter* pFlt = 0;
+ const SfxFilter* pFlt = nullptr;
aMatcher.DetectFilter( aMed, &pFlt, false );
if(!pFlt)
{
@@ -1460,7 +1460,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
// Get a client for an embedded object if possible.
SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef )
{
- SfxInPlaceClient* pResult = NULL;
+ SfxInPlaceClient* pResult = nullptr;
SwWrtShell* pShell = GetWrtShell();
if ( pShell )
@@ -1500,7 +1500,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
// Iterate over the DocShell and get the ones with the name
SfxObjectShell* pShell = pDestSh;
- bool bFirst = 0 != pShell;
+ bool bFirst = nullptr != pShell;
if( !bFirst )
// No DocShell passed, starting with the first from the DocShell list
@@ -1539,7 +1539,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
if( INetProtocol::File == aTmpObj.GetProtocol() )
pMed->Download(); // Touch the medium (download it)
- const SfxFilter* pSfxFlt = 0;
+ const SfxFilter* pSfxFlt = nullptr;
if( !pMed->GetError() )
{
SfxFilterMatcher aMatcher( OUString::createFromAscii(SwDocShell::Factory().GetShortName()) );
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index c716ca3f51d6..a9183054bce6 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -265,7 +265,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
nFontHeightWhich = RES_CHRATR_CTL_FONTSIZE;
eLanguage = static_cast<const SvxLanguageItem&>(m_pDoc->GetDefault( RES_CHRATR_CTL_LANGUAGE )).GetLanguage();
}
- SwTextFormatColl *pColl = 0;
+ SwTextFormatColl *pColl = nullptr;
if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx]))
{
sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]);
@@ -465,10 +465,10 @@ void SwDocShell::RemoveLink()
}
sal_Int8 nRefCt = static_cast< sal_Int8 >(m_pDoc->release());
m_pDoc->SetOle2Link(Link<bool,void>());
- m_pDoc->SetDocShell( 0 );
+ m_pDoc->SetDocShell( nullptr );
if( !nRefCt )
delete m_pDoc;
- m_pDoc = 0; // we don't have the Doc anymore!!
+ m_pDoc = nullptr; // we don't have the Doc anymore!!
}
}
void SwDocShell::InvalidateModel()
@@ -565,7 +565,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
}
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
SetError( nErr, OSL_LOG_PREFIX );
bRet = !IsError( nErr );
@@ -631,7 +631,7 @@ void SwDocShell::SubInitNew()
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );
m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
m_pDoc->getIDocumentSettingAccess().setLinkUpdateMode( GLOBALSETTING );
m_pDoc->getIDocumentSettingAccess().setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 8ab012ea2e93..2dcb6f944397 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -108,7 +108,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
else
{
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pFrame->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem)
@@ -169,7 +169,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
nMask = SWSTYLEBIT_HTML;
else
{
- const FrmTypeFlags nSelection = pShell->GetFrmType(0,true);
+ const FrmTypeFlags nSelection = pShell->GetFrmType(nullptr,true);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FrmTypeFlags::HEADER ||
@@ -296,7 +296,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if (sName.isEmpty() && m_xBasePool.get())
sName = SfxStyleDialog::GenerateUnusedName(*m_xBasePool);
- nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), nullptr, rReq.IsAPI() );
}
break;
@@ -346,7 +346,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
OUString aParam;
sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
sal_uInt16 nMask = 0;
- SwWrtShell* pActShell = 0;
+ SwWrtShell* pActShell = nullptr;
if( !pArgs )
{
@@ -518,7 +518,7 @@ public:
DECL_LINK_TYPED( ApplyHdl, LinkParamNone*, void );
void apply()
{
- ApplyHdl(NULL);
+ ApplyHdl(nullptr);
}
sal_uInt16 getRet() const { return m_nRet; }
private:
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG_TYPED(ApplyStyle, ApplyHdl, LinkParamNone*, void)
if( SFX_STYLE_FAMILY_PAGE == m_nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
{
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SfxItemState::SET )
SwChartHelper::DoUpdateAllCharts( pDoc );
}
@@ -624,7 +624,7 @@ sal_uInt16 SwDocShell::Edit(
const bool bBasic )
{
assert( GetWrtShell() );
- SfxStyleSheetBase *pStyle = 0;
+ SfxStyleSheetBase *pStyle = nullptr;
sal_uInt16 nRet = nMask;
bool bModified = m_pDoc->getIDocumentState().IsModified();
@@ -731,7 +731,7 @@ sal_uInt16 SwDocShell::Edit(
{
//Get the undo id for the type of style that was created in order to re-use that comment for the grouped
//create style + change style operations
- m_pWrtShell->GetLastUndoInfo(0, &nNewStyleUndoId);
+ m_pWrtShell->GetLastUndoInfo(nullptr, &nNewStyleUndoId);
}
}
else
@@ -789,7 +789,7 @@ sal_uInt16 SwDocShell::Edit(
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert( pFact );
std::unique_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(
- 0, *(xTmp.get()), nFamily, sPage,
+ nullptr, *(xTmp.get()), nFamily, sPage,
pActShell ? pActShell : m_pWrtShell, bNew));
assert( pDlg );
ApplyStyle aApplyStyleHelper(*this, bNew, pStyle, nRet, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified);
@@ -1087,7 +1087,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw
{
const SwNumRule* pCurRule;
if( pStyle->GetNumRule() &&
- 0 != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() ))
+ nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() ))
{
SwNumRule aRule( *pCurRule );
// #i91400#
@@ -1281,7 +1281,7 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, bool bPreserveCurrentDocu
// of the template, update all the Source's
// FixFields once.
if(!bPreserveCurrentDocument)
- static_cast<SwDocShell&>(rSource).m_pDoc->getIDocumentFieldsAccess().SetFixFields(false, NULL);
+ static_cast<SwDocShell&>(rSource).m_pDoc->getIDocumentFieldsAccess().SetFixFields(false, nullptr);
if (m_pWrtShell)
{
// rhbz#818557, fdo#58893: EndAllAction will call SelectShell(),
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index a9c70c29f185..cedea9b48b8c 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -94,12 +94,12 @@ public:
};
SwImplShellAction::SwImplShellAction( SwDoc& rDoc )
- : pCurrSh( 0 )
+ : pCurrSh( nullptr )
{
if( rDoc.GetDocShell() )
pSh = rDoc.GetDocShell()->GetWrtShell();
else
- pSh = 0;
+ pSh = nullptr;
if( pSh )
{
@@ -121,10 +121,10 @@ SwImplShellAction::~SwImplShellAction()
// possibly fill Style
static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if (!rName.isEmpty())
{
pFormat = rDoc.FindCharFormatByName( rName );
@@ -163,10 +163,10 @@ static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc,
// fill Style
static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
if (!rName.isEmpty())
{
@@ -201,10 +201,10 @@ static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc,
// Border formats
static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwFrameFormat* pFormat = 0;
+ SwFrameFormat* pFormat = nullptr;
if( !rName.isEmpty() )
{
pFormat = rDoc.FindFrameFormatByName( rName );
@@ -235,10 +235,10 @@ static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc,
// Page descriptors
static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- const SwPageDesc* pDesc = 0;
+ const SwPageDesc* pDesc = nullptr;
if (!rName.isEmpty())
{
@@ -269,10 +269,10 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
static const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- const SwNumRule* pRule = 0;
+ const SwNumRule* pRule = nullptr;
if (!rName.isEmpty())
{
@@ -381,11 +381,11 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
- pCharFormat(0),
- pColl(0),
- pFrameFormat(0),
- pDesc(0),
- pNumRule(0),
+ pCharFormat(nullptr),
+ pColl(nullptr),
+ pFrameFormat(nullptr),
+ pDesc(nullptr),
+ pNumRule(nullptr),
rDoc(rDocument),
aCoreSet(GetPool().GetPool(), //UUUU sorted by indices, one double removed
@@ -453,7 +453,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
if (!bPhysical)
FillStyleSheet(FillPhysical);
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch (nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -498,7 +498,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
void SwDocStyleSheet::GetGrabBagItem(uno::Any& rVal) const
{
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch (nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -529,7 +529,7 @@ void SwDocStyleSheet::SetHidden( bool bValue )
if(!bPhysical)
FillStyleSheet( FillPhysical );
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -597,7 +597,7 @@ bool SwDocStyleSheet::IsHidden( ) const
{
bool bRet = false;
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -637,7 +637,7 @@ const OUString& SwDocStyleSheet::GetParent() const
if( !bPhysical )
{
// check if it's already in document
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
SwGetPoolIdFromName eGetType;
switch(nFamily)
{
@@ -1067,24 +1067,24 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow)
// hierarchy of deduction
bool SwDocStyleSheet::SetParent( const OUString& rStr)
{
- SwFormat* pFormat = 0, *pParent = 0;
+ SwFormat* pFormat = nullptr, *pParent = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
OSL_ENSURE( pCharFormat, "SwCharFormat missing!" );
- if( 0 != ( pFormat = pCharFormat ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pCharFormat ) && !rStr.isEmpty() )
pParent = lcl_FindCharFormat(rDoc, rStr);
break;
case SFX_STYLE_FAMILY_PARA :
OSL_ENSURE( pColl, "Collektion missing!");
- if( 0 != ( pFormat = pColl ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pColl ) && !rStr.isEmpty() )
pParent = lcl_FindParaFormat( rDoc, rStr );
break;
case SFX_STYLE_FAMILY_FRAME:
OSL_ENSURE(pFrameFormat, "FrameFormat missing!");
- if( 0 != ( pFormat = pFrameFormat ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pFrameFormat ) && !rStr.isEmpty() )
pParent = lcl_FindFrameFormat( rDoc, rStr );
break;
@@ -1130,7 +1130,7 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
if( pColl )
{
SwTextFormatColl* pFollow = pColl;
- if( !rStr.isEmpty() && 0 == (pFollow = lcl_FindParaFormat(rDoc, rStr) ))
+ if( !rStr.isEmpty() && nullptr == (pFollow = lcl_FindParaFormat(rDoc, rStr) ))
pFollow = pColl;
pColl->SetNextTextFormatColl(*pFollow);
@@ -1144,7 +1144,7 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
{
const SwPageDesc* pFollowDesc = !rStr.isEmpty()
? lcl_FindPageDesc(rDoc, rStr)
- : 0;
+ : nullptr;
size_t nId = 0;
if (pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDesc(pDesc->GetName(), &nId))
{
@@ -1364,8 +1364,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
}
- SwFormat* pFormat = 0;
- SwPageDesc* pNewDsc = 0;
+ SwFormat* pFormat = nullptr;
+ SwPageDesc* pNewDsc = nullptr;
size_t nPgDscPos = 0;
switch(nFamily)
@@ -1389,14 +1389,14 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SwCondCollItem* pCondItem;
if( SfxItemState::SET != rSet.GetItemState( FN_COND_COLL, false,
reinterpret_cast<const SfxPoolItem**>(&pCondItem) ))
- pCondItem = 0;
+ pCondItem = nullptr;
if( RES_CONDTXTFMTCOLL == pColl->Which() && pCondItem )
{
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
- SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
+ SwCollCondition aCond( nullptr, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
static_cast<SwConditionTextFormatColl*>(pColl)->RemoveCondition( aCond );
const OUString sStyle = pCondItem->GetStyle( i );
if (sStyle.isEmpty())
@@ -1456,7 +1456,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// we have to create a physical instance of the numbering style. If we do not and
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
- const SfxPoolItem* pNumRuleItem = 0;
+ const SfxPoolItem* pNumRuleItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) )
{ // Setting a numbering rule?
const OUString sNumRule = static_cast<const SwNumRuleItem*>(pNumRuleItem)->GetValue();
@@ -1623,7 +1623,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
}
@@ -1767,7 +1767,7 @@ bool SwDocStyleSheet::FillStyleSheet(
{
bool bRet = false;
sal_uInt16 nPoolId = USHRT_MAX;
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
bool bCreate = FillPhysical == eFType;
bool bDeleteInfo = false;
@@ -1779,7 +1779,7 @@ bool SwDocStyleSheet::FillStyleSheet(
{
case SFX_STYLE_FAMILY_CHAR:
pCharFormat = lcl_FindCharFormat(rDoc, aName, this, bCreate );
- bPhysical = 0 != pCharFormat;
+ bPhysical = nullptr != pCharFormat;
if( bFillOnlyInfo && !bPhysical )
{
// create style (plus all needed parents) and clean it up
@@ -1800,16 +1800,16 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
}
- bRet = 0 != pCharFormat || USHRT_MAX != nPoolId;
+ bRet = nullptr != pCharFormat || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pCharFormat = 0;
+ pCharFormat = nullptr;
break;
case SFX_STYLE_FAMILY_PARA:
{
pColl = lcl_FindParaFormat(rDoc, aName, this, bCreate);
- bPhysical = 0 != pColl;
+ bPhysical = nullptr != pColl;
if( bFillOnlyInfo && !bPhysical )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1824,16 +1824,16 @@ bool SwDocStyleSheet::FillStyleSheet(
else if( !bCreate )
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- bRet = 0 != pColl || USHRT_MAX != nPoolId;
+ bRet = nullptr != pColl || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pColl = 0;
+ pColl = nullptr;
}
break;
case SFX_STYLE_FAMILY_FRAME:
pFrameFormat = lcl_FindFrameFormat(rDoc, aName, this, bCreate);
- bPhysical = 0 != pFrameFormat;
+ bPhysical = nullptr != pFrameFormat;
if (bFillOnlyInfo && !bPhysical)
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1845,15 +1845,15 @@ bool SwDocStyleSheet::FillStyleSheet(
if( !bCreate && !pFormat )
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
- bRet = 0 != pFrameFormat || USHRT_MAX != nPoolId;
+ bRet = nullptr != pFrameFormat || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pFrameFormat = 0;
+ pFrameFormat = nullptr;
break;
case SFX_STYLE_FAMILY_PAGE:
pDesc = lcl_FindPageDesc(rDoc, aName, this, bCreate);
- bPhysical = 0 != pDesc;
+ bPhysical = nullptr != pDesc;
if( bFillOnlyInfo && !pDesc )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1875,14 +1875,14 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
SetMask( USER_FMT & nPoolId ? SFXSTYLEBIT_USERDEF : 0 );
- bRet = 0 != pDesc || USHRT_MAX != nPoolId;
+ bRet = nullptr != pDesc || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pDesc = 0;
+ pDesc = nullptr;
break;
case SFX_STYLE_FAMILY_PSEUDO:
pNumRule = lcl_FindNumRule(rDoc, aName, this, bCreate);
- bPhysical = 0 != pNumRule;
+ bPhysical = nullptr != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1904,10 +1904,10 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
SetMask( USER_FMT & nPoolId ? SFXSTYLEBIT_USERDEF : 0 );
- bRet = 0 != pNumRule || USHRT_MAX != nPoolId;
+ bRet = nullptr != pNumRule || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pNumRule = 0;
+ pNumRule = nullptr;
break;
default:; //prevent warning
}
@@ -2015,7 +2015,7 @@ void SwDocStyleSheet::Create()
{
const OUString sTmpNm( aName.isEmpty() ? rDoc.GetUniqueNumRuleName() : aName );
SwNumRule* pRule = rDoc.GetNumRuleTable()[
- rDoc.MakeNumRule( sTmpNm, 0, false,
+ rDoc.MakeNumRule( sTmpNm, nullptr, false,
// #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
pRule->SetAutoRule( false );
@@ -2090,10 +2090,10 @@ void SwDocStyleSheet::SetPhysical(bool bPhys)
if(!bPhys)
{
- pCharFormat = 0;
- pColl = 0;
- pFrameFormat = 0;
- pDesc = 0;
+ pCharFormat = nullptr;
+ pColl = nullptr;
+ pFrameFormat = nullptr;
+ pDesc = nullptr;
}
}
@@ -2141,12 +2141,12 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
rFile = "swrhlppi.hlp";
- const SwFormat* pTmpFormat = 0;
+ const SwFormat* pTmpFormat = nullptr;
switch( nFamily )
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFormat &&
- 0 == (pCharFormat = lcl_FindCharFormat( rDoc, aName, 0, false )) )
+ nullptr == (pCharFormat = lcl_FindCharFormat( rDoc, aName, nullptr, false )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -2156,7 +2156,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFormat( rDoc, aName, 0, false )) )
+ nullptr == ( pColl = lcl_FindParaFormat( rDoc, aName, nullptr, false )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -2166,7 +2166,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_FRAME:
if( !pFrameFormat &&
- 0 == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, 0, false ) ) )
+ nullptr == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -2176,7 +2176,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, false ) ) )
+ nullptr == ( pDesc = lcl_FindPageDesc( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -2189,7 +2189,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, false ) ) )
+ nullptr == ( pNumRule = lcl_FindNumRule( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -2237,7 +2237,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily!
- SwFormat* pTmpFormat = 0;
+ SwFormat* pTmpFormat = nullptr;
switch( nFamily )
{
case SFX_STYLE_FAMILY_CHAR : pTmpFormat = pCharFormat; break;
@@ -2305,14 +2305,14 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make( const OUString& rName,
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOrg*/)
{
OSL_ENSURE(false , "Create im SW-Stylesheet-Pool geht nicht" );
- return NULL;
+ return nullptr;
}
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const OUString &,
SfxStyleFamily, sal_uInt16 )
{
OSL_ENSURE( false, "Create im SW-Stylesheet-Pool geht nicht" );
- return NULL;
+ return nullptr;
}
SfxStyleSheetIteratorPtr SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, sal_uInt16 _nMask )
@@ -2337,21 +2337,21 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, 0, false );
+ SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, nullptr, false );
if(pFormat)
rDoc.DelCharFormat(pFormat);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, 0, false );
+ SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, nullptr, false );
if(pColl)
rDoc.DelTextFormatColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, 0, false );
+ SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, nullptr, false );
if(pFormat)
rDoc.DelFrameFormat(pFormat);
}
@@ -2382,21 +2382,21 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const OUString &rStyle, const OUString &rParent )
{
- SwFormat* pFormat = 0, *pParent = 0;
+ SwFormat* pFormat = nullptr, *pParent = nullptr;
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- if( 0 != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindCharFormat(rDoc, rParent );
break;
case SFX_STYLE_FAMILY_PARA :
- if( 0 != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindParaFormat( rDoc, rParent );
break;
case SFX_STYLE_FAMILY_FRAME:
- if( 0 != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindFrameFormat( rDoc, rParent );
break;
@@ -2453,7 +2453,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
}
const bool bSearchUsed = ( n != SFXSTYLEBIT_ALL && n & SFXSTYLEBIT_USED );
- const SwModify* pMod = 0;
+ const SwModify* pMod = nullptr;
mxStyleSheet->SetPhysical( false );
mxStyleSheet->PresetName( rName );
@@ -2511,7 +2511,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
: bSearchUsed )
bFnd = false;
}
- return bFnd ? mxStyleSheet.get() : 0;
+ return bFnd ? mxStyleSheet.get() : nullptr;
}
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
@@ -2900,7 +2900,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nLastPos = SAL_MAX_UINT32;
return Next();
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase* SwStyleSheetIterator::Next()
@@ -2915,11 +2915,11 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(mxIterSheet->pSet)
{
mxIterSheet->pSet->ClearItem();
- mxIterSheet->pSet= 0;
+ mxIterSheet->pSet= nullptr;
}
return mxIterSheet.get();
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName)
@@ -2940,7 +2940,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName)
return mxStyleSheet.get();
}
- return 0;
+ return nullptr;
}
void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList,
diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx
index 8413077f398c..4e4c32bbb36c 100644
--- a/sw/source/uibase/app/mainwn.cxx
+++ b/sw/source/uibase/app/mainwn.cxx
@@ -34,7 +34,7 @@ struct SwProgress
SfxProgress *pProgress;
};
-static std::vector<SwProgress*> *pProgressContainer = 0;
+static std::vector<SwProgress*> *pProgressContainer = nullptr;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
@@ -44,7 +44,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
if ( pTmp->pDocShell == pDocShell )
return pTmp;
}
- return 0;
+ return nullptr;
}
void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
@@ -52,13 +52,13 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
{
- SwProgress *pProgress = 0;
+ SwProgress *pProgress = nullptr;
if ( !pProgressContainer )
pProgressContainer = new std::vector<SwProgress*>;
else
{
- if ( 0 != (pProgress = lcl_SwFindProgress( pDocShell )) )
+ if ( nullptr != (pProgress = lcl_SwFindProgress( pDocShell )) )
++pProgress->nStartCount;
}
if ( !pProgress )
@@ -91,7 +91,7 @@ void EndProgress( SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
- SwProgress *pProgress = 0;
+ SwProgress *pProgress = nullptr;
sal_uInt16 i;
for ( i = 0; i < pProgressContainer->size(); ++i )
{
@@ -112,7 +112,7 @@ void EndProgress( SwDocShell *pDocShell )
//#112337# it may happen that the container has been removed
//while rescheduling
if ( pProgressContainer && pProgressContainer->empty() )
- delete pProgressContainer, pProgressContainer = 0;
+ delete pProgressContainer, pProgressContainer = nullptr;
}
}
}
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index ae6862d2924d..6fcda50c66d9 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -89,8 +89,8 @@ SwDLL::SwDLL()
std::unique_ptr<SvtModuleOptions> xOpt;
if (!utl::ConfigManager::IsAvoidConfig())
xOpt.reset(new SvtModuleOptions);
- SfxObjectFactory* pDocFact = 0;
- SfxObjectFactory* pGlobDocFact = 0;
+ SfxObjectFactory* pDocFact = nullptr;
+ SfxObjectFactory* pGlobDocFact = nullptr;
if (xOpt && xOpt->IsWriter())
{
pDocFact = &SwDocShell::Factory();
@@ -156,7 +156,7 @@ SwDLL::~SwDLL()
{
// fdo#86494 SwAutoCorrect must be deleted before _FinitCore
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
- rACfg.SetAutoCorrect(0); // delete SwAutoCorrect before exit handlers
+ rACfg.SetAutoCorrect(nullptr); // delete SwAutoCorrect before exit handlers
}
// Pool has to be deleted before statics are
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 7427473aa21d..649937193ea2 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -111,7 +111,7 @@ SwWrtShell* GetActiveWrtShell()
SwView *pActive = ::GetActiveView();
if( pActive )
return &pActive->GetWrtShell();
- return 0;
+ return nullptr;
}
SwView* GetActiveView()
@@ -139,7 +139,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
sal_uInt16 nDest )
{
SwView* pCurrView = pActView;
- SwViewShell* pSh = pCurrView ? &pCurrView->GetWrtShell() : 0;
+ SwViewShell* pSh = pCurrView ? &pCurrView->GetWrtShell() : nullptr;
SwMasterUsrPref* pPref = const_cast<SwMasterUsrPref*>(GetUsrPref(
nDest == VIEWOPT_DEST_WEB
@@ -150,7 +150,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
bool bViewOnly = VIEWOPT_DEST_VIEW_ONLY == nDest;
// fob Preview off
SwPagePreview* pPPView;
- if( !pCurrView && 0 != (pPPView = dynamic_cast<SwPagePreview*>( SfxViewShell::Current())) )
+ if( !pCurrView && nullptr != (pPPView = dynamic_cast<SwPagePreview*>( SfxViewShell::Current())) )
{
if(!bViewOnly)
pPref->SetUIOptions( rUsrPref );
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index d2d99939dd50..2a2d7c98b518 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -124,7 +124,7 @@
#include <app.hrc>
#include <svx/xmlsecctrl.hxx>
-ResMgr *pSwResMgr = 0;
+ResMgr *pSwResMgr = nullptr;
bool g_bNoInterrupt = false;
#include <sfx2/app.hxx>
@@ -147,27 +147,27 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory* pGlobalFact )
: SfxModule( ResMgr::CreateResMgr( "sw" ), false, pWebFact,
pFact, pGlobalFact, NULL ),
- m_pModuleConfig(0),
- m_pUsrPref(0),
- m_pWebUsrPref(0),
- m_pPrintOptions(0),
- m_pWebPrintOptions(0),
- m_pChapterNumRules(0),
- m_pStdFontConfig(0),
- m_pNavigationConfig(0),
- m_pToolbarConfig(0),
- m_pWebToolbarConfig(0),
- m_pDBConfig(0),
- m_pColorConfig(0),
- m_pAccessibilityOptions(0),
- m_pCTLOptions(0),
- m_pUserOptions(0),
- m_pAttrPool(0),
- m_pView(0),
+ m_pModuleConfig(nullptr),
+ m_pUsrPref(nullptr),
+ m_pWebUsrPref(nullptr),
+ m_pPrintOptions(nullptr),
+ m_pWebPrintOptions(nullptr),
+ m_pChapterNumRules(nullptr),
+ m_pStdFontConfig(nullptr),
+ m_pNavigationConfig(nullptr),
+ m_pToolbarConfig(nullptr),
+ m_pWebToolbarConfig(nullptr),
+ m_pDBConfig(nullptr),
+ m_pColorConfig(nullptr),
+ m_pAccessibilityOptions(nullptr),
+ m_pCTLOptions(nullptr),
+ m_pUserOptions(nullptr),
+ m_pAttrPool(nullptr),
+ m_pView(nullptr),
m_bAuthorInitialised(false),
m_bEmbeddedLoadSave( false ),
- m_pDragDrop( 0 ),
- m_pXSelection( 0 )
+ m_pDragDrop( nullptr ),
+ m_pXSelection( nullptr )
{
SetName( "StarWriter" );
pSwResMgr = GetResMgr();
@@ -390,13 +390,13 @@ void SwDLL::RegisterControls()
void SwModule::InitAttrPool()
{
OSL_ENSURE(!m_pAttrPool, "Pool already exists!");
- m_pAttrPool = new SwAttrPool(0);
+ m_pAttrPool = new SwAttrPool(nullptr);
SetPool(m_pAttrPool);
}
void SwModule::RemoveAttrPool()
{
- SetPool(0);
+ SetPool(nullptr);
SfxItemPool::Free(m_pAttrPool);
}
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 78b859bc9203..c620f5bc1ef0 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -124,8 +124,8 @@ public:
{
return uno::Any();
}
- SwNumFormat const* pNumFormat(0);
- OUString const* pCharStyleName(0);
+ SwNumFormat const* pNumFormat(nullptr);
+ OUString const* pCharStyleName(nullptr);
pRules->GetNumFormat(nIndex, pNumFormat, pCharStyleName);
if (!pNumFormat)
{ // the dialog only fills in those levels that are non-default
@@ -159,7 +159,7 @@ public:
SwXNumberingRules::SetPropertiesToNumFormat(
aNumberFormat,
charStyleName,
- 0, 0, 0, 0, 0,
+ nullptr, nullptr, nullptr, nullptr, nullptr,
props);
SwNumRulesWithName *const pRules(GetOrCreateRules());
pRules->SetNumFormat(nIndex, aNumberFormat, charStyleName);
@@ -438,8 +438,8 @@ void ExportStoredChapterNumberingRules(SwChapterNumRules & rRules,
{
for (size_t j = 0; j < MAXLEVEL; ++j)
{
- SwNumFormat const* pDummy(0);
- OUString const* pCharStyleName(0);
+ SwNumFormat const* pDummy(nullptr);
+ OUString const* pCharStyleName(nullptr);
pRule->GetNumFormat(j, pDummy, pCharStyleName);
if (pCharStyleName && !pCharStyleName->isEmpty())
{
diff --git a/sw/source/uibase/config/dbconfig.cxx b/sw/source/uibase/config/dbconfig.cxx
index 3aee9f4f8d80..843b9bf24737 100644
--- a/sw/source/uibase/config/dbconfig.cxx
+++ b/sw/source/uibase/config/dbconfig.cxx
@@ -54,8 +54,8 @@ const Sequence<OUString>& SwDBConfig::GetPropertyNames()
SwDBConfig::SwDBConfig() :
ConfigItem("Office.DataAccess",
ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree),
- pAdrImpl(0),
- pBibImpl(0)
+ pAdrImpl(nullptr),
+ pBibImpl(nullptr)
{
};
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index d932fea3d70a..2e40ba7c94fb 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -56,7 +56,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
return &rObj;
}
- return NULL;
+ return nullptr;
}
void InsCaptionOptArr::Insert(InsCaptionOpt* pObj)
@@ -70,7 +70,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
if(bHTML)
{
OSL_FAIL("no caption option in sw/web!");
- return 0;
+ return nullptr;
}
else
{
@@ -588,8 +588,8 @@ const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
SwInsertConfig::SwInsertConfig(bool bWeb) :
ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"),
ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree),
- pCapOptions(0),
- pOLEMiscOpt(0),
+ pCapOptions(nullptr),
+ pOLEMiscOpt(nullptr),
bInsWithCaption( false ),
bCaptionOrderNumberingFirst( false ),
aInsTableOpts(0,0),
@@ -639,14 +639,14 @@ void SwInsertConfig::ImplCommit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- const InsCaptionOpt* pWriterTableOpt = 0;
- const InsCaptionOpt* pWriterFrameOpt = 0;
- const InsCaptionOpt* pWriterGraphicOpt = 0;
- const InsCaptionOpt* pOLECalcOpt = 0;
- const InsCaptionOpt* pOLEImpressOpt = 0;
- const InsCaptionOpt* pOLEChartOpt = 0;
- const InsCaptionOpt* pOLEFormulaOpt = 0;
- const InsCaptionOpt* pOLEDrawOpt = 0;
+ const InsCaptionOpt* pWriterTableOpt = nullptr;
+ const InsCaptionOpt* pWriterFrameOpt = nullptr;
+ const InsCaptionOpt* pWriterGraphicOpt = nullptr;
+ const InsCaptionOpt* pOLECalcOpt = nullptr;
+ const InsCaptionOpt* pOLEImpressOpt = nullptr;
+ const InsCaptionOpt* pOLEChartOpt = nullptr;
+ const InsCaptionOpt* pOLEFormulaOpt = nullptr;
+ const InsCaptionOpt* pOLEDrawOpt = nullptr;
if(pCapOptions)
{
pWriterTableOpt = pCapOptions->Find(TABLE_CAP);
@@ -873,14 +873,14 @@ void SwInsertConfig::Load()
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
assert(aValues.getLength() == aNames.getLength());
- InsCaptionOpt* pWriterTableOpt = 0;
- InsCaptionOpt* pWriterFrameOpt = 0;
- InsCaptionOpt* pWriterGraphicOpt = 0;
- InsCaptionOpt* pOLECalcOpt = 0;
- InsCaptionOpt* pOLEImpressOpt = 0;
- InsCaptionOpt* pOLEChartOpt = 0;
- InsCaptionOpt* pOLEFormulaOpt = 0;
- InsCaptionOpt* pOLEDrawOpt = 0;
+ InsCaptionOpt* pWriterTableOpt = nullptr;
+ InsCaptionOpt* pWriterFrameOpt = nullptr;
+ InsCaptionOpt* pWriterGraphicOpt = nullptr;
+ InsCaptionOpt* pOLECalcOpt = nullptr;
+ InsCaptionOpt* pOLEImpressOpt = nullptr;
+ InsCaptionOpt* pOLEChartOpt = nullptr;
+ InsCaptionOpt* pOLEFormulaOpt = nullptr;
+ InsCaptionOpt* pOLEDrawOpt = nullptr;
if (pCapOptions)
{
pWriterTableOpt = pCapOptions->Find(TABLE_CAP);
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index bc33fb86d2f7..4c5f874a34a6 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -80,7 +80,7 @@ SwChapterNumRules::~SwChapterNumRules()
void SwChapterNumRules::Init()
{
for(sal_uInt16 i = 0; i < nMaxRules; ++i )
- pNumRules[i] = 0;
+ pNumRules[i] = nullptr;
OUString sNm(CHAPTER_FILENAME);
SvtPathOptions aOpt;
@@ -119,7 +119,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
if( pFormat )
aFormats[ n ] = new _SwNumFormatGlobal( *pFormat );
else
- aFormats[ n ] = 0;
+ aFormats[ n ] = nullptr;
}
}
@@ -153,7 +153,7 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
if( pFormat )
aFormats[ n ] = new _SwNumFormatGlobal( *pFormat );
else
- aFormats[ n ] = 0;
+ aFormats[ n ] = nullptr;
}
}
return *this;
@@ -167,7 +167,7 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
_SwNumFormatGlobal* pFormat = aFormats[ n ];
- if( 0 != pFormat)
+ if( nullptr != pFormat)
{
SwNumFormat aNew;
pFormat->ChgNumFormat( rSh, aNew );
@@ -179,8 +179,8 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
void SwNumRulesWithName::GetNumFormat(
size_t const nIndex, SwNumFormat const*& rpNumFormat, OUString const*& rpName) const
{
- rpNumFormat = (aFormats[nIndex]) ? &aFormats[nIndex]->aFormat : 0;
- rpName = (aFormats[nIndex]) ? &aFormats[nIndex]->sCharFormatName : 0;
+ rpNumFormat = (aFormats[nIndex]) ? &aFormats[nIndex]->aFormat : nullptr;
+ rpName = (aFormats[nIndex]) ? &aFormats[nIndex]->sCharFormatName : nullptr;
}
void SwNumRulesWithName::SetNumFormat(
@@ -216,7 +216,7 @@ SwNumRulesWithName::_SwNumFormatGlobal::_SwNumFormatGlobal( const SwNumFormat& r
}
}
- aFormat.SetCharFormat( 0 );
+ aFormat.SetCharFormat( nullptr );
}
}
@@ -239,7 +239,7 @@ SwNumRulesWithName::_SwNumFormatGlobal::~_SwNumFormatGlobal()
void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
SwNumFormat& rNew ) const
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if( !sCharFormatName.isEmpty() )
{
// at first, look for the name
@@ -250,7 +250,7 @@ void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
if (pFormat->GetName()==sCharFormatName)
// exists, so leave attributes as they are!
break;
- pFormat = 0;
+ pFormat = nullptr;
}
if( !pFormat )
@@ -275,7 +275,7 @@ void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
const_cast<SwNumFormat&>(aFormat).SetCharFormat( pFormat );
rNew = aFormat;
if( pFormat )
- const_cast<SwNumFormat&>(aFormat).SetCharFormat( 0 );
+ const_cast<SwNumFormat&>(aFormat).SetCharFormat( nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 657ee2a3a897..e5d6df837447 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -55,7 +55,7 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
aLayoutConfig(bWeb, *this),
aGridConfig(bWeb, *this),
aCursorConfig(*this),
- pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0),
+ pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr),
bApplyCharUnit(false)
{
if (utl::ConfigManager::IsAvoidConfig())
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 02f296e3a3ee..eb2ef3c7b676 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -200,7 +200,7 @@ public:
explicit SwConnectionDisposedListener_Impl(SwDBManager& rMgr);
virtual ~SwConnectionDisposedListener_Impl();
- void Dispose() { m_pDBManager = 0; }
+ void Dispose() { m_pDBManager = nullptr; }
};
@@ -279,7 +279,7 @@ void SwDataSourceRemovedListener::disposing(const lang::EventObject& /*rObject*/
void SwDataSourceRemovedListener::Dispose()
{
- m_pDBManager = 0;
+ m_pDBManager = nullptr;
}
struct SwDBManager_Impl
@@ -290,8 +290,8 @@ struct SwDBManager_Impl
rtl::Reference<SwDataSourceRemovedListener> m_xDataSourceRemovedListener;
explicit SwDBManager_Impl(SwDBManager& rDBManager)
- :pMergeData(0)
- ,pMergeDialog(0)
+ :pMergeData(nullptr)
+ ,pMergeDialog(nullptr)
, m_xDisposeListener(new SwConnectionDisposedListener_Impl(rDBManager))
{}
@@ -781,7 +781,7 @@ SwDBManager::SwDBManager(SwDoc* pDoc)
, bMergeSilent(false)
, bMergeLock(false)
, pImpl(new SwDBManager_Impl(*this))
- , pMergeEvtSrc(NULL)
+ , pMergeEvtSrc(nullptr)
, m_pDoc(pDoc)
{
}
@@ -914,7 +914,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
OUString sBodyMimeType;
rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
- static const char *sMaxDumpDocs = 0;
+ static const char *sMaxDumpDocs = nullptr;
static sal_Int32 nMaxDumpDocs = 0;
if (!sMaxDumpDocs)
{
@@ -973,7 +973,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
const SfxFilter* pStoreToFilter = SwIoSystem::GetFileFilter(
pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::NO_DECODE));
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
- const OUString* pStoreToFilterOptions = 0;
+ const OUString* pStoreToFilterOptions = nullptr;
// if a save_to filter is set then use it - otherwise use the default
if( bEMail && !rMergeDescriptor.bSendAsAttachment )
@@ -995,12 +995,12 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
bCancel = false;
// in case of creating a single resulting file this has to be created here
- SwWrtShell* pTargetShell = 0;
- SwDoc* pTargetDoc = 0;
+ SwWrtShell* pTargetShell = nullptr;
+ SwDoc* pTargetDoc = nullptr;
SfxObjectShellRef xTargetDocShell;
- SwView* pTargetView = 0;
+ SwView* pTargetView = nullptr;
std::unique_ptr< utl::TempFile > aTempFile;
bool createTempFile = ( rMergeDescriptor.nMergeType == DBMGR_MERGE_EMAIL || rMergeDescriptor.nMergeType == DBMGR_MERGE_FILE );
OUString sModifiedStartingPageDesc;
@@ -1008,7 +1008,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
- vcl::Window *pSourceWindow = 0;
+ vcl::Window *pSourceWindow = nullptr;
VclPtr<CancelableDialog> pProgressDlg;
if (!IsMergeSilent()) {
@@ -1104,9 +1104,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
// The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here
SfxObjectShellLock xWorkDocSh;
// a view frame for the document
- SwView* pWorkView = NULL;
- SwDoc* pWorkDoc = NULL;
- SwDBManager* pOldDBManager = NULL;
+ SwView* pWorkView = nullptr;
+ SwDoc* pWorkDoc = nullptr;
+ SwDBManager* pOldDBManager = nullptr;
do
{
@@ -1241,7 +1241,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
//#i72517# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
- SwPageDesc* pTargetPageDesc(NULL);
+ SwPageDesc* pTargetPageDesc(nullptr);
if(bPageStylesWithHeaderFooter)
{
//create a new pagestyle
@@ -1430,7 +1430,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
{
pWorkDoc->SetDBManager( pOldDBManager );
xWorkDocSh->DoClose();
- xWorkDocSh = NULL;
+ xWorkDocSh = nullptr;
}
}
}
@@ -1819,7 +1819,7 @@ uno::Reference< sdbc::XConnection> SwDBManager::GetConnection(const OUString& rD
if ( xComplConnection.is() )
{
rxSource.set(xComplConnection, uno::UNO_QUERY);
- uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
xConnection = xComplConnection->connectWithCompletion( xHandler );
}
}
@@ -1981,7 +1981,7 @@ bool SwDBManager::GetColumnCnt(const OUString& rSourceName, const OUString& rTab
OUString& rResult, double* pNumber)
{
bool bRet = false;
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
//check if it's the merge data source
if(pImpl->pMergeData &&
rSourceName == pImpl->pMergeData->sDataSource &&
@@ -2132,7 +2132,7 @@ bool SwDBManager::FillCalcWithMergeData( SvNumberFormatter *pDocFormatter,
bool SwDBManager::ToNextRecord(
const OUString& rDataSource, const OUString& rCommand, sal_Int32 /*nCommandType*/)
{
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
if(pImpl->pMergeData &&
rDataSource == pImpl->pMergeData->sDataSource &&
rCommand == pImpl->pMergeData->sCommand)
@@ -2285,9 +2285,9 @@ bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rT
}
catch (const uno::Exception&)
{
- pFound->xResultSet = 0;
- pFound->xStatement = 0;
- pFound->xConnection = 0;
+ pFound->xResultSet = nullptr;
+ pFound->xStatement = nullptr;
+ pFound->xConnection = nullptr;
}
}
return pFound->xResultSet.is();
@@ -2387,7 +2387,7 @@ SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
return pImpl->pMergeData;
}
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
for (size_t nPos = m_DataSourceParams.size(); nPos; nPos--)
{
SwDSParam* pParam = m_DataSourceParams[nPos - 1].get();
@@ -2432,7 +2432,7 @@ SwDSParam* SwDBManager::FindDSConnection(const OUString& rDataSource, bool bCre
{
return pImpl->pMergeData;
}
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
for (auto & pParam : m_DataSourceParams)
{
if(rDataSource == pParam->sDataSource)
@@ -2524,7 +2524,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
if( xSettingsDlg->execute() )
aSettings.set( uno::Reference < beans::XPropertySet >( xSettingsDlg, uno::UNO_QUERY_THROW ) );
}
- sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type ? &aSettings : 0, aURI, 0, 0, pDocShell );
+ sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type ? &aSettings : nullptr, aURI, nullptr, nullptr, pDocShell );
}
return sFind;
}
@@ -2805,7 +2805,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
}
//always create a connection for the dialog and dispose it after the dialog has been closed
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
if(!xConnection.is())
{
xConnection = SwDBManager::RegisterConnection(sDataSource);
@@ -2819,7 +2819,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
sDataTableOrQuery,
nCmdType,
xConnection,
- bWithDataSourceBrowser ? 0 : &aSelection);
+ bWithDataSourceBrowser ? nullptr : &aSelection);
OSL_ENSURE(pImpl->pMergeDialog, "Dialog creation failed!");
if(pImpl->pMergeDialog->Execute() == RET_OK)
{
@@ -2909,7 +2909,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), rSh.GetView().GetViewFrame()->GetObjectShell()));
// reset the cursor inside
- xResSet = NULL;
+ xResSet = nullptr;
aDescriptor[svx::daCursor] <<= xResSet;
}
if(pFound)
@@ -3046,7 +3046,7 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat
if ( xRowSet.is() )
{
- uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), 0), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), nullptr), uno::UNO_QUERY_THROW );
xRowSet->executeWithCompletion(xHandler);
}
xResultSet.set(xRowSet, uno::UNO_QUERY);
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 9cb14f9a0e82..26106097cfdf 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -119,7 +119,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
void SwDBTreeList_Impl::disposing( const EventObject& ) throw (RuntimeException, std::exception)
{
- m_xDatabaseContext = 0;
+ m_xDatabaseContext = nullptr;
}
void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (RuntimeException, std::exception)
@@ -153,7 +153,7 @@ SwDBTreeList::SwDBTreeList(vcl::Window *pParent, WinBits nStyle)
, aImageList(SW_RES(ILIST_DB_DLG))
, bInitialized(false)
, bShowColumns(false)
- , pImpl(new SwDBTreeList_Impl(NULL))
+ , pImpl(new SwDBTreeList_Impl(nullptr))
{
if (IsVisible())
InitTreeList();
@@ -181,7 +181,7 @@ SwDBTreeList::~SwDBTreeList()
void SwDBTreeList::dispose()
{
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
SvTreeListBox::dispose();
}
@@ -208,7 +208,7 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
OUString sDBName(pDBNames[i]);
- InsertEntry(sDBName, aImg, aImg, NULL, true);
+ InsertEntry(sDBName, aImg, aImg, nullptr, true);
}
OUString sDBName(sDefDBName.getToken(0, DB_DELIM));
OUString sTableName(sDefDBName.getToken(1, DB_DELIM));
@@ -221,7 +221,7 @@ void SwDBTreeList::InitTreeList()
void SwDBTreeList::AddDataSource(const OUString& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
- SvTreeListEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, true);
+ SvTreeListEntry* pEntry = InsertEntry(rSource, aImg, aImg, nullptr, true);
SvTreeListBox::Select(pEntry);
}
@@ -244,7 +244,7 @@ void SwDBTreeList::ShowColumns(bool bShowCol)
Collapse(pEntry); // zuklappen
SvTreeListEntry* pChild;
- while ((pChild = FirstChild(pEntry)) != 0L)
+ while ((pChild = FirstChild(pEntry)) != nullptr)
GetModel()->Remove(pChild);
pEntry = Next(pEntry);
@@ -273,7 +273,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- bool bTable = pParent->GetUserData() == 0;
+ bool bTable = pParent->GetUserData() == nullptr;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -409,7 +409,7 @@ OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sa
sDBName = GetEntryText(GetParent(pEntry));
if(pbIsTable)
{
- *pbIsTable = pEntry->GetUserData() == 0;
+ *pbIsTable = pEntry->GetUserData() == nullptr;
}
rTableName = GetEntryText(pEntry);
}
@@ -424,13 +424,13 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
sal_uInt16 nParent = 0;
sal_uInt16 nChild = 0;
- while ((pParent = GetEntry(nParent++)) != NULL)
+ while ((pParent = GetEntry(nParent++)) != nullptr)
{
if (rDBName == GetEntryText(pParent))
{
if (!pParent->HasChildren())
RequestingChildren(pParent);
- while ((pChild = GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = GetEntry(pParent, nChild++)) != nullptr)
{
if (rTableName == GetEntryText(pChild))
{
@@ -443,7 +443,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
if (!pParent->HasChildren())
RequestingChildren(pParent);
- while ((pChild = GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = GetEntry(pParent, nChild++)) != nullptr)
if (rColumnName == GetEntryText(pChild))
break;
}
diff --git a/sw/source/uibase/dbui/maildispatcher.cxx b/sw/source/uibase/dbui/maildispatcher.cxx
index 6fd88f64923b..46c7f3657d4e 100644
--- a/sw/source/uibase/dbui/maildispatcher.cxx
+++ b/sw/source/uibase/dbui/maildispatcher.cxx
@@ -269,7 +269,7 @@ void MailDispatcher::onTerminated()
{
//keep the reference until the end of onTerminated() because of the call order in the
//_threadFunc() from osl/thread.hxx
- m_xSelfReference = 0;
+ m_xSelfReference = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 1b49433d0f4d..9fd1325cd093 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -466,7 +466,7 @@ OUString SwAddressPreview::FillData(
//exchange the placeholder (like <Firstname>) with the database content
//unassigned columns are expanded to <not assigned>
Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
- Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
Sequence< OUString> aAssignment = pAssignments ?
*pAssignments :
rConfigItem.GetColumnAssignment(
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 027821c4acec..5e4396502894 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -723,7 +723,7 @@ void SwMailMergeConfigItem_Impl::SetCurrentGreeting(
namespace
{
- static SwMailMergeConfigItem_Impl* pOptions = NULL;
+ static SwMailMergeConfigItem_Impl* pOptions = nullptr;
static sal_Int32 nRefCount = 0;
class theMailMergeConfigMutex : public rtl::Static<osl::Mutex, theMailMergeConfigMutex> {};
@@ -736,8 +736,8 @@ SwMailMergeConfigItem::SwMailMergeConfigItem() :
m_nGreetingMoves(0),
m_nStartPrint(0),
m_nEndPrint(0),
- m_pSourceView(0),
- m_pTargetView(0)
+ m_pSourceView(nullptr),
+ m_pTargetView(nullptr)
{
// Global access, must be guarded (multithreading)
::osl::MutexGuard aGuard( theMailMergeConfigMutex::get() );
@@ -839,7 +839,7 @@ void SwMailMergeConfigItem::SetCurrentConnection(
m_pImpl->m_xConnection = rConnection ;
m_pImpl->m_xColumnsSupplier = xColumnsSupplier;
m_pImpl->m_aDBData = rDBData;
- m_pImpl->m_xResultSet = 0;
+ m_pImpl->m_xResultSet = nullptr;
m_pImpl->m_nResultSetCursorPos = 0;
m_pImpl->SetModified();
}
@@ -877,8 +877,8 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
{
m_pImpl->m_aDBData = rDBData;
m_pImpl->m_xConnection.clear();
- m_pImpl->m_xSource = 0;
- m_pImpl->m_xColumnsSupplier = 0;
+ m_pImpl->m_xSource = nullptr;
+ m_pImpl->m_xColumnsSupplier = nullptr;
m_pImpl->SetModified();
}
}
@@ -1612,7 +1612,7 @@ static SwView* lcl_ExistsView(SwView* pView)
pViewShell = SfxViewShell::GetNext( *pViewShell, false, checkSfxViewShell<SwView> );
}
- return 0;
+ return nullptr;
}
SwView* SwMailMergeConfigItem::GetTargetView()
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 230202341a86..9093b6a5cc24 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -104,17 +104,17 @@ struct SpellState
m_bOtherSpelled(false),
m_bStartedInOther(false),
m_bStartedInSelection(false),
- pOtherCursor(0),
+ pOtherCursor(nullptr),
m_bDrawingsSpelled(false),
- m_pStartDrawing(0),
+ m_pStartDrawing(nullptr),
m_bRestartDrawing(false),
m_eSelMode(SHELL_MODE_OBJECT), // initially invalid
- m_pPointNode(0),
- m_pMarkNode(0),
+ m_pPointNode(nullptr),
+ m_pMarkNode(nullptr),
m_nPointPos(0),
m_nMarkPos(0),
- m_pOutliner(0),
+ m_pOutliner(nullptr),
m_bTextObjectsCollected(false)
{}
@@ -124,14 +124,14 @@ struct SpellState
void Reset()
{ m_bInitialCall = true;
m_bBodySpelled = m_bOtherSpelled = m_bDrawingsSpelled = false;
- m_xStartRange = 0;
- m_pStartDrawing = 0;
+ m_xStartRange = nullptr;
+ m_pStartDrawing = nullptr;
m_bRestartDrawing = false;
m_bTextObjectsCollected = false;
m_aTextObjects.clear();
m_bStartedInOther = false;
delete pOtherCursor;
- pOtherCursor = 0;
+ pOtherCursor = nullptr;
}
};
@@ -226,7 +226,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
m_pSpellState->m_bStartedInSelection = true;
}
// determine if the selection is outside of the body text
- bOtherText = !(pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
if(bOtherText)
{
@@ -323,14 +323,14 @@ The code below would only be part of the solution.
if (!m_pSpellState->m_bStartedInSelection)
{
// find out which text has been spelled body or other
- bOtherText = !(pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
{
m_pSpellState->m_bStartedInOther = false;
pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
pWrtShell->SpellEnd();
delete m_pSpellState->pOtherCursor;
- m_pSpellState->pOtherCursor = 0;
+ m_pSpellState->pOtherCursor = nullptr;
pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART );
(void)pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
@@ -404,7 +404,7 @@ The code below would only be part of the solution.
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
pWrtShell->SpellEnd();
}
- m_pSpellState->m_xStartRange = 0;
+ m_pSpellState->m_xStartRange = nullptr;
LockFocusNotification( false );
// take care that the now valid selection is stored
LoseFocus();
@@ -507,7 +507,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn)
else if( bDrawText )
{
SdrView* pSdrView = pWrtShell->GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SetGrammarChecking");
if(pOutliner)
{
@@ -552,7 +552,7 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_DRAWTEXT:
{
SdrView* pSdrView = pWrtShell->GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
if(!pOutliner || m_pSpellState->m_pOutliner != pOutliner)
bInvalidate = true;
else
@@ -586,9 +586,9 @@ void SwSpellDialogChildWindow::LoseFocus()
if(pWrtShell)
{
m_pSpellState->m_eSelMode = pWrtShell->GetView().GetShellMode();
- m_pSpellState->m_pPointNode = m_pSpellState->m_pMarkNode = 0;
+ m_pSpellState->m_pPointNode = m_pSpellState->m_pMarkNode = nullptr;
m_pSpellState->m_nPointPos = m_pSpellState->m_nMarkPos = 0;
- m_pSpellState->m_pOutliner = 0;
+ m_pSpellState->m_pOutliner = nullptr;
switch(m_pSpellState->m_eSelMode)
{
@@ -630,7 +630,7 @@ void SwSpellDialogChildWindow::InvalidateSpellDialog()
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(!m_pSpellState->m_bInitialCall && pWrtShell)
- pWrtShell->SpellEnd(0, false);
+ pWrtShell->SpellEnd(nullptr, false);
m_pSpellState->Reset();
svx::SpellDialogChildWindow::InvalidateSpellDialog();
}
@@ -638,19 +638,19 @@ void SwSpellDialogChildWindow::InvalidateSpellDialog()
SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
{
SfxDispatcher* pDispatch = GetBindings().GetDispatcher();
- SwView* pView = 0;
+ SwView* pView = nullptr;
if(pDispatch)
{
sal_uInt16 nShellIdx = 0;
SfxShell* pShell;
- while(0 != (pShell = pDispatch->GetShell(nShellIdx++)))
+ while(nullptr != (pShell = pDispatch->GetShell(nShellIdx++)))
if(dynamic_cast< const SwView *>( pShell ) != nullptr)
{
pView = static_cast<SwView* >(pShell);
break;
}
}
- return pView ? pView->GetWrtShellPtr(): 0;
+ return pView ? pView->GetWrtShellPtr(): nullptr;
}
// set the cursor into the body text - necessary if any object is selected
@@ -732,7 +732,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
SwDoc* pDoc = rView.GetDocShell()->GetDoc();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
// start at the current draw object - if there is any selected
- SdrTextObj* pCurrentTextObj = 0;
+ SdrTextObj* pCurrentTextObj = nullptr;
if ( rMarkList.GetMarkCount() == 1 )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -812,7 +812,7 @@ bool SwSpellDialogChildWindow::SpellDrawText_Impl(SwWrtShell& rSh, svx::SpellPor
{
bool bRet = false;
SdrView* pSdrView = rSh.GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SpellDrawText_Impl");
if(pOutliner)
{
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index e2d984b7678a..4d632cf70564 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -91,7 +91,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
}
else
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
OUString aTmpStr;
if ( SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_REGION_NAME, true, &pItem) )
@@ -169,7 +169,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
aSection.SetType( FILE_LINK_SECTION );
aSection.SetLinkFileName(sLinkFileName);
}
- rSh.InsertSection(aSection, aSet.Count() ? &aSet : 0);
+ rSh.InsertSection(aSection, aSet.Count() ? &aSet : nullptr);
rReq.Done();
}
}
@@ -206,7 +206,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem);
SwWrtShell& rWrtShell = GetShell();
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index 449e584f499e..0d1ee6633c86 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -37,7 +37,7 @@ extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
- SwFuncPtrCreateDialogFactory fp = 0;
+ SwFuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -52,7 +52,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 4ac121b940e2..da8e5ce86944 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -315,7 +315,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam
return false;
OUString sOnlyText;
- OUString* pOnlyText = 0;
+ OUString* pOnlyText = nullptr;
if( bNoAttr )
{
if( !pWrtShell->GetSelectedText( sOnlyText, GETSELTXT_PARABRK_TO_ONLYCR ))
@@ -443,7 +443,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(0, aShortName));
+ std::unique_ptr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(nullptr, aShortName));
assert(pDlg && "Dialog creation failed!");
for(size_t i = 0; i < aFoundArr.size(); ++i)
{
@@ -625,7 +625,7 @@ SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh)
aCurGrp( SwGlossaries::GetDefName() ),
pViewFrame( pVwFrm ),
pWrtShell( pSh ),
- pCurGrp( 0 )
+ pCurGrp( nullptr )
{
}
@@ -662,7 +662,7 @@ bool SwGlossaryHdl::Rename(const OUString& rOldShort, const OUString& rNewShortN
bool SwGlossaryHdl::IsReadOnly( const OUString* pGrpNm ) const
{
- SwTextBlocks *pGlossary = 0;
+ SwTextBlocks *pGlossary = nullptr;
if (pGrpNm)
pGlossary = rStatGlossaries.GetGroupDoc( *pGrpNm );
@@ -713,16 +713,16 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName )
bool bRet = false;
if( !rName.isEmpty() )
{
- const SfxFilter* pFilter = 0;
- std::unique_ptr<SfxMedium> pMed(new SfxMedium( rName, StreamMode::READ, 0, 0 ));
+ const SfxFilter* pFilter = nullptr;
+ std::unique_ptr<SfxMedium> pMed(new SfxMedium( rName, StreamMode::READ, nullptr, nullptr ));
SfxFilterMatcher aMatcher( OUString("swriter") );
pMed->UseInteractionHandler( true );
if (!aMatcher.GuessFilter(*pMed, &pFilter, SfxFilterFlags::NONE))
{
- SwTextBlocks *pGlossary = NULL;
+ SwTextBlocks *pGlossary = nullptr;
pMed->SetFilter( pFilter );
Reader* pR = SwReaderWriter::GetReader( pFilter->GetUserData() );
- if( pR && 0 != ( pGlossary = pCurGrp ? pCurGrp
+ if( pR && nullptr != ( pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp)) )
{
SwReader aReader( *pMed, rName );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 2f7d5c5d6686..bff00a0c9519 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -187,7 +187,7 @@ class SwTrnsfrActionAndUndo
SwUndoId eUndoId;
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
- const SwRewriter * pRewriter = 0,
+ const SwRewriter * pRewriter = nullptr,
bool bDelSel = false)
: pSh( pS ), eUndoId( nId )
{
@@ -205,14 +205,14 @@ public:
SwTransferable::SwTransferable( SwWrtShell& rSh )
: m_pWrtShell( &rSh ),
- m_pCreatorView( 0 ),
- m_pClpDocFac( 0 ),
- m_pClpGraphic( 0 ),
- m_pClpBitmap( 0 ),
- m_pOrigGraphic( 0 ),
- m_pBookmark( 0 ),
- m_pImageMap( 0 ),
- m_pTargetURL( 0 ),
+ m_pCreatorView( nullptr ),
+ m_pClpDocFac( nullptr ),
+ m_pClpGraphic( nullptr ),
+ m_pClpBitmap( nullptr ),
+ m_pOrigGraphic( nullptr ),
+ m_pBookmark( nullptr ),
+ m_pImageMap( nullptr ),
+ m_pTargetURL( nullptr ),
m_eBufferType( TRNSFR_NONE )
{
rSh.GetView().AddTransferable(*this);
@@ -244,7 +244,7 @@ SwTransferable::~SwTransferable()
m_xDdeLink.Clear();
}
- m_pWrtShell = 0;
+ m_pWrtShell = nullptr;
// release reference to the document so that aDocShellRef will delete
// it (if aDocShellRef is set). Otherwise, the OLE nodes keep references
@@ -265,9 +265,9 @@ SwTransferable::~SwTransferable()
if(pMod)
{
if ( pMod->m_pDragDrop == this )
- pMod->m_pDragDrop = 0;
+ pMod->m_pDragDrop = nullptr;
else if ( pMod->m_pXSelection == this )
- pMod->m_pXSelection = 0;
+ pMod->m_pXSelection = nullptr;
}
delete m_pClpGraphic;
@@ -296,9 +296,9 @@ void SwTransferable::ObjectReleased()
{
SwModule *pMod = SW_MOD();
if( this == pMod->m_pDragDrop )
- pMod->m_pDragDrop = 0;
+ pMod->m_pDragDrop = nullptr;
else if( this == pMod->m_pXSelection )
- pMod->m_pXSelection = 0;
+ pMod->m_pXSelection = nullptr;
}
void SwTransferable::AddSupportedFormats()
@@ -350,7 +350,7 @@ const Graphic* SwTransferable::FindOLEReplacementGraphic() const
}
}
- return NULL;
+ return nullptr;
}
void SwTransferable::RemoveDDELinkFormat( const vcl::Window& rWin )
@@ -409,7 +409,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
// 1) we have data for this format
// 2) we have either a clipboard document (pClpDocFac), or
// we have a SwWrtShell (so we can generate a new clipboard document)
- if( !HasFormat( nFormat ) || ( m_pClpDocFac == NULL && m_pWrtShell == NULL ) )
+ if( !HasFormat( nFormat ) || ( m_pClpDocFac == nullptr && m_pWrtShell == nullptr ) )
return false;
if( !m_pClpDocFac )
@@ -566,7 +566,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
case SotClipboardFormatId::BITMAP:
case SotClipboardFormatId::PNG:
// Neither pClpBitmap nor pClpGraphic are necessarily set
- if( (m_eBufferType & TRNSFR_GRAPHIC) && (m_pClpBitmap != 0 || m_pClpGraphic != 0))
+ if( (m_eBufferType & TRNSFR_GRAPHIC) && (m_pClpBitmap != nullptr || m_pClpGraphic != nullptr))
bOK = SetBitmapEx( (m_pClpBitmap ? m_pClpBitmap : m_pClpGraphic)->GetBitmapEx(), rFlavor );
break;
@@ -819,7 +819,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
AddFormat( SotClipboardFormatId::BITMAP );
}
m_eBufferType = TRNSFR_GRAPHIC;
- m_pWrtShell->GetGrfNms( &sGrfNm, 0 );
+ m_pWrtShell->GetGrfNms( &sGrfNm, nullptr );
}
else if ( nSelection == nsSelectionType::SEL_OLE )
{
@@ -969,7 +969,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
// at Cut, DDE-Link doesn't make sense!!
SwDocShell* pDShell;
if( !bIsCut && bDDELink &&
- 0 != ( pDShell = m_pWrtShell->GetDoc()->GetDocShell()) &&
+ nullptr != ( pDShell = m_pWrtShell->GetDoc()->GetDocShell()) &&
SfxObjectCreateMode::STANDARD == pDShell->GetCreateMode() )
{
AddFormat( SotClipboardFormatId::LINK );
@@ -1099,7 +1099,7 @@ bool SwTransferable::IsPaste( const SwWrtShell& rSh,
// If _only_ the internal format can be pasted, this check will
// yield 'true', while the one below would give a (wrong) result 'false'.
- bool bIsPaste = ( GetSwTransferable( rData ) != NULL );
+ bool bIsPaste = ( GetSwTransferable( rData ) != nullptr );
// if it's not our own data, we need to have a closer look:
if( ! bIsPaste )
@@ -1241,14 +1241,14 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if( bDelSel )
// #i34830#
- pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
+ pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, nullptr,
true ));
}
- SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
+ SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
// check for private drop
- bool bPrivateDrop(pPt && (bPasteSelection ? 0 != (pTrans = pMod->m_pXSelection) : 0 != (pTrans = pMod->m_pDragDrop)));
+ bool bPrivateDrop(pPt && (bPasteSelection ? nullptr != (pTrans = pMod->m_pXSelection) : nullptr != (pTrans = pMod->m_pDragDrop)));
bool bNeedToSelectBeforePaste(false);
if(bPrivateDrop && DND_ACTION_LINK == nDropAction)
@@ -1291,7 +1291,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
}
// in Drag&Drop MessageBoxes must not be showed
- bool bMsg = 0 == pPt;
+ bool bMsg = nullptr == pPt;
sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
@@ -1379,7 +1379,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
: EXCHG_IN_ACTION_LINK == nClearedAction
? SwPasteSdr::SetAttr
: SwPasteSdr::Insert),
- pPt, nActionFlags, bMsg, 0 );
+ pPt, nActionFlags, bMsg, nullptr );
break;
case SotClipboardFormatId::FILE_LIST:
@@ -1564,7 +1564,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh,
ObjCntType eOType;
if( pPt )
{
- SdrObject *pObj = 0;
+ SdrObject *pObj = nullptr;
eOType = rSh.GetObjCntType( *pPt, pObj );
}
else
@@ -1577,15 +1577,15 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh,
bool bIMap, bLink;
if( pPt )
{
- bIMap = 0 != rSh.GetFormatFromObj( *pPt )->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFormatFromObj( *pPt )->GetURL().GetMap();
OUString aDummy;
rSh.GetGrfAtPos( *pPt, aDummy, bLink );
}
else
{
- bIMap = 0 != rSh.GetFlyFrameFormat()->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFlyFrameFormat()->GetURL().GetMap();
OUString aDummy;
- rSh.GetGrfNms( &aDummy, 0 );
+ rSh.GetGrfNms( &aDummy, nullptr );
bLink = !aDummy.isEmpty();
}
@@ -1635,8 +1635,8 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
MSE40HTMLClipFormatObj aMSE40ClpObj;
tools::SvRef<SotStorageStream> xStrm;
- SvStream* pStream = 0;
- SwRead pRead = 0;
+ SvStream* pStream = nullptr;
+ SwRead pRead = nullptr;
OUString sData;
switch( nFormat )
{
@@ -1729,7 +1729,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
TransferableObjectDescriptor aObjDesc;
uno::Reference < io::XInputStream > xStrm;
uno::Reference < embed::XStorage > xStore;
- Reader* pRead = 0;
+ Reader* pRead = nullptr;
// Get the preferred format
SotClipboardFormatId nId;
@@ -1769,7 +1769,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
uno::Reference < lang::XComponent > xComp( xStore, uno::UNO_QUERY );
xComp->dispose();
- xStore = 0;
+ xStore = nullptr;
}
catch (const uno::Exception&)
{
@@ -1936,7 +1936,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( bRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
// let the object be unloaded if possible
SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT );
@@ -2107,7 +2107,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
return bRet;
}
- SwFieldType* pTyp = 0;
+ SwFieldType* pTyp = nullptr;
size_t i = 1;
size_t j;
OUString aName;
@@ -2173,7 +2173,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
{
if( bMsg )
ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VCL_MESSAGE_INFO)->Execute();
- pDDETyp = 0;
+ pDDETyp = nullptr;
break;
}
@@ -2182,7 +2182,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
{
if( bMsg )
ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute();
- pDDETyp = 0;
+ pDDETyp = nullptr;
break;
}
@@ -2201,7 +2201,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
aSect.SetProtectFlag(true);
rWrtShell.InsertSection( aSect );
- pDDETyp = 0; // remove FieldTypes again
+ pDDETyp = nullptr; // remove FieldTypes again
}
else
{
@@ -2213,7 +2213,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
} while( false );
}
else
- pDDETyp = 0; // remove FieldTypes again
+ pDDETyp = nullptr; // remove FieldTypes again
if( !pDDETyp && !bDoublePaste )
{
@@ -2251,7 +2251,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
if( bRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
}
return bRet;
}
@@ -2442,7 +2442,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
}
else if( bCheckForImageMap )
{
@@ -2451,7 +2451,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
STREAM_STD_READ );
SvStream* pStream = aMed.GetInStream();
- if( pStream != NULL &&
+ if( pStream != nullptr &&
!pStream->GetError() &&
// mba: no BaseURL for clipboard functionality
aMap.Read( *pStream, IMAP_FORMAT_DETECT, OUString() ) == IMAP_ERR_OK &&
@@ -2547,7 +2547,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
{
bool bRet = SwTransferable::_PasteGrf( rData, rSh, nFormat, nAction,
pPt, nActionFlags, 0, false);
- if (graphicInserted != 0) {
+ if (graphicInserted != nullptr) {
*graphicInserted = bRet;
}
if( !bRet )
@@ -2580,7 +2580,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
//Own FileFormat? --> insert, not for StarWriter/Web
OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link<OUString *, bool>(), false );
const SfxFilter* pFlt = SwPasteSdr::SetAttr == nAction
- ? 0 : SwIoSystem::GetFileFilter(sFileURL);
+ ? nullptr : SwIoSystem::GetFileFilter(sFileURL);
if( pFlt && dynamic_cast< const SwWebDocShell *>( rSh.GetView().GetDocShell() ) == nullptr )
{
// and then pull up the insert-region-dialog by PostUser event
@@ -2662,7 +2662,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
if(pFmView) {
const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData);
SdrObject* pObj = pFmView->CreateXFormsControl(rDesc);
- if(0 != pObj)
+ if(nullptr != pObj)
{
rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
}
@@ -2718,7 +2718,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
if (pFmView && bHaveColumnDescriptor)
{
SdrObject* pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) );
- if ( 0 != pObj)
+ if ( nullptr != pObj)
rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
}
}
@@ -2750,7 +2750,7 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData,
TransferableDataHelper aData( pHlp );
if( SwTransferable::_PasteFileName( aData, rSh, SotClipboardFormatId::SIMPLE_FILE, nAct,
- pPt, 0, bMsg, 0 ))
+ pPt, 0, bMsg, nullptr ))
{
if( bLink )
{
@@ -3036,7 +3036,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
AddFormat( SotClipboardFormatId::BITMAP );
}
m_eBufferType = TRNSFR_GRAPHIC;
- m_pWrtShell->GetGrfNms( &sGrfNm, 0 );
+ m_pWrtShell->GetGrfNms( &sGrfNm, nullptr );
}
else if( nsSelectionType::SEL_OLE == nSelection )
{
@@ -3260,7 +3260,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
{
- rShell.ResetSelect(NULL,false);
+ rShell.ResetSelect(nullptr,false);
}
bool bInWrd = false, bEndWrd = false, bSttWrd = false,
@@ -3605,7 +3605,7 @@ sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) throw(
SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& rData )
{
- SwTransferable* pSwTransferable = NULL;
+ SwTransferable* pSwTransferable = nullptr;
uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
if ( xTunnel.is() )
@@ -3621,7 +3621,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr(rTrans)
- , pDocShell(0)
+ , pDocShell(nullptr)
, nOldTimeOut(0)
, bDelBookmrk(false)
, bInDisconnect(false)
@@ -3658,7 +3658,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
}
if( !sName.isEmpty() &&
- 0 != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
+ nullptr != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
{
// then we create our "server" and connect to it
refObj = pDocShell->DdeCreateLinkSource( sName );
@@ -3818,7 +3818,7 @@ bool SwTrnsfrDdeLink::FindDocShell()
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, checkSfxObjectShell<SwDocShell> );
}
- pDocShell = 0;
+ pDocShell = nullptr;
return false;
}
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 1e0157434940..67f4e3bcda9e 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -235,7 +235,7 @@ ImplPrimitive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE)
const Point& aLineEnd,
const Color& aColorAnchor )
{
- AnchorOverlayObject* pAnchorOverlayObject( 0 );
+ AnchorOverlayObject* pAnchorOverlayObject( nullptr );
if ( rDocView.GetDrawView() )
{
SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0);
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index ea9d50da3d1b..8c03679510b7 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -64,7 +64,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
: SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem )
, mpFormatField(aField)
, mpField( static_cast<SwPostItField*>(aField->GetField()))
- , mpButtonPopup(0)
+ , mpButtonPopup(nullptr)
{
if (SupportsDoubleBuffering())
// When double-buffering, allow parents to paint on our area. That's
@@ -139,12 +139,12 @@ void SwAnnotationWin::UpdateData()
SwPosition aPosition( pTextField->GetTextNode() );
aPosition.nContent = pTextField->GetStart();
rUndoRedo.AppendUndo(
- new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true));
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, nullptr, true));
}
// so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
Mgr().SetLayout();
// #i98686# if we have several views, all notes should update their text
- mpFormatField->Broadcast(SwFormatFieldHint( 0, SwFormatFieldHintWhich::CHANGED));
+ mpFormatField->Broadcast(SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::CHANGED));
DocView().GetDocShell()->SetModified();
}
Engine()->ClearModifyFlag();
@@ -186,7 +186,7 @@ bool SwAnnotationWin::CalcFollow()
pTextField->GetTextNode().GetTextAttrForCharAt(
aPosition.nContent.GetIndex() - 1,
RES_TXTATR_ANNOTATION );
- const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : 0;
+ const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : nullptr;
return pField && (pField->Which()== RES_POSTITFLD);
}
@@ -203,7 +203,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
RES_TXTATR_ANNOTATION );
SwField* pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
- : 0;
+ : nullptr;
while ( pField && ( pField->Which()== RES_POSTITFLD ) )
{
aCount++;
@@ -212,7 +212,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
RES_TXTATR_ANNOTATION );
pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
- : 0;
+ : nullptr;
}
return aCount - 1;
}
@@ -281,7 +281,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SwPosition aPosition( pTextField->GetTextNode() );
aPosition.nContent = pTextField->GetStart();
rUndoRedo.AppendUndo(
- new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true));
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, nullptr, true));
}
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Engine()->ClearModifyFlag();
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 2ea7de480d7d..3735ef9217eb 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -129,7 +129,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm,
Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() );
SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow());
- assert( pWin != NULL) ;
+ assert( pWin != nullptr) ;
assert( pWin->IsHeader() == bHeader );
pWin->SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
@@ -160,7 +160,7 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm )
}
SwPageBreakWin* pWin = dynamic_cast<SwPageBreakWin *>(pControl->GetWindow());
- assert (pWin != NULL);
+ assert (pWin != nullptr);
pWin->UpdatePosition();
if (!pWin->IsVisible())
pControl->ShowAll( true );
@@ -181,7 +181,7 @@ const SwPageFrm* SwFrameMenuButtonBase::GetPageFrame()
void SwFrameMenuButtonBase::dispose()
{
m_pEditWin.clear();
- m_pFrm = NULL;
+ m_pFrm = nullptr;
MenuButton::dispose();
}
@@ -194,7 +194,7 @@ SwFrameControl::SwFrameControl( const VclPtr<vcl::Window> &pWindow )
SwFrameControl::~SwFrameControl()
{
- mpIFace = NULL;
+ mpIFace = nullptr;
mxWindow.disposeAndClear();
}
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index c0ef493cc4f4..2531c5d8ae5b 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -127,8 +127,8 @@ namespace
SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrm *pFrm, bool bHeader ) :
SwFrameMenuButtonBase( pEditWin, pFrm ),
m_bIsHeader( bHeader ),
- m_pPopupMenu( NULL ),
- m_pLine( NULL ),
+ m_pPopupMenu( nullptr ),
+ m_pLine( nullptr ),
m_bIsAppearing( false ),
m_nFadeRate( 100 ),
m_aFadeTimer( )
diff --git a/sw/source/uibase/docvw/OverlayRanges.cxx b/sw/source/uibase/docvw/OverlayRanges.cxx
index 7b44a9b3bdb9..2f0c4c9e083e 100644
--- a/sw/source/uibase/docvw/OverlayRanges.cxx
+++ b/sw/source/uibase/docvw/OverlayRanges.cxx
@@ -109,10 +109,10 @@ namespace sw
const std::vector< basegfx::B2DRange >& rRanges,
const bool bShowSolidBorder )
{
- OverlayRanges* pOverlayRanges = NULL;
+ OverlayRanges* pOverlayRanges = nullptr;
SdrView* pView = rDocView.GetDrawView();
- if ( pView != NULL )
+ if ( pView != nullptr )
{
SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
rtl::Reference<sdr::overlay::OverlayManager> xTargetOverlay = pCandidate->GetOverlayManager();
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index a80ab3614133..08bb106eca2a 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -129,17 +129,17 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
: mpView(pView)
, mpWrtShell(mpView->GetDocShell()->GetWrtShell())
, mpEditWin(&mpView->GetEditWin())
- , mnEventId(0)
+ , mnEventId(nullptr)
, mbWaitingForCalcRects(false)
- , mpActivePostIt(0)
+ , mpActivePostIt(nullptr)
, mbLayout(false)
, mbLayoutHeight(0)
, mbLayouting(false)
, mbReadOnly(mpView->GetDocShell()->IsReadOnly())
, mbDeleteNote(true)
- , mpAnswer(0)
+ , mpAnswer(nullptr)
, mbIsShowAnchor( false )
- , mpFrmSidebarWinContainer( 0 )
+ , mpFrmSidebarWinContainer( nullptr )
{
if(!mpView->GetDrawView() )
mpView->GetWrtShell().MakeDrawView();
@@ -178,7 +178,7 @@ SwPostItMgr::~SwPostItMgr()
mPages.clear();
delete mpFrmSidebarWinContainer;
- mpFrmSidebarWinContainer = 0;
+ mpFrmSidebarWinContainer = nullptr;
}
void SwPostItMgr::CheckForRemovedPostIts()
@@ -192,7 +192,7 @@ void SwPostItMgr::CheckForRemovedPostIts()
SwSidebarItem* p = (*it);
mvPostItFields.remove(*it);
if (GetActiveSidebarWin() == p->pPostIt)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
p->pPostIt.disposeAndClear();
delete p;
bRemoved = true;
@@ -241,7 +241,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
{
SwSidebarItem* p = (*i);
if (GetActiveSidebarWin() == p->pPostIt)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
p->pPostIt.disposeAndClear();
mvPostItFields.erase(i);
delete p;
@@ -441,7 +441,7 @@ bool SwPostItMgr::CalcRects()
// if CalcRects() was forced and an event is still pending: remove it
// it is superfluous and also may cause reentrance problems if triggered while layouting
Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
+ mnEventId = nullptr;
}
bool bChange = false;
@@ -655,7 +655,7 @@ void SwPostItMgr::LayoutPostIts()
if (pPostIt->CalcFollow()) //do we really have another note in front of this one
static_cast<sw::annotation::SwAnnotationWin*>(pPostIt)->InitAnswer(mpAnswer);
delete mpAnswer;
- mpAnswer = 0;
+ mpAnswer = nullptr;
}
}
@@ -791,7 +791,7 @@ void SwPostItMgr::LayoutPostIts()
(*i)->pPostIt->HideNote();
if ((*i)->pPostIt->HasChildPathFocus())
{
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
(*i)->pPostIt->GrabFocusToDocument();
}
}
@@ -1346,7 +1346,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor)
mpWrtShell->StartAllAction();
if (HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor() == rAuthor))
{
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
}
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_DELETE_AUTHOR_NOTES) + rAuthor);
@@ -1370,7 +1370,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor)
void SwPostItMgr::Delete()
{
mpWrtShell->StartAllAction();
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_DELETE_ALL_NOTES) );
mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
@@ -1638,7 +1638,7 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pField,bool bCursor)
if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
{
pOldPostIt->SetViewState(ViewState::NORMAL);
- mShadowState.mpShadowField = 0;
+ mShadowState.mpShadowField = nullptr;
}
}
}
@@ -1754,7 +1754,7 @@ void SwPostItMgr::CorrectPositions()
return;
// find first valid note
- SwSidebarWin *pFirstPostIt = 0;
+ SwSidebarWin *pFirstPostIt = nullptr;
for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
{
pFirstPostIt = (*i)->pPostIt;
@@ -1886,13 +1886,13 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p)
if (pActive)
{
pActive->DeactivatePostIt();
- mShadowState.mpShadowField = 0;
+ mShadowState.mpShadowField = nullptr;
}
if (mpActivePostIt)
{
mpActivePostIt->GotoPos();
mpView->SetAnnotationMode(true);
- mpView->AttrChangedNotify(0);
+ mpView->AttrChangedNotify(nullptr);
mpView->SetAnnotationMode(false);
mpActivePostIt->ActivatePostIt();
}
@@ -1901,7 +1901,7 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p)
IMPL_LINK_NOARG_TYPED( SwPostItMgr, CalcHdl, void*, void )
{
- mnEventId = 0;
+ mnEventId = nullptr;
if ( mbLayouting )
{
OSL_FAIL("Reentrance problem in Layout Manager!");
@@ -1981,7 +1981,7 @@ sal_uInt16 SwPostItMgr::Replace(SvxSearchItem* pItem)
SwSidebarWin* pWin = GetActiveSidebarWin();
sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( *pItem );
if (!aResult)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
return aResult;
}
@@ -1993,7 +1993,7 @@ sal_uInt16 SwPostItMgr::FinishSearchReplace(const css::util::SearchOptions& rSea
aItem.SetBackward(!bSrchForward);
sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem );
if (!aResult)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
return aResult;
}
@@ -2056,7 +2056,7 @@ bool SwPostItMgr::HasActiveSidebarWin() const
bool SwPostItMgr::HasActiveAnnotationWin() const
{
return HasActiveSidebarWin() &&
- dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt.get()) != 0;
+ dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt.get()) != nullptr;
}
void SwPostItMgr::GrabFocusOnActiveSidebarWin()
@@ -2103,7 +2103,7 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm,
const SwFormatField& rFormatField,
SwSidebarWin& rSidebarWin )
{
- if ( mpFrmSidebarWinContainer == 0 )
+ if ( mpFrmSidebarWinContainer == nullptr )
{
mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer();
}
@@ -2112,20 +2112,20 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm,
if ( bInserted &&
mpWrtShell->GetAccessibleMap() )
{
- mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( 0, 0, &rSidebarWin, SwRect() );
+ mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( nullptr, nullptr, &rSidebarWin, SwRect() );
}
}
void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
SwSidebarWin& rSidebarWin )
{
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin );
if ( bRemoved &&
mpWrtShell->GetAccessibleMap() )
{
- mpWrtShell->GetAccessibleMap()->Dispose( 0, 0, &rSidebarWin );
+ mpWrtShell->GetAccessibleMap()->Dispose( nullptr, nullptr, &rSidebarWin );
}
}
}
@@ -2134,7 +2134,7 @@ bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm )
{
bool bRet( false );
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
bRet = !mpFrmSidebarWinContainer->empty( rFrm );
}
@@ -2145,9 +2145,9 @@ bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm )
vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
const sal_Int32 nIndex )
{
- vcl::Window* pSidebarWin( 0 );
+ vcl::Window* pSidebarWin( nullptr );
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex );
}
@@ -2158,7 +2158,7 @@ vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm,
std::vector< vcl::Window* >* pChildren )
{
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
mpFrmSidebarWinContainer->getAll( rFrm, pChildren );
}
diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
index 8ac92cb2d2a7..c4700f9baa67 100644
--- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx
+++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
@@ -167,7 +167,7 @@ ImplPrimitive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE)
/* static */ ShadowOverlayObject* ShadowOverlayObject::CreateShadowOverlayObject( SwView& rDocView )
{
- ShadowOverlayObject* pShadowOverlayObject( 0 );
+ ShadowOverlayObject* pShadowOverlayObject( nullptr );
if ( rDocView.GetDrawView() )
{
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index d864b40114c4..4ab884bbad47 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -382,7 +382,7 @@ void SidebarTextControl::Command( const CommandEvent& rCEvt )
}
else
{
- HandleScrollCommand( rCEvt, 0 , mrSidebarWin.Scrollbar());
+ HandleScrollCommand( rCEvt, nullptr , mrSidebarWin.Scrollbar());
}
}
else
diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
index 24bd2cad4ea0..208c880cf1c2 100644
--- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
@@ -161,7 +161,7 @@ class SidebarTextControlAccessibleContext : public VCLXAccessibleComponent
SidebarTextControlAccessibleContext::SidebarTextControlAccessibleContext( SidebarTextControl& rSidebarTextControl )
: VCLXAccessibleComponent( rSidebarTextControl.GetWindowPeer() )
, mrSidebarTextControl( rSidebarTextControl )
- , mpAccessibleTextHelper( 0 )
+ , mpAccessibleTextHelper( nullptr )
, maMutex()
{
mpAccessibleTextHelper = new ::accessibility::AccessibleTextHelper( o3tl::make_unique<SidebarTextEditSource>(mrSidebarTextControl) );
@@ -176,7 +176,7 @@ SidebarTextControlAccessibleContext::~SidebarTextControlAccessibleContext()
void SidebarTextControlAccessibleContext::defunc()
{
delete mpAccessibleTextHelper;
- mpAccessibleTextHelper = 0;
+ mpAccessibleTextHelper = nullptr;
}
sal_Int32 SAL_CALL SidebarTextControlAccessibleContext::getAccessibleChildCount()
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 21f5a6e94d8a..0682f0ba392f 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -99,14 +99,14 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin,
, mrMgr(aMgr)
, mrView(rEditWin.GetView())
, nFlags(aBits)
- , mnEventId(0)
- , mpOutlinerView(0)
- , mpOutliner(0)
- , mpSidebarTextControl(0)
- , mpVScrollbar(0)
- , mpMetadataAuthor(0)
- , mpMetadataDate(0)
- , mpMenuButton(0)
+ , mnEventId(nullptr)
+ , mpOutlinerView(nullptr)
+ , mpOutliner(nullptr)
+ , mpSidebarTextControl(nullptr)
+ , mpVScrollbar(nullptr)
+ , mpMetadataAuthor(nullptr)
+ , mpMetadataDate(nullptr)
+ , mpMenuButton(nullptr)
, mpAnchor(nullptr)
, mpShadow(nullptr)
, mpTextRangeOverlay(nullptr)
@@ -155,7 +155,7 @@ void SwSidebarWin::dispose()
{
if ( mpOutlinerView )
{
- mpOutlinerView->SetWindow( 0 );
+ mpOutlinerView->SetWindow( nullptr );
}
}
mpSidebarTextControl.disposeAndClear();
@@ -163,13 +163,13 @@ void SwSidebarWin::dispose()
if ( mpOutlinerView )
{
delete mpOutlinerView;
- mpOutlinerView = 0;
+ mpOutlinerView = nullptr;
}
if (mpOutliner)
{
delete mpOutliner;
- mpOutliner = 0;
+ mpOutliner = nullptr;
}
if (mpMetadataAuthor)
@@ -1073,7 +1073,7 @@ void SwSidebarWin::DeactivatePostIt()
if ( !IsProtected() && Engine()->GetEditEngine().GetText().isEmpty() )
{
- mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0, true );
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), nullptr, true );
}
}
@@ -1109,7 +1109,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
mrMgr.RegisterAnswer(pPara);
}
if (mrMgr.HasActiveSidebarWin())
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
SwitchToFieldPos();
mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
break;
@@ -1117,13 +1117,13 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
case FN_DELETE_COMMENT:
//Delete(); // do not kill the parent of our open popup menu
- mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0, true );
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), nullptr, true );
break;
case FN_FORMAT_ALL_NOTES:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_ALL_NOTES:
// not possible as slot as this would require that "this" is the active postit
- mrView.GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, 0, SfxCallMode::ASYNCHRON );
break;
case FN_DELETE_NOTE_AUTHOR:
case FN_HIDE_NOTE_AUTHOR:
@@ -1132,7 +1132,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
SfxStringItem aItem( nSlot, GetAuthor() );
const SfxPoolItem* aItems[2];
aItems[0] = &aItem;
- aItems[1] = 0;
+ aItems[1] = nullptr;
mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SfxCallMode::ASYNCHRON );
}
break;
@@ -1206,12 +1206,12 @@ void SwSidebarWin::Delete()
{
if ( mrMgr.GetActiveSidebarWin() == this)
{
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
// if the note is empty, the previous line will send a delete event, but we are already there
if (mnEventId)
{
Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
+ mnEventId = nullptr;
}
}
}
@@ -1229,7 +1229,7 @@ IMPL_LINK_NOARG_TYPED(SwSidebarWin, ModifyHdl, LinkParamNone*, void)
IMPL_LINK_NOARG_TYPED(SwSidebarWin, DeleteHdl, void*, void)
{
- mnEventId = 0;
+ mnEventId = nullptr;
Delete();
}
@@ -1336,7 +1336,7 @@ void SwSidebarWin::SetViewState(ViewState bViewState)
SwSidebarWin* pTopWinSelf = GetTopReplyNote();
SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin()
? mrMgr.GetActiveSidebarWin()->GetTopReplyNote()
- : 0;
+ : nullptr;
// #i111964#
if ( pTopWinSelf && ( pTopWinSelf != pTopWinActive ) &&
pTopWinSelf->Anchor() )
@@ -1369,12 +1369,12 @@ void SwSidebarWin::SetViewState(ViewState bViewState)
SwSidebarWin* SwSidebarWin::GetTopReplyNote()
{
- SwSidebarWin* pTopNote = 0;
- SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : 0;
+ SwSidebarWin* pTopNote = nullptr;
+ SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : nullptr;
while (pSidebarWin)
{
pTopNote = pSidebarWin;
- pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : 0;
+ pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : nullptr;
}
return pTopNote;
}
@@ -1382,7 +1382,7 @@ SwSidebarWin* SwSidebarWin::GetTopReplyNote()
void SwSidebarWin::SwitchToFieldPos()
{
if ( mrMgr.GetActiveSidebarWin() == this )
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
GotoPos();
sal_uInt32 aCount = MoveCaret();
if (aCount)
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index 0070daefbee5..0ab6174779e4 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -82,7 +82,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
if ( !m_pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
{
bool bStart = false, bDelSelect = false;
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
Point aDocPos( PixelToLogic( rPosPixel ) );
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, true, true))
//We are not selecting and aren't at a selection
@@ -174,8 +174,8 @@ void SwEditWin::CleanupDropUserMarker()
if ( m_pUserMarker )
{
delete m_pUserMarker;
- m_pUserMarker = 0;
- m_pUserMarkerObj = 0;
+ m_pUserMarker = nullptr;
+ m_pUserMarkerObj = nullptr;
}
}
@@ -195,11 +195,11 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
//A Drop to an open OutlinerView doesn't concern us (also see QueryDrop)
SwWrtShell &rSh = m_rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rEvt.maPosPixel ));
- SdrObject *pObj = 0;
+ SdrObject *pObj = nullptr;
OutlinerView* pOLV;
rSh.GetObjCntType( aDocPt, pObj );
- if( pObj && 0 != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() ))
+ if( pObj && nullptr != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() ))
{
Rectangle aRect( pOLV->GetOutputArea() );
aRect.Union( pObj->GetLogicRect() );
@@ -250,7 +250,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject *
|| rSh.DocPtInsideInputField( aDocPt ) )
return SotExchangeDest::NONE;
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
//Drop to OutlinerView (TextEdit in Drawing) should decide it on its own!
@@ -278,7 +278,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject *
case OBJCNT_GRF:
{
bool bLink,
- bIMap = 0 != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap();
OUString aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
if ( bLink && bIMap )
@@ -368,7 +368,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
m_bOldIdleSet = false;
}
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
m_nDropDestination = GetDropDestination( aPixPt, &pObj );
if( !bool(m_nDropDestination) )
return DND_ACTION_NONE;
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 83e022479370..502620f5c1c9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -179,7 +179,7 @@ bool g_bFlushCharBuffer = false;
bool g_bDDINetAttr = false;
SdrHdlKind g_eSdrMoveHdl = HDL_USER;
-QuickHelpData* SwEditWin::m_pQuickHlpData = 0;
+QuickHelpData* SwEditWin::m_pQuickHlpData = nullptr;
long SwEditWin::m_nDDStartPosY = 0;
long SwEditWin::m_nDDStartPosX = 0;
@@ -339,7 +339,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
if ( rSh.IsOverReadOnlyPos( rLPt ) )
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
eStyle = PointerStyle::NotAllowed;
}
@@ -347,7 +347,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwRect aRect;
SwRect* pRect = &aRect;
- const SwFrameFormat* pFormat = 0;
+ const SwFrameFormat* pFormat = nullptr;
bool bFrameIsValidTarget = false;
if( m_pApplyTempl->m_pFormatClipboard )
@@ -356,7 +356,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
bFrameIsValidTarget = ( m_pApplyTempl->eType == SFX_STYLE_FAMILY_FRAME );
if( bFrameIsValidTarget &&
- 0 !=(pFormat = rSh.GetFormatFromObj( rLPt, &pRect )) &&
+ nullptr !=(pFormat = rSh.GetFormatFromObj( rLPt, &pRect )) &&
dynamic_cast<const SwFlyFrameFormat*>( pFormat) )
{
//turn on highlight for frame
@@ -370,7 +370,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
else
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
rSh.SwCrsrShell::SetVisCrsr( rLPt );
@@ -402,7 +402,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
else
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
SetPointer( eStyle );
@@ -431,7 +431,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
PointerStyle eStyle = PointerStyle::Text;
if ( !pSdrView )
bCntAtPos = true;
- else if ( (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
+ else if ( (bHitHandle = pSdrView->PickHandle( rLPt ) != nullptr) )
{
m_aActHitType = SDRHIT_OBJECT;
bPrefSdrPointer = true;
@@ -563,10 +563,10 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
// Is edit inline input field
if (SwContentAtPos::SW_FIELD == aSwContentAtPos.eContentAtPos)
{
- if ( aSwContentAtPos.pFndTextAttr != NULL
+ if ( aSwContentAtPos.pFndTextAttr != nullptr
&& aSwContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD)
{
- const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL;
+ const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr;
if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField()))
eStyle = PointerStyle::RefHand;
}
@@ -675,7 +675,7 @@ void SwEditWin::LeaveArea(const Point &rPos)
JustifyAreaTimer();
if( !m_aTimer.IsActive() )
m_aTimer.Start();
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
}
inline void SwEditWin::EnterArea()
@@ -717,7 +717,7 @@ void SwEditWin::StopInsFrm()
if (m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
}
m_rView.LeaveDrawCreate(); // leave construction mode
m_bInsFrm = false;
@@ -1253,7 +1253,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
const SdrHdlList& rHdlList = pSdrView->GetHdlList();
SdrHdl* pHdl = rHdlList.GetFocusHdl();
rSh.StartAllAction();
- if(0L == pHdl)
+ if(nullptr == pHdl)
{
// now move the selected draw objects
// if the object's position is not protected
@@ -1293,7 +1293,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
const SdrDragStat& rDragStat = pSdrView->GetDragStat();
// start dragging
- pSdrView->BegDragObj(aStartPoint, 0, pHdl, 0);
+ pSdrView->BegDragObj(aStartPoint, nullptr, pHdl, 0);
if(pSdrView->IsDragObj())
{
@@ -1342,7 +1342,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
rSh.IsHeaderFooterEdit( ) )
{
- bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(0,false));
+ bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false));
if ( bHeader )
rSh.SttPg();
else
@@ -1356,7 +1356,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// running on a document, no order is being taken
return;
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
m_aKeyInputFlushTimer.Stop();
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() &&
@@ -1518,8 +1518,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
return;
}
- SvxAutoCorrCfg* pACfg = 0;
- SvxAutoCorrect* pACorr = 0;
+ SvxAutoCorrCfg* pACfg = nullptr;
+ SvxAutoCorrect* pACorr = nullptr;
uno::Reference< frame::XDispatchRecorder > xRecorder =
m_rView.GetViewFrame()->GetBindings().GetRecorder();
@@ -1931,7 +1931,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() );
if ( rSh.IsSttPara()
&& !rSh.HasSelection()
- && ( rSh.GetNumRuleAtCurrCrsrPos() == NULL
+ && ( rSh.GetNumRuleAtCurrCrsrPos() == nullptr
|| ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
{
bDone = rSh.TryRemoveIndent();
@@ -1986,7 +1986,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
&& !rSh.HasSelection() )
{
const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCrsrPos() );
- if ( pCurrNumRule != NULL
+ if ( pCurrNumRule != nullptr
&& pCurrNumRule != rSh.GetOutlineNumRule() )
{
bCallNumOrNoNum = true;
@@ -2388,7 +2388,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
const bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- const bool bRunNext = pACorr != NULL && pACorr->HasRunNext();
+ const bool bRunNext = pACorr != nullptr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFormatByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -2532,7 +2532,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -2745,7 +2745,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos,
void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwWrtShell &rSh = m_rView.GetWrtShell();
- const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL;
+ const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr;
// We have to check if a context menu is shown and we have an UI
// active inplace client. In that case we have to ignore the mouse
@@ -2764,7 +2764,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (m_rView.GetPostItMgr()->IsHit(rMEvt.GetPosPixel()))
return;
- m_rView.GetPostItMgr()->SetActiveSidebarWin(0);
+ m_rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
GrabFocus();
@@ -2777,8 +2777,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
_rMEvt.GetMode(), _rMEvt.GetButtons() );
}
- m_bWasShdwCrsr = 0 != m_pShadCrsr;
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ m_bWasShdwCrsr = nullptr != m_pShadCrsr;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -2831,8 +2831,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
{
SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
- const bool bWasInHeader = aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != NULL;
- const bool bWasInFooter = aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != NULL;
+ const bool bWasInHeader = aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
+ const bool bWasInFooter = aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
// Is the cursor in a part like similar to the one we clicked on? For example,
// if the cursor is in a header and we click on an empty header... don't change anything to
@@ -2994,7 +2994,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( RulerMarginDrag( rMEvt,
SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) )
{
- m_rView.SetNumRuleNodeFromDoc( NULL );
+ m_rView.SetNumRuleNodeFromDoc( nullptr );
m_rView.InvalidateRulerPos();
rBind.Update();
bCallBase = false;
@@ -3003,7 +3003,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
// Make sure the pointer is set to 0, otherwise it may point to
// nowhere after deleting the corresponding text node.
- m_rView.SetNumRuleNodeFromDoc( NULL );
+ m_rView.SetNumRuleNodeFromDoc( nullptr );
return;
}
}
@@ -3036,7 +3036,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !bIsDocReadOnly &&
!m_pAnchorMarker &&
pSdrView &&
- 0 != ( pHdl = pSdrView->PickHandle(aDocPos) ) &&
+ nullptr != ( pHdl = pSdrView->PickHandle(aDocPos) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
@@ -3168,7 +3168,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -3194,7 +3194,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
m_rView.NoRotate();
SdrHdl *pHdl;
- if( !bIsDocReadOnly && !m_pAnchorMarker && 0 !=
+ if( !bIsDocReadOnly && !m_pAnchorMarker && nullptr !=
( pHdl = pSdrView->PickHandle(aDocPos) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
@@ -3242,7 +3242,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -3274,7 +3274,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.isTiledRendering())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_GRAFIC_DLG, 0, 0,
+ FN_FORMAT_GRAFIC_DLG, nullptr, 0,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@@ -3293,7 +3293,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.isTiledRendering())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_FRAME_DLG, 0, 0,
+ FN_FORMAT_FRAME_DLG, nullptr, 0,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@@ -3316,7 +3316,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bool bFootnote = false;
if( !bIsDocReadOnly &&
- ( 0 != ( pField = rSh.GetCurField() ) ||
+ ( nullptr != ( pField = rSh.GetCurField() ) ||
( bFootnote = rSh.GetCurFootnote() ) ) )
{
RstMBDownFlags();
@@ -3514,7 +3514,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.SelectObj(aDocPos, SW_ADD_SELECT);
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if (rMarkList.GetMark(0) == NULL)
+ if (rMarkList.GetMark(0) == nullptr)
{
rSh.LeaveSelFrmMode();
m_rView.AttrChangedNotify(&rSh);
@@ -3611,7 +3611,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// Are we clicking on a field?
if (rSh.GetContentAtPos(aDocPos, aFieldAtPos))
{
- bool bEditableField = (aFieldAtPos.pFndTextAttr != NULL
+ bool bEditableField = (aFieldAtPos.pFndTextAttr != nullptr
&& aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD);
if (!bEditableField)
@@ -3640,7 +3640,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false;
if( !bOverSelect )
- bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
+ bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
@@ -3686,7 +3686,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// Are we clicking on a field?
if (g_bValidCrsrPos
&& rSh.GetContentAtPos(aDocPos, aFieldAtPos)
- && aFieldAtPos.pFndTextAttr != NULL
+ && aFieldAtPos.pFndTextAttr != nullptr
&& aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD
&& (!pCrsrField || pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField()))
{
@@ -3726,7 +3726,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
return ;
if( m_pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly();
@@ -3758,7 +3758,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const bool bInsWin = rSh.VisArea().IsInside( aDocPt ) || rSh.isTiledRendering();
if( m_pShadCrsr && !bInsWin )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
if( bInsWin && m_pRowColumnSelectionStart )
{
@@ -3901,8 +3901,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const Point aOld = m_pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) );
Point aNew = rSh.FindAnchorPos( aDocPt );
SdrHdl* pHdl;
- if( pSdrView && (0!=( pHdl = pSdrView->PickHandle( aOld ) )||
- 0 !=(pHdl = pSdrView->PickHandle( m_pAnchorMarker->GetHdlPos()) ) ) &&
+ if( pSdrView && (nullptr!=( pHdl = pSdrView->PickHandle( aOld ) )||
+ nullptr !=(pHdl = pSdrView->PickHandle( m_pAnchorMarker->GetHdlPos()) ) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
@@ -3916,7 +3916,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
else
{
delete m_pAnchorMarker;
- m_pAnchorMarker = NULL;
+ m_pAnchorMarker = nullptr;
}
}
if ( m_bInsDraw )
@@ -3976,8 +3976,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
- if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
- 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
+ if( nullptr != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
+ nullptr != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
Get( nEvent )) &&
// or notify only e.g. every 20 Twip?
m_aRszMvHdlPt != aDocPt )
@@ -4114,10 +4114,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
m_rView.GetPostItMgr()->SetShadowState(reinterpret_cast<const SwPostItField*>(pField),false);
}
else
- m_rView.GetPostItMgr()->SetShadowState(0,false);
+ m_rView.GetPostItMgr()->SetShadowState(nullptr,false);
}
else
- m_rView.GetPostItMgr()->SetShadowState(0,false);
+ m_rView.GetPostItMgr()->SetShadowState(nullptr,false);
}
// no break;
case KEY_SHIFT:
@@ -4129,8 +4129,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
UpdatePointer( aDocPt, rMEvt.GetModifier() );
- const SwFrameFormat* pFormat = 0;
- const SwFormatINetFormat* pINet = 0;
+ const SwFrameFormat* pFormat = nullptr;
+ const SwFormatINetFormat* pINet = nullptr;
SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR );
if( rSh.GetContentAtPos( aDocPt, aContentAtPos ) )
pINet = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr);
@@ -4138,7 +4138,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const void* pTmp = pINet;
if( pINet ||
- 0 != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt )))
+ nullptr != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt )))
{
bTstShdwCrsr = false;
if( pTmp == pINet )
@@ -4206,7 +4206,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
if( bDelShadCrsr && m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
m_bWasShdwCrsr = false;
}
@@ -4220,7 +4220,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
bool bCallShadowCrsr = m_bWasShdwCrsr;
m_bWasShdwCrsr = false;
if( m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
if( m_pRowColumnSelectionStart )
DELETEZ( m_pRowColumnSelectionStart );
@@ -4230,7 +4230,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
// preventively reset
m_rView.SetTabColFromDoc( false );
- m_rView.SetNumRuleNodeFromDoc(NULL);
+ m_rView.SetNumRuleNodeFromDoc(nullptr);
SwWrtShell &rSh = m_rView.GetWrtShell();
SET_CURR_SHELL( &rSh );
@@ -4320,7 +4320,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (!m_rView.IsDrawMode())
{
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
rBind.Invalidate( SID_TABLE_CELL );
@@ -4417,8 +4417,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
- if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
- 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
+ if( nullptr != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
+ nullptr != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
Get( nEvent )) )
{
const Point aSttPt( PixelToLogic( m_aStartPos ) );
@@ -4449,7 +4449,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
ReleaseMouse();
- rSh.ExecMacro( *pMacro, 0, &xArgs );
+ rSh.ExecMacro( *pMacro, nullptr, &xArgs );
CaptureMouse();
}
@@ -4549,7 +4549,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
bAddMode = true;
rSh.EnterAddMode();
}
- if ( aContentAtPos.pFndTextAttr != NULL
+ if ( aContentAtPos.pFndTextAttr != nullptr
&& aContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD )
{
if (!rSh.IsInSelect())
@@ -4586,8 +4586,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if ( SwContentAtPos::SW_FORMCTRL == aContentAtPos.eContentAtPos )
{
- OSL_ENSURE( aContentAtPos.aFnd.pFieldmark != NULL, "where is my field ptr???");
- if ( aContentAtPos.aFnd.pFieldmark != NULL)
+ OSL_ENSURE( aContentAtPos.aFnd.pFieldmark != nullptr, "where is my field ptr???");
+ if ( aContentAtPos.aFnd.pFieldmark != nullptr)
{
IFieldmark *fieldBM = const_cast< IFieldmark* > ( aContentAtPos.aFnd.pFieldmark );
if ( fieldBM->GetFieldname( ) == ODF_FORMCHECKBOX )
@@ -4654,7 +4654,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.VisArea().IsInside( aDocPt ))
{
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (rSh.GetLastUndoInfo(0, & nLastUndoId))
+ if (rSh.GetLastUndoInfo(nullptr, & nLastUndoId))
{
if (UNDO_INS_FROM_SHADOWCRSR == nLastUndoId)
{
@@ -4692,7 +4692,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
//get some parameters
SwWrtShell& rWrtShell = m_rView.GetWrtShell();
- SfxStyleSheetBasePool* pPool=0;
+ SfxStyleSheetBasePool* pPool=nullptr;
bool bNoCharacterFormats = false;
bool bNoParagraphFormats = true;
{
@@ -4933,12 +4933,12 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
DragSourceHelper( this ),
m_eBufferLanguage(LANGUAGE_DONTKNOW),
- m_pApplyTempl(0),
- m_pAnchorMarker( 0 ),
- m_pUserMarker( 0 ),
- m_pUserMarkerObj( 0 ),
- m_pShadCrsr( 0 ),
- m_pRowColumnSelectionStart( 0 ),
+ m_pApplyTempl(nullptr),
+ m_pAnchorMarker( nullptr ),
+ m_pUserMarker( nullptr ),
+ m_pUserMarkerObj( nullptr ),
+ m_pShadCrsr( nullptr ),
+ m_pRowColumnSelectionStart( nullptr ),
m_rView( rMyView ),
@@ -5016,24 +5016,24 @@ void SwEditWin::dispose()
m_aKeyInputTimer.Stop();
delete m_pShadCrsr;
- m_pShadCrsr = NULL;
+ m_pShadCrsr = nullptr;
delete m_pRowColumnSelectionStart;
- m_pRowColumnSelectionStart = NULL;
+ m_pRowColumnSelectionStart = nullptr;
if( m_pQuickHlpData->m_bIsDisplayed && m_rView.GetWrtShellPtr() )
m_pQuickHlpData->Stop( m_rView.GetWrtShell() );
g_bExecuteDrag = false;
delete m_pApplyTempl;
- m_pApplyTempl = NULL;
+ m_pApplyTempl = nullptr;
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
delete m_pUserMarker;
- m_pUserMarker = NULL;
+ m_pUserMarker = nullptr;
delete m_pAnchorMarker;
- m_pAnchorMarker = NULL;
+ m_pAnchorMarker = nullptr;
m_pFrameControlsManager->dispose();
delete m_pFrameControlsManager;
@@ -5052,7 +5052,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
if (m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
}
m_rView.NoRotate();
@@ -5209,7 +5209,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
- Menu* pMenu = 0;
+ Menu* pMenu = nullptr;
OUString sMenuName("private:resource/ReadonlyContextMenu");
if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) )
{
@@ -5240,7 +5240,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case CommandEventId::StartAutoScroll:
case CommandEventId::AutoScroll:
if( m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
bCallBase = !m_rView.HandleWheelCommands( rCEvt );
break;
@@ -5564,7 +5564,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
@@ -5658,7 +5658,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -5716,7 +5716,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -5738,7 +5738,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false;
if( !bOverSelect )
- bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
+ bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
@@ -5819,7 +5819,7 @@ void SwEditWin::SetChainMode( bool bOn )
if ( m_pUserMarker )
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
m_bChainMode = bOn;
@@ -5915,7 +5915,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
void QuickHelpData::Stop( SwWrtShell& rSh )
{
if( !m_bIsTip )
- rSh.DeleteExtTextInput( 0, false );
+ rSh.DeleteExtTextInput( nullptr, false );
else if( nTipId )
Help::HideTip( nTipId );
ClearContent();
@@ -6145,7 +6145,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r
Point aPt( rDocPos );
SwWrtShell &rSh = m_rView.GetWrtShell();
SwPaM aPam( *rSh.GetCurrentShellCursor().GetPoint() );
- rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, NULL, true );
+ rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, nullptr, true );
const SwStartNode* pStartFly = aPam.GetPoint()->nNode.GetNode().FindFlyStartNode();
if ( pStartFly )
@@ -6157,8 +6157,8 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r
const SwPosition* pAnchor = pFlyFormat->GetAnchor( ).GetContentAnchor( );
if ( pAnchor )
{
- bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != NULL;
- bool bInFooter = pAnchor->nNode.GetNode( ).FindFooterStartNode( ) != NULL;
+ bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != nullptr;
+ bool bInFooter = pAnchor->nNode.GetNode( ).FindFooterStartNode( ) != nullptr;
bRet = bInHeader || bInFooter;
if ( bInHeader )
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index c527e1244eea..c7d7be51932c 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -121,7 +121,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( pSdrView )
{
SdrPageView* pPV = pSdrView->GetSdrPageView();
- SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : 0;
+ SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
}
}
@@ -452,7 +452,7 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
// fully resides inside?
if( rRect.IsInside( aRect ) )
// dann aufheben
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
else if( rRect.IsOver( aRect ))
{
// resides somewhat above, then everything is clipped outside
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
index dd4193bec003..43f1fd332841 100644
--- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
@@ -155,7 +155,7 @@ bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm )
SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm,
const sal_Int32 nIndex )
{
- SwSidebarWin* pRet( 0 );
+ SwSidebarWin* pRet( nullptr );
FrmKey aFrmKey( &rFrm );
FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index 8cac9180b002..f7abc6a90d2b 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -59,7 +59,7 @@ SwReadOnlyPopup::~SwReadOnlyPopup()
void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
- SfxPoolItem *_pItem = 0;
+ SfxPoolItem *_pItem = nullptr;
SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem );
if (eState >= SfxItemState::DEFAULT)
{
@@ -85,8 +85,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
rView ( rV ),
aBrushItem(RES_BACKGROUND),
rDocPos( rDPos ),
- pImageMap( 0 ),
- pTargetURL( 0 )
+ pImageMap( nullptr ),
+ pTargetURL( nullptr )
{
bGrfToGalleryAsLnk = SW_MOD()->GetModuleConfig()->IsGrfToGalleryAsLnk();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -105,7 +105,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
bool bLink = false;
const Graphic *pGrf;
- if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
+ if ( nullptr == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
{
EnableItem( MN_READONLY_SAVEGRAPHIC, false );
EnableItem( MN_READONLY_COPYGRAPHIC, false );
@@ -182,7 +182,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
else
EnableItem( MN_READONLY_LOADGRAPHIC, false );
- bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
+ bool bReloadFrame = nullptr != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
EnableItem( MN_READONLY_RELOAD_FRAME,
bReloadFrame );
EnableItem( MN_READONLY_RELOAD, !bReloadFrame);
@@ -198,14 +198,14 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
Check( MN_READONLY_OPENURL, SID_OPENDOC, rDis );
Check( MN_READONLY_OPENURLNEW, SID_OPENDOC, rDis );
- SfxPoolItem* pState = NULL;
+ SfxPoolItem* pState = nullptr;
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SfxItemState::DEFAULT)
EnableItem( MN_READONLY_COPY, false );
delete pState;
- pState = NULL;
+ pState = nullptr;
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (
@@ -266,7 +266,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
return;
}
- TransferDataContainer* pClipCntnr = 0;
+ TransferDataContainer* pClipCntnr = nullptr;
sal_uInt16 nExecId = USHRT_MAX;
sal_uInt16 nFilter = USHRT_MAX;
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 6ad94fe373b9..041acaf960cb 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -239,11 +239,11 @@ private:
SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ) :
Window( pParent, WB_BORDER|WB_CLIPCHILDREN ),
- pTextEngine(0),
+ pTextEngine(nullptr),
- pOutWin(0),
- pHScrollbar(0),
- pVScrollbar(0),
+ pOutWin(nullptr),
+ pHScrollbar(nullptr),
+ pVScrollbar(nullptr),
pSrcView(pParentView),
@@ -289,7 +289,7 @@ void SwSrcEditWindow::dispose()
}
aSyntaxIdle.Stop();
if ( pOutWin )
- pOutWin->SetTextView( NULL );
+ pOutWin->SetTextView( nullptr );
if ( pTextEngine )
{
@@ -297,9 +297,9 @@ void SwSrcEditWindow::dispose()
pTextEngine->RemoveView( pTextView );
delete pTextView;
- pTextView = NULL;
+ pTextView = nullptr;
delete pTextEngine;
- pTextEngine = NULL;
+ pTextEngine = nullptr;
}
pHScrollbar.disposeAndClear();
pVScrollbar.disposeAndClear();
@@ -596,7 +596,7 @@ IMPL_LINK_TYPED(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll, void)
IMPL_LINK_TYPED( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle, void )
{
tools::Time aSyntaxCheckStart( tools::Time::SYSTEM );
- SAL_WARN_IF(pTextView == 0, "sw", "No View yet, but syntax highlighting?!");
+ SAL_WARN_IF(pTextView == nullptr, "sw", "No View yet, but syntax highlighting?!");
bHighlighting = true;
sal_uInt16 nCount = 0;
@@ -661,7 +661,7 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
ImpDoHighlight( aSource, nPara );
TextView* pTmp = pTextEngine->GetActiveView();
pTmp->SetAutoScroll(false);
- pTextEngine->SetActiveView(0);
+ pTextEngine->SetActiveView(nullptr);
pTextEngine->SetUpdateMode( true );
pTextEngine->SetActiveView(pTmp);
pTmp->SetAutoScroll(true);
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index fa6ecca7d6d8..cd0c9a0a9d18 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -207,18 +207,18 @@ static const SwFieldPack aSwFields[] =
static SwWrtShell* lcl_GetShell()
{
SwView* pView;
- if ( 0 != (pView = ::GetActiveView()) )
+ if ( nullptr != (pView = ::GetActiveView()) )
return pView->GetWrtShellPtr();
OSL_FAIL("no current shell found!");
- return 0;
+ return nullptr;
}
inline sal_uInt16 GetPackCount() { return sizeof(aSwFields) / sizeof(SwFieldPack); }
// FieldManager controls inserting and updating of fields
SwFieldMgr::SwFieldMgr(SwWrtShell* pSh ) :
- pModule(0),
- pMacroItem(0),
+ pModule(nullptr),
+ pMacroItem(nullptr),
pWrtShell(pSh),
bEvalExp(true)
{
@@ -244,7 +244,7 @@ bool SwFieldMgr::CanInsertRefMark( const OUString& rStr )
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
--nCnt;
- bRet = 2 > nCnt && 0 == pSh->GetRefMark( rStr );
+ bRet = 2 > nCnt && nullptr == pSh->GetRefMark( rStr );
}
return bRet;
}
@@ -269,14 +269,14 @@ SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, size_t nField) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
- return pSh ? pSh->GetFieldType(nField, nResId) : 0;
+ return pSh ? pSh->GetFieldType(nField, nResId) : nullptr;
}
SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, const OUString& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
- return pSh ? pSh->GetFieldType(nResId, rName) : 0;
+ return pSh ? pSh->GetFieldType(nResId, rName) : nullptr;
}
// determine current field
@@ -286,7 +286,7 @@ SwField* SwFieldMgr::GetCurField()
if ( pSh )
pCurField = pSh->GetCurField( true );
else
- pCurField = NULL;
+ pCurField = nullptr;
// initialise strings and format
aCurPar1.clear();
@@ -295,7 +295,7 @@ SwField* SwFieldMgr::GetCurField()
nCurFormat = 0;
if(!pCurField)
- return 0;
+ return nullptr;
// preprocess current values; determine parameter 1 and parameter 2
// as well as the format
@@ -731,7 +731,7 @@ bool SwFieldMgr::GoNextPrev( bool bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD)
{
// for fieldcommand-edit (hop to all DB fields)
- return pSh->MoveFieldType( 0, bNext, RES_DBFLD );
+ return pSh->MoveFieldType( nullptr, bNext, RES_DBFLD );
}
return pTyp && pSh && pSh->MoveFieldType( pTyp, bNext );
@@ -756,7 +756,7 @@ sal_uInt16 SwFieldMgr::GetCurTypeId() const
bool SwFieldMgr::InsertField(
const SwInsertField_Data& rData)
{
- SwField* pField = 0;
+ SwField* pField = nullptr;
bool bExp = false;
bool bTable = false;
bool bPageVar = false;
@@ -1255,7 +1255,7 @@ bool SwFieldMgr::InsertField(
case TYP_FORMELFLD:
{
- if(pCurShell->GetFrmType(0,false) & FrmTypeFlags::TABLE)
+ if(pCurShell->GetFrmType(nullptr,false) & FrmTypeFlags::TABLE)
{
pCurShell->StartAllAction();
@@ -1349,7 +1349,7 @@ bool SwFieldMgr::InsertField(
else if( bPageVar )
static_cast<SwRefPageGetFieldType*>(pCurShell->GetFieldType( 0, RES_REFPAGEGETFLD ))->UpdateFields();
else if( TYP_GETREFFLD == rData.m_nTypeId )
- pField->GetTyp()->ModifyNotification( 0, 0 );
+ pField->GetTyp()->ModifyNotification( nullptr, nullptr );
// delete temporary field
delete pField;
@@ -1369,7 +1369,7 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat,
bool bDelete = false;
SwField *pTmpField; // mb: fixed memory leak
- if (NULL != _pTmpField)
+ if (nullptr != _pTmpField)
{
pTmpField = _pTmpField;
}
@@ -1538,7 +1538,7 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat,
// explicitly evaluate ExpressionFields
void SwFieldMgr::EvalExpFields(SwWrtShell* pSh)
{
- if (pSh == NULL)
+ if (pSh == nullptr)
pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if(pSh)
diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx
index bf189929abdb..0501e0e602f3 100644
--- a/sw/source/uibase/fldui/fldwrap.cxx
+++ b/sw/source/uibase/fldui/fldwrap.cxx
@@ -39,7 +39,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(SwFieldDlgWrapper, FN_INSERT_FIELD)
SwChildWinWrapper::SwChildWinWrapper(vcl::Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
- m_pDocSh(0)
+ m_pDocSh(nullptr)
{
// avoid flickering of buttons:
m_aUpdateTimer.SetTimeout(200);
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index bd3c326429f0..8e6cbdd805d2 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -113,7 +113,7 @@ void SwFlyFrmAttrMgr::UpdateAttrMgr()
void SwFlyFrmAttrMgr::_UpdateFlyFrm()
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET)
m_pOwnSh->SetFlyName(static_cast<const SfxStringItem *>(pItem)->GetValue());
@@ -163,7 +163,7 @@ bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
m_pOwnSh->StartAllAction();
- bool bRet = 0 != m_pOwnSh->NewFlyFrm( m_aSet );
+ bool bRet = nullptr != m_pOwnSh->NewFlyFrm( m_aSet );
// turn on the right mode at the shell, frame got selected automatically.
if ( bRet )
@@ -259,7 +259,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nVRelOrient,
pToCharContentPos,
rVal.bFollowTextFlow,
- rVal.bMirror, NULL, &rVal.aPercentSize,
+ rVal.bMirror, nullptr, &rVal.aPercentSize,
&rSize);
if (bOnlyPercentRefValue)
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index 23a3a134a0c7..2302966cb991 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -42,7 +42,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void Activate( ) override;
- void UpdatePosition( const Point* pEvtPt = NULL );
+ void UpdatePosition( const Point* pEvtPt = nullptr );
virtual void ShowAll( bool bShow ) override;
virtual bool Contains( const Point &rDocPt ) const override;
diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx
index 9fcb72bc816e..446114af66eb 100644
--- a/sw/source/uibase/inc/caption.hxx
+++ b/sw/source/uibase/inc/caption.hxx
@@ -43,7 +43,7 @@ private:
bool bCopyAttributes; // -""-
public:
- InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
+ InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = nullptr);
InsCaptionOpt(const InsCaptionOpt&);
~InsCaptionOpt();
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index e6c9793501c7..e21869810765 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -64,7 +64,7 @@ public:
SwDocDisplayItem( const SwViewOption& rVOpt,
sal_uInt16 nWhich );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwDocDisplayItem& );
void FillViewOptions( SwViewOption& rVOpt) const;
@@ -95,7 +95,7 @@ public:
SwElemItem(const SwElemItem& rElemItem);
SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwElemItem& );
@@ -117,7 +117,7 @@ public:
SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -135,7 +135,7 @@ public:
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwShadowCursorItem& );
@@ -173,7 +173,7 @@ public:
SfxPoolItem(_nWhich){};
SwTestItem( const SwTestItem& pTestItem);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
};
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 4de3e0a4e913..cc6199355338 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog
public:
SwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const OUString* pFormatStr = 0);
+ sal_uInt8 nDialogMode, const OUString* pFormatStr = nullptr);
virtual ~SwCharDlg();
diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx
index 3e5f122ec2fa..76c5ee383af5 100644
--- a/sw/source/uibase/inc/colex.hxx
+++ b/sw/source/uibase/inc/colex.hxx
@@ -56,7 +56,7 @@ protected:
public:
SwPageGridExample(vcl::Window* pPar)
: SwPageExample(pPar)
- , pGridItem(0)
+ , pGridItem(nullptr)
{}
virtual ~SwPageGridExample();
@@ -79,7 +79,7 @@ protected:
public:
SwColExample(vcl::Window* pPar)
: SwPageExample(pPar)
- , pColMgr(0)
+ , pColMgr(nullptr)
{
}
diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 07cd57b3588d..85a20ec1bd77 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -99,7 +99,7 @@ public:
long nYPos )
: SwContent(pCnt, rName, nYPos)
, pField(pFormatField)
- , pRedline(NULL)
+ , pRedline(nullptr)
, mbPostIt(true)
{}
SwPostItContent( const SwContentType* pCnt,
@@ -107,7 +107,7 @@ public:
SwRangeRedline* pRed,
long nYPos )
: SwContent(pCnt, rName, nYPos)
- , pField(NULL)
+ , pField(nullptr)
, pRedline(pRed)
, mbPostIt(false)
{}
@@ -167,8 +167,8 @@ public:
SwContentType(SwWrtShell* pParent, ContentTypeId nType, sal_uInt8 nLevel );
virtual ~SwContentType();
- void Init(bool* pbInvalidateWindow = 0);
- void FillMemberList(bool* pbLevelChanged = NULL);
+ void Init(bool* pbInvalidateWindow = nullptr);
+ void FillMemberList(bool* pbLevelChanged = nullptr);
size_t GetMemberCount() const
{return nMemberCount;};
ContentTypeId GetType() const {return nContentType;}
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index a46ec993d541..010b3475b8f0 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -317,7 +317,7 @@ public:
void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
- const OUString* pFileName = 0 );
+ const OUString* pFileName = nullptr );
void EditContent(const SwGlblDocContent* pCont );
void ShowTree();
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index 8609c30a003f..cc2ae88e4417 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -57,8 +57,8 @@ class SwConvertTableDlg: public SfxModalDialog
DECL_LINK_TYPED( AutoFormatHdl, Button*, void );
DECL_LINK_TYPED( BtnHdl, Button*, void );
- DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void );
- DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void );
+ DECL_LINK_TYPED( CheckBoxHdl, Button* = nullptr, void );
+ DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void );
public:
SwConvertTableDlg( SwView& rView, bool bToTable );
diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx
index 1e6f69adbb63..c2d3b6236fac 100644
--- a/sw/source/uibase/inc/dbtree.hxx
+++ b/sw/source/uibase/inc/dbtree.hxx
@@ -57,7 +57,7 @@ public:
virtual void dispose() override;
virtual Size GetOptimalSize() const override;
- OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = 0);
+ OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = nullptr);
void Select( const OUString& rDBName, const OUString& rTableName,
const OUString& rColumnName );
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 5e8f7571e06e..56cc43888832 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -156,7 +156,7 @@ friend void PageNumNotify( SwViewShell* pVwSh,
void DropCleanup();
void CleanupDropUserMarker();
SotExchangeDest GetDropDestination( const Point& rPixPnt,
- SdrObject ** ppObj = 0 );
+ SdrObject ** ppObj = nullptr );
//select the object/cursor at the mouse position of the context menu request
bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx
index 66fd1438e9fc..62dc0bcc2d7e 100644
--- a/sw/source/uibase/inc/envimg.hxx
+++ b/sw/source/uibase/inc/envimg.hxx
@@ -62,7 +62,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index b8ab936ce842..ca2e7a1ae400 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -109,7 +109,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwEnvItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index 5beab7aac8cf..a8bdfc427c8e 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -79,7 +79,7 @@ struct SwInsertField_Data
VclPtr<vcl::Window> m_pParent; // parent dialog used for SwWrtShell::StartInputFieldDlg()
SwInsertField_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2,
- sal_uLong nFormatId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) :
+ sal_uLong nFormatId, SwWrtShell* pShell = nullptr, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) :
m_nTypeId(nType),
m_nSubType(nSub),
m_sPar1(rPar1),
@@ -88,10 +88,10 @@ struct SwInsertField_Data
m_pSh(pShell),
m_cSeparator(cSep),
m_bIsAutomaticLanguage(bIsAutoLanguage),
- m_pParent(0) {}
+ m_pParent(nullptr) {}
SwInsertField_Data() :
- m_pSh(0),
+ m_pSh(nullptr),
m_cSeparator(' '),
m_bIsAutomaticLanguage(true){}
};
@@ -120,7 +120,7 @@ private:
SAL_DLLPRIVATE css::uno::Reference<css::text::XNumberingTypeInfo> GetNumberingInfo()const;
public:
- explicit SwFieldMgr(SwWrtShell* pSh = 0);
+ explicit SwFieldMgr(SwWrtShell* pSh = nullptr);
~SwFieldMgr();
void SetWrtShell( SwWrtShell* pShell )
@@ -133,7 +133,7 @@ public:
void UpdateCurField(sal_uLong nFormat,
const OUString& rPar1,
const OUString& rPar2,
- SwField * _pField = 0);
+ SwField * _pField = nullptr);
OUString GetCurFieldPar1() const { return aCurPar1; }
OUString GetCurFieldPar2() const { return aCurPar2; }
@@ -149,9 +149,9 @@ public:
inline OUString GetMacroName() const { return sMacroName; }
// previous and next of the same type
- bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = 0 );
- bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( true, pTyp ); }
- bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( false, pTyp ); }
+ bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = nullptr );
+ bool GoNext( SwFieldType* pTyp = nullptr ) { return GoNextPrev( true, pTyp ); }
+ bool GoPrev( SwFieldType* pTyp = nullptr ) { return GoNextPrev( false, pTyp ); }
bool IsDBNumeric(const OUString& rDBName, const OUString& rTableQryName,
bool bIsTable, const OUString& rFieldName);
@@ -189,13 +189,13 @@ public:
sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode = false) const;
OUString GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
- sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal = nullptr);
// turn off evaluation of expression fields for insertation
// of many expressino fields (see labels)
inline void SetEvalExpFields(bool bEval);
- void EvalExpFields(SwWrtShell* pSh = NULL);
+ void EvalExpFields(SwWrtShell* pSh = nullptr);
};
inline void SwFieldMgr::SetEvalExpFields(bool bEval)
diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx
index 8b95826a1b98..387ba8853498 100644
--- a/sw/source/uibase/inc/frmdlg.hxx
+++ b/sw/source/uibase/inc/frmdlg.hxx
@@ -56,7 +56,7 @@ public:
const OUString& sResType = OUString("FrameDialog"),
bool bFormat = false,
const OString& sDefPage = OString(),
- const OUString* pFormatStr = 0);
+ const OUString* pFormatStr = nullptr);
virtual ~SwFrmDlg();
diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx
index 1a70091903e2..6d23af7f20e1 100644
--- a/sw/source/uibase/inc/gloshdl.hxx
+++ b/sw/source/uibase/inc/gloshdl.hxx
@@ -45,7 +45,7 @@ public:
void GlossaryDlg();
size_t GetGroupCnt() const;
- OUString GetGroupName( size_t, OUString* pTitle = 0 );
+ OUString GetGroupName( size_t, OUString* pTitle = nullptr );
bool NewGroup(OUString & rGroupName, const OUString& rTitle);
bool DelGroup(const OUString &);
bool RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle);
@@ -74,13 +74,13 @@ public:
void SetMacros(const OUString& rName,
const SvxMacro* pStart,
const SvxMacro* pEnd,
- SwTextBlocks *pGlossary = 0 );
+ SwTextBlocks *pGlossary = nullptr );
void GetMacros(const OUString& rShortName,
SvxMacro& rStart,
SvxMacro& rEnd,
- SwTextBlocks* pGlossary = 0 );
+ SwTextBlocks* pGlossary = nullptr );
- bool IsReadOnly( const OUString* = 0 ) const;
+ bool IsReadOnly( const OUString* = nullptr ) const;
bool IsOld() const;
bool FindGroupName(OUString& rGroup); // find group without path index
diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx
index a838a89c1122..bd84cdd5103a 100644
--- a/sw/source/uibase/inc/instable.hxx
+++ b/sw/source/uibase/inc/instable.hxx
@@ -59,8 +59,8 @@ class SwInsTableDlg : public SfxModalDialog
DECL_LINK_TYPED( ModifyRowCol, Edit&, void );
DECL_LINK_TYPED( AutoFormatHdl, Button*, void );
DECL_LINK_TYPED( OKHdl, Button*, void);
- DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void);
- DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void);
+ DECL_LINK_TYPED( CheckBoxHdl, Button* = nullptr, void);
+ DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void);
DECL_LINK_TYPED( ModifyRepeatHeaderNF_Hdl, Edit&, void );
public:
diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx
index 4207c38b8b8e..4a11b248020c 100644
--- a/sw/source/uibase/inc/labimg.hxx
+++ b/sw/source/uibase/inc/labimg.hxx
@@ -38,7 +38,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
OUString m_aLstMake; // remember last selection
OUString m_aLstType;
diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx
index 7db3ed8fdb85..f12e8e886794 100644
--- a/sw/source/uibase/inc/linenum.hxx
+++ b/sw/source/uibase/inc/linenum.hxx
@@ -49,7 +49,7 @@ private:
VclPtr<CheckBox> m_pNumberingOnCB;
VclPtr<CheckBox> m_pNumberingOnFooterHeader;
DECL_LINK_TYPED(OKHdl, Button*, void);
- DECL_LINK_TYPED(LineOnOffHdl, Button* = 0, void);
+ DECL_LINK_TYPED(LineOnOffHdl, Button* = nullptr, void);
DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index a1cdbf66f2a9..b8613a78a153 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -50,7 +50,7 @@ namespace SwMailMergeHelper
css::uno::Reference<css::mail::XMailService>& xInMailService,
const OUString& rInMailServerPassword,
const OUString& rOutMailServerPassword,
- vcl::Window* pDialogParentWindow = 0);
+ vcl::Window* pDialogParentWindow = nullptr);
}
struct SwAddressPreview_Impl;
@@ -107,7 +107,7 @@ public:
// fill the actual data into a string (address block or greeting)
static OUString FillData(const OUString& rAddress, SwMailMergeConfigItem& rConfigItem,
- const css::uno::Sequence<OUString>* pAssignments = 0);
+ const css::uno::Sequence<OUString>* pAssignments = nullptr);
void SetSelectHdl (const Link<LinkParamNone*,void>& rLink) { m_aSelectHdl = rLink; }
};
@@ -146,7 +146,7 @@ class SW_DLLPUBLIC SwAuthenticator :
VclPtr<vcl::Window> m_pParentWindow;
public:
SwAuthenticator()
- : m_pParentWindow(0)
+ : m_pParentWindow(nullptr)
{}
SwAuthenticator(const OUString& username, const OUString& password, vcl::Window* pParent)
: m_aUserName(username)
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index b0ab3ba771e0..f4d1aae66ce2 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -120,7 +120,7 @@ public:
const OUString& rTableName,
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection,
- css::uno::Sequence< css::uno::Any >* pSelection = 0);
+ css::uno::Sequence< css::uno::Any >* pSelection = nullptr);
virtual ~SwMailMergeDlg();
virtual void dispose() override;
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index 741d6dfcce57..6b794a724d13 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -64,7 +64,7 @@ class SwParagraphNumTabPage : public SfxTabPage
protected:
static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0,
- const sal_uInt16* pModifier = NULL );
+ const sal_uInt16* pModifier = nullptr );
public:
SwParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/sw/source/uibase/inc/numprevw.hxx b/sw/source/uibase/inc/numprevw.hxx
index 1fae3ac8ab32..0792b6090c69 100644
--- a/sw/source/uibase/inc/numprevw.hxx
+++ b/sw/source/uibase/inc/numprevw.hxx
@@ -40,14 +40,14 @@ class NumberingPreview : public vcl::Window
public:
NumberingPreview(vcl::Window* pParent, const ResId& rResId)
: Window(pParent, rResId),
- pActNum(0),nPageWidth(0), pOutlineNames(0),
+ pActNum(nullptr),nPageWidth(0), pOutlineNames(nullptr),
bPosition(false), nActLevel(USHRT_MAX)
{
}
NumberingPreview(vcl::Window* pParent)
: Window(pParent)
- , pActNum(0),nPageWidth(0), pOutlineNames(0),
+ , pActNum(nullptr),nPageWidth(0), pOutlineNames(nullptr),
bPosition(false), nActLevel(USHRT_MAX)
{
}
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index c05902aeb1e4..162357a0133b 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -161,7 +161,7 @@ private:
DECL_LINK_TYPED(SaveEntryHdl, SvTreeListBox*, void);
void DelUserData();
- void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId = 0);
+ void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId = nullptr);
void SaveEntry(SvTreeListEntry* pEntry);
void InvalidatePreview();
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 4ea911d56ef2..fcb35a1a4eb4 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -69,7 +69,7 @@ private:
using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx
index 56ef67b36131..d57c3f2bd5a0 100644
--- a/sw/source/uibase/inc/pggrid.hxx
+++ b/sw/source/uibase/inc/pggrid.hxx
@@ -95,7 +95,7 @@ public:
virtual void Reset(const SfxItemSet *rSet) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
#endif
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index a59f37f87f23..88af21b6da6a 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -192,7 +192,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
bool mbResetFormDesignMode:1;
bool mbFormDesignModeToReset:1;
- SAL_DLLPRIVATE void Init(const SwViewOption* = 0);
+ SAL_DLLPRIVATE void Init(const SwViewOption* = nullptr);
SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
SAL_DLLPRIVATE int _CreateScrollbar( bool bHori);
@@ -217,7 +217,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
optional input parameter - pointer to the <SfxRequest> instance, if existing.
*/
SAL_DLLPRIVATE void _ExecPgUpAndPgDown( const bool _bPgUp,
- SfxRequest* _pReq = 0 );
+ SfxRequest* _pReq = nullptr );
protected:
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ) override;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index f615299e7285..fa4453ddc60e 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -126,7 +126,7 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void );
DECL_LINK_TYPED( SubRegionEventHdl, VclWindowEvent&, void );
- bool CheckPasswd(CheckBox* pBox = 0);
+ bool CheckPasswd(CheckBox* pBox = nullptr);
public:
SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh );
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index d8d6d34be93a..09a436689275 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -53,7 +53,7 @@ protected:
public:
TextViewOutWin(vcl::Window* pParent, WinBits nBits) :
- Window(pParent, nBits), pTextView(0){}
+ Window(pParent, nBits), pTextView(nullptr){}
void SetTextView( ExtTextView* pView ) {pTextView = pView;}
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index b755b7bc9ef1..4b8b238a7a02 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -85,7 +85,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
static void SetSelInShell( SwWrtShell& , bool , const Point* );
static bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
- OUString& rFileName, OUString* pTitle = 0 );
+ OUString& rFileName, OUString* pTitle = nullptr );
static bool _TestAllowedFormat( const TransferableDataHelper& rData,
SotClipboardFormatId nFormat, SotExchangeDest nDestination );
@@ -150,7 +150,7 @@ public:
SwTransferable( SwWrtShell& );
virtual ~SwTransferable();
- static SotExchangeDest GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+ static SotExchangeDest GetSotDestination( const SwWrtShell& rSh, const Point* = nullptr );
// set properties on the document, like PageMargin, VisArea.
// And set real Size
@@ -173,7 +173,7 @@ public:
SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat,
SotExchangeDest nDestination, bool bIsPasteFormat,
bool bIsDefault,
- const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
+ const Point* pDDPos = nullptr, sal_Int8 nDropAction = 0,
bool bPasteSelection = false );
static bool IsPasteSpecial( const SwWrtShell& rWrtShell,
@@ -196,12 +196,12 @@ public:
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
static void CreateSelection( SwWrtShell & rSh,
- const SwFrameShell * pCreator = NULL );
+ const SwFrameShell * pCreator = nullptr );
static void ClearSelection( SwWrtShell& rSh,
- const SwFrameShell * pCreator = NULL );
+ const SwFrameShell * pCreator = nullptr );
// the related SwView is being closed and the SwTransferable is invalid now
- void Invalidate() {m_pWrtShell = 0;}
+ void Invalidate() {m_pWrtShell = nullptr;}
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) throw( css::uno::RuntimeException, std::exception ) override;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 50847c0889ba..29aabdf5d4f0 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -228,7 +228,7 @@ public:
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -443,7 +443,7 @@ public:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -491,7 +491,7 @@ public:
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx
index 86bc063acd57..90d49fe10485 100644
--- a/sw/source/uibase/inc/swuiidxmrk.hxx
+++ b/sw/source/uibase/inc/swuiidxmrk.hxx
@@ -145,7 +145,7 @@ public:
~SwIndexMarkPane();
- void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
+ void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = nullptr);
bool IsTOXType(const OUString& rName)
{return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);}
};
diff --git a/sw/source/uibase/inc/swuipardlg.hxx b/sw/source/uibase/inc/swuipardlg.hxx
index 874c090c5f93..4fb29dc5a52c 100644
--- a/sw/source/uibase/inc/swuipardlg.hxx
+++ b/sw/source/uibase/inc/swuipardlg.hxx
@@ -44,7 +44,7 @@ public:
SwView& rVw,
const SfxItemSet&,
sal_uInt8 nDialogMode,
- const OUString *pCollName = 0,
+ const OUString *pCollName = nullptr,
bool bDraw = false,
const OString& sDefPage = OString());
virtual ~SwParaDlg();
diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx
index 99c678764c75..a0474a77c1a2 100644
--- a/sw/source/uibase/inc/swwrtshitem.hxx
+++ b/sw/source/uibase/inc/swwrtshitem.hxx
@@ -34,7 +34,7 @@ public:
SwWrtShellItem( const SwWrtShellItem& );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SwWrtShell* GetValue() const { return pWrtSh; }
diff --git a/sw/source/uibase/inc/tablemgr.hxx b/sw/source/uibase/inc/tablemgr.hxx
index 796b5c0dce5b..eb512826605b 100644
--- a/sw/source/uibase/inc/tablemgr.hxx
+++ b/sw/source/uibase/inc/tablemgr.hxx
@@ -69,12 +69,12 @@ public:
/// @return the XModel of the newly inserted chart if successful
css::uno::Reference< css::frame::XModel >
- InsertChart( css::uno::Reference< css::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrameFormat** ppFlyFrameFormat = 0 );
+ InsertChart( css::uno::Reference< css::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrameFormat** ppFlyFrameFormat = nullptr );
};
inline SwTableFUNC::SwTableFUNC(SwFrameFormat &rFormat) :
pFormat(&rFormat),
- pSh(0),
+ pSh(nullptr),
bCopy(false)
{
}
diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx
index 523f1aebd052..24fb0e6041b8 100644
--- a/sw/source/uibase/inc/tautofmt.hxx
+++ b/sw/source/uibase/inc/tautofmt.hxx
@@ -80,7 +80,7 @@ class SwAutoFormatDlg : public SfxModalDialog
public:
SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
- const SwTableAutoFormat* pSelFormat = 0 );
+ const SwTableAutoFormat* pSelFormat = nullptr );
virtual ~SwAutoFormatDlg();
virtual void dispose() override;
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index db280d42c315..b339757b7554 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -73,7 +73,7 @@ public:
SfxStyleSheetBase& rBase,
sal_uInt16 nRegion,
const OString& sPage = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
bool bNew = false );
virtual void RefreshInputSet() override;
diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx
index 48bb27406b88..d9c57bf22ed5 100644
--- a/sw/source/uibase/inc/toxmgr.hxx
+++ b/sw/source/uibase/inc/toxmgr.hxx
@@ -68,9 +68,9 @@ public:
// single argument ctors shall be explicit.
explicit SwTOXDescription(TOXTypes eType) :
eTOXType(eType),
- pTitle(0),
- pTOUName(0),
- pForm(0),
+ pTitle(nullptr),
+ pTOUName(nullptr),
+ pForm(nullptr),
nContent(nsSwTOXElement::TOX_MARK | nsSwTOXElement::TOX_OUTLINELEVEL),
nIndexOptions(nsSwTOIOptions::TOI_SAME_ENTRY|nsSwTOIOptions::TOI_FF|nsSwTOIOptions::TOI_CASE_SENSITIVE),
nOLEOptions(0),
@@ -194,13 +194,13 @@ public:
eTOXType(eType),
nLevel(0),
bMainEntry(false),
- pPrimKey(0),
- pSecKey(0),
- pAltStr(0),
- pTOUName(0),
- pPhoneticReadingOfAltStr(0),
- pPhoneticReadingOfPrimKey(0),
- pPhoneticReadingOfSecKey(0)
+ pPrimKey(nullptr),
+ pSecKey(nullptr),
+ pAltStr(nullptr),
+ pTOUName(nullptr),
+ pPhoneticReadingOfAltStr(nullptr),
+ pPhoneticReadingOfPrimKey(nullptr),
+ pPhoneticReadingOfSecKey(nullptr)
{
}
~SwTOXMarkDescription()
@@ -282,7 +282,7 @@ public:
// methods for directories
- bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+ bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = nullptr, const SfxItemSet* pSet = nullptr);
const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
const SwTOXBase* GetCurTOX();
diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx
index 1e573e915344..a1b4414f5c66 100644
--- a/sw/source/uibase/inc/uiitems.hxx
+++ b/sw/source/uibase/inc/uiitems.hxx
@@ -39,13 +39,13 @@ public:
SwPageFootnoteInfoItem(const SwPageFootnoteInfoItem& rItem );
virtual ~SwPageFootnoteInfoItem();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -59,10 +59,10 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
void* pMisc;
public:
- SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = nullptr);
SwPtrItem( const SwPtrItem& rItem );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void* GetValue() const { return pMisc; }
@@ -77,7 +77,7 @@ public:
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -92,7 +92,7 @@ class SwBackgroundDestinationItem : public SfxUInt16Item
public:
SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem
@@ -100,10 +100,10 @@ class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem
SwPaM* m_pPaM;
public:
- SwPaMItem( const sal_uInt16 nId = FN_PARAM_PAM, SwPaM* pPaM = NULL);
+ SwPaMItem( const sal_uInt16 nId = FN_PARAM_PAM, SwPaM* pPaM = nullptr);
SwPaMItem( const SwPaMItem& rItem );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
SwPaM* GetValue() const { return m_pPaM; }
diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx
index b95cb12f6d80..3ae07ead1bd2 100644
--- a/sw/source/uibase/inc/uivwimp.hxx
+++ b/sw/source/uibase/inc/uivwimp.hxx
@@ -59,7 +59,7 @@ public:
virtual void SAL_CALL disposing(
const css::lang::EventObject& rEventObject ) throw(css::uno::RuntimeException, std::exception) override;
- void ViewDestroyed() { pView = 0; }
+ void ViewDestroyed() { pView = nullptr; }
};
// Clipboard EventListener
@@ -81,7 +81,7 @@ public:
SwClipboardChangeListener( SwView& rView ) : pView( &rView ) {}
virtual ~SwClipboardChangeListener();
- void ViewDestroyed() { pView = 0; }
+ void ViewDestroyed() { pView = nullptr; }
void AddRemoveListener( bool bAdd );
};
diff --git a/sw/source/uibase/inc/unoatxt.hxx b/sw/source/uibase/inc/unoatxt.hxx
index b8c57ad10c9a..75924b8ea62d 100644
--- a/sw/source/uibase/inc/unoatxt.hxx
+++ b/sw/source/uibase/inc/unoatxt.hxx
@@ -232,7 +232,7 @@ public:
// XEventsSupplier
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents( ) throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pGlossaries = 0;}
+ void Invalidate() {pGlossaries = nullptr;}
const SwGlossaries* GetGlossaries() { return pGlossaries; }
const OUString& GetGroupName() {return sGroupName;}
const OUString& GetEntryName() {return sEntryName;}
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index 630f40c463b9..055167216cad 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -114,7 +114,7 @@ protected:
virtual ~SwXPrintSettings()
throw();
public:
- SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL );
+ SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = nullptr );
//XServiceInfo
virtual OUString SAL_CALL getImplementationName()
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index 5e37a4ce2f96..4164dd6dfe6d 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -98,8 +98,8 @@ class SW_DLLPUBLIC SwOneExampleFrame
public:
SwOneExampleFrame(vcl::Window& rWin,
sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT,
- const Link<SwOneExampleFrame&,void>* pInitalizedLink = 0,
- const OUString* pURL = 0);
+ const Link<SwOneExampleFrame&,void>* pInitalizedLink = nullptr,
+ const OUString* pURL = nullptr);
~SwOneExampleFrame();
css::uno::Reference< css::frame::XModel > & GetModel() {return _xModel;}
diff --git a/sw/source/uibase/inc/unotxvw.hxx b/sw/source/uibase/inc/unotxvw.hxx
index f94a55f31482..d95c8e635b57 100644
--- a/sw/source/uibase/inc/unotxvw.hxx
+++ b/sw/source/uibase/inc/unotxvw.hxx
@@ -322,7 +322,7 @@ public:
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
- void Invalidate(){m_pView = 0;}
+ void Invalidate(){m_pView = nullptr;}
// ITextCursorHelper
virtual const SwPaM* GetPaM() const override;
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index ef2f1c934be2..4fef61f60165 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -115,7 +115,7 @@ public:
inline void ResetCursorStack();
SelectionType GetSelectionType() const;
- bool IsModePushed() const { return 0 != m_pModeStack; }
+ bool IsModePushed() const { return nullptr != m_pModeStack; }
void PushMode();
void PopMode();
@@ -151,7 +151,7 @@ public:
bool IsInsMode() const { return m_bIns; }
void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
- void EnterSelFrmMode(const Point *pStartDrag = 0);
+ void EnterSelFrmMode(const Point *pStartDrag = nullptr);
void LeaveSelFrmMode();
bool IsSelFrmMode() const { return m_bLayoutMode; }
// reset selection of frames
@@ -177,10 +177,10 @@ public:
// select word / sentence
bool SelNearestWrd();
- bool SelWrd (const Point * = 0, bool bProp=false );
+ bool SelWrd (const Point * = nullptr, bool bProp=false );
// #i32329# Enhanced selection
- void SelSentence (const Point * = 0, bool bProp=false );
- void SelPara (const Point * = 0, bool bProp=false );
+ void SelSentence (const Point * = nullptr, bool bProp=false );
+ void SelPara (const Point * = nullptr, bool bProp=false );
long SelAll();
// basecursortravelling
@@ -220,12 +220,12 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
{ return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
// #i20126# Enhanced table selection
- bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ bool SelectTableRowCol( const Point& rPt, const Point* pEnd = nullptr, bool bRowDrag = false );
bool SelectTableRow();
bool SelectTableCol();
bool SelectTableCell();
- bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = 0 );
+ bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = nullptr );
// per column jumps
bool StartOfColumn ( bool bSelect = false );
@@ -247,7 +247,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool PageCrsr(SwTwips lOffset, bool bSelect);
// update fields
- void UpdateInputFields( SwInputFieldList* pLst = 0 );
+ void UpdateInputFields( SwInputFieldList* pLst = nullptr );
void NoEdit(bool bHideCrsr = true);
void Edit();
@@ -290,11 +290,11 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void Insert(const OUString &);
// graphic
void Insert( const OUString &rPath, const OUString &rFilter,
- const Graphic &, SwFlyFrmAttrMgr * = 0,
+ const Graphic &, SwFlyFrmAttrMgr * = nullptr,
bool bRule = false );
void InsertByWord( const OUString & );
- void InsertPageBreak(const OUString *pPageDesc = 0, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
+ void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
void InsertLineBreak();
void InsertColumnBreak();
void InsertFootnote(const OUString &, bool bEndNote = false, bool bEdit = true );
@@ -302,8 +302,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool CanInsert();
// indexes
- void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr);
+ bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr);
// numbering and bullets
/**
@@ -320,16 +320,16 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
//OLE
void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 for clipboard
const svt::EmbeddedObjectRef&,
- SvGlobalName *pName = 0, // != 0 create object accordingly
+ SvGlobalName *pName = nullptr, // != 0 create object accordingly
bool bActivate = true,
sal_uInt16 nSlotId = 0); // SlotId for dialog
- bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat **pFlyFrameFormat = 0 );
+ bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat **pFlyFrameFormat = nullptr );
void LaunchOLEObj( long nVerb = 0 ); // start server
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ) override;
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
- const SwRect *pFlyPrtRect = 0,
- const SwRect *pFlyFrmRect = 0,
+ const SwRect *pFlyPrtRect = nullptr,
+ const SwRect *pFlyFrmRect = nullptr,
const bool bNoTextFrmPrtAreaChanged = false ) override;
virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt,
const SwRect &rFrm ) override;
@@ -371,14 +371,14 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
sal_uLong SearchTempl (const OUString &rTempl,
SwDocPositions eStart, SwDocPositions eEnd,
FindRanges eFlags = FND_IN_BODY,
- const OUString* pReplTempl = 0 );
+ const OUString* pReplTempl = nullptr );
sal_uLong SearchAttr (const SfxItemSet& rFindSet,
bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnd,
FindRanges eFlags = FND_IN_BODY,
- const css::util::SearchOptions* pSearchOpt = 0,
- const SfxItemSet* pReplaceSet = 0);
+ const css::util::SearchOptions* pSearchOpt = nullptr,
+ const SfxItemSet* pReplaceSet = nullptr);
void AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar );
@@ -387,9 +387,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void MoveCrsr( bool bWithSelect = false );
// update input fields
- bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = 0, OString* pWindowState = 0);
+ bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = nullptr, OString* pWindowState = nullptr);
// update DropDown fields
- bool StartDropDownFieldDlg(SwField*, bool bNextButton, OString* pWindowState = 0);
+ bool StartDropDownFieldDlg(SwField*, bool bNextButton, OString* pWindowState = nullptr);
//"Handler" for changes at DrawView - for controls.
virtual void DrawSelChanged( ) override;
@@ -414,10 +414,10 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
SwView& GetView() { return m_rView; }
// Because nobody else is doing it, here is a ExecMacro()
- void ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* pArgs = 0 );
+ void ExecMacro( const SvxMacro& rMacro, OUString* pRet = nullptr, SbxArray* pArgs = nullptr );
// call into the dark Basic/JavaScript
sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
- bool bCheckPtr = false, SbxArray* pArgs = 0 );
+ bool bCheckPtr = false, SbxArray* pArgs = nullptr );
// a click at the given field. the cursor is on it.
// execute the predefined actions.
@@ -437,7 +437,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// automatic update of styles
void AutoUpdateFrame(SwFrameFormat* pFormat, const SfxItemSet& rStyleSet);
- void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL );
+ void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = nullptr );
// link for inserting ranges via Drag&Drop/Clipboard
DECL_LINK_TYPED( InsertRegionDialog, void*, void );
@@ -445,7 +445,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// ctor, the first one is a kind of a controlled copy ctor for more views of a document
SwWrtShell( SwWrtShell&, vcl::Window *pWin, SwView &rShell);
SwWrtShell( SwDoc& rDoc, vcl::Window *pWin, SwView &rShell,
- const SwViewOption *pViewOpt = 0);
+ const SwViewOption *pViewOpt = nullptr);
virtual ~SwWrtShell();
bool TryRemoveIndent(); // #i23725#
@@ -463,7 +463,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool GotoRegion( const OUString& rName );
bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0,
sal_uInt16 nSeqNo = 0 );
- bool GotoNextTOXBase( const OUString* pName = 0);
+ bool GotoNextTOXBase( const OUString* pName = nullptr);
bool GotoTable( const OUString& rName );
bool GotoFormatField( const SwFormatField& rField );
const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, bool bSelect = false);
@@ -526,7 +526,7 @@ private:
Point m_aDest;
bool m_bDestOnStack;
- bool HasCrsrStack() const { return 0 != m_pCrsrStack; }
+ bool HasCrsrStack() const { return nullptr != m_pCrsrStack; }
SAL_DLLPRIVATE bool PushCrsr(SwTwips lOffset, bool bSelect);
SAL_DLLPRIVATE bool PopCrsr(bool bUpdate, bool bSelect = false);
@@ -586,9 +586,9 @@ private:
SAL_DLLPRIVATE void LeaveExtSel() { m_bSelWrd = m_bSelLn = false;}
- SAL_DLLPRIVATE bool GoStart(bool KeepArea = false, bool * = 0,
+ SAL_DLLPRIVATE bool GoStart(bool KeepArea = false, bool * = nullptr,
bool bSelect = false, bool bDontMoveRegion = false);
- SAL_DLLPRIVATE bool GoEnd(bool KeepArea = false, bool * = 0);
+ SAL_DLLPRIVATE bool GoEnd(bool KeepArea = false, bool * = nullptr);
enum BookMarkMove
{
@@ -598,7 +598,7 @@ private:
BOOKMARK_LAST_LAST_ENTRY
};
- SAL_DLLPRIVATE bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+ SAL_DLLPRIVATE bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=nullptr);
};
inline void SwWrtShell::ResetCursorStack()
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index 9bde8b126487..1e309ffb0b0e 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -46,17 +46,17 @@ SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId)
{
if(!aCurMarks.empty())
return aCurMarks[nId];
- return 0;
+ return nullptr;
}
void SwTOXMgr::DeleteTOXMark()
{
- SwTOXMark* pNext = 0;
+ SwTOXMark* pNext = nullptr;
if( pCurTOXMark )
{
pNext = const_cast<SwTOXMark*>(&pSh->GotoTOXMark( *pCurTOXMark, TOX_NXT ));
if( pNext == pCurTOXMark )
- pNext = 0;
+ pNext = nullptr;
pSh->DeleteTOXMark( pCurTOXMark );
pSh->SetModified();
@@ -67,7 +67,7 @@ void SwTOXMgr::DeleteTOXMark()
void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
- SwTOXMark* pMark = 0;
+ SwTOXMark* pMark = nullptr;
switch(rDesc.GetTOXType())
{
case TOX_CONTENT:
@@ -212,7 +212,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
pSh->DeleteTOXMark(pCurTOXMark);
aCpy.SetAlternativeText( *rDesc.GetAltStr() );
pSh->SwEditShell::Insert( aCpy );
- pCurTOXMark = 0;
+ pCurTOXMark = nullptr;
}
}
pSh->SetModified();
@@ -274,7 +274,7 @@ const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
{
- pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : 0;
+ pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : nullptr;
}
bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
@@ -286,7 +286,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
SwTOXBase* pTOX = const_cast<SwTOXBase*>(pCurTOX);
- SwTOXBase * pNewTOX = NULL;
+ SwTOXBase * pNewTOX = nullptr;
if (pTOX)
pNewTOX = new SwTOXBase(*pTOX);
@@ -440,7 +440,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr);
}
pDoc->ChgTOX(*pTOX, *pNewTOX);
@@ -451,7 +451,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr);
}
}
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index d4c2479c564b..79cf3464c38b 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -98,7 +98,7 @@ SwHHCWrapper::SwHHCWrapper(
, m_pView( pSwView )
, m_pWin( &pSwView->GetEditWin() )
, m_rWrtShell( pSwView->GetWrtShell() )
- , m_pConvArgs( 0 )
+ , m_pConvArgs( nullptr )
, m_nLastPos( 0 )
, m_nUnitOffset( 0 )
, m_nPageCount( 0 )
@@ -116,7 +116,7 @@ SwHHCWrapper::~SwHHCWrapper()
{
delete m_pConvArgs;
- SwViewShell::SetCareWin( NULL );
+ SwViewShell::SetCareWin( nullptr );
// check for existence of a draw view which means that there are
// (or previously were) draw objects present in the document.
@@ -376,7 +376,7 @@ void SwHHCWrapper::ReplaceUnit(
OUString aOrigText( m_rWrtShell.GetSelText() );
OUString aNewText( rReplaceWith );
OSL_ENSURE( aOrigText == rOrigText, "!! text mismatch !!" );
- SwFormatRuby *pRuby = 0;
+ SwFormatRuby *pRuby = nullptr;
bool bRubyBelow = false;
OUString aNewOrigText;
switch (eAction)
@@ -429,7 +429,7 @@ void SwHHCWrapper::ReplaceUnit(
{
// according to FT we currently should not bother about keeping
// attributes in Hangul/Hanja conversion
- ChangeText( aNewOrigText, rOrigText, NULL, NULL );
+ ChangeText( aNewOrigText, rOrigText, nullptr, nullptr );
//!! since Delete, Insert in 'ChangeText' do not set the WrtShells
//!! bInSelect flag
@@ -465,7 +465,7 @@ void SwHHCWrapper::ReplaceUnit(
if (bIsChineseConversion)
ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() );
else
- ChangeText( aNewText, rOrigText, NULL, NULL );
+ ChangeText( aNewText, rOrigText, nullptr, nullptr );
// change language and font if necessary
if (bIsChineseConversion)
@@ -518,7 +518,7 @@ bool SwHHCWrapper::HasRubySupport() const
void SwHHCWrapper::Convert()
{
- OSL_ENSURE( m_pConvArgs == 0, "NULL pointer expected" );
+ OSL_ENSURE( m_pConvArgs == nullptr, "NULL pointer expected" );
{
SwPaM *pCrsr = m_pView->GetWrtShell().GetCrsr();
SwPosition* pSttPos = pCrsr->Start();
@@ -701,7 +701,7 @@ bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs )
bool bProgress = !m_bIsDrawObj && !m_bIsSelection;
(pConversionArgs->aConvText).clear();
pConversionArgs->nConvTextLang = LANGUAGE_NONE;
- m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? &m_nPageStart : NULL, pConversionArgs );
+ m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? &m_nPageStart : nullptr, pConversionArgs );
return !pConversionArgs->aConvText.isEmpty();
}
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index 2abb2d4876e5..aee0bcfd5ff9 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -80,7 +80,7 @@ bool SwHyphWrapper::SpellContinue()
}
uno::Reference< uno::XInterface > xHyphWord = bInSelection ?
- PSH->HyphContinue( NULL, NULL ) :
+ PSH->HyphContinue( nullptr, nullptr ) :
PSH->HyphContinue( &nPageCount, &nPageStart );
SetLast( xHyphWord );
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index aa95a1763234..3202dcee2250 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -850,7 +850,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
else if (nId == MN_SET_SELECTION_MORE)
{
//Open Format/Character Dialog
- sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, 0, 0 );
+ sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr );
}
else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END)
{
@@ -882,7 +882,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
m_pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *m_pSh );
//Open Format/Character Dialog
- sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, 0, 0 );
+ sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr );
m_pSh->Pop( false ); // restore cursor
}
}
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 956e7a576180..5395ffe7656a 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -56,8 +56,8 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
GetDrawOutliner().GetEmptyItemSet().GetPool(),
OUTLINERMODE_TEXTOBJECT ),
pView( pVw ),
- pTextObj( NULL ),
- pOutlView( NULL ),
+ pTextObj( nullptr ),
+ pOutlView( nullptr ),
nOptions( nConvOptions ),
nDocIndex( 0 ),
nSourceLang( nSourceLanguage ),
@@ -119,7 +119,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
SetPaperSize( Size(1, 1) );
Clear();
- pTextObj = NULL;
+ pTextObj = nullptr;
}
const auto n = nDocIndex;
@@ -164,7 +164,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
}
if ( !bNextDoc )
- pTextObj = NULL;
+ pTextObj = nullptr;
else
break;
}
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 6b147080a178..badc48d938d5 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -278,7 +278,7 @@ SwGlossaries::~SwGlossaries()
SwTextBlocks* SwGlossaries::GetGlosDoc( const OUString &rName, bool bCreate ) const
{
sal_uInt16 nPath = (sal_uInt16)rName.getToken(1, GLOS_DELIM).toInt32();
- SwTextBlocks *pTmp = 0;
+ SwTextBlocks *pTmp = nullptr;
if (static_cast<size_t>(nPath) < m_PathArr.size())
{
const OUString sFileURL =
@@ -468,7 +468,7 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup )
{
Reference< lang::XUnoTunnel > xEntryTunnel( aLoop->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >(
xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
@@ -536,7 +536,7 @@ void SwGlossaries::InvalidateUNOOjects()
)
{
Reference< lang::XUnoTunnel > xEntryTunnel( aEntryLoop->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >(
xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
@@ -561,7 +561,7 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const OUString
{
Reference< lang::XUnoTunnel > xGroupTunnel( aSearch->get(), UNO_QUERY );
- SwXAutoTextGroup* pSwGroup = 0;
+ SwXAutoTextGroup* pSwGroup = nullptr;
if ( xGroupTunnel.is() )
pSwGroup = reinterpret_cast< SwXAutoTextGroup* >( xGroupTunnel->getSomething( SwXAutoTextGroup::getUnoTunnelId() ) );
@@ -628,7 +628,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
{
Reference< lang::XUnoTunnel > xEntryTunnel( aSearch->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >( xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
else
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index 38fe702238f1..be79bafab709 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -120,8 +120,8 @@ static bool lcl_Save( SwWrtShell& rSh, const OUString& rGroupName,
if(aStart.HasMacro() || aEnd.HasMacro() )
{
- SvxMacro* pStart = aStart.HasMacro() ? &aStart : 0;
- SvxMacro* pEnd = aEnd.HasMacro() ? &aEnd : 0;
+ SvxMacro* pStart = aStart.HasMacro() ? &aStart : nullptr;
+ SvxMacro* pEnd = aEnd.HasMacro() ? &aEnd : nullptr;
pGlosHdl->SetMacros( rShortNm, pStart, pEnd, pBlock.get() );
}
@@ -208,7 +208,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
if (pGroup && pGroup->GetCount())
{
// query which view is registered. In WebWriter there is no normal view
- sal_uInt16 nViewId = 0 != SwView::Factory() ? 2 : 6;
+ sal_uInt16 nViewId = nullptr != SwView::Factory() ? 2 : 6;
const OUString sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
if( 6 == nViewId )
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 1f1e47a4eee1..faf6f3215eb4 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -78,7 +78,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
uno::Sequence<sal_Int16> aTypes;
- const sal_Int16* pTypes = NULL;
+ const sal_Int16* pTypes = nullptr;
if(0 != (nTypeFlags&INSERT_NUM_EXTENDED_TYPES) )
{
if(pImpl->xInfo.is())
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 81429200ab72..694b7b0ed3da 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -123,7 +123,7 @@ void SwModelessRedlineAcceptDlg::Activate()
void SwModelessRedlineAcceptDlg::Initialize(SfxChildWinInfo *pInfo)
{
- if (pInfo != NULL)
+ if (pInfo != nullptr)
pImplDlg->Initialize(pInfo->aExtraString);
SfxModelessDialog::Initialize(pInfo);
@@ -303,7 +303,7 @@ void SwRedlineAcceptDlg::InitAuthors()
pFilterPage->SelectAuthor(aStrings[0]);
bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess().GetRedlinePassword().getLength();
- bool bSel = pTable->FirstSelected() != 0;
+ bool bSel = pTable->FirstSelected() != nullptr;
SvTreeListEntry* pSelEntry = pTable->FirstSelected();
while (pSelEntry)
@@ -515,7 +515,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild)
}
pBackupData = pNext;
}
- pParent->pNext = 0;
+ pParent->pNext = nullptr;
// insert new children
InsertChildren(pParent, rRedln, nAutoFormat);
@@ -560,7 +560,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild)
void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat)
{
OUString sChild;
- SwRedlineDataChild *pLastRedlineChild = 0;
+ SwRedlineDataChild *pLastRedlineChild = nullptr;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
bool bAutoFormat = (rRedln.GetRealType() & nAutoFormat) != 0;
@@ -581,7 +581,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
pTable->SetEntryText(
sAutoFormat, (*ret.first)->pTLBParent, 0);
pTable->RemoveEntry(pParent->pTLBParent);
- pParent->pTLBParent = 0;
+ pParent->pTLBParent = nullptr;
}
return;
}
@@ -625,18 +625,18 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
pTable->Expand(pParent->pTLBParent);
}
else
- pRedlineChild->pTLBChild = 0;
+ pRedlineChild->pTLBChild = nullptr;
pLastRedlineChild = pRedlineChild;
}
if (pLastRedlineChild)
- pLastRedlineChild->pNext = 0;
+ pLastRedlineChild->pNext = nullptr;
if (!bValidTree && pParent->pTLBParent)
{
pTable->RemoveEntry(pParent->pTLBParent);
- pParent->pTLBParent = 0;
+ pParent->pTLBParent = nullptr;
if (nAutoFormat)
aUsedSeqNo.erase(pParent);
}
@@ -658,8 +658,8 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
// set the cursor after the last entry because otherwise performance problem in TLB.
// TLB would otherwise reset the cursor at every Remove (expensive)
sal_uInt16 nPos = std::min((sal_uInt16)nCount, (sal_uInt16)m_RedlineParents.size());
- SvTreeListEntry *pCurEntry = NULL;
- while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
+ SvTreeListEntry *pCurEntry = nullptr;
+ while( ( pCurEntry == nullptr ) && ( nPos > 0 ) )
{
--nPos;
pCurEntry = m_RedlineParents[nPos]->pTLBParent;
@@ -741,13 +741,13 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
if( !pCurrRedline )
{
pSh->SwCrsrShell::Push();
- if( 0 == (pCurrRedline = pSh->SelNextRedline()))
+ if( nullptr == (pCurrRedline = pSh->SelNextRedline()))
pCurrRedline = pSh->SelPrevRedline();
pSh->SwCrsrShell::Pop( false );
}
}
else
- pCurrRedline = 0;
+ pCurrRedline = nullptr;
for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
@@ -756,7 +756,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
pRedlineParent = new SwRedlineDataParent;
pRedlineParent->pData = pRedlineData;
- pRedlineParent->pNext = 0;
+ pRedlineParent->pNext = nullptr;
OUString sComment(rRedln.GetComment());
pRedlineParent->sComment = sComment.replace('\n', ' ');
m_RedlineParents.insert(m_RedlineParents.begin() + i,
@@ -767,7 +767,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
pData->bDisabled = false;
sParent = GetRedlineText(rRedln, pData->aDateTime);
- pParent = pTable->InsertEntry(GetActionImage(rRedln), sParent, pData, 0, i);
+ pParent = pTable->InsertEntry(GetActionImage(rRedln), sParent, pData, nullptr, i);
if( pCurrRedline == &rRedln )
{
pTable->SetCurEntry( pParent );
@@ -910,7 +910,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, UndoHdl, SvxTPView*, void)
SwView * pView = ::GetActiveView();
pView->GetViewFrame()->GetDispatcher()->
Execute(SID_UNDO, SfxCallMode::SYNCHRON);
- pTPView->EnableUndo(pView->GetSlotState(SID_UNDO) != 0);
+ pTPView->EnableUndo(pView->GetSlotState(SID_UNDO) != nullptr);
Activate();
}
@@ -956,7 +956,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
//#107938# But not only ask pTable if it has the focus. To move
// the selection to the selected redline any child of pParentDlg
// may the focus.
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if (pParentDlg->HasChildPathFocus())
pSelEntry = pTable->FirstSelected();
@@ -1003,7 +1003,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
pSh->LeaveAddMode();
pSh->EndAction();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
}
bool bEnable = !pSh->getIDocumentRedlineAccess().GetRedlinePassword().getLength();
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
@@ -1021,7 +1021,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvTreeListEntry* pEntry = pTable->FirstSelected();
- const SwRangeRedline *pRed = 0;
+ const SwRangeRedline *pRed = nullptr;
if (pEntry)
{
@@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
// disable commenting for protected areas
- if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != 0)
+ if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != nullptr)
{
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -1048,7 +1048,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
// && pRed->HasReadonlySel()
);
- aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 );
+ aPopup.EnableItem( MN_SUB_SORT, pTable->First() != nullptr );
sal_uInt16 nColumn = pTable->GetSortedCol();
if (nColumn == 0xffff)
nColumn = 4;
@@ -1142,7 +1142,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
}
pDlg.reset();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
}
}
@@ -1250,7 +1250,7 @@ SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
void SwRedlineAcceptPanel::dispose()
{
delete mpImplDlg;
- mpImplDlg = NULL;
+ mpImplDlg = nullptr;
PanelLayout::dispose();
}
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index bf6ada4d650d..0913d101cf68 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -70,7 +70,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SdrView *pSdrView = m_pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
SdrObject* pObj = rMarkList.GetMark(0) ? rMarkList.GetMark(0)->GetMarkedSdrObj()
- : 0;
+ : nullptr;
switch( m_pWin->GetSdrDrawMode() )
{
case OBJ_TEXT:
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index e302afa0b5da..684a5d9360a5 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -140,7 +140,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
// Select gluepoint
if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()))
{
- SdrHdl* pHdl = NULL;
+ SdrHdl* pHdl = nullptr;
if (!rMEvt.IsShift())
{
@@ -152,7 +152,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pSdrView->IsPointMarked(*aVEvt.pHdl))
{
bReturn = pSdrView->UnmarkPoint(*aVEvt.pHdl);
- pHdl = NULL;
+ pHdl = nullptr;
}
else
{
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 6720fe92210c..c27b2e32d4a6 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -61,9 +61,9 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent )
aPos( VclPtr<Edit>::Create(this, SW_RES(ED_POS))),
aEdit( VclPtr<InputEdit>::Create(this, WB_3DLOOK|WB_TABSTOP|WB_BORDER|WB_NOHIDESELECTION)),
aPopMenu( SW_RES(MN_CALC_POPUP)),
- pMgr(0),
- pWrtShell(0),
- pView(0),
+ pMgr(nullptr),
+ pWrtShell(nullptr),
+ pView(nullptr),
aAktTableName(aEmptyOUStr)
, m_bDoesUndo(true)
, m_bResetUndo(false)
@@ -80,7 +80,7 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent )
pManager->RegisterToolBox(this);
pView = ::GetActiveView();
- pWrtShell = pView ? pView->GetWrtShellPtr() : 0;
+ pWrtShell = pView ? pView->GetWrtShellPtr() : nullptr;
InsertWindow( ED_POS, aPos.get(), ToolBoxItemBits::NONE, 0);
SetItemText(ED_POS, SW_RESSTR(STR_ACCESS_FORMULA_TYPE));
@@ -225,7 +225,7 @@ void SwInputWindow::ShowWin()
aPos->SetText(SW_RESSTR(STR_TBL_FORMULA));
// Edit current field
- OSL_ENSURE(pMgr == 0, "FieldManager not deleted");
+ OSL_ENSURE(pMgr == nullptr, "FieldManager not deleted");
pMgr = new SwFieldMgr;
// Formular should always begin with "=" , so set here
@@ -391,7 +391,7 @@ void SwInputWindow::ApplyFormula()
pView->GetEditWin().GrabFocus();
const SfxPoolItem* aArgs[2];
aArgs[0] = &aParam;
- aArgs[1] = 0;
+ aArgs[1] = nullptr;
pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SfxCallMode::ASYNCHRON );
}
diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx
index e7b0d05db45f..deb2b7400822 100644
--- a/sw/source/uibase/ribbar/tbxanchr.cxx
+++ b/sw/source/uibase/ribbar/tbxanchr.cxx
@@ -65,15 +65,15 @@ void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const
VclPtr<SfxPopupWindow> SwTbxAnchor::CreatePopupWindow()
{
SwTbxAnchor::Click();
- return 0;
+ return nullptr;
}
void SwTbxAnchor::Click()
{
PopupMenu aPopMenu(SW_RES(MN_ANCHOR_POPUP));
- SfxViewFrame* pViewFrame( 0 );
- SfxDispatcher* pDispatch( 0 );
+ SfxViewFrame* pViewFrame( nullptr );
+ SfxDispatcher* pDispatch( nullptr );
SfxViewShell* pCurSh( SfxViewShell::Current() );
if ( pCurSh )
@@ -83,7 +83,7 @@ void SwTbxAnchor::Click()
pDispatch = pViewFrame->GetDispatcher();
}
- SwView* pActiveView = 0;
+ SwView* pActiveView = nullptr;
if(pViewFrame)
{
SwView* pView = static_cast<SwView*>(SfxViewShell::GetFirst(true, checkSfxViewShell<SwView>));
@@ -103,7 +103,7 @@ void SwTbxAnchor::Click()
return;
}
SwWrtShell* pWrtShell = pActiveView->GetWrtShellPtr();
- aPopMenu.EnableItem( FN_TOOL_ANCHOR_FRAME, 0 != pWrtShell->IsFlyInFly() );
+ aPopMenu.EnableItem( FN_TOOL_ANCHOR_FRAME, nullptr != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 9b8276d6bd2c..8217ad8e31d9 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -72,7 +72,7 @@ SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
- pPopup(0)
+ pPopup(nullptr)
{
rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
@@ -128,7 +128,7 @@ VclPtr<SfxPopupWindow> SwTbxAutoTextCtrl::CreatePopupWindow()
}
GetToolBox().EndSelection();
DelPopup();
- return 0;
+ return nullptr;
}
@@ -172,7 +172,7 @@ void SwTbxAutoTextCtrl::DelPopup()
delete pSubPopup;
}
delete pPopup;
- pPopup = 0;
+ pPopup = nullptr;
}
}
@@ -221,7 +221,7 @@ VclPtr<SfxPopupWindow> SwTbxFieldCtrl::CreatePopupWindow()
GetToolBox().EndSelection();
- return 0;
+ return nullptr;
}
void SwTbxFieldCtrl::StateChanged( sal_uInt16,
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 5f68f0c57b73..e0239fd1bb48 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -170,7 +170,7 @@ SwAnnotationShell::~SwAnnotationShell()
!pPostItMgr->HasActiveSidebarWin() )
{
OSL_ENSURE(pPostItMgr,"PostItMgr::Layout(): We are looping forever");
- return 0;
+ return nullptr;
}
return &pPostItMgr->GetActiveSidebarWin()->GetOutlinerView()->GetOutliner()->GetUndoManager();
}
@@ -384,7 +384,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
break;
case SID_HYPERLINK_SETLINK:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem);
@@ -439,7 +439,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
case FN_INSERT_STRING:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
@@ -544,7 +544,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, 0, true ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, nullptr, true ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
@@ -721,7 +721,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUB_SCRIPT:
{
sal_uInt16 nEsc = 0;
- const SfxPoolItem *pEscItem = 0;
+ const SfxPoolItem *pEscItem = nullptr;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
else
@@ -741,7 +741,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_PARA_ADJUST_CENTER:
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- const SfxPoolItem *pAdjust = 0;
+ const SfxPoolItem *pAdjust = nullptr;
int eAdjust = 0;
if (nWhich==SID_ATTR_PARA_ADJUST_LEFT)
@@ -771,7 +771,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_PARA_LINESPACE_15:
case SID_ATTR_PARA_LINESPACE_20:
{
- const SfxPoolItem *pLSpace = 0;
+ const SfxPoolItem *pLSpace = nullptr;
int nLSpace = 0;
if (nWhich==SID_ATTR_PARA_LINESPACE_10)
@@ -1237,7 +1237,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
break;
}
case SID_HANGUL_HANJA_CONVERSION:
- pOLV->StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ pOLV->StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false );
break;
@@ -1259,7 +1259,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -1472,7 +1472,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
sal_uInt16 nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
- const SfxPoolItem* pItem=0;
+ const SfxPoolItem* pItem=nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) )
nCnt = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
switch( nId )
@@ -1553,7 +1553,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetUndoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if (rSh.GetLastUndoInfo(0, 0))
+ else if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
}
@@ -1566,7 +1566,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetRedoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if (rSh.GetFirstRedoInfo(0))
+ else if (rSh.GetFirstRedoInfo(nullptr))
{
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
}
@@ -1602,12 +1602,12 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
SfxStringListItem aItem( nWhich );
if ((nWhich == SID_GETUNDOSTRINGS) &&
- rSh.GetLastUndoInfo(0, 0))
+ rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
else if ((nWhich == SID_GETREDOSTRINGS) &&
- (rSh.GetFirstRedoInfo(0)))
+ (rSh.GetFirstRedoInfo(nullptr)))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
@@ -1656,7 +1656,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -1665,7 +1665,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
if ( pItem )
{
sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index f6fe41d6b321..8949cea9121b 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -138,13 +138,13 @@ namespace
SfxChildWindow *pChildWindow = rView.GetViewFrame()->GetChildWindow(
SvxContourDlgChildWindow::GetChildWindowId());
- return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : NULL;
+ return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : nullptr;
}
SvxIMapDlg* GetIMapDlg(SwView &rView)
{
SfxChildWindow* pWnd = rView.GetViewFrame()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
- return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : NULL;
+ return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : nullptr;
}
}
@@ -168,7 +168,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
Graphic aGrf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGrf.GetType();
void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType
- ? rSh.GetIMapInventor() : 0;
+ ? rSh.GetIMapInventor() : nullptr;
std::unique_ptr<TargetList> pList(new TargetList);
rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList);
@@ -188,7 +188,7 @@ static bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
OUString aGrfName;
if ( nSel & nsSelectionType::SEL_GRF )
- rSh.GetGrfNms( &aGrfName, 0 );
+ rSh.GetGrfNms( &aGrfName, nullptr );
SvxContourDlg *pDlg = GetContourDlg(rSh.GetView());
if (pDlg)
@@ -517,7 +517,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
case SID_UNDO:
{
- if (rSh.GetLastUndoInfo(0, 0))
+ if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSet.Put( SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::UNDO)));
@@ -528,7 +528,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_REDO:
{
- if (rSh.GetFirstRedoInfo(0))
+ if (rSh.GetFirstRedoInfo(nullptr))
{
rSet.Put(SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::REDO)));
@@ -539,9 +539,9 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_REPEAT:
{ // Repeat is only possible if no REDO is possible - UI-Restriction
- if ((!rSh.GetFirstRedoInfo(0)) &&
+ if ((!rSh.GetFirstRedoInfo(nullptr)) &&
!rSh.IsSelFrmMode() &&
- (UNDO_EMPTY != rSh.GetRepeatInfo(0)))
+ (UNDO_EMPTY != rSh.GetRepeatInfo(nullptr)))
{
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
}
@@ -551,7 +551,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_GETUNDOSTRINGS:
- if (rSh.GetLastUndoInfo(0, 0))
+ if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
@@ -562,7 +562,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
break;
case SID_GETREDOSTRINGS:
- if (rSh.GetFirstRedoInfo(0))
+ if (rSh.GetFirstRedoInfo(nullptr))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
@@ -671,7 +671,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
bool bRet = rSh.MoveFieldType( pFieldType, nSlot == FN_GOTO_NEXT_MARK );
- SwField* pCurField = bRet ? rSh.GetCurField() : 0;
+ SwField* pCurField = bRet ? rSh.GetCurField() : nullptr;
if (pCurField)
rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
@@ -776,10 +776,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
sal_Unicode cDelim = 0;
bool bToTable = false;
if( nSlot == FN_CONVERT_TEXT_TO_TABLE ||
- ( nSlot == FN_CONVERT_TEXT_TABLE && 0 == rSh.GetTableFormat() ))
+ ( nSlot == FN_CONVERT_TEXT_TABLE && nullptr == rSh.GetTableFormat() ))
bToTable = true;
SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
- SwTableAutoFormat const* pTAFormat = 0;
+ SwTableAutoFormat const* pTAFormat = nullptr;
std::unique_ptr<SwTableAutoFormatTable> pAutoFormatTable;
bool bDeleteFormat = true;
if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem))
@@ -1114,16 +1114,16 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_XFORMS_DESIGN_MODE:
- if( pArgs != NULL
+ if( pArgs != nullptr
&& pArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET
- && pItem != NULL
+ && pItem != nullptr
&& dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr )
{
bool bDesignMode =
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
- OSL_ENSURE( GetView().GetFormShell() != NULL, "form shell?" );
+ OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" );
SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
GetView().GetFormShell()->Execute( aReq );
@@ -1141,7 +1141,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
if(bMore && pArgs)
{
- pItem = 0;
+ pItem = nullptr;
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
if(pItem)
switch(nSlot)
@@ -1241,9 +1241,9 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
{
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : 0;
+ pVFrame->GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
- static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : 0;
+ static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : nullptr;
if( pDlg && ( SID_IMAP_EXEC == nSlot ||
( SID_IMAP == nSlot && !bProtect)) &&
@@ -1251,7 +1251,7 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
lcl_UpdateIMapDlg( rSh );
if( !bProtect && SID_IMAP == nSlot )
- bSetState = true, bState = 0 != pDlg;
+ bSetState = true, bState = nullptr != pDlg;
}
break;
@@ -1260,15 +1260,15 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : 0;
+ pVFrame->GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
- static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : 0;
+ static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : nullptr;
if( pDlg && pDlg->GetEditingObject() !=
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
bSetState = true;
- bState = 0 != pDlg;
+ bState = nullptr != pDlg;
}
break;
@@ -1349,7 +1349,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_CONVERT_TABLE_TO_TEXT:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
!rSh.GetTableFormat() )
rSet.DisableItem( nWhich );
@@ -1357,7 +1357,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TO_TABLE:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
!rSh.IsTextToTableAvailable() )
rSet.DisableItem( nWhich );
@@ -1365,7 +1365,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TABLE:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
(!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) )
rSet.DisableItem( nWhich );
@@ -1753,7 +1753,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
nWhich = aIter.NextWhich();
}
- pGetStateSet = 0;
+ pGetStateSet = nullptr;
}
// Disable the slots with this status methode
@@ -1908,7 +1908,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
SwBaseShell::SwBaseShell(SwView& rVw) :
SfxShell( &rVw ),
rView(rVw),
- pGetStateSet(0)
+ pGetStateSet(nullptr)
{
SwWrtShell& rWrtSh = rView.GetWrtShell();
@@ -2345,11 +2345,11 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
vcl::Window *pMDI = &GetView().GetViewFrame()->GetWindow();
// So that from the basic no dialogues for the background views are called:
bool bBackground = (&GetView() != GetActiveView());
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxItemSet* pOutSet = 0;
+ const SfxItemSet* pOutSet = nullptr;
bool bDone = false;
if(pArgs)
pArgs->GetItemState( GetPool().GetWhich(nSlot), false, &pItem );
@@ -2544,7 +2544,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SfxItemSet* pArgs = _rRequest.GetArgs();
SwWrtShell& rSh = GetShell();
- if ( !( rSh.GetFrmType( 0, true ) & FrmTypeFlags::FOOTNOTE ) )
+ if ( !( rSh.GetFrmType( nullptr, true ) & FrmTypeFlags::FOOTNOTE ) )
{
SwView &rTempView = GetView(); // Because GetView() does not work after the shell exchange
bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
@@ -2572,7 +2572,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
OUString aTableName;
OUString aAutoName;
- SwTableAutoFormat* pTAFormat = 0;
+ SwTableAutoFormat* pTAFormat = nullptr;
if( pArgs && pArgs->Count() >= 2 )
{
@@ -2734,7 +2734,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) );
nOlePos = nPos++;
}
- const FrmTypeFlags nType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags nType = rSh.GetFrmType(nullptr,true);
if ( nType & FrmTypeFlags::HEADER )
{
rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) );
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 36148b40ebb4..de5e992ad4e9 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -55,7 +55,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( NULL, &aNewAttr, pView ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, pView ));
sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
@@ -77,7 +77,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( NULL,
+ std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( nullptr,
&aNewAttr,
pDoc,
true));
@@ -112,14 +112,14 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
bool bHasMarked = pView->AreObjectsMarked();
- const SdrObject* pObj = NULL;
+ const SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( NULL,
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( nullptr,
&aNewAttr,
pDoc,
pObj,
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 86df26664185..3f1e09814594 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -90,29 +90,29 @@ SdrObject* SwDrawShell::IsSingleFillableNonOLESelected()
if(!pSdrView)
{
- return 0;
+ return nullptr;
}
if(1 != pSdrView->GetMarkedObjectCount())
{
- return 0;
+ return nullptr;
}
SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
if(!pPickObj)
{
- return 0;
+ return nullptr;
}
if(!pPickObj->IsClosedObj())
{
- return 0;
+ return nullptr;
}
if(dynamic_cast< SdrOle2Obj* >(pPickObj))
{
- return 0;
+ return nullptr;
}
return pPickObj;
@@ -579,8 +579,8 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -588,7 +588,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
if ( pVFrame->HasChildWindow(nId) )
{
SfxChildWindow *pChildWindow = pVFrame->GetChildWindow(nId);
- pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : NULL;
+ pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index 7fe17f17b6f2..6162ba5498e9 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -71,7 +71,7 @@ TYPEINIT1(SwDrawFormShell, SwDrawBaseShell)
void SwDrawFormShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet *pArgs = rReq.GetArgs();
switch ( rReq.GetSlot() )
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index eca6b0489467..ec43a4f81cc4 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -104,7 +104,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
sal_uInt16 nSlotId = rReq.GetSlot();
bool bChanged = pSdrView->GetModel()->IsChanged();
pSdrView->GetModel()->SetChanged(false);
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlotId, false, &pItem);
@@ -131,7 +131,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if(!pArgs)
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
@@ -180,7 +180,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if(!pArgs)
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
std::unique_ptr<SfxAbstractTabDialog> pDlg;
@@ -201,7 +201,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxCaptionDialog* pCaptionDlg =
- pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors );
+ pFact->CreateCaptionDialog( nullptr, pSdrView, nAllowedAnchors );
pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg.reset(pCaptionDlg);
}
@@ -209,7 +209,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxTransformTabDialog* pTransform =
- pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors );
+ pFact->CreateSvxTransformTabDialog( nullptr, nullptr, pSdrView, nAllowedAnchors );
pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg.reset(pTransform);
}
@@ -287,10 +287,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aAnchor );
}
}
- const SfxPoolItem* pHoriOrient = 0;
- const SfxPoolItem* pHoriRelation = 0;
- const SfxPoolItem* pHoriPosition = 0;
- const SfxPoolItem* pHoriMirror = 0;
+ const SfxPoolItem* pHoriOrient = nullptr;
+ const SfxPoolItem* pHoriRelation = nullptr;
+ const SfxPoolItem* pHoriPosition = nullptr;
+ const SfxPoolItem* pHoriMirror = nullptr;
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, false, &pHoriOrient);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, false, &pHoriRelation);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, false, &pHoriPosition);
@@ -310,9 +310,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put(aHOrient);
}
- const SfxPoolItem* pVertOrient = 0;
- const SfxPoolItem* pVertRelation = 0;
- const SfxPoolItem* pVertPosition = 0;
+ const SfxPoolItem* pVertOrient = nullptr;
+ const SfxPoolItem* pVertRelation = nullptr;
+ const SfxPoolItem* pVertPosition = nullptr;
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, false, &pVertOrient);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, false, &pVertRelation);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, false, &pVertPosition);
@@ -328,7 +328,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aVOrient.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue());
aFrmAttrSet.Put( aVOrient );
}
- const SfxPoolItem* pFollowItem = 0;
+ const SfxPoolItem* pFollowItem = nullptr;
pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
@@ -376,7 +376,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (GetView().GetDrawFuncPtr())
{
GetView().GetDrawFuncPtr()->Deactivate();
- GetView().SetDrawFuncPtr(NULL);
+ GetView().SetDrawFuncPtr(nullptr);
}
GetView().LeaveDrawCreate(); // Switch to selection mode
}
@@ -523,7 +523,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName));
+ std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(nullptr, aName));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl));
@@ -553,7 +553,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription));
+ std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(nullptr, aTitle, aDescription));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
@@ -698,7 +698,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- const bool bIsWebView(NULL != dynamic_cast<SwWebView*>(&GetView()));
+ const bool bIsWebView(nullptr != dynamic_cast<SwWebView*>(&GetView()));
if(!bIsWebView && 1L != pSdrView->GetMarkedObjectCount())
{
@@ -716,7 +716,7 @@ void SwDrawBaseShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
rSet.Put(aNewAttr,false);
@@ -759,7 +759,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid
// OD 18.09.2003 #i18732# - adjustment for allowing vertical position
// aligned to page for fly frame anchored to paragraph or to character.
const RndStdIds eAnchorType = static_cast<RndStdIds >(rValidation.nAnchorType);
- const SwPosition* pContentPos = 0;
+ const SwPosition* pContentPos = nullptr;
SdrView* pSdrView = pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
@@ -774,7 +774,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid
rValidation.nVRelOrient,
pContentPos,
rValidation.bFollowTextFlow,
- rValidation.bMirror, NULL, &rValidation.aPercentSize);
+ rValidation.bMirror, nullptr, &rValidation.aPercentSize);
bool bIsInVertical( false );
{
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 59550baea276..377753d781fb 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -422,7 +422,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, 0, true ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, nullptr, true ));
assert(pDlg && "Dialog creation failed!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
@@ -457,7 +457,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
break;
case SID_HYPERLINK_SETLINK:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem);
@@ -590,7 +590,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
SfxItemSet aEditAttr( pOLV->GetAttribs() );
- const SfxPoolItem *pAdjust = 0, *pLSpace = 0, *pEscItem = 0;
+ const SfxPoolItem *pAdjust = nullptr, *pLSpace = nullptr, *pEscItem = nullptr;
int eAdjust, nLSpace, nEsc;
while(nWhich)
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index ff2c67e550c7..4a8cb89257fe 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -238,8 +238,8 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -247,7 +247,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
if (pVFrame->HasChildWindow(nId))
{
SfxChildWindow* pWnd = pVFrame->GetChildWindow(nId);
- pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
@@ -296,7 +296,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
break;
case SID_HANGUL_HANJA_CONVERSION:
- pOutlinerView->StartTextConversion(LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ pOutlinerView->StartTextConversion(LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false);
break;
@@ -321,7 +321,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
return;
// initialize dialog
- Reference<awt::XWindow> xDialogParentWindow(0);
+ Reference<awt::XWindow> xDialogParentWindow(nullptr);
Sequence<Any> aSequence(1);
Any* pArray = aSequence.getArray();
PropertyValue aParam;
@@ -416,7 +416,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
{
const SfxItemSet *pNewAttrs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
{
pNewAttrs->GetItemState(nSlot, false, &pItem );
@@ -695,7 +695,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!pOLV)
return;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -704,7 +704,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if ( pItem )
{
sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 0872981aa2be..3473a2ffa4ab 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -98,7 +98,7 @@ static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUSt
if(pFormat->GetName() == rName)
return pFormat;
}
- return 0;
+ return nullptr;
}
#define SwFrameShell
@@ -622,7 +622,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
assert(pFact);
std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(
- pFact->CreateSvxObjectTitleDescDialog( NULL,
+ pFact->CreateSvxObjectTitleDescDialog( nullptr,
aTitle,
aDescription ));
assert(pDlg);
@@ -676,7 +676,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
bProtect |= bParentCntProt;
- const FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
@@ -967,7 +967,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
SvxBoxItem aBoxItem(rBoxItem);
SvxBorderLine aBorderLine;
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if(pArgs) // Any controller can sometimes deliver nothing #48169#
{
@@ -980,13 +980,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
SvxBoxItem aNewBox(*static_cast<const SvxBoxItem *>(pItem));
const SvxBorderLine* pBorderLine;
- if ((pBorderLine = aBoxItem.GetTop()) != NULL)
+ if ((pBorderLine = aBoxItem.GetTop()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetBottom()) != NULL)
+ if ((pBorderLine = aBoxItem.GetBottom()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetLeft()) != NULL)
+ if ((pBorderLine = aBoxItem.GetLeft()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetRight()) != NULL)
+ if ((pBorderLine = aBoxItem.GetRight()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
if(aBorderLine.GetOutWidth() == 0)
@@ -1007,13 +1007,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
aBoxItem = aNewBox;
SvxBorderLine aDestBorderLine;
- if( aBoxItem.GetTop() != NULL )
+ if( aBoxItem.GetTop() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::TOP);
- if( aBoxItem.GetBottom() != NULL )
+ if( aBoxItem.GetBottom() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
- if( aBoxItem.GetLeft() != NULL )
+ if( aBoxItem.GetLeft() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
- if( aBoxItem.GetRight() != NULL )
+ if( aBoxItem.GetRight() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
}
}
@@ -1064,10 +1064,10 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
else
{
- aBoxItem.SetLine(0, SvxBoxItemLine::TOP);
- aBoxItem.SetLine(0, SvxBoxItemLine::BOTTOM);
- aBoxItem.SetLine(0, SvxBoxItemLine::LEFT);
- aBoxItem.SetLine(0, SvxBoxItemLine::RIGHT);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::TOP);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::BOTTOM);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::LEFT);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::RIGHT);
}
}
}
@@ -1255,7 +1255,7 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
assert(pFact);
std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(
- NULL,
+ nullptr,
&aNewAttr,
pDoc,
false));
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index bc681b588b02..749474d7c80f 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -132,7 +132,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_SAVE_GRAPHIC:
{
const Graphic *pGraphic;
- if(0 != (pGraphic = rSh.GetGraphic()))
+ if(nullptr != (pGraphic = rSh.GetGraphic()))
{
OUString sGrfNm;
OUString sFilterNm;
@@ -191,7 +191,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// When the graphic is selected to be opened via some external tool
// for advanced editing
GraphicObject const*const pGraphicObject(rSh.GetGraphicObj());
- if(0 != pGraphicObject)
+ if(nullptr != pGraphicObject)
{
m_ExternalEdits.push_back(std::unique_ptr<SwExternalToolEdit>(
new SwExternalToolEdit(&rSh)));
@@ -336,7 +336,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
SfxObjectShell * sh = rSh.GetDoc()->GetPersist();
- if (sh != 0 && sh->HasName())
+ if (sh != nullptr && sh->HasName())
{
aSet.Put(
SfxStringItem(SID_REFERER, sh->GetMedium()->GetName()));
@@ -477,7 +477,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_OBJECT_CROP:
{
GraphicObject const *pGraphicObject = rSh.GetGraphicObj();
- if (0 != pGraphicObject && SDRDRAG_CROP != rSh.GetDragMode()) {
+ if (nullptr != pGraphicObject && SDRDRAG_CROP != rSh.GetDragMode()) {
rSh.StartCropImage();
}
}
@@ -502,7 +502,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
const SfxPoolItem* pItem;
sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
switch( nSlot )
{
@@ -827,7 +827,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
}
- SetGetStateSet( 0 );
+ SetGetStateSet( nullptr );
}
void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
@@ -928,7 +928,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
nWhich = aIterator.NextWhich();
}
- SetGetStateSet( 0 );
+ SetGetStateSet( nullptr );
}
SwGrfShell::~SwGrfShell()
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 3f9ced7a89d7..1ded2e66fbc1 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -226,7 +226,7 @@ namespace SwLangHelper
void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet );
+ SetLanguage( rWrtSh, nullptr , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
@@ -234,7 +234,7 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : nullptr;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
@@ -308,7 +308,7 @@ namespace SwLangHelper
void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet );
+ SetLanguage_None( rWrtSh,nullptr,ESelection(),bIsForSelection,rCoreSet );
}
void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
@@ -335,7 +335,7 @@ namespace SwLangHelper
// (for paragraph is handled by previosuly having set the selection to the
// whole paragraph)
- EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : nullptr;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
if (pEditEngine)
{
@@ -368,7 +368,7 @@ namespace SwLangHelper
void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection )
{
- ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection );
+ ResetLanguages( rWrtSh, nullptr , ESelection(), bIsForSelection );
}
void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection )
@@ -416,7 +416,7 @@ namespace SwLangHelper
LanguageType nLang = LANGUAGE_SYSTEM;
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState nState = aSet.GetItemState( nLangWhichId, true, &pItem );
if (nState > SfxItemState::DEFAULT && pItem)
{
diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx
index 6afb7f525ccf..b39ade8b7b2e 100644
--- a/sw/source/uibase/shells/mediash.cxx
+++ b/sw/source/uibase/shells/mediash.cxx
@@ -114,7 +114,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
const SfxPoolItem* pItem;
if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
- pItem = NULL;
+ pItem = nullptr;
if( pItem )
{
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index ce012a693a13..96016f8cf94e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -201,7 +201,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
rSh.GetTabBorders( rSet );
//row split
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
{
@@ -274,7 +274,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.StartAllAction();
rSh.StartUndo( UNDO_TABLE_ATTR );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem))
{
@@ -284,14 +284,14 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
}
bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) ||
SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
- pItem = 0;
+ pItem = nullptr;
bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem );
- const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
+ const SfxPoolItem* pRowItem = nullptr, *pTableItem = nullptr;
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem );
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem );
- const SfxPoolItem* pSplit = 0;
+ const SfxPoolItem* pSplit = nullptr;
bool bRowSplit = SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit );
- const SfxPoolItem* pBoxDirection = 0;
+ const SfxPoolItem* pBoxDirection = nullptr;
bool bBoxDirection = SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
@@ -353,7 +353,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwTabCols aTabCols;
bool bTabCols = false;
- SwTableRep* pRep = 0;
+ SwTableRep* pRep = nullptr;
SwFrameFormat *pFormat = rSh.GetTableFormat();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
@@ -454,7 +454,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// At first the slots which doesn't need a FrmMgr.
bool bMore = false;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
@@ -476,7 +476,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.GetTabBorders( aCoreSet );
const SvxBoxItem& rCoreBox = static_cast<const SvxBoxItem&>(
aCoreSet.Get(RES_BOX));
- const SfxPoolItem *pBoxItem = 0;
+ const SfxPoolItem *pBoxItem = nullptr;
if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SfxItemState::SET )
{
aBox = *static_cast<const SvxBoxItem*>(pBoxItem);
@@ -788,7 +788,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, false );
+ rSh.ResetSelect( nullptr, false );
bCallDone = true;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
@@ -923,7 +923,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
+ std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : nullptr);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
@@ -1168,7 +1168,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ROW_SPLIT :
{
const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(pItem);
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
if(!pBool)
{
rSh.GetRowSplit(pSplit);
@@ -1347,7 +1347,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
}
else
{
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
@@ -1407,7 +1407,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = static_cast<const SvxLineItem&>(pArgs->
Get( SID_FRAME_LINESTYLE ));
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, true, pBorderLine);
+ rSh.SetTabLineStyle( nullptr, true, pBorderLine);
}
else
{
@@ -1446,7 +1446,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
SwWrtShell &rSh = GetShell();
// At first the slots, which doesn't need a FrmMgr.
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 4ea500e1d49c..869d845de3cc 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -109,7 +109,7 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline )
void SwTextShell::ExecField(SfxRequest &rReq)
{
SwWrtShell& rSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -183,7 +183,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bool bRet = false;
SwFieldType* pField = rSh.GetFieldType( 0, RES_INPUTFLD );
const bool bAddSetExpressionFields = !( rSh.GetViewOptions()->IsReadonly() );
- if ( pField != NULL
+ if ( pField != nullptr
&& rSh.MoveFieldType(
pField,
FN_GOTO_NEXT_INPUTFLD == nSlot,
@@ -191,7 +191,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bAddSetExpressionFields ) )
{
rSh.ClearMark();
- if ( dynamic_cast<SwInputField*>(rSh.GetCurField( true )) != NULL )
+ if ( dynamic_cast<SwInputField*>(rSh.GetCurField( true )) != nullptr )
{
rSh.SttSelect();
rSh.SelectText(
@@ -304,7 +304,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow(FN_INSERT_FIELD);
- bRes = pVFrame->GetChildWindow( nSlot ) != 0;
+ bRes = pVFrame->GetChildWindow( nSlot ) != nullptr;
Invalidate(rReq.GetSlot());
Invalidate(FN_INSERT_FIELD_CTRL);
rReq.Ignore();
@@ -420,7 +420,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
if ( pSwFormatField->GetField() == pPostIt )
{
- pSwFormatField->Broadcast( SwFormatFieldHint( 0, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
+ pSwFormatField->Broadcast( SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
break;
}
pSwFormatField = aIter.Next();
@@ -477,7 +477,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- bool bPrev = pActRed != 0;
+ bool bPrev = pActRed != nullptr;
rSh.Pop(false);
rSh.EndAction();
@@ -487,7 +487,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- bool bNext = pActRed != 0;
+ bool bNext = pActRed != nullptr;
rSh.Pop(false); // Restore cursor position
if( rSh.IsCrsrPtAtEnd() )
@@ -525,7 +525,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
pDlg.reset();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
g_bNoInterrupt = false;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
@@ -643,7 +643,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
{
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
- const SwField* pField = 0;
+ const SwField* pField = nullptr;
bool bGetField = false;
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -869,7 +869,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo
pSh->Push();
const SwRangeRedline *pActRed = pSh->SelNextRedline();
- pSh->Pop(pActRed != 0);
+ pSh->Pop(pActRed != nullptr);
bool bEnable = false;
@@ -877,7 +877,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo
{
pSh->StartAction();
pSh->Push();
- bEnable = pSh->SelNextRedline() != 0;
+ bEnable = pSh->SelNextRedline() != nullptr;
pSh->Pop(false);
pSh->EndAction();
}
@@ -913,7 +913,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog&, rDlg, vo
// Traveling only if more than one field.
pSh->Push();
const SwRangeRedline *pActRed = pSh->SelPrevRedline();
- pSh->Pop(pActRed != 0);
+ pSh->Pop(pActRed != nullptr);
bool bEnable = false;
@@ -921,7 +921,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog&, rDlg, vo
{
pSh->StartAction();
pSh->Push();
- bEnable = pSh->SelPrevRedline() != 0;
+ bEnable = pSh->SelPrevRedline() != nullptr;
pSh->Pop(false);
pSh->EndAction();
}
diff --git a/sw/source/uibase/shells/textglos.cxx b/sw/source/uibase/shells/textglos.cxx
index 525b3e94ee64..855d6c803394 100644
--- a/sw/source/uibase/shells/textglos.cxx
+++ b/sw/source/uibase/shells/textglos.cxx
@@ -41,7 +41,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
bool bUpdateList = false;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 9686c3ca2fdd..7eacd872d994 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -44,7 +44,7 @@
void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
@@ -121,7 +121,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth));
// Height = width for a more consistent preview (analogous to edit range)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
- const SwTOXBase* pCurTOX = 0;
+ const SwTOXBase* pCurTOX = nullptr;
bool bGlobal = false;
if(pItem)
{
@@ -170,8 +170,8 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
const bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
- const SwTOXBase* pBase = 0;
- if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
+ const SwTOXBase* pBase = nullptr;
+ if( bHtmlMode || nullptr != ( pBase = rSh.GetCurTOX()) )
{
if( pBase )
{
@@ -229,14 +229,14 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
}
else
rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG,
- 0 != pIdxMrk));
+ nullptr != pIdxMrk));
SwField* pField = rSh.GetCurField();
if(bInReadonly)
rSet.DisableItem(FN_INSERT_AUTH_ENTRY_DLG);
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, 0 != pAuthMark));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, nullptr != pAuthMark));
if( bInReadonly || !pField ||
pField->GetTyp()->Which() != RES_AUTHORITY)
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 8c65f71359fd..619186115204 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -143,7 +143,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
"wrong shell on dispatcher" );
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
@@ -272,7 +272,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, true, nSlot);
+ rSh.InsertObject( xObj, nullptr, true, nSlot);
}
}
}
@@ -283,7 +283,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_INSERT_PLUGIN:
{
const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
- SvGlobalName *pName = NULL;
+ SvGlobalName *pName = nullptr;
SvGlobalName aName;
if ( pNameItem )
{
@@ -413,7 +413,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, true, nSlot);
+ rSh.InsertObject( xObj, nullptr, true, nSlot);
rReq.Done();
}
}
@@ -526,7 +526,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME:
{
bool bSingleCol = false;
- if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
+ if( nullptr!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( HTML_CFG_MSIE == rHtmlOpt.GetExportMode() )
@@ -926,7 +926,7 @@ void SwTextShell::ExecRotateTransliteration( SfxRequest & rReq )
}
SwTextShell::SwTextShell(SwView &_rView) :
- SwBaseShell(_rView), pPostItFieldMgr( 0 )
+ SwBaseShell(_rView), pPostItFieldMgr( nullptr )
{
SetName("Text");
SetHelpId(SW_TEXTSHELL);
@@ -983,7 +983,7 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr)
void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -991,7 +991,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
if ( pItem )
{
aChars = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 94f95fe0bd53..3e3e2e3b1ba6 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -194,7 +194,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
}
- const SfxItemSet* pSet = NULL;
+ const SfxItemSet* pSet = nullptr;
if ( !bUseDialog )
pSet = pArgs;
else if ( pDlg && pDlg->Execute() == RET_OK ) /* #110771# pDlg can be NULL */
@@ -283,7 +283,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
bool bUseDialog = true;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
@@ -473,7 +473,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
- rWrtSh.ResetSelect(0, false);
+ rWrtSh.ResetSelect(nullptr, false);
rWrtSh.EndSelect();
rWrtSh.GotoFootnoteText();
}
@@ -900,11 +900,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case SID_PARA_DLG:
{
- SwPaM* pPaM = NULL;
+ SwPaM* pPaM = nullptr;
if ( pArgs )
{
- const SfxPoolItem* pPaMItem = 0;
+ const SfxPoolItem* pPaMItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich( FN_PARAM_PAM ), false, &pPaMItem );
if ( pPaMItem )
pPaM = static_cast< const SwPaMItem* >( pPaMItem )->GetValue( );
@@ -1006,10 +1006,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, DLG_STD, NULL, false, sDefPage ));
+ pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, DLG_STD, nullptr, false, sDefPage ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
}
- SfxItemSet* pSet = NULL;
+ SfxItemSet* pSet = nullptr;
if ( !bUseDialog )
{
if ( nSlot == SID_ATTR_PARA_LRSPACE)
@@ -1526,7 +1526,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
const FrmTypeFlags nNoType =
FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE;
- if ( rSh.GetFrmType(0,true) & nNoType )
+ if ( rSh.GetFrmType(nullptr,true) & nNoType )
rSet.DisableItem(nWhich);
if ( rSh.CrsrInsideInputField() )
@@ -1549,7 +1549,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_TABLE:
if ( rSh.CrsrInsideInputField()
|| rSh.GetTableFormat()
- || (rSh.GetFrmType(0,true) & FrmTypeFlags::FOOTNOTE) )
+ || (rSh.GetFrmType(nullptr,true) & FrmTypeFlags::FOOTNOTE) )
{
rSet.DisableItem( nWhich );
}
@@ -1708,7 +1708,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem( nWhich, 0 != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+ rSet.Put(SfxBoolItem( nWhich, nullptr != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
}
break;
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index fddb21522455..6d2ccb2dd468 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -90,12 +90,12 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
- const SfxPoolItem* pSourceItem = 0;
- const SfxPoolItem* pCursorItem = 0;
- const SfxPoolItem* pConnectionItem = 0;
- const SfxPoolItem* pCommandItem = 0;
- const SfxPoolItem* pCommandTypeItem = 0;
- const SfxPoolItem* pSelectionItem = 0;
+ const SfxPoolItem* pSourceItem = nullptr;
+ const SfxPoolItem* pCursorItem = nullptr;
+ const SfxPoolItem* pConnectionItem = nullptr;
+ const SfxPoolItem* pCommandItem = nullptr;
+ const SfxPoolItem* pCommandTypeItem = nullptr;
+ const SfxPoolItem* pSelectionItem = nullptr;
// first get the selection of rows to be inserted
pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, false, &pSelectionItem);
@@ -187,8 +187,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_INSERT_FIELD:
{
- const SfxPoolItem* pColumnItem = 0;
- const SfxPoolItem* pColumnNameItem = 0;
+ const SfxPoolItem* pColumnItem = nullptr;
+ const SfxPoolItem* pColumnNameItem = nullptr;
pArgs->GetItemState(FN_DB_COLUMN_ANY, false, &pColumnItem);
pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, false, &pColumnNameItem);
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index ddd1de7e8288..55aae8590a50 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -171,16 +171,16 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ bool bArgs = pArgs != nullptr && pArgs->Count() > 0;
SwWrtShell& rWrtSh = GetShell();
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
// Is only set if the whole paragraph is selected and AutoUpdateFormat is set.
if (rWrtSh.HasSelection() && rWrtSh.IsSelFullPara())
{
pColl = rWrtSh.GetCurTextFormatColl();
if ( pColl && !pColl->IsAutoUpdateFormat() )
- pColl = 0;
+ pColl = nullptr;
}
SfxItemPool& rPool = GetPool();
sal_uInt16 nWhich = rPool.GetWhich( nSlot );
@@ -389,7 +389,7 @@ SET_LINESPACE:
else if(SVX_ADJUST_RIGHT == aFormat.GetNumAdjust())
aFormat.SetNumAdjust( SVX_ADJUST_LEFT );
- aRule.SetLevel(i, aFormat, aRule.Get(i) != 0);
+ aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr);
}
SwNumRule aSetRule( pCurRule->GetName(),
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
@@ -421,7 +421,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
@@ -435,7 +435,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP, 0L);
rSh.GetCurAttr(aSet);
SwFormatDrop aDropItem(static_cast<const SwFormatDrop&>(aSet.Get(RES_PARATR_DROP)));
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if(!sCharStyleName.isEmpty())
pFormat = rSh.FindCharFormatByName( sCharStyleName );
aDropItem.SetCharFormat( pFormat );
@@ -519,7 +519,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
sal_uInt16 nSlot = aIter.FirstWhich();
bool bFlag = false;
SfxBoolItem aFlagItem;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
int eAdjust = -1; // Illegal value to recognize DONTCARE.
SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem);
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 6ed39e5740b8..1d85bfbd188b 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -318,11 +318,11 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
case SID_FM_TOGGLECONTROLFOCUS:
{
const SwDoc* pDoc = rSh.GetDoc();
- const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : NULL;
- const SwView* pView = pDocShell ? pDocShell->GetView() : NULL;
- const FmFormShell* pFormShell = pView ? pView->GetFormShell() : NULL;
- SdrView* pDrawView = pView ? pView->GetDrawView() : NULL;
- vcl::Window* pWindow = pView ? pView->GetWrtShell().GetWin() : NULL;
+ const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : nullptr;
+ const SwView* pView = pDocShell ? pDocShell->GetView() : nullptr;
+ const FmFormShell* pFormShell = pView ? pView->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView ? pView->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView ? pView->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::ExecMoveMisc: no chance!" );
if ( !pFormShell || !pDrawView || !pWindow )
@@ -363,7 +363,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FrmTypeFlags::HEADER & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false) )
rSh.SttPg();
else
{
@@ -375,7 +375,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(nullptr,false) )
rSh.EndPg();
else
{
@@ -387,7 +387,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(nullptr,false) )
rSh.GotoFootnoteAnchor();
else
rSh.GotoFootnoteText();
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 1db6124b9e3a..acebe2535ad3 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -116,7 +116,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SwDocShell* pDocSh = GetView().GetDocShell();
const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr;
const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection();
- if ( pNumRuleAtCurrentSelection != NULL )
+ if ( pNumRuleAtCurrentSelection != nullptr )
{
SvxNumRule aRule = pNumRuleAtCurrentSelection->MakeSvxNumRule();
@@ -129,7 +129,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
const SvxBrushItem* pBrush = aFormat.GetBrush();
if(pBrush && !pBrush->GetGraphicLink().isEmpty())
aFormat.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
- aRule.SetLevel(i, aFormat, aRule.Get(i) != 0);
+ aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr);
}
}
if(bHtml)
@@ -199,7 +199,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
rReq.Done();
SvxNumRule* pSetRule = static_cast<const SvxNumBulletItem*>( pItem )->GetNumRule();
pSetRule->UnLinkGraphics();
- SwNumRule aSetRule( pNumRuleAtCurrentSelection != NULL
+ SwNumRule aSetRule( pNumRuleAtCurrentSelection != nullptr
? pNumRuleAtCurrentSelection->GetName()
: GetShell().GetUniqueNumRuleName(),
numfunc::GetDefaultPositionAndSpaceMode() );
@@ -207,12 +207,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aSetRule.SetAutoRule( true );
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
- const bool bCreateList = ( pNumRuleAtCurrentSelection == NULL );
+ const bool bCreateList = ( pNumRuleAtCurrentSelection == nullptr );
GetShell().SetCurNumRule( aSetRule, bCreateList );
}
// If the Dialog was leaved with OK but nothing was chosen then the
// numbering must be at least activated, if it is not already.
- else if ( pNumRuleAtCurrentSelection == NULL
+ else if ( pNumRuleAtCurrentSelection == nullptr
&& SfxItemState::SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) )
{
rReq.AppendItem( *pItem );
@@ -248,18 +248,18 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
case FN_SVX_SET_BULLET:
{
const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nSlot);
- if ( pItem != NULL )
+ if ( pItem != nullptr )
{
const sal_uInt16 nChoosenItemIdx = pItem->GetValue();
svx::sidebar::NBOTypeMgrBase* pNBOTypeMgr =
nSlot == FN_SVX_SET_NUMBER
? svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::NUMBERING )
: svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::BULLETS );
- if ( pNBOTypeMgr != NULL )
+ if ( pNBOTypeMgr != nullptr )
{
const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection();
sal_uInt16 nActNumLvl = USHRT_MAX;
- if ( pNumRuleAtCurrentSelection != NULL )
+ if ( pNumRuleAtCurrentSelection != nullptr )
{
const sal_uInt16 nLevel = GetShell().GetNumLevel();
if ( nLevel < MAXLEVEL )
@@ -268,9 +268,9 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
}
}
SwNumRule aNewNumRule(
- pNumRuleAtCurrentSelection != NULL ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(),
+ pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(),
numfunc::GetDefaultPositionAndSpaceMode() );
- SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != NULL
+ SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != nullptr
? pNumRuleAtCurrentSelection->MakeSvxNumRule()
: aNewNumRule.MakeSvxNumRule();
// set unit attribute to NB Manager
@@ -281,7 +281,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
aNewNumRule.SetSvxRule( aNewSvxNumRule, GetShell().GetDoc() );
aNewNumRule.SetAutoRule( true );
- const bool bCreateNewList = ( pNumRuleAtCurrentSelection == NULL );
+ const bool bCreateNewList = ( pNumRuleAtCurrentSelection == nullptr );
GetShell().SetCurNumRule( aNewNumRule, bCreateNewList );
}
}
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index bfcdd2dc36d0..3b2c3d32439b 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -47,19 +47,19 @@ PageColumnControl::PageColumnControl(
if ( bLandscape )
{
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE_L)), 0, SW_RES(STR_ONE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO_L)), 0, SW_RES(STR_TWO), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE_L)), 0, SW_RES(STR_THREE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT_L)), 0, SW_RES(STR_LEFT), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT_L)), 0, SW_RES(STR_RIGHT), 0 );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE_L)), nullptr, SW_RES(STR_ONE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO_L)), nullptr, SW_RES(STR_TWO), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE_L)), nullptr, SW_RES(STR_THREE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT_L)), nullptr, SW_RES(STR_LEFT), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT_L)), nullptr, SW_RES(STR_RIGHT), nullptr );
}
else
{
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE)), 0, SW_RES(STR_ONE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO)), 0, SW_RES(STR_TWO), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE)), 0, SW_RES(STR_THREE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT)), 0, SW_RES(STR_LEFT), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT)), 0, SW_RES(STR_RIGHT), 0 );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE)), nullptr, SW_RES(STR_ONE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO)), nullptr, SW_RES(STR_TWO), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE)), nullptr, SW_RES(STR_THREE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT)), nullptr, SW_RES(STR_LEFT), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT)), nullptr, SW_RES(STR_RIGHT), nullptr );
}
mpColumnValueSet->SetNoSelection();
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 6f4b82e18467..f8236a1e9039 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -204,7 +204,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aNarrowValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), 0,
+ Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), nullptr,
SW_RESSTR(STR_NARROW), &aHelpText );
SetMetricValue( *maWidthHeightField.get(), SWPAGE_NORMAL_VALUE, meUnit );
@@ -218,7 +218,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aNormalValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), 0,
+ Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), nullptr,
SW_RESSTR(STR_NORMAL), &aHelpText );
SetMetricValue( *maWidthHeightField.get(), SWPAGE_WIDE_VALUE1, meUnit );
@@ -234,7 +234,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aWide1ValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE)), 0,
+ Image((bLandscape) ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE)), nullptr,
SW_RESSTR(STR_WIDE), &aHelpText );
const OUString aInner = SW_RESSTR(STR_MARGIN_TOOLTIP_INNER);
@@ -251,7 +251,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aWide1ValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED)), 0,
+ Image((bLandscape) ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED)), nullptr,
SW_RESSTR(STR_MIRRORED), &aHelpText );
if ( bUserCustomValuesAvailable )
@@ -274,7 +274,7 @@ void PageMarginControl::FillValueSet(
aHelpText.clear();
}
mpMarginValueSet->AddItem(
- Image((bUserCustomValuesAvailable) ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS)), 0,
+ Image((bUserCustomValuesAvailable) ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS)), nullptr,
SW_RESSTR(STR_LCVALUE), &aHelpText );
}
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 73ff9eb676f9..a9f3fa689cf2 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -42,10 +42,10 @@ PageOrientationControl::PageOrientationControl(
// initialize <ValueSetWithText> control
{
- mpOrientationValueSet->AddItem(Image(SW_RES(IMG_PORTRAIT)), 0,
- SW_RES(STR_PORTRAIT), 0);
- mpOrientationValueSet->AddItem(Image(SW_RES(IMG_LANDSCAPE)), 0,
- SW_RES(STR_LANDSCAPE), 0 );
+ mpOrientationValueSet->AddItem(Image(SW_RES(IMG_PORTRAIT)), nullptr,
+ SW_RES(STR_PORTRAIT), nullptr);
+ mpOrientationValueSet->AddItem(Image(SW_RES(IMG_LANDSCAPE)), nullptr,
+ SW_RES(STR_LANDSCAPE), nullptr );
}
mpOrientationValueSet->SetSelectHdl(LINK(this, PageOrientationControl,ImplOrientationHdl ));
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 8ac1f6939617..7040be9a445f 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -86,12 +86,12 @@ VclPtr<vcl::Window> PagePropertyPanel::Create (
const css::uno::Reference< css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", nullptr, 2);
return VclPtr<PagePropertyPanel>::Create( pParent,
rxFrame,
@@ -106,8 +106,8 @@ PagePropertyPanel::PagePropertyPanel(
, mpBindings(pBindings)
// image resources
- , maImgSize (NULL)
- , maImgSize_L (NULL)
+ , maImgSize (nullptr)
+ , maImgSize_L (nullptr)
, mImgPortrait (SW_RES(IMG_PAGE_PORTRAIT))
, mImgLandscape (SW_RES(IMG_PAGE_LANDSCAPE))
, mImgNarrow (SW_RES(IMG_PAGE_NARROW))
@@ -203,9 +203,9 @@ PagePropertyPanel::~PagePropertyPanel()
void PagePropertyPanel::dispose()
{
delete[] maImgSize;
- maImgSize = NULL;
+ maImgSize = nullptr;
delete[] maImgSize_L;
- maImgSize_L = NULL;
+ maImgSize_L = nullptr;
mpPageItem.reset();
mpPageLRMarginItem.reset();
@@ -566,7 +566,7 @@ void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pSt
else
{
SfxViewFrame* pFrame = SfxViewFrame::Current();
- SfxObjectShell* pSh = NULL;
+ SfxObjectShell* pSh = nullptr;
if ( pFrame )
pSh = pFrame->GetObjectShell();
if ( pSh )
@@ -588,9 +588,9 @@ void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pSt
void PagePropertyPanel::ChangeMarginImage()
{
- if ( mpPageLRMarginItem.get() == 0 ||
- mpPageULMarginItem.get() == 0 ||
- mpPageItem.get() == 0 )
+ if ( mpPageLRMarginItem.get() == nullptr ||
+ mpPageULMarginItem.get() == nullptr ||
+ mpPageItem.get() == nullptr )
{
return;
}
@@ -632,8 +632,8 @@ void PagePropertyPanel::ChangeMarginImage()
void PagePropertyPanel::ChangeSizeImage()
{
- if ( mpPageSizeItem.get() == 0 ||
- mpPageItem.get() == 0 )
+ if ( mpPageSizeItem.get() == nullptr ||
+ mpPageItem.get() == nullptr )
{
return;
}
@@ -695,7 +695,7 @@ void PagePropertyPanel::ChangeSizeImage()
void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType )
{
- if ( mpPageItem.get() == 0 )
+ if ( mpPageItem.get() == nullptr )
{
return;
}
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index e43cd140850a..20b3c8a3b449 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -118,7 +118,7 @@ PageSizeControl::PageSizeControl(
mpSizeValueSet->AddItem(
SvxPaperInfo::GetName( maPaperList[ nPaperIdx ] ),
aItemText2,
- 0 );
+ nullptr );
if ( maPaperList[ nPaperIdx ] == mePaper )
{
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index 71aa566c7c9f..656054d07f14 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -147,12 +147,12 @@ VclPtr<vcl::Window> StylePresetsPanel::Create (vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to StylePresetsPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to StylePresetsPanel::Create", nullptr, 0);
if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to StylePresetsPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to StylePresetsPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to StylePresetsPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to StylePresetsPanel::Create", nullptr, 2);
return VclPtr<StylePresetsPanel>::Create(pParent, rxFrame, pBindings);
}
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 5181ac3be1f0..4a5d33a1c73e 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -105,18 +105,18 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
- if ( ! xParentWindow.is() || pParentWindow==NULL)
+ if ( ! xParentWindow.is() || pParentWindow==nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without ParentWindow",
- NULL);
+ nullptr);
if ( ! xFrame.is())
throw RuntimeException(
"PanelFactory::createUIElement called without Frame",
- NULL);
- if (pBindings == NULL)
+ nullptr);
+ if (pBindings == nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without SfxBindings",
- NULL);
+ nullptr);
if (rsResourceURL.endsWith("/PagePropertyPanel"))
{
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 5653db1bf76b..90694ef79a0c 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -431,12 +431,12 @@ VclPtr<vcl::Window> ThemePanel::Create (vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", nullptr, 0);
if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", nullptr, 2);
return VclPtr<ThemePanel>::Create(pParent, rxFrame, pBindings);
}
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 1e6708bf4ec4..8ee32d15feeb 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -50,12 +50,12 @@ VclPtr<vcl::Window> WrapPropertyPanel::Create (
const css::uno::Reference< css::frame::XFrame >& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to WrapPropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to WrapPropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to WrapPropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to WrapPropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", nullptr, 2);
return VclPtr<WrapPropertyPanel>::Create(
pParent,
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index c28c18675c45..eb2931965c71 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -162,7 +162,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings )
}
}
- SwFlyFrameFormat *pFlyFrameFormat = 0;
+ SwFlyFrameFormat *pFlyFrameFormat = nullptr;
xChartModel.set( SwTableFUNC( &rWrtShell, false ).InsertChart( xDataProvider, xDataProvider.is(), aRangeString, &pFlyFrameFormat ));
//open wizard
@@ -181,7 +181,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings )
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
{
- uno::Reference< awt::XWindow > xDialogParentWindow(0);
+ uno::Reference< awt::XWindow > xDialogParentWindow(nullptr);
// initialize dialog
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index e0a9894b7d51..96d1090138a3 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -229,7 +229,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( xObj.is() )
{
- SwFlyFrameFormat* pTmp = 0;
+ SwFlyFrameFormat* pTmp = nullptr;
pSh->InsertOleObject( aEmbObjRef, &pTmp );
if (ppFlyFrameFormat)
*ppFlyFrameFormat = pTmp;
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index f28c524af776..d832099a4b45 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -89,7 +89,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
// TabPage Format/Table/Columns
@@ -140,7 +140,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
@@ -179,7 +179,7 @@ class SwTextFlowPage : public SfxTabPage
DECL_LINK_TYPED( PageBreakTypeHdl_Impl, Button*, void );
DECL_LINK_TYPED( SplitHdl_Impl, Button*, void );
DECL_STATIC_LINK_TYPED( SwTextFlowPage, SplitRowHdl_Impl, Button*, void );
- DECL_LINK_TYPED( HeadLineCBClickHdl, Button* = 0, void );
+ DECL_LINK_TYPED( HeadLineCBClickHdl, Button* = nullptr, void );
public:
SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index c6808fe5d43e..fb16147de311 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -60,7 +60,7 @@ FORMAT_PAINTBRUSH_FRAME_IDS
SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool, bool bNoParagraphFormats = false )
{
- SfxItemSet* pItemSet = 0;
+ SfxItemSet* pItemSet = nullptr;
if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
{
pItemSet = new SfxItemSet(rPool,
@@ -121,7 +121,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSet.Put( pFrameFormat->GetFrmDir() );
}
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
@@ -129,11 +129,11 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) ||
SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem );
- const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
+ const SfxPoolItem* pRowItem = nullptr, *pTableItem = nullptr;
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem );
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem );
@@ -164,37 +164,37 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(pFrameFormat)
{
//RES_SHADOW
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_BREAK
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_PAGEDESC
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_LAYOUT_SPLIT
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_KEEP
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_FRAMEDIR
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
@@ -217,9 +217,9 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
SwFormatClipboard::SwFormatClipboard()
: m_nSelectionType(0)
- , m_pItemSet_TextAttr(0)
- , m_pItemSet_ParAttr(0)
- , m_pTableItemSet(0)
+ , m_pItemSet_TextAttr(nullptr)
+ , m_pItemSet_ParAttr(nullptr)
+ , m_pTableItemSet(nullptr)
, m_bPersistentCopy(false)
{
}
@@ -232,9 +232,9 @@ SwFormatClipboard::~SwFormatClipboard()
bool SwFormatClipboard::HasContent() const
{
- return m_pItemSet_TextAttr!=0
- || m_pItemSet_ParAttr!=0
- || m_pTableItemSet != 0
+ return m_pItemSet_TextAttr!=nullptr
+ || m_pItemSet_ParAttr!=nullptr
+ || m_pTableItemSet != nullptr
|| !m_aCharStyle.isEmpty()
|| !m_aParaStyle.isEmpty()
;
@@ -578,13 +578,13 @@ void SwFormatClipboard::Erase()
m_nSelectionType = 0;
delete m_pItemSet_TextAttr;
- m_pItemSet_TextAttr = 0;
+ m_pItemSet_TextAttr = nullptr;
delete m_pItemSet_ParAttr;
- m_pItemSet_ParAttr = 0;
+ m_pItemSet_ParAttr = nullptr;
delete m_pTableItemSet;
- m_pTableItemSet = 0;
+ m_pTableItemSet = nullptr;
if( !m_aCharStyle.isEmpty() )
m_aCharStyle.clear();
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 3efbd57b9b7e..3c388fe66a8c 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -188,11 +188,11 @@ void SwPreviewZoomDlg::Apply()
// all for SwPagePreviewWin
SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView )
: Window(pParent, WinBits(WB_CLIPCHILDREN))
- , mpViewShell(0)
+ , mpViewShell(nullptr)
, mrView(rPView)
, mbCalcScaleForPreviewLayout(true)
, maPaintedPreviewDocRect(Rectangle(0,0,0,0))
- , mpPgPreviewLayout(NULL)
+ , mpPgPreviewLayout(nullptr)
{
SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
SetHelpId(HID_PAGEPREVIEW);
@@ -511,7 +511,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetNewCrsrPos( sNewCrsrPos );
SfxViewFrame *pTmpFrm = mrView.GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@@ -959,7 +959,7 @@ MOVEPAGE:
nSelPage +=2;
SetNewPage( nSelPage );
SfxViewFrame *pTmpFrm = GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
break;
@@ -1184,8 +1184,8 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ),
nNewPage(USHRT_MAX),
sPageStr(SW_RES(STR_PAGE)),
- pHScrollbar(0),
- pVScrollbar(0),
+ pHScrollbar(nullptr),
+ pVScrollbar(nullptr),
pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(),
pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
@@ -1243,11 +1243,11 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
}
if( pVS )
- pNew = new SwViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
+ pNew = new SwViewShell( *pVS, pViewWin, nullptr, VSHELLFLAG_ISPREVIEW );
else
pNew = new SwViewShell(
*static_cast<SwDocShell*>(pViewFrame->GetObjectShell())->GetDoc(),
- pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+ pViewWin, nullptr, nullptr, VSHELLFLAG_ISPREVIEW );
pViewWin->SetViewShell( pNew );
pNew->SetSfxViewShell( this );
@@ -1256,9 +1256,9 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SwPagePreview::~SwPagePreview()
{
- SetWindow( 0 );
+ SetWindow( nullptr );
SwViewShell* pVShell = pViewWin->GetViewShell();
- pVShell->SetWin(0);
+ pVShell->SetWin(nullptr);
delete pVShell;
pViewWin.disposeAndClear();
@@ -1849,7 +1849,7 @@ uno::Reference< css::accessibility::XAccessible >
{
SolarMutexGuard aGuard; // this should have happened already!!!
- OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" );
+ OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" );
css::uno::Reference< css::accessibility::XAccessible > xAcc = GetAccessible( false );
if (xAcc.is())
{
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index eb66d8ac5fa5..7f1bc323ff53 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -219,7 +219,7 @@ static OUString lcl_ConvertTabsToSpaces( const OUString& sLine )
SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( VclPtr<SwSrcEditWindow>::Create( &pViewFrame->GetWindow(), this ) ),
- pSearchItem(0),
+ pSearchItem(nullptr),
bSourceSaved(false),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
@@ -338,7 +338,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
case SID_SAVEDOC:
{
SwDocShell* pDocShell = GetDocShell();
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
if(pDocShell->HasName())
pMed = pDocShell->GetMedium();
else
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index d2195b7f62c4..c67b46899498 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -78,8 +78,8 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
rSh.EndAllAction();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() )),
- aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )),
+ aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() ));
aLogRect.SetPos( aPrt.Pos() + aFrm.Pos() );
aLogRect.SetSize( aPrt.SSize() );
}
@@ -87,7 +87,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
void SwOleClient::ObjectAreaChanged()
{
SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() ));
if ( !aFrm.IsOver( rSh.VisArea() ) )
rSh.MakeVisible( aFrm );
}
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 17fbac4e8e90..49d3a96de2a9 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -57,16 +57,16 @@ using namespace ::com::sun::star::datatransfer::clipboard;
SwView_Impl::SwView_Impl(SwView* pShell)
: mxXTextView()
, pView(pShell)
- , pScanEvtLstnr(0)
- , pClipEvtLstnr(0)
+ , pScanEvtLstnr(nullptr)
+ , pClipEvtLstnr(nullptr)
, eShellMode(SHELL_MODE_TEXT)
#if HAVE_FEATURE_DBCONNECTIVITY
- , pConfigItem(0)
+ , pConfigItem(nullptr)
, nMailMergeRestartPage(0)
, bMailMergeSourceView(true)
#endif
- , m_pDocInserter(NULL)
- , m_pRequest(NULL)
+ , m_pDocInserter(nullptr)
+ , m_pRequest(nullptr)
, m_nParam(0)
, m_bSelectObject(false)
, m_bEditingPositionSet(false)
@@ -78,9 +78,9 @@ SwView_Impl::SwView_Impl(SwView* pShell)
SwView_Impl::~SwView_Impl()
{
Reference<XUnoTunnel> xDispTunnel(xDisProvInterceptor, UNO_QUERY);
- SwXDispatchProviderInterceptor* pInterceptor = 0;
+ SwXDispatchProviderInterceptor* pInterceptor = nullptr;
if(xDispTunnel.is() &&
- 0 != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
+ nullptr != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
sal::static_int_cast< sal_IntPtr >(
xDispTunnel->getSomething(SwXDispatchProviderInterceptor::getUnoTunnelId())))))
{
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 7dd9064caad0..35e5ebcf9a2e 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -126,15 +126,15 @@ extern bool g_bNoInterrupt; // in swmodule.cxx
bool bDocSzUpdated = true;
-SvxSearchItem* SwView::m_pSrchItem = 0;
+SvxSearchItem* SwView::m_pSrchItem = nullptr;
bool SwView::m_bExtra = false;
bool SwView::m_bFound = false;
bool SwView::m_bJustOpened = false;
VclPtr<SvxSearchDialog> SwView::m_pSrchDlg = nullptr;
-SearchAttrItemList* SwView::m_pSrchList = 0;
-SearchAttrItemList* SwView::m_pReplList = 0;
+SearchAttrItemList* SwView::m_pSrchList = nullptr;
+SearchAttrItemList* SwView::m_pReplList = nullptr;
inline SfxDispatcher &SwView::GetDispatcher()
{
@@ -184,7 +184,7 @@ void SwView::GotFocus() const
SwAnnotationShell* pAsAnnotationShell = dynamic_cast<SwAnnotationShell*>( pTopShell );
if ( pAsAnnotationShell )
{
- m_pPostItMgr->SetActiveSidebarWin(0);
+ m_pPostItMgr->SetActiveSidebarWin(nullptr);
const_cast< SwView* >( this )->AttrChangedNotify( m_pWrtShell );
}
}
@@ -210,7 +210,7 @@ IMPL_LINK_NOARG_TYPED(SwView, FormControlActivated, LinkParamNone*, void)
if ( !pAsFormShell )
{
// if we're editing text currently, cancel this
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : NULL;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if ( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
@@ -682,25 +682,25 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
m_nNewPage(USHRT_MAX),
m_nOldPageNum(0),
- m_pNumRuleNodeFromDoc(0),
+ m_pNumRuleNodeFromDoc(nullptr),
m_pEditWin( VclPtr<SwEditWin>::Create( &_pFrame->GetWindow(), *this ) ),
- m_pWrtShell(0),
- m_pShell(0),
- m_pFormShell(0),
- m_pHScrollbar(0),
- m_pVScrollbar(0),
+ m_pWrtShell(nullptr),
+ m_pShell(nullptr),
+ m_pFormShell(nullptr),
+ m_pHScrollbar(nullptr),
+ m_pVScrollbar(nullptr),
m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin,
SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL|
SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC,
GetViewFrame()->GetBindings(),
WB_VSCROLL | WB_EXTRAFIELD | WB_BORDER )),
- m_pTogglePageBtn(0),
- m_pGlosHdl(0),
- m_pDrawActual(0),
- m_pLastTableFormat(0),
+ m_pTogglePageBtn(nullptr),
+ m_pGlosHdl(nullptr),
+ m_pDrawActual(nullptr),
+ m_pLastTableFormat(nullptr),
m_pFormatClipboard(new SwFormatClipboard()),
- m_pPostItMgr(0),
+ m_pPostItMgr(nullptr),
m_nSelectionType( INT_MAX ),
m_nPageCnt(0),
m_nDrawSfxId( USHRT_MAX ),
@@ -766,7 +766,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// determine if there is an existing view for
// document
- SfxViewShell* pExistingSh = 0;
+ SfxViewShell* pExistingSh = nullptr;
if ( pOldSh )
{
pExistingSh = pOldSh;
@@ -940,7 +940,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SET_CURR_SHELL( m_pWrtShell );
m_pWrtShell->StartAction();
m_pWrtShell->CalcLayout();
- m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
m_pWrtShell->EndAction();
}
m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat( false );
@@ -1017,7 +1017,7 @@ SwView::~SwView()
{
GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
delete m_pPostItMgr;
- m_pPostItMgr = 0;
+ m_pPostItMgr = nullptr;
m_bInDtor = true;
m_pEditWin->Hide(); // prevent problems with painting
@@ -1025,27 +1025,27 @@ SwView::~SwView()
// Set pointer in SwDocShell to the view again
SwDocShell* pDocSh = GetDocShell();
if( pDocSh && pDocSh->GetView() == this )
- pDocSh->SetView( 0 );
+ pDocSh->SetView( nullptr );
if ( SW_MOD()->GetView() == this )
- SW_MOD()->SetView( 0 );
+ SW_MOD()->SetView( nullptr );
if( m_aTimer.IsActive() && m_bAttrChgNotifiedWithRegistrations )
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
- SetWindow( 0 );
+ SetWindow( nullptr );
m_pViewImpl->Invalidate();
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
m_pScrollFill.disposeAndClear();
delete m_pWrtShell;
- m_pWrtShell = 0; // Set to 0, so that it is not accessible by the following dtors cannot.
- m_pShell = 0;
+ m_pWrtShell = nullptr; // Set to 0, so that it is not accessible by the following dtors cannot.
+ m_pShell = nullptr;
m_pHScrollbar.disposeAndClear();
m_pVScrollbar.disposeAndClear();
m_pHRuler.disposeAndClear();
@@ -1658,7 +1658,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (!bDesignMode && GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
AttrChangedNotify(m_pWrtShell);
}
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 090310e62d43..49c666e9d1f7 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -372,7 +372,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pAttr=NULL;
+ const SfxPoolItem* pAttr=nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
{
@@ -543,7 +543,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if (bSet)
{
SwDocShell *pDocSh = GetDocShell();
- SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : NULL;
+ SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
// right now we don't have view options for automatic grammar checking. Thus...
bool bIsAutoGrammar = false;
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index 9fb3bd92e722..3f9b047da6a7 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -184,7 +184,7 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
void SwView::UpdateWordCount(SfxShell* pShell, sal_uInt16 nSlot)
{
SfxViewFrame* pVFrame = GetViewFrame();
- if (pVFrame != NULL)
+ if (pVFrame != nullptr)
{
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
pShell->Invalidate(nSlot);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 7c528dc42a31..853120e3a8ef 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -688,7 +688,7 @@ void SwView::Execute(SfxRequest &rReq)
// would return NULL if called on the point)
sal_uInt16 nRedline = 0;
const SwRangeRedline *pRedline = pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), &nRedline);
- assert(pRedline != 0);
+ assert(pRedline != nullptr);
if (pRedline)
{
if (FN_REDLINE_ACCEPT_DIRECT == nSlot)
@@ -816,7 +816,7 @@ void SwView::Execute(SfxRequest &rReq)
}
else if ( m_pWrtShell->HasSelection() || IsDrawMode() )
{
- SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : nullptr;
if(pSdrView && pSdrView->AreObjectsMarked() &&
pSdrView->GetHdlList().GetFocusHdl())
{
@@ -962,7 +962,7 @@ void SwView::Execute(SfxRequest &rReq)
if( m_pWrtShell->GotoNextTOXBase() )
pBase = m_pWrtShell->GetCurTOX();
else
- pBase = 0;
+ pBase = nullptr;
}
}
m_pWrtShell->SetReadOnlyAvailable( bOldCrsrInReadOnly );
@@ -1163,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq)
case FN_SPELL_GRAMMAR_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
- if (rReq.GetArgs() != NULL)
+ if (rReq.GetArgs() != nullptr)
pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
@@ -1623,7 +1623,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
bool bUp = false;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
@@ -1672,7 +1672,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
- const SfxItemSet *pSet = 0;
+ const SfxItemSet *pSet = nullptr;
std::unique_ptr<AbstractSvxZoomDialog> pDlg;
if ( pArgs )
pSet = pArgs;
@@ -1714,7 +1714,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
- const SfxPoolItem* pViewLayoutItem = 0;
+ const SfxPoolItem* pViewLayoutItem = nullptr;
if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem))
{
const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem *>(pViewLayoutItem)->GetValue();
@@ -2003,7 +2003,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
m_pWrtShell->addCurrentPosition();
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
}
@@ -2027,7 +2027,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
// make selection visible later
@@ -2095,7 +2095,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUString& rFilterName, sal_Int16 nVersion )
{
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
SwDocShell* pDocSh = GetDocShell();
if( !rFileName.isEmpty() )
@@ -2104,7 +2104,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, StreamMode::READ, 0, 0 );
+ pMed = new SfxMedium(rFileName, StreamMode::READ, nullptr, nullptr );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
pMed->UseInteractionHandler( true );
ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SfxFilterFlags::NONE);
@@ -2114,7 +2114,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, 0);
+ pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, nullptr);
}
else
{
@@ -2200,7 +2200,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
uno::Reference<text::XTextRange> const xInsertPosition(
SwXTextRange::CreateXTextRange(*pDoc,
- *m_pWrtShell->GetCrsr()->GetPoint(), 0));
+ *m_pWrtShell->GetCrsr()->GetPoint(), nullptr));
nErrno = pDocSh->ImportFrom(*pMedium, xInsertPosition)
? 0 : ERR_SWG_READ_ERROR;
}
@@ -2372,7 +2372,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( NULL, SID_OPTIONS_DATABASES ));
+ std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES ));
pDlg->Execute();
}
}
diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx
index 8f379b56ece3..3a3e20f3ce93 100644
--- a/sw/source/uibase/uiview/viewcoll.cxx
+++ b/sw/source/uibase/uiview/viewcoll.cxx
@@ -33,7 +33,7 @@
void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
diff --git a/sw/source/uibase/uiview/viewdlg.cxx b/sw/source/uibase/uiview/viewdlg.cxx
index bb7d3796b3e9..a14eeee8037c 100644
--- a/sw/source/uibase/uiview/viewdlg.cxx
+++ b/sw/source/uibase/uiview/viewdlg.cxx
@@ -36,7 +36,7 @@
void SwView::ExecDlg(SfxRequest &rReq)
{
// Thus, from the basic no dialogues for background views are called:
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index b58cf1c0708e..d5ab1c5ef626 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -145,7 +145,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
}
sal_uInt16 nID = USHRT_MAX;
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
const size_t nCount = aMgr.GetFieldTypeCount();
if( !rName.isEmpty() )
{
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index a00996a27d30..a8b4cc4768fd 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -77,8 +77,8 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- const SfxAllEnumItem* pEItem = 0;
- const SfxStringItem* pStringItem = 0;
+ const SfxAllEnumItem* pEItem = nullptr;
+ const SfxStringItem* pStringItem = nullptr;
SdrView *pSdrView = m_pWrtShell->GetDrawView();
bool bDeselect = false;
@@ -176,7 +176,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
pSdrView = m_pWrtShell->GetDrawView();
if ( pSdrView )
{
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
ScopedVclPtrInstance< svx::FontWorkGalleryDialog > aDlg( pSdrView, pWin, nSlotId );
aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() );
aDlg->Execute();
@@ -237,7 +237,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode())
@@ -255,7 +255,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (m_pWrtShell->IsFrmSelected())
m_pWrtShell->EnterStdMode(); // because bug #45639
- SwDrawBase* pFuncPtr = NULL;
+ SwDrawBase* pFuncPtr = nullptr;
switch (nSlotId)
{
@@ -347,7 +347,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
SetDrawFuncPtr(pFuncPtr);
@@ -365,7 +365,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
pFuncPtr->CreateDefaultObject();
pFuncPtr->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
m_pWrtShell->EnterStdMode();
SdrView *pTmpSdrView = m_pWrtShell->GetDrawView();
@@ -404,7 +404,7 @@ void SwView::ExitDraw()
// the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
sal_uInt16 nIdx = 0;
- SfxShell* pTest = 0;
+ SfxShell* pTest = nullptr;
do
{
pTest = pDispatch->GetShell(nIdx++);
@@ -433,7 +433,7 @@ void SwView::ExitDraw()
m_pWrtShell->LeaveSelFrmMode();
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
@@ -577,7 +577,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
// set in each case, thus it will be correct for all objects
static_cast<SdrTextObj*>(pToBeActivated)->SetTextEditOffset(aNewTextEditOffset);
- bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, 0, false, false, false ));
+ bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, nullptr, false, false, false ));
// #i7672#
// Since SdrBeginTextEdit actually creates the OutlinerView and thus also
diff --git a/sw/source/uibase/uiview/viewfunc.hxx b/sw/source/uibase/uiview/viewfunc.hxx
index a64bd360eba0..c891101e477b 100644
--- a/sw/source/uibase/uiview/viewfunc.hxx
+++ b/sw/source/uibase/uiview/viewfunc.hxx
@@ -43,8 +43,8 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
vcl::Window& rScrollBarBox,
- SvxRuler* pVRuler = 0,
- SvxRuler* pHRuler = 0,
+ SvxRuler* pVRuler = nullptr,
+ SvxRuler* pHRuler = nullptr,
bool bVRulerRight = false );
#endif
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index e2d37d25e3b2..af2e46e954df 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -106,7 +106,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
rReq.Ignore();
break;
case SID_HANGUL_HANJA_CONVERSION:
- StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true );
break;
case SID_CHINESE_CONVERSION:
@@ -127,7 +127,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -247,7 +247,7 @@ void SwView::StartTextConversion(
m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext();
const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc();
- const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
{
const uno::Reference< uno::XComponentContext > xContext(
@@ -456,7 +456,7 @@ void SwView::HyphenateDocument()
bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection;
bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() );
bool bStop = false;
- if( !bOther && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY) && !bSelection )
+ if( !bOther && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY) && !bSelection )
// turned on no special area
{
// I want also in special areas hyphenation
@@ -521,7 +521,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : 0;
+ pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -717,7 +717,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
aEvent.SourceWindow = VCLUnoHelper::GetInterface( m_pEditWin );
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
- Menu* pMenu = 0;
+ Menu* pMenu = nullptr;
OUString sMenuName = bUseGrammarContext ?
OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu");
@@ -761,7 +761,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aURL;
pExecuteInfo->aArgs = aArgs;
- Application::PostUserEvent( LINK(0, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
+ Application::PostUserEvent( LINK(nullptr, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
}
}
catch (const Exception&)
@@ -836,7 +836,7 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
aListBox(VclPtr<ListBox>::Create(this)),
pFieldmark( fieldBM )
{
- if ( fieldBM != NULL )
+ if ( fieldBM != nullptr )
{
const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters();
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index a722622493fd..12e6596b2c3b 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -152,7 +152,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
{
pUsrPref->SetZoom(nZoomFac);
pUsrPref->SetZoomType(eZoomType);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
if ( pOpt->GetZoom() != nZoomFac )
@@ -226,7 +226,7 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
{
pUsrPref->SetViewLayoutColumns(nColumns);
pUsrPref->SetViewLayoutBookMode(bBookMode);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
}
@@ -420,7 +420,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void )
rSh.EnterStdMode();
sw::sidebarwindows::SwSidebarWin* pPostIt = GetPostItMgr()->GetActiveSidebarWin();
if (pPostIt)
- GetPostItMgr()->SetActiveSidebarWin(0);
+ GetPostItMgr()->SetActiveSidebarWin(nullptr);
SwFieldType* pFieldType = rSh.GetFieldType(0, RES_POSTITFLD);
if ( rSh.MoveFieldType( pFieldType, bNext ) )
GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 47ba3deb006f..bbf790402cee 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -623,7 +623,7 @@ bool SwView::PageUpCrsr( bool bSelect )
{
if ( !bSelect )
{
- const FrmTypeFlags eType = m_pWrtShell->GetFrmType(0,true);
+ const FrmTypeFlags eType = m_pWrtShell->GetFrmType(nullptr,true);
if ( eType & FrmTypeFlags::FOOTNOTE )
{
m_pWrtShell->MoveCrsr();
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 04c4ac34680f..308d0b89e671 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -255,17 +255,17 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "No Print Dialog");
if (!pFact)
- return NULL;
+ return nullptr;
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(TP_OPTPRINT_PAGE);
OSL_ENSURE(pFact, "No Page Creator");
if (!fnCreatePage)
- return NULL;
+ return nullptr;
VclPtr<SfxTabPage> pPage = fnCreatePage(pParent, &rOptions);
OSL_ENSURE(pPage, "No page");
if (!pPage)
- return NULL;
+ return nullptr;
SfxAllItemSet aSet(*(rOptions.GetPool()));
aSet.Put(SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 92d907694970..7d7ebd578822 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -85,7 +85,7 @@ struct SwSearchOptions
static vcl::Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
{
- return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : 0;
+ return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : nullptr;
}
/// Adds rMatches using rKey as a key to the rTree tree.
@@ -144,7 +144,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell
void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bQuiet = false;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem))
bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue();
@@ -195,7 +195,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -220,7 +220,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -373,7 +373,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if (!m_pSrchItem->GetSelection())
{
// if we don't want to search in the selection...
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
// i#8288 "replace all" should not change cursor
// position, so save current cursor
m_pWrtShell->Push();
@@ -550,7 +550,7 @@ bool SwView::SearchAndWrap(bool bApi)
// If you want to search in selected areas, they must not be unselected.
if (!m_pSrchItem->GetSelection())
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
std::unique_ptr<SwWait> pWait(new SwWait( *GetDocShell(), true ));
if( FUNC_Search( aOpts ) )
@@ -664,7 +664,7 @@ bool SwView::SearchAll(sal_uInt16* pFound)
if (!m_pSrchItem->GetSelection())
{
// Cancel existing selections, if should not be sought in selected areas.
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
if( DOCPOS_START == aOpts.eEnd )
m_pWrtShell->EndDoc();
@@ -822,7 +822,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
::SfxToSwPageDescAttr( *m_pWrtShell, aSrchSet );
}
- SfxItemSet* pReplSet = 0;
+ SfxItemSet* pReplSet = nullptr;
if( bDoReplace && m_pReplList && m_pReplList->Count() )
{
pReplSet = new SfxItemSet( m_pWrtShell->GetAttrPool(),
@@ -852,7 +852,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : 0,
+ !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : nullptr,
pReplSet );
}
else if( m_pSrchItem->GetPattern() )
@@ -863,7 +863,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- bDoReplace ? &sRplStr : 0 );
+ bDoReplace ? &sRplStr : nullptr );
}
else
{
@@ -883,7 +883,7 @@ SvxSearchDialog* SwView::GetSearchDialog()
#if HAVE_FEATURE_DESKTOP
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = static_cast<SvxSearchDialogWrapper*>( SfxViewFrame::Current()->GetChildWindow(nId) );
- m_pSrchDlg = pWrp ? pWrp->getDialog () : 0;
+ m_pSrchDlg = pWrp ? pWrp->getDialog () : nullptr;
return m_pSrchDlg;
#else
return NULL;
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 762fae9ac0f8..8da54f5a9399 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -98,7 +98,7 @@ void SwView::GetState(SfxItemSet &rSet)
// There are captions for graphics, OLE objects, frames and tables
if( !bGetFrmType )
{
- eFrmType = m_pWrtShell->GetFrmType(0, true);
+ eFrmType = m_pWrtShell->GetFrmType(nullptr, true);
bGetFrmType = true;
}
if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)||
@@ -130,7 +130,7 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_CHANGE_PAGENUM:
{
- FrmTypeFlags nType = m_pWrtShell->GetFrmType(0,true);
+ FrmTypeFlags nType = m_pWrtShell->GetFrmType(nullptr,true);
if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER |
FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType )
rSet.DisableItem(nWhich);
@@ -175,7 +175,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_CLEARHISTORY:
{
- rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(0, 0)));
+ rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(nullptr, nullptr)));
}
break;
case SID_UNDO:
@@ -206,8 +206,8 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_EDIT_CURRENT_TOX:
case FN_UPDATE_CUR_TOX:
{
- const SwTOXBase* pBase = 0;
- if(0 == (pBase = m_pWrtShell->GetCurTOX()) ||
+ const SwTOXBase* pBase = nullptr;
+ if(nullptr == (pBase = m_pWrtShell->GetCurTOX()) ||
(FN_EDIT_CURRENT_TOX == nWhich && pBase->IsTOXBaseInReadonly()))
rSet.DisableItem(nWhich);
}
@@ -280,9 +280,9 @@ void SwView::GetState(SfxItemSet &rSet)
sal_uInt16 index = 0;
const SwRedlineTable& table = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index );
- if( redline != NULL && *redline->Start() == *pCursor->End())
- redline = NULL;
- if( redline == NULL )
+ if( redline != nullptr && *redline->Start() == *pCursor->End())
+ redline = nullptr;
+ if( redline == nullptr )
{
for(; index < table.size(); ++index )
{
@@ -296,14 +296,14 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
}
- if( redline == NULL )
+ if( redline == nullptr )
rSet.DisableItem(nWhich);
}
else
{
// If the cursor position isn't on a redline, disable
// accepting/rejecting changes.
- if (0 == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), 0))
+ if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr))
rSet.DisableItem(nWhich);
}
}
@@ -430,7 +430,7 @@ void SwView::GetState(SfxItemSet &rSet)
//the draw shell cannot provide a status per item - only one for SID_OBJECT_ALIGN
if(nWhich != SID_ALIGN_ANY_JUSTIFIED)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetDispatcher()->QueryState( SID_OBJECT_ALIGN, pItem );
if(pItem)
bDraw = true;
@@ -449,7 +449,7 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
//these slots are either re-mapped to text or object alignment
- const SfxPoolItem* pState = 0;
+ const SfxPoolItem* pState = nullptr;
if(nAlias)
GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
if(pState)
@@ -534,7 +534,7 @@ bool SwView::HasUIFeature( sal_uInt32 nFeature )
{
case CHILDWIN_LABEL : bRet = m_pWrtShell->IsLabelDoc(); break;
#if HAVE_FEATURE_DBCONNECTIVITY
- case CHILDWIN_MAILMERGE : bRet = 0 != GetMailMergeConfigItem(); break;
+ case CHILDWIN_MAILMERGE : bRet = nullptr != GetMailMergeConfigItem(); break;
#endif
}
return bRet;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 921eacd5669b..3f53c38bc6e7 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -225,7 +225,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwWrtShell &rSh = GetWrtShell();
const FrmTypeFlags nFrmType = rSh.IsObjSelected() ?
FrmTypeFlags::DRAWOBJ :
- rSh.GetFrmType(0,true);
+ rSh.GetFrmType(nullptr,true);
const bool bFrmSelection = rSh.IsFrmSelected();
const bool bBrowse = rSh.GetViewOptions()->getBrowseMode();
@@ -858,7 +858,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect)
{
- SwSectionFormat *pSectFormat = 0;
+ SwSectionFormat *pSectFormat = nullptr;
SfxItemSet aSet( GetPool(), RES_COL, RES_COL );
if(bSect)
{
@@ -985,7 +985,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.LockView( false );
m_bSetTabColFromDoc = m_bSetTabRowFromDoc = m_bTabColFromDoc = m_bTabRowFromDoc = false;
- SetNumRuleNodeFromDoc(NULL);
+ SetNumRuleNodeFromDoc(nullptr);
}
// Here the status of the tab bar will be determined.
@@ -995,7 +995,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetWrtShell();
- const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : 0;
+ const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : nullptr;
const FrmTypeFlags nFrmType = rSh.IsObjSelected()
? FrmTypeFlags::DRAWOBJ
: rSh.GetFrmType( pPt, true );
@@ -1391,7 +1391,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
- const SvxBoxItem* pBox = 0;
+ const SvxBoxItem* pBox = nullptr;
if(nFrmType & FrmTypeFlags::HEADER)
{
rMaster.GetHeader();
@@ -1923,7 +1923,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
size_t nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( m_aTabColFromDocPos ):
rSh.GetCurOutColNum();
- const SwFrameFormat* pFormat = NULL;
+ const SwFrameFormat* pFormat = nullptr;
if( bColSct )
{
eRecType = bSectOutTable ? RECT_OUTTABSECTION
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index a48e970561ed..0cb66cbf2018 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -237,9 +237,9 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel )
&Application::GetSolarMutex () )
, mxModel ( pModel )
, mpModel ( pModel )
-, mpDocSh ( NULL )
-, mpDoc ( NULL )
-, mpPrinter( NULL )
+, mpDocSh ( nullptr )
+, mpDoc ( nullptr )
+, mpPrinter( nullptr )
{
registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) );
}
@@ -303,11 +303,11 @@ void SwXDocumentSettings::_preSetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -315,7 +315,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
if (rInfo.mnAttributes & PropertyAttribute::READONLY)
- throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( 0 ) );
+ throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( nullptr ) );
switch( rInfo.mnHandle )
{
@@ -859,19 +859,19 @@ void SwXDocumentSettings::_postSetValues ()
mpDoc->getIDocumentDeviceAccess().setPrinter( mpPrinter, true, true );
}
- mpPrinter = 0;
- mpDocSh = 0;
- mpDoc = 0;
+ mpPrinter = nullptr;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
void SwXDocumentSettings::_preGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -1244,8 +1244,8 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
void SwXDocumentSettings::_postGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
- mpDocSh = 0;
- mpDoc = 0;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
// XServiceInfo
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index d2bec2560321..252c740db290 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -95,12 +95,12 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream ));
uno::Reference< XUnoTunnel > xTunnel(xModel, uno::UNO_QUERY);
- SwDocShell* pDocShell = 0;
+ SwDocShell* pDocShell = nullptr;
if(xTunnel.is())
{
SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >(
sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
- pDocShell = pXDoc ? pXDoc->GetDocShell() : 0;
+ pDocShell = pXDoc ? pXDoc->GetDocShell() : nullptr;
}
if(pDocShell)
{
@@ -108,7 +108,7 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(NULL, *pDocShell,
+ std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(nullptr, *pDocShell,
pInStream.get()));
OSL_ENSURE(pAsciiDlg, "Dialog creation failed!");
if(RET_OK == pAsciiDlg->Execute())
diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx
index b3c7ba28cd02..fea9981242f1 100644
--- a/sw/source/uibase/uno/dlelstnr.cxx
+++ b/sw/source/uibase/uno/dlelstnr.cxx
@@ -109,9 +109,9 @@ void SAL_CALL SwLinguServiceEventListener::disposing(
SolarMutexGuard aGuard;
if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xLngSvcMgr.is() && rEventObj.Source == xGCIterator)
- xGCIterator = 0;
+ xGCIterator = nullptr;
}
void SAL_CALL SwLinguServiceEventListener::queryTermination(
@@ -129,10 +129,10 @@ void SAL_CALL SwLinguServiceEventListener::notifyTermination(
if (xDesktop.is() && rEventObj.Source == xDesktop)
{
if (xLngSvcMgr.is())
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xGCIterator.is())
- xGCIterator = 0;
- xDesktop = NULL;
+ xGCIterator = nullptr;
+ xDesktop = nullptr;
}
}
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f42b4b5ba50e..ddba7056014b 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -253,7 +253,7 @@ SwXAutoTextGroup::~SwXAutoTextGroup()
uno::Sequence< OUString > SwXAutoTextGroup::getTitles() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -275,7 +275,7 @@ void SwXAutoTextGroup::renameByName(const OUString& aElementName,
// throw exception only if the programmatic name is to be changed into an existing name
if(aNewElementName != aElementName && hasByName(aNewElementName))
throw container::ElementExistException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex( aElementName);
@@ -314,7 +314,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
{
SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : &pxRange->GetDoc());
SwPaM aPam(pDoc->GetNodes());
- SwPaM * pPam(0);
+ SwPaM * pPam(nullptr);
if(pxCursor)
{
pPam = pxCursor->GetPaM();
@@ -332,7 +332,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
pInsDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pInsDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
return bRet;
}
@@ -347,14 +347,14 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
if(!xTextRange.is())
throw uno::RuntimeException();
- SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0;
+ SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr;
OUString sShortName(aName);
OUString sLongName(aTitle);
if (pGlosGroup && !pGlosGroup->GetError())
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pxRange = 0;
- OTextCursorHelper* pxCursor = 0;
+ SwXTextRange* pxRange = nullptr;
+ OTextCursorHelper* pxCursor = nullptr;
if(xRangeTunnel.is())
{
pxRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -364,7 +364,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
}
OUString sOnlyText;
- OUString* pOnlyText = 0;
+ OUString* pOnlyText = nullptr;
bool bNoAttr = !pxCursor && !pxRange;
if(bNoAttr)
{
@@ -439,7 +439,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
void SwXAutoTextGroup::removeByName(const OUString& aEntryName) throw( container::NoSuchElementException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex(aEntryName);
@@ -501,7 +501,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
sal_Int32 SwXAutoTextGroup::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return static_cast<sal_Int32>(pGlosGroup->GetCount());
@@ -511,7 +511,7 @@ uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -529,7 +529,7 @@ uno::Type SwXAutoTextGroup::getElementType() throw( uno::RuntimeException, std::
sal_Bool SwXAutoTextGroup::hasElements() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return pGlosGroup->GetCount() > 0;
@@ -550,7 +550,7 @@ uno::Sequence< OUString > SwXAutoTextGroup::getElementNames()
throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -568,7 +568,7 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
{
SolarMutexGuard aGuard;
bool bRet = false;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -603,7 +603,7 @@ void SwXAutoTextGroup::setPropertyValue(
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
switch(pEntry->nWID)
@@ -631,7 +631,7 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -674,7 +674,7 @@ void SwXAutoTextGroup::removeVetoableChangeListener(
void SwXAutoTextGroup::Invalidate()
{
- pGlossaries = 0;
+ pGlossaries = nullptr;
sName.clear();
m_sGroupName.clear();
}
@@ -724,7 +724,7 @@ SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const OUString& rGroupNa
pGlossaries(pGlss),
sGroupName(rGroupName),
sEntryName(rEntryName),
- pBodyText ( NULL )
+ pBodyText ( nullptr )
{
}
@@ -783,7 +783,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
if(SFX_EVENT_PREPARECLOSEDOC == static_cast< const SfxEventHint& >( _rHint ).GetEventId())
{
implFlushDocument();
- xBodyText = 0;
+ xBodyText = nullptr;
EndListening( *&xDocSh );
xDocSh.Clear();
}
@@ -907,9 +907,9 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
// in the meantime
uno::Reference<lang::XUnoTunnel> xTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- SwXText *pText = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
+ SwXText *pText = nullptr;
if(xTunnel.is())
{
@@ -921,7 +921,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
( xTunnel->getSomething( SwXText::getUnoTunnelId() ) );
}
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
if (pRange)
pDoc = &pRange->GetDoc();
else if ( pCursor )
@@ -990,7 +990,7 @@ const struct SvEventDescription aAutotextEvents[] =
{
{ SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" },
{ SW_EVENT_END_INS_GLOSSARY, "OnInsertDone" },
- { 0, NULL }
+ { 0, nullptr }
};
SwAutoTextEventDescriptor::SwAutoTextEventDescriptor(
@@ -1021,7 +1021,7 @@ void SwAutoTextEventDescriptor::replaceByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(),
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(),
"Strangely enough, the AutoText vanished!" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
@@ -1058,7 +1058,7 @@ void SwAutoTextEventDescriptor::getByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(), "no AutoText" );
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(), "no AutoText" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
"Unknown event ID" );
diff --git a/sw/source/uibase/uno/unodefaults.cxx b/sw/source/uibase/uno/unodefaults.cxx
index a1cc59ca1f74..66e1eb38880a 100644
--- a/sw/source/uibase/uno/unodefaults.cxx
+++ b/sw/source/uibase/uno/unodefaults.cxx
@@ -46,7 +46,7 @@ SfxItemPool* SwSvxUnoDrawPool::getModelPool( bool /*bReadOnly*/ ) throw()
m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
return &(m_pDoc->GetAttrPool());
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index e1b95428eca7..534aea55b09a 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -141,9 +141,9 @@ void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& )
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
+ m_xIntercepted = nullptr;
}
namespace
@@ -178,10 +178,10 @@ void SwXDispatchProviderInterceptor::Invalidate()
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
- m_pView = 0;
+ m_xIntercepted = nullptr;
+ m_pView = nullptr;
}
SwXDispatch::SwXDispatch(SwView& rVw) :
@@ -380,7 +380,7 @@ void SwXDispatch::disposing( const lang::EventObject& rSource ) throw(uno::Runti
StatusStruct_Impl aStatus = *aListIter;
aStatus.xListener->disposing(aObject);
}
- m_pView = 0;
+ m_pView = nullptr;
}
const sal_Char* SwXDispatch::GetDBChangeURL()
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index a5f6468771ea..7834a954a415 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -46,7 +46,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
void * pServiceManager,
void * )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
uno::Reference< XMultiServiceFactory > xMSF(
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 371080ea7e63..f8ff1a5370bf 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -101,7 +101,7 @@ static CloseResult CloseModelAndDocSh(
{
CloseResult eResult = eSuccess;
- rxDocSh = 0;
+ rxDocSh = nullptr;
//! models/documents should never be disposed (they may still be
//! used for printing which is called asynchronously for example)
@@ -153,13 +153,13 @@ static bool LoadFromURL_impl(
}
// try to get the DocShell
- SwDocShell *pTmpDocShell = 0;
+ SwDocShell *pTmpDocShell = nullptr;
Reference < XUnoTunnel > xTunnel( xTmpModel, UNO_QUERY );
if (xTunnel.is())
{
SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument *>(
xTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ));
- pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
+ pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : nullptr;
}
bool bRes = false;
@@ -348,8 +348,8 @@ static bool DeleteTmpFile_Impl(
bDelete = false;
}
- rxModel = 0;
- rxDocSh = 0; // destroy doc shell
+ rxModel = nullptr;
+ rxDocSh = nullptr; // destroy doc shell
if ( bDelete )
{
@@ -379,7 +379,7 @@ SwXMailMerge::SwXMailMerge() :
m_bSendAsAttachment(false),
m_bSaveAsSingleFile(false),
m_bDisposing(false),
- m_pMgr(0)
+ m_pMgr(nullptr)
{
// create empty document
// like in: SwModule::InsertEnv (appenv.cxx)
@@ -403,8 +403,8 @@ SwXMailMerge::~SwXMailMerge()
if ( eVetoed == CloseModelAndDocSh( m_xModel, m_xDocSh ) )
OSL_FAIL("ownership transferred to vetoing object!" );
- m_xModel = 0;
- m_xDocSh = 0; // destroy doc shell
+ m_xModel = nullptr;
+ m_xDocSh = nullptr; // destroy doc shell
}
}
@@ -419,7 +419,7 @@ public:
~MailMergeExecuteFinalizer()
{
osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
- m_pMailMerge->m_pMgr = 0;
+ m_pMailMerge->m_pMgr = nullptr;
}
private:
@@ -595,7 +595,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, false);
- SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : NULL;
+ SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : nullptr;
if (!pView)
throw RuntimeException();
SwWrtShell &rSh = *pView->GetWrtShellPtr();
@@ -889,7 +889,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
throw PropertyVetoException();
else
{
- void *pData = NULL;
+ void *pData = nullptr;
switch (pCur->nWID)
{
case WID_SELECTION : pData = &m_aSelection; break;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index fa4fbb2e97fc..15aef1f25db7 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -209,7 +209,7 @@ Reference< XPropertySet > SwXModule::getViewSettings() throw( uno::RuntimeExcep
if(!mxViewSettings.is())
{
OSL_FAIL("Web or Text?");
- mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, 0 ) );
+ mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, nullptr ) );
}
return mxViewSettings;
}
@@ -245,7 +245,7 @@ Sequence< OUString > SwXModule::getSupportedServiceNames() throw( RuntimeExcepti
SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc)
: ChainableHelperNoState ( lcl_createPrintSettingsInfo (), &Application::GetSolarMutex() )
, meType(eType)
-, mpPrtOpt ( NULL )
+, mpPrtOpt ( nullptr )
, mpDoc ( pDoc )
{
}
@@ -415,7 +415,7 @@ void SwXPrintSettings::_postSetValues()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
void SwXPrintSettings::_preGetValues()
@@ -518,7 +518,7 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo,
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
OUString SwXPrintSettings::getImplementationName() throw( RuntimeException, std::exception )
@@ -542,8 +542,8 @@ Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() throw( Runtime
SwXViewSettings::SwXViewSettings(bool bWebView, SwView* pVw)
: ChainableHelperNoState( lcl_createViewSettingsInfo (), &Application::GetSolarMutex() )
, pView(pVw)
- , mpViewOption(NULL)
- , mpConstViewOption(NULL)
+ , mpViewOption(nullptr)
+ , mpConstViewOption(nullptr)
, bObjectValid(true)
, bWeb(bWebView)
, mbApplyZoom(false)
@@ -569,7 +569,7 @@ void SwXViewSettings::_preSetValues ()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- const SwViewOption* pVOpt = 0;
+ const SwViewOption* pVOpt = nullptr;
if(pView)
{
if(!IsValid())
@@ -695,7 +695,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break;
default:
throw IllegalArgumentException(
- "SwXViewSettings: invalid zoom type", 0, 0);
+ "SwXViewSettings: invalid zoom type", nullptr, 0);
}
mpViewOption->SetZoomType( eZoom );
mbApplyZoom = true;
@@ -819,7 +819,7 @@ void SwXViewSettings::_postSetValues()
: VIEWOPT_DEST_TEXT );
delete mpViewOption;
- mpViewOption = NULL;
+ mpViewOption = nullptr;
}
void SwXViewSettings::_preGetValues ()
@@ -984,7 +984,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
void SwXViewSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpConstViewOption = NULL;
+ mpConstViewOption = nullptr;
}
OUString SwXViewSettings::getImplementationName() throw( RuntimeException, std::exception )
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 83416d69e336..2ab018bc95d8 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -174,13 +174,13 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
const SfxViewShell * pView )
{
if (!pDocShell)
- return NULL;
+ return nullptr;
- const bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
- const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
+ const bool bWebDoc = nullptr != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const bool bSwSrcView = nullptr != dynamic_cast< const SwSrcView * >(pView);
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView && pSwView->HasSelection( false ); // check for any selection, not just text selection
- const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), 0 );
+ const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), nullptr );
// get default values to use in dialog from documents SwPrintData
const SwPrintData &rPrintData = pDocShell->GetDoc()->getIDocumentDeviceAccess().getPrintData();
@@ -375,11 +375,11 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
pDocShell(pShell),
- bObjectValid(pShell != 0),
+ bObjectValid(pShell != nullptr),
- pDrawPage(0),
+ pDrawPage(nullptr),
mxXDrawPage(),
- pBodyText(0),
+ pBodyText(nullptr),
mxXNumberingRules(),
mxXFootnotes(),
mxXFootnoteSettings(),
@@ -402,10 +402,10 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
mxXLineNumberingProperties(),
mxLinkTargetSupplier(),
mxXRedlines(),
- m_pHiddenViewFrame(0),
- pPropertyHelper(0),
- m_pPrintUIOptions( NULL ),
- m_pRenderData( NULL ),
+ m_pHiddenViewFrame(nullptr),
+ pPropertyHelper(nullptr),
+ m_pPrintUIOptions( nullptr ),
+ m_pRenderData( nullptr ),
// #i117783#
bApplyPagePrintSettingsFromXPagePrintable( false )
{
@@ -418,7 +418,7 @@ SwXTextDocument::~SwXTextDocument()
{
Reference< XInterface > x0;
xNumFormatAgg->setDelegator(x0);
- xNumFormatAgg = 0;
+ xNumFormatAgg = nullptr;
}
delete m_pPrintUIOptions;
if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
@@ -461,7 +461,7 @@ void SwXTextDocument::GetNumberFormatter()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -763,7 +763,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0,
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr,
&aReplace );
}
else if(pSearch->bStyles)
@@ -820,13 +820,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
if(xLastResult.is())
{
Reference<XUnoTunnel> xCursorTunnel( xLastResult, UNO_QUERY);
- OTextCursorHelper* pPosCrsr = 0;
+ OTextCursorHelper* pPosCrsr = nullptr;
if(xCursorTunnel.is())
{
pPosCrsr = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething(
OTextCursorHelper::getUnoTunnelId()));
}
- SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : 0;
+ SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : nullptr;
if(pCrsr)
{
*pUnoCrsr->GetPoint() = *pCrsr->End();
@@ -834,7 +834,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
}
else
{
- SwXTextRange* pRange = 0;
+ SwXTextRange* pRange = nullptr;
if(xCursorTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xCursorTunnel->getSomething(
@@ -893,13 +893,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0 );
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr );
}
else if(pSearch->bStyles)
{
SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
- SwTextFormatColl *pReplaceColl = 0;
+ SwTextFormatColl *pReplaceColl = nullptr;
bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
@@ -1375,18 +1375,18 @@ void SwXTextDocument::Invalidate()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>(
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
OSL_ENSURE(pNumFormat, "No number formatter available");
}
InitNewDoc();
- pDocShell = 0;
+ pDocShell = nullptr;
lang::EventObject const ev(static_cast<SwXTextDocumentBaseClass &>(*this));
m_pImpl->m_RefreshListeners.disposeAndClear(ev);
}
@@ -1432,15 +1432,15 @@ void SwXTextDocument::InitNewDoc()
if(xBodyText.is())
{
- xBodyText = 0;
- pBodyText = 0;
+ xBodyText = nullptr;
+ pBodyText = nullptr;
}
if(xNumFormatAgg.is())
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -1450,7 +1450,7 @@ void SwXTextDocument::InitNewDoc()
}
OSL_ENSURE(pNumFormat, "No number formatter available");
if (pNumFormat)
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
if(mxXTextFieldTypes.is())
@@ -1580,8 +1580,8 @@ void SwXTextDocument::InitNewDoc()
if(xPropertyHelper.is())
{
pPropertyHelper->Invalidate();
- xPropertyHelper = 0;
- pPropertyHelper = 0;
+ xPropertyHelper = nullptr;
+ pPropertyHelper = nullptr;
}
}
@@ -1667,7 +1667,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
aTmpServiceName = "com.sun.star.drawing.OLE2Shape";
}
Reference<XInterface> xTmp(
- arguments == 0
+ arguments == nullptr
? SvxFmMSFactory::createInstance(aTmpServiceName)
: SvxFmMSFactory::createInstanceWithArguments(
aTmpServiceName, *arguments));
@@ -1686,7 +1686,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServiceName)
throw( Exception, RuntimeException, std::exception )
{
- return create(rServiceName, 0);
+ return create(rServiceName, nullptr);
}
Reference< XInterface > SwXTextDocument::createInstanceWithArguments(
@@ -1889,7 +1889,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetAutoControlFocus( bAuto );
else if (bAuto)
{
@@ -1909,7 +1909,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bMode = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetOpenInDesignMode( bMode );
else if (!bMode)
{
@@ -2056,7 +2056,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bAuto;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bAuto = pDrawDoc->GetAutoControlFocus();
else
bAuto = false;
@@ -2067,7 +2067,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bMode;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bMode = pDrawDoc->GetOpenInDesignMode();
else
bMode = true;
@@ -2313,7 +2313,7 @@ SfxViewShell * SwXTextDocument::GetRenderView(
bool bIsPDFExport )
{
// get view shell to use
- SfxViewShell *pView = 0;
+ SfxViewShell *pView = nullptr;
if (bIsPDFExport)
pView = GuessViewShell( rbIsSwSrcView );
else
@@ -2353,7 +2353,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
const uno::Any& rSelection,
bool bIsPDFExport )
{
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
uno::Reference< frame::XModel > xModel;
rSelection >>= xModel;
@@ -2386,7 +2386,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
if (!m_pRenderData)
{
OSL_FAIL("GetRenderDoc: no renderdata");
- return 0;
+ return nullptr;
}
SwView *const pSwView(static_cast<SwView *>(rpView));
SfxObjectShellLock xDocSh(m_pRenderData->GetTempDocShell());
@@ -2482,7 +2482,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pViewShell = 0;
+ SwViewShell* pViewShell = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
{
@@ -2543,7 +2543,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
{
// PDF export should not make use of the SwPrtOptions
const SwPrintData *pPrtOptions = (bIsPDFExport)
- ? NULL : m_pRenderData->GetSwPrtOptions();
+ ? nullptr : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -2657,7 +2657,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
throw IllegalArgumentException();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
pVwSh = pSwView->GetWrtShellPtr();
@@ -2848,10 +2848,10 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
// #130810# SfxViewShell::Current() / SfxViewShell::GetObjectShell()
// must not be used (see comment from MBA)
- SfxViewShell *pView = 0;
- SwView *pSwView = 0;
- SwPagePreview *pSwPagePreview = 0;
- SwSrcView *pSwSrcView = 0;
+ SfxViewShell *pView = nullptr;
+ SwView *pSwView = nullptr;
+ SwPagePreview *pSwPagePreview = nullptr;
+ SwSrcView *pSwSrcView = nullptr;
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, false );
// look for the view shell with the same controller in use,
@@ -2876,7 +2876,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
OSL_ENSURE( pSwView || pSwPagePreview || pSwSrcView, "failed to get view shell" );
if (pView)
- rbIsSwSrcView = pSwSrcView != 0;
+ rbIsSwSrcView = pSwSrcView != nullptr;
return pView;
}
@@ -2942,7 +2942,7 @@ void SAL_CALL SwXTextDocument::render(
// or SwPagePreview for PDF export of the page preview
//!! (check for SwView first as in GuessViewShell) !!
OSL_ENSURE( pView, "!! view missing !!" );
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
if (pView)
{
// TODO/mba: we really need a generic way to get the SwViewShell!
@@ -2978,7 +2978,7 @@ void SAL_CALL SwXTextDocument::render(
SwWrtShell* pWrtShell = dynamic_cast< const SwView *>( pView ) != nullptr ?
static_cast<SwView*>(pView)->GetWrtShellPtr() :
- 0;
+ nullptr;
SwPrintData const& rSwPrtOptions =
*m_pRenderData->GetSwPrtOptions();
@@ -3020,7 +3020,7 @@ void SAL_CALL SwXTextDocument::render(
if (m_pHiddenViewFrame)
{
lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
+ m_pHiddenViewFrame = nullptr;
// prevent crash described in #i108805
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
@@ -3035,8 +3035,8 @@ void SAL_CALL SwXTextDocument::render(
}
if( bLastPage )
{
- delete m_pRenderData; m_pRenderData = NULL;
- delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ delete m_pRenderData; m_pRenderData = nullptr;
+ delete m_pPrintUIOptions; m_pPrintUIOptions = nullptr;
}
}
@@ -3386,7 +3386,7 @@ void SwXTextDocument::resetSelection()
SolarMutexGuard aGuard;
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
- pWrtShell->ResetSelect(0, false);
+ pWrtShell->ResetSelect(nullptr, false);
}
void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) throw (::css::uno::RuntimeException, ::std::exception)
@@ -3743,7 +3743,7 @@ uno::Type SwXLinkTargetSupplier::getElementType()
sal_Bool SwXLinkTargetSupplier::hasElements() throw( RuntimeException, std::exception )
{
- return 0 != pxDoc;
+ return nullptr != pxDoc;
}
OUString SwXLinkTargetSupplier::getImplementationName() throw( RuntimeException, std::exception )
@@ -3772,7 +3772,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sLinkSuffix(sSuffix),
sLinkDisplayName(rLinkDisplayName),
- pxDoc(0)
+ pxDoc(nullptr)
{
}
@@ -4196,14 +4196,14 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
void SwXDocumentPropertyHelper::Invalidate()
{
- xDashTable = 0;
- xGradientTable = 0;
- xHatchTable = 0;
- xBitmapTable = 0;
- xTransGradientTable = 0;
- xMarkerTable = 0;
- xDrawDefaults = 0;
- m_pDoc = 0;
+ xDashTable = nullptr;
+ xGradientTable = nullptr;
+ xHatchTable = nullptr;
+ xBitmapTable = nullptr;
+ xTransGradientTable = nullptr;
+ xMarkerTable = nullptr;
+ xDrawDefaults = nullptr;
+ m_pDoc = nullptr;
SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
}
@@ -4279,7 +4279,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
- aRenderViewOptions.SetPrinting( pPrtOptions != NULL );
+ aRenderViewOptions.SetPrinting( pPrtOptions != nullptr );
m_pShell->ApplyViewOptions( aRenderViewOptions );
}
}
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index dc012f1a0183..dd4c778914f2 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -128,7 +128,7 @@ void SwXTextView::Invalidate()
}
m_refCount--;
- m_pView = 0;
+ m_pView = nullptr;
}
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException, std::exception)
@@ -248,11 +248,11 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface)
}
else
{
- SwPaM * pPaM(0);
+ SwPaM * pPaM(nullptr);
std::pair<OUString, FlyCntType> frame;
OUString tableName;
- SwUnoTableCrsr const* pTableCursor(0);
- ::sw::mark::IMark const* pMark(0);
+ SwUnoTableCrsr const* pTableCursor(nullptr);
+ ::sw::mark::IMark const* pMark(nullptr);
SwUnoCursorHelper::GetSelectableFromAny(xInterface, *pDoc,
pPaM, frame, tableName, pTableCursor, pMark, sdrObjects);
if (pPaM)
@@ -438,13 +438,13 @@ SdrObject* SwXTextView::GetControl(
uno::Reference< awt::XControl >& xToFill )
{
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
- SdrObject* pControl = NULL;
+ SdrObject* pControl = nullptr;
if ( pFormShell && pDrawView && pWindow )
pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill );
return pControl;
@@ -464,9 +464,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
uno::Reference< form::runtime::XFormController > xController;
@@ -479,7 +479,7 @@ sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
return !pFormShell || pFormShell->IsDesignMode();
}
@@ -487,7 +487,7 @@ void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (Runt
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
if ( pFormShell )
pFormShell->SetDesignMode( _DesignMode );
}
@@ -1068,9 +1068,9 @@ void SwXTextViewCursor::gotoRange(
}
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- SwXParagraph* pPara = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ SwXParagraph* pPara = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -1081,7 +1081,7 @@ void SwXTextViewCursor::gotoRange(
SwXParagraph::getUnoTunnelId()));
}
- const FrmTypeFlags nFrmType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = rSh.GetFrmType(nullptr,true);
SwStartNodeType eSearchNodeType = SwNormalStartNode;
if(nFrmType & FrmTypeFlags::FLY_ANY)
@@ -1098,7 +1098,7 @@ void SwXTextViewCursor::gotoRange(
const SwStartNode* pOwnStartNode = aOwnPaM.GetNode().
FindSttNodeByType(eSearchNodeType);
- const SwNode* pSrcNode = 0;
+ const SwNode* pSrcNode = nullptr;
if(pCursor && pCursor->GetPaM())
{
pSrcNode = &pCursor->GetPaM()->GetNode();
@@ -1115,7 +1115,7 @@ void SwXTextViewCursor::gotoRange(
{
pSrcNode = pPara->GetTextNode();
}
- const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0;
+ const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : nullptr;
//Skip SectionNodes
while(pTmp && pTmp->IsSectionNode())
@@ -1386,7 +1386,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1406,7 +1406,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1762,13 +1762,13 @@ IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCurs
const SwDoc* SwXTextViewCursor::GetDoc() const
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
SwDoc* SwXTextViewCursor::GetDoc()
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
const SwPaM* SwXTextViewCursor::GetPaM() const
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 88c84a760c3c..e0026eb3163b 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -222,7 +222,7 @@ SwTOXBaseContent::~SwTOXBaseContent()
SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 nLevel) :
SwTypeNumber(CTYPE_CTT),
pWrtShell(pShell),
- pMember(0),
+ pMember(nullptr),
sContentTypeName(SW_RES(STR_CONTENT_TYPE_FIRST + (int)nType)),
sSingleContentTypeName(SW_RES(STR_CONTENT_TYPE_SINGLE_FIRST + (int)nType)),
nMemberCount(0),
@@ -298,7 +298,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
break;
case ContentTypeId::REGION :
{
- SwContentArr* pOldMember = 0;
+ SwContentArr* pOldMember = nullptr;
size_t nOldRegionCount = 0;
bool bInvalidate = false;
if(!pMember)
@@ -333,7 +333,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
nLevel,
pFormat->FindLayoutRect( false, &aNullPt ).Top());
- SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 );
+ SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
if( !pFormat->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
@@ -480,9 +480,9 @@ void SwContentType::Invalidate()
void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
{
- SwContentArr* pOldMember = 0;
+ SwContentArr* pOldMember = nullptr;
size_t nOldMemberCount = 0;
- SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 );
+ SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
if(pMember && pbLevelOrVisibilityChanged)
{
pOldMember = pMember;
@@ -576,7 +576,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
if(ContentTypeId::GRAPHIC == nContentType)
{
OUString sLink;
- pWrtShell->GetGrfNms( &sLink, 0, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
+ pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
pCnt = new SwGraphicContent(this, sFrmName,
INetURLObject::decode( sLink,
INetURLObject::DECODE_UNAMBIGUOUS ),
@@ -792,8 +792,8 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
, m_sPostItShow(SW_RES(STR_POSTIT_SHOW))
, m_sPostItHide(SW_RES(STR_POSTIT_HIDE))
, m_sPostItDelete(SW_RES(STR_POSTIT_DELETE))
- , m_pHiddenShell(0)
- , m_pActiveShell(0)
+ , m_pHiddenShell(nullptr)
+ , m_pActiveShell(nullptr)
, m_pConfig(SW_MOD()->GetNavigationConfig())
, m_nActiveBlock(0)
, m_nHiddenBlock(0)
@@ -821,8 +821,8 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
SetDragDropMode(DragDropMode::APP_COPY);
for (ContentTypeId i : o3tl::enumrange<ContentTypeId>())
{
- m_aActiveContentArr[i] = 0;
- m_aHiddenContentArr[i] = 0;
+ m_aActiveContentArr[i] = nullptr;
+ m_aHiddenContentArr[i] = nullptr;
}
for (int i = 0; i < CONTEXT_COUNT; ++i)
{
@@ -846,17 +846,17 @@ void SwContentTree::dispose()
Clear(); // If applicable erase content types previously.
bIsInDrag = false;
m_aUpdTimer.Stop();
- SetActiveShell(0);
+ SetActiveShell(nullptr);
SvTreeListBox::dispose();
}
OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
{
- if( pEntry == NULL)
+ if( pEntry == nullptr)
return OUString();
SwContent* pCnt = static_cast<SwContent*>(pEntry->GetUserData());
- if( pCnt == NULL || pCnt->GetParent() == NULL)
+ if( pCnt == nullptr || pCnt->GetParent() == nullptr)
return OUString();
ContentTypeId nJumpType = pCnt->GetParent()->GetType();
@@ -946,11 +946,11 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
{
- if( pEntry == NULL)
+ if( pEntry == nullptr)
return OUString();
SwContent* pCnt = static_cast<SwContent*>(pEntry->GetUserData());
- if( pCnt == NULL || pCnt->GetParent() == NULL)
+ if( pCnt == nullptr || pCnt->GetParent() == nullptr)
return OUString();
SdrObject* pTemp;
@@ -1073,7 +1073,7 @@ sal_Int8 SwContentTree::AcceptDrop( const AcceptDropEvent& rEvt )
static void* lcl_GetOutlineKey( SwContentTree* pTree, SwOutlineContent* pContent)
{
- void* key = 0;
+ void* key = nullptr;
if( pTree && pContent )
{
SwWrtShell* pShell = pTree->GetWrtShell();
@@ -1174,10 +1174,10 @@ std::unique_ptr<PopupMenu> SwContentTree::CreateContextMenu()
pPop->InsertItem(2, m_aContextStrings[STR_DRAGMODE - STR_CONTEXT_FIRST]);
pPop->InsertItem(3, m_aContextStrings[STR_DISPLAY - STR_CONTEXT_FIRST]);
// Now edit
- SvTreeListEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = nullptr;
// Edit only if the shown content is coming from the current view.
if((m_bIsActive || m_pActiveShell == pActiveView->GetWrtShellPtr())
- && 0 != (pEntry = FirstSelected()) && lcl_IsContent(pEntry))
+ && nullptr != (pEntry = FirstSelected()) && lcl_IsContent(pEntry))
{
const SwContentType* pContType = static_cast<SwContent*>(pEntry->GetUserData())->GetParent();
const ContentTypeId nContentType = pContType->GetType();
@@ -1288,7 +1288,7 @@ sal_IntPtr SwContentTree::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
nLevel++;
SwContent* pCnt = static_cast<SwContent *>(pEntry->GetUserData());
const SwContentType* pParent;
- if(pCnt && 0 != (pParent = pCnt->GetParent()))
+ if(pCnt && nullptr != (pParent = pCnt->GetParent()))
{
if(pParent->GetType() == ContentTypeId::OUTLINE)
nLevel = nLevel + static_cast<SwOutlineContent*>(pCnt)->GetOutlineLevel();
@@ -1315,7 +1315,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
// Add for outline plus/minus
if(pCntType->GetType() == ContentTypeId::OUTLINE)
{
- SvTreeListEntry* pChild = 0;
+ SvTreeListEntry* pChild = nullptr;
for(size_t i = 0; i < nCount; ++i)
{
const SwContent* pCnt = pCntType->GetMember(i);
@@ -1354,7 +1354,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
{
for(size_t i = 0; i < nCount; ++i)
{
- SvTreeListEntry* pChild = NULL;
+ SvTreeListEntry* pChild = nullptr;
const SwContent* pCnt = pCntType->GetMember(i);
if (pCnt)
{
@@ -1393,7 +1393,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
//Get drawing Objects by content .
SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
{
- SdrObject *pRetObj = NULL;
+ SdrObject *pRetObj = nullptr;
switch(pCnt->GetParent()->GetType())
{
case ContentTypeId::DRAWOBJECT:
@@ -1418,7 +1418,7 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
break;
}
default:
- pRetObj = NULL;
+ pRetObj = nullptr;
}
return pRetObj;
}
@@ -1596,7 +1596,7 @@ void SwContentTree::Display( bool bActive )
if(bReadOnly != m_bIsLastReadOnly)
{
m_bIsLastReadOnly = bReadOnly;
- bool bDisable = pShell == 0 || bReadOnly;
+ bool bDisable = pShell == nullptr || bReadOnly;
SwNavigationPI* pNavi = GetParentWindow();
pNavi->m_aContentToolBox->EnableItem(FN_ITEM_UP , !bDisable);
pNavi->m_aContentToolBox->EnableItem(FN_ITEM_DOWN, !bDisable);
@@ -1606,7 +1606,7 @@ void SwContentTree::Display( bool bActive )
}
if(pShell)
{
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if(m_nRootType == ContentTypeId::UNKNOWN)
{
for( ContentTypeId nCntType : o3tl::enumrange<ContentTypeId>() )
@@ -1622,7 +1622,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = m_aEntryImages.GetImage(SID_SW_START + (int)nCntType);
bool bChOnDemand = 0 != (*ppContentT)->GetMemberCount();
pEntry = InsertEntry(sEntry, rImage, rImage,
- 0, bChOnDemand, TREELIST_APPEND, (*ppContentT));
+ nullptr, bChOnDemand, TREELIST_APPEND, (*ppContentT));
if(nCntType == m_nLastSelType)
pSelEntry = pEntry;
sal_Int32 nExpandOptions = m_bIsActive || m_bIsConstant ?
@@ -1635,9 +1635,9 @@ void SwContentTree::Display( bool bActive )
{
// Now maybe select a additional child
SvTreeListEntry* pChild = pEntry;
- SvTreeListEntry* pTemp = 0;
+ SvTreeListEntry* pTemp = nullptr;
sal_uLong nPos = 1;
- while(0 != (pChild = Next(pChild)))
+ while(nullptr != (pChild = Next(pChild)))
{
// The old text will be slightly favored
if(sEntryName == GetEntryText(pChild) ||
@@ -1673,7 +1673,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = m_aEntryImages.GetImage(20000 + (int)m_nRootType);
SvTreeListEntry* pParent = InsertEntry(
(*ppRootContentT)->GetName(), rImage, rImage,
- 0, false, TREELIST_APPEND, *ppRootContentT);
+ nullptr, false, TREELIST_APPEND, *ppRootContentT);
if(m_nRootType != ContentTypeId::OUTLINE)
{
@@ -1699,7 +1699,7 @@ void SwContentTree::Display( bool bActive )
const sal_uInt16 nActPos = pShell->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pEntry = First();
- while( 0 != (pEntry = Next(pEntry)) )
+ while( nullptr != (pEntry = Next(pEntry)) )
{
if(static_cast<SwOutlineContent*>(pEntry->GetUserData())->GetPos() == nActPos)
{
@@ -1713,9 +1713,9 @@ void SwContentTree::Display( bool bActive )
{
// Now maybe select a additional child
SvTreeListEntry* pChild = pParent;
- SvTreeListEntry* pTemp = 0;
+ SvTreeListEntry* pTemp = nullptr;
sal_uLong nPos = 1;
- while(0 != (pChild = Next(pChild)))
+ while(nullptr != (pChild = Next(pChild)))
{
// The old text will be slightly favored
if(sEntryName == GetEntryText(pChild) ||
@@ -1975,7 +1975,7 @@ bool SwContentTree::HasContentChanged()
{
SvTreeListEntry* pFirstSel;
if(bOutline &&
- 0 != ( pFirstSel = FirstSelected()) &&
+ nullptr != ( pFirstSel = FirstSelected()) &&
lcl_IsContent(pFirstSel))
{
const auto nSelLevel =
@@ -2017,7 +2017,7 @@ bool SwContentTree::HasContentChanged()
const sal_uInt16 nActPos = GetWrtShell()->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pFirstEntry = First();
- while( 0 != (pFirstEntry = Next(pFirstEntry)) )
+ while( nullptr != (pFirstEntry = Next(pFirstEntry)) )
{
if(static_cast<SwOutlineContent*>(pFirstEntry->GetUserData())->GetPos() == nActPos)
{
@@ -2157,7 +2157,7 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
// If clear is called by TimerUpdate:
// Only for root can the validity of the UserData be guaranteed.
SvTreeListEntry* pParent;
- while(0 != (pParent = GetParent(pEntry)))
+ while(nullptr != (pParent = GetParent(pEntry)))
pEntry = pParent;
if(pEntry->GetUserData() && lcl_IsContentType(pEntry))
m_nLastSelType = static_cast<SwContentType*>(pEntry->GetUserData())->GetType();
@@ -2165,7 +2165,7 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
pEntry = First();
while(pEntry)
{
- pEntry->SetUserData(0);
+ pEntry->SetUserData(nullptr);
pEntry = Next(pEntry);
}
}
@@ -2258,12 +2258,12 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
SfxViewEventHint const*const pVEHint(
dynamic_cast<SfxViewEventHint const*>(&rHint));
- SwXTextView* pDyingShell = NULL;
+ SwXTextView* pDyingShell = nullptr;
if (m_pActiveShell && pVEHint && pVEHint->GetEventName() == "OnViewClosed")
pDyingShell = dynamic_cast<SwXTextView*>(pVEHint->GetController().get());
if (pDyingShell && pDyingShell->GetView() == &m_pActiveShell->GetView())
{
- SetActiveShell(0); // our view is dying, clear our pointers to it
+ SetActiveShell(nullptr); // our view is dying, clear our pointers to it
}
else
{
@@ -2408,7 +2408,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier)
const sal_uInt16 nCurrPos = pShell->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pFirst = First();
- while( 0 != (pFirst = Next(pFirst)) && lcl_IsContent(pFirst))
+ while( nullptr != (pFirst = Next(pFirst)) && lcl_IsContent(pFirst))
{
if(static_cast<SwOutlineContent*>(pFirst->GetUserData())->GetPos() == nCurrPos)
{
@@ -2477,7 +2477,7 @@ IMPL_LINK_NOARG_TYPED(SwContentTree, TimerUpdate, Timer *, void)
{
if(m_pActiveShell)
{
- SetActiveShell(0);
+ SetActiveShell(nullptr);
}
Clear();
m_bIsIdleClear = true;
@@ -2579,7 +2579,7 @@ TriState SwContentTree::NotifyCopying( SvTreeListEntry* pTarget,
bool SwContentTree::NotifyAcceptDrop( SvTreeListEntry* pEntry)
{
- return pEntry != 0;
+ return pEntry != nullptr;
}
// If a Ctrl + DoubleClick are executed in an open area,
@@ -2645,7 +2645,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
IsExpanded(pEntry) ? Collapse(pEntry) : Expand(pEntry);
}
else
- ContentDoubleClickHdl(0);
+ ContentDoubleClickHdl(nullptr);
break;
}
}
@@ -2701,7 +2701,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
const size_t nCount = pPage->GetObjCount();
bool hasObjectMarked = false;
- SdrObject* pObject = NULL;
+ SdrObject* pObject = nullptr;
pObject = GetDrawingObjectsByContent( pCnt );
if( pObject )
{
@@ -2954,7 +2954,7 @@ void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
break;
case 602:
{
- m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
+ m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
m_pActiveShell->GetView().GetPostItMgr()->Delete();
break;
}
@@ -3206,7 +3206,7 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode)
{
if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
{
- m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
+ m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
m_pActiveShell->DelRight();
}
}
@@ -3403,7 +3403,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
}
SwView& rView = m_pActiveShell->GetView();
rView.StopShellTimer();
- rView.GetPostItMgr()->SetActiveSidebarWin(0);
+ rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
rView.GetEditWin().GrabFocus();
}
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index d9b6ade3865e..d2014ddd1dcc 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -94,29 +94,29 @@ using namespace ::com::sun::star::uno;
// TabPos: push to left
#define GLBL_TABPOS_SUB 5
-const SfxObjectShell* SwGlobalTree::pShowShell = 0;
+const SfxObjectShell* SwGlobalTree::pShowShell = nullptr;
static const char* aHelpForMenu[] =
{
- 0,
+ nullptr,
HID_GLBLTREE_UPDATE, //CTX_UPDATE
HID_GLBLTREE_INSERT, //CTX_INSERT
HID_GLBLTREE_EDIT, //CTX_EDIT
HID_GLBLTREE_DEL, //CTX_DELETE
HID_GLBLTREE_EDIT_LINK, //CTX_EDIT_LINK
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
HID_GLBLTREE_INS_IDX, //CTX_INSERT_ANY_INDEX
HID_GLBLTREE_INS_FILE, //CTX_INSERT_FILE
HID_GLBLTREE_INS_NEW_FILE, //CTX_INSERT_NEW_FILE
HID_GLBLTREE_INS_TEXT, //CTX_INSERT_TEXT
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
HID_GLBLTREE_UPD_SEL, //CTX_UPDATE_SEL
HID_GLBLTREE_UPD_IDX, //CTX_UPDATE_INDEX
HID_GLBLTREE_UPD_LINK, //CTX_UPDATE_LINK
@@ -149,13 +149,13 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, const ResId& rResId) :
SvTreeListBox(pParent, rResId),
- pActiveShell ( NULL ),
- pEmphasisEntry ( NULL ),
- pDDSource ( NULL ),
- pSwGlblDocContents ( NULL ),
- pDefParentWin ( NULL ),
- pDocContent ( NULL ),
- pDocInserter ( NULL ),
+ pActiveShell ( nullptr ),
+ pEmphasisEntry ( nullptr ),
+ pDDSource ( nullptr ),
+ pSwGlblDocContents ( nullptr ),
+ pDefParentWin ( nullptr ),
+ pDocContent ( nullptr ),
+ pDocInserter ( nullptr ),
bIsInternalDrag ( false ),
bLastEntryEmphasis ( false ),
@@ -187,9 +187,9 @@ SwGlobalTree::~SwGlobalTree()
void SwGlobalTree::dispose()
{
delete pSwGlblDocContents;
- pSwGlblDocContents = NULL;
+ pSwGlblDocContents = nullptr;
delete pDocInserter;
- pDocInserter = NULL;
+ pDocInserter = nullptr;
pDefParentWin.clear();
aUpdateTimer.Stop();
SvTreeListBox::dispose();
@@ -202,17 +202,17 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
if(pEmphasisEntry)
{
ImplShowTargetEmphasis( Prev(pEmphasisEntry), false );
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
}
else if(bLastEntryEmphasis && pLast)
{
ImplShowTargetEmphasis( pLast, false);
}
- SvTreeListEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
+ SvTreeListEntry* pDropEntry = bLastEntryEmphasis ? nullptr : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
- SvTreeListEntry* pDummy = 0;
+ SvTreeListEntry* pDummy = nullptr;
sal_uLong nInsertionPos = TREELIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
@@ -223,7 +223,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
OUString sFileName;
const SwGlblDocContent* pCnt = pDropEntry ?
static_cast<const SwGlblDocContent*>(pDropEntry->GetUserData()) :
- 0;
+ nullptr;
if( aData.HasFormat( SotClipboardFormatId::FILE_LIST ))
{
nRet = rEvt.mnAction;
@@ -285,7 +285,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
if( pEmphasisEntry )
{
ImplShowTargetEmphasis( Prev(pEmphasisEntry), false );
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
}
else if(bLastEntryEmphasis && pLast)
{
@@ -434,7 +434,7 @@ sal_uInt16 SwGlobalTree::GetEnableFlags() const
SvTreeListEntry* pEntry = FirstSelected();
sal_uLong nSelCount = GetSelectionCount();
sal_uLong nEntryCount = GetEntryCount();
- SvTreeListEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
+ SvTreeListEntry* pPrevEntry = pEntry ? Prev(pEntry) : nullptr;
sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
@@ -469,7 +469,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
const SwGlblDocContent* pCont = pEntry ?
- static_cast<const SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ static_cast<const SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
bParent = false;
@@ -573,7 +573,7 @@ TriState SwGlobalTree::NotifyCopying( SvTreeListEntry* /*pTarget*/,
bool SwGlobalTree::NotifyAcceptDrop( SvTreeListEntry* pEntry)
{
- return pEntry != 0;
+ return pEntry != nullptr;
}
void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
@@ -627,7 +627,7 @@ void SwGlobalTree::KeyInput(const KeyEvent& rKEvt)
void SwGlobalTree::Clear()
{
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
SvTreeListBox::Clear();
}
@@ -665,7 +665,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
if(!pSwGlblDocContents)
Update( false );
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
for( size_t i = 0; i < nCount; i++)
{
SwGlblDocContent* pCont = (*pSwGlblDocContents)[i];
@@ -694,7 +694,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
break;
}
SvTreeListEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, false, TREELIST_APPEND, pCont);
+ nullptr, false, TREELIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -758,7 +758,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
OpenDoc(pCont);
nSlot = 0;
- pCont = 0;
+ pCont = nullptr;
}
break;
}
@@ -781,11 +781,11 @@ IMPL_LINK_TYPED( SwGlobalTree, PopupHdl, Menu* , pMenu, bool)
void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvTreeListEntry* pEntry = FirstSelected();
- SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
// If a RequestHelp is called during the dialogue,
// then the content gets lost. Because of that a copy
// is created in which only the DocPos is set correctly.
- SwGlblDocContent* pContCopy = 0;
+ SwGlblDocContent* pContCopy = nullptr;
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
@@ -830,7 +830,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
pActiveShell->GetLinkManager().UpdateAllLinks();
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
- pCont = 0;
+ pCont = nullptr;
}
break;
case CTX_EDIT:
@@ -875,7 +875,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
}
pTempContents.reset();
pActiveShell->EndAction();
- pCont = 0;
+ pCont = nullptr;
}
break;
case CTX_INSERT_ANY_INDEX:
@@ -896,7 +896,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
std::unique_ptr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog(
this, aSet,
*pActiveShell,
- 0,
+ nullptr,
USHRT_MAX,
true));
assert(pDlg && "Dialog creation failed!");
@@ -905,11 +905,11 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
SwTOXDescription& rDesc = pDlg->GetTOXDescription(
pDlg->GetCurrentTOXType());
SwTOXMgr aMgr(pActiveShell);
- SwTOXBase* pToInsert = 0;
+ SwTOXBase* pToInsert = nullptr;
if(aMgr.UpdateOrInsertTOX(rDesc, &pToInsert, pDlg->GetOutputItemSet()))
pActiveShell->InsertGlobalDocContent( *pContCopy, *pToInsert );
}
- pCont = 0;
+ pCont = nullptr;
}
}
break;
@@ -918,7 +918,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
bDeleteContentCopy = false;
pDocContent = pContCopy;
InsertRegion( pContCopy );
- pCont = NULL;
+ pCont = nullptr;
}
break;
case CTX_INSERT_NEW_FILE:
@@ -936,8 +936,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
SfxCallMode::SYNCHRON, &aFactory, 0L));
// save at
- SfxFrame* pFrm = pItem ? pItem->GetFrame() : 0;
- SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : 0;
+ SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr;
+ SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr;
if( pFrame )
{
const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(
@@ -958,12 +958,12 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
- pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
}
else
{
- pEntry = 0;
- pCont = 0;
+ pEntry = nullptr;
+ pCont = nullptr;
}
if(pBool->GetValue())
{
@@ -995,7 +995,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
}
break;
case CTX_UPDATE:
- pCont = 0;
+ pCont = nullptr;
break;
default:;
// here nothing happens
@@ -1103,7 +1103,7 @@ bool SwGlobalTree::Update(bool bHard)
if(pActiveShell != pOldShell)
{
delete pSwGlblDocContents;
- pSwGlblDocContents = 0;
+ pSwGlblDocContents = nullptr;
}
if(!pSwGlblDocContents)
{
@@ -1180,8 +1180,8 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
bFound = true;
SwGlobalTree::SetShowShell(pCurr);
- Application::PostUserEvent( LINK( this, SwGlobalTree, ShowFrameHdl ), NULL, true );
- pCurr = 0;
+ Application::PostUserEvent( LINK( this, SwGlobalTree, ShowFrameHdl ), nullptr, true );
+ pCurr = nullptr;
}
else
pCurr = SfxObjectShell::GetNext(*pCurr);
@@ -1220,10 +1220,10 @@ SwNavigationPI* SwGlobalTree::GetParentWindow()
IMPL_STATIC_LINK_NOARG_TYPED(SwGlobalTree, ShowFrameHdl, void*, void)
{
const SfxObjectShell* pShell = SwGlobalTree::GetShowShell();
- SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : NULL;
+ SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : nullptr;
if (pFirst)
pFirst->ToTop();
- SwGlobalTree::SetShowShell(0);
+ SwGlobalTree::SetShowShell(nullptr);
}
void SwGlobalTree::InitEntry(SvTreeListEntry* pEntry,
@@ -1304,7 +1304,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
{
//update the global document content after each inserted document
rSh.GetGlobalDocContent(aTempContents);
- SwGlblDocContent* pAnchorContent = 0;
+ SwGlblDocContent* pAnchorContent = nullptr;
OSL_ENSURE(aTempContents.size() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.size() > (nAnchorContent + nFile) )
pAnchorContent = aTempContents[nAnchorContent + nFile];
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index adb7a9d85084..1bfd535c8965 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -366,7 +366,7 @@ AutoTextGroup* SwGlossaryList::FindGroup(const OUString& rGroupName)
if(pRet->sName == rGroupName)
return pRet;
}
- return 0;
+ return nullptr;
}
void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 0b5730cd98a2..30d009b469f2 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -39,10 +39,10 @@
// Global Pointer
-SwGlossaries* pGlossaries = 0;
+SwGlossaries* pGlossaries = nullptr;
// Provides all needed paths. Is initialized by UI.
-SwGlossaryList* pGlossaryList = 0;
+SwGlossaryList* pGlossaryList = nullptr;
namespace
{
@@ -57,7 +57,7 @@ enum CachedStringID
CachedStrings
};
-OUString *StringCache[CachedStrings] = {0};
+OUString *StringCache[CachedStrings] = {nullptr};
inline OUString GetCachedString(CachedStringID id)
{
@@ -139,8 +139,8 @@ void SetCurrGlosGroup(const OUString& sStr)
namespace
{
-std::vector<OUString>* pAuthFieldNameList = 0;
-std::vector<OUString>* pAuthFieldTypeList = 0;
+std::vector<OUString>* pAuthFieldNameList = nullptr;
+std::vector<OUString>* pAuthFieldTypeList = nullptr;
}
@@ -149,7 +149,7 @@ std::vector<OUString>* pAuthFieldTypeList = 0;
void _FinitUI()
{
delete SwViewShell::GetShellRes();
- SwViewShell::SetShellRes( 0 );
+ SwViewShell::SetShellRes( nullptr );
SwEditWin::_FinitStaticData();
@@ -208,7 +208,7 @@ ShellResource::ShellResource()
aTOXCitationName( SW_RES(STR_TOX_CITATION)),
aLinkCtrlClick(SW_RESSTR(STR_LINK_CTRL_CLICK)),
aLinkClick(SW_RESSTR(STR_LINK_CLICK)),
- pAutoFormatNameLst(0),
+ pAutoFormatNameLst(nullptr),
sPageDescFirstName( SW_RES(STR_PAGEDESC_FIRSTNAME)),
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
@@ -262,7 +262,7 @@ SwGlossaries* GetGlossaries()
bool HasGlossaryList()
{
- return pGlossaryList != 0;
+ return pGlossaryList != nullptr;
}
SwGlossaryList* GetGlossaryList()
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 8f29a40e384d..8a26ff77283b 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -161,7 +161,7 @@ void SwNavigationPI::FillBox()
SwView *pView = GetCreateView();
if(!pView)
{
- m_aContentTree->SetActiveShell(0);
+ m_aContentTree->SetActiveShell(nullptr);
}
else if( pView != m_pActContView)
{
@@ -179,7 +179,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
if (!pSh)
{
SwView *pView = GetCreateView();
- pSh = pView ? &pView->GetWrtShell() : 0;
+ pSh = pView ? &pView->GetWrtShell() : nullptr;
GetPageEdit().SetValue(1);
}
if (pSh)
@@ -227,7 +227,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
break;
case FN_SHOW_CONTENT_BOX:
case FN_SELECT_CONTENT:
- if(m_pContextWin!=NULL && m_pContextWin->GetFloatingWindow()!=NULL)
+ if(m_pContextWin!=nullptr && m_pContextWin->GetFloatingWindow()!=nullptr)
{
if(_IsZoomedIn() )
{
@@ -244,7 +244,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_FOOTER:
{
rSh.MoveCrsr();
- const FrmTypeFlags eType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false);
if (eType & FrmTypeFlags::FOOTER)
{
if (rSh.EndPg())
@@ -258,7 +258,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_HEADER:
{
rSh.MoveCrsr();
- const FrmTypeFlags eType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false);
if (eType & FrmTypeFlags::HEADER)
{
if (rSh.SttPg())
@@ -272,7 +272,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_FOOTNOTE:
{
rSh.MoveCrsr();
- const FrmTypeFlags eFrmType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,false);
// Jump from the footnote to the anchor.
if (eFrmType & FrmTypeFlags::FOOTNOTE)
{
@@ -518,7 +518,7 @@ void SwNavigationPI::GotoPage()
_ZoomIn();
if(IsGlobalMode())
ToggleTree();
- UsePage(0);
+ UsePage(nullptr);
GetPageEdit().GrabFocus();
}
@@ -526,14 +526,14 @@ void SwNavigationPI::_ZoomOut()
{
if (_IsZoomedIn())
{
- FloatingWindow* pFloat = m_pContextWin!=NULL ? m_pContextWin->GetFloatingWindow() : NULL;
+ FloatingWindow* pFloat = m_pContextWin!=nullptr ? m_pContextWin->GetFloatingWindow() : nullptr;
m_bIsZoomedIn = false;
Size aSz(GetOutputSizePixel());
aSz.Height() = m_nZoomOut;
Size aMinOutSizePixel = static_cast<SfxDockingWindow*>(GetParent())->GetMinOutputSizePixel();
static_cast<SfxDockingWindow*>(GetParent())->SetMinOutputSizePixel(Size(
aMinOutSizePixel.Width(),m_nZoomOutInit));
- if (pFloat != NULL)
+ if (pFloat != nullptr)
pFloat->SetOutputSizePixel(aSz);
FillBox();
if(IsGlobalMode())
@@ -555,7 +555,7 @@ void SwNavigationPI::_ZoomOut()
void SwNavigationPI::_ZoomIn()
{
- if (m_pContextWin != NULL)
+ if (m_pContextWin != nullptr)
{
FloatingWindow* pFloat = m_pContextWin->GetFloatingWindow();
if (pFloat &&
@@ -591,7 +591,7 @@ void SwNavigationPI::Resize()
Size aNewSize (pParent->GetOutputSizePixel());
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pParent);
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
{
FloatingWindow* pFloat = pDockingParent->GetFloatingWindow();
//change the minimum width depending on the dock status
@@ -648,13 +648,13 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_aGlobalTree(VclPtr<SwGlobalTree>::Create(this, SW_RES(TL_GLOBAL))),
m_aDocListBox(VclPtr<ListBox>::Create(this, SW_RES(LB_DOCS))),
- m_pxObjectShell(0),
- m_pContentView(0),
- m_pContentWrtShell(0),
- m_pActContView(0),
- m_pCreateView(0),
- m_pPopupWindow(0),
- m_pFloatingWindow(0),
+ m_pxObjectShell(nullptr),
+ m_pContentView(nullptr),
+ m_pContentWrtShell(nullptr),
+ m_pActContView(nullptr),
+ m_pCreateView(nullptr),
+ m_pPopupWindow(nullptr),
+ m_pFloatingWindow(nullptr),
m_pContextWin(pCw),
@@ -731,7 +731,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_nWishWidth += 2 * m_aContentToolBox->GetPosPixel().X();
DockingWindow* pDockingParent = dynamic_cast<DockingWindow*>(pParent);
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
{
FloatingWindow* pFloat = pDockingParent->GetFloatingWindow();
Size aMinSize(pFloat ? m_nWishWidth : 0, pFloat ? m_nZoomOutInit : 0);
@@ -739,7 +739,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
SetOutputSizePixel( Size( m_nWishWidth, m_nZoomOutInit));
SfxDockingWindow* pSfxDockingParent = dynamic_cast<SfxDockingWindow*>(pParent);
- if (pSfxDockingParent != NULL)
+ if (pSfxDockingParent != nullptr)
{
Size aTmpParentSize(pSfxDockingParent->GetSizePixel());
if (aTmpParentSize.Width() < aMinSize.Width()
@@ -817,7 +817,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
}
else
m_aContentTree->GrabFocus();
- UsePage(0);
+ UsePage(nullptr);
m_aPageChgIdle.SetIdleHdl(LINK(this, SwNavigationPI, ChangePageHdl));
m_aPageChgIdle.SetPriority(SchedulerPriority::LOWEST);
@@ -825,7 +825,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
m_aDocListBox->SetAccessibleName(m_aStatusArr[3]);
- if (m_pContextWin == NULL)
+ if (m_pContextWin == nullptr)
{
// When the context window is missing then the navigator is
// displayed in the sidebar. While the navigator could change
@@ -897,22 +897,22 @@ IMPL_LINK_NOARG_TYPED(SwNavigationPI, PopupModeEndHdl, FloatingWindow*, void)
// floating window instance.
m_pFloatingWindow.disposeAndClear();
m_pFloatingWindow = m_pPopupWindow;
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
else
{
// Popup window has been closed by the user. No replacement, instance
// will destroy itself.
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
}
IMPL_LINK_TYPED( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow, void )
{
if ( pWindow == m_pFloatingWindow )
- m_pFloatingWindow = 0;
+ m_pFloatingWindow = nullptr;
else
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
@@ -939,7 +939,7 @@ void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
}
else
{
- m_aContentTree->SetActiveShell(0);
+ m_aContentTree->SetActiveShell(nullptr);
}
UpdateListBox();
}
@@ -959,7 +959,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
{
if(dynamic_cast<const SfxSimpleHint*>(&rHint) && static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING)
{
- m_pCreateView = 0;
+ m_pCreateView = nullptr;
}
}
else
@@ -1012,7 +1012,7 @@ void SwNavigationPI::UpdateListBox()
m_aDocListBox->SetUpdateMode(false);
m_aDocListBox->Clear();
SwView *pActView = GetCreateView();
- bool bDisable = pActView == 0;
+ bool bDisable = pActView == nullptr;
SwView *pView = SwModule::GetFirstView();
sal_Int32 nCount = 0;
sal_Int32 nAct = 0;
@@ -1020,7 +1020,7 @@ void SwNavigationPI::UpdateListBox()
const SwView* pConstView = m_aContentTree->IsConstantView() &&
m_aContentTree->GetActiveWrtShell() ?
&m_aContentTree->GetActiveWrtShell()->GetView():
- 0;
+ nullptr;
while (pView)
{
SfxObjectShell* pDoc = pView->GetDocShell();
@@ -1089,7 +1089,7 @@ IMPL_LINK_TYPED(SwNavigationPI, DoneLink, SfxPoolItem *, pItem, void)
if(m_pContentView)
m_pContentWrtShell = m_pContentView->GetWrtShellPtr();
else
- m_pContentWrtShell = 0;
+ m_pContentWrtShell = nullptr;
m_pxObjectShell = new SfxObjectShellLock(pFrame->GetObjectShell());
FillBox();
m_aContentTree->Update();
@@ -1171,7 +1171,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
m_sContentFileName = sFileName;
if(m_pxObjectShell)
{
- m_aContentTree->SetHiddenShell( 0 );
+ m_aContentTree->SetHiddenShell( nullptr );
(*m_pxObjectShell)->DoClose();
DELETEZ( m_pxObjectShell);
}
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 90a8154c82fe..20885f23fcba 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -61,8 +61,8 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) :
nStdEntry (0),
bOneArea (false),
nDefFormat (0),
- pVw (0),
- pOwnFormatter (0),
+ pVw (nullptr),
+ pOwnFormatter (nullptr),
bShowLanguageControl(false),
bUseAutomaticLanguage(true)
{
@@ -261,7 +261,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
if (!pOwnFormatter)
{
const sal_Int32 nPos = InsertEntry(SW_RESSTR( STR_DEFINE_NUMBERFORMAT ));
- SetEntryData( nPos, NULL );
+ SetEntryData( nPos, nullptr );
}
SelectEntryPos( nStdEntry );
@@ -311,7 +311,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefaultFormat)
// No entry found:
double fValue = GetDefValue(nType);
OUString sValue;
- Color* pCol = 0;
+ Color* pCol = nullptr;
if (nType == css::util::NumberFormat::TEXT)
{
diff --git a/sw/source/uibase/utlui/prcntfld.cxx b/sw/source/uibase/utlui/prcntfld.cxx
index 182e866bf3ef..1234f805753a 100644
--- a/sw/source/uibase/utlui/prcntfld.cxx
+++ b/sw/source/uibase/utlui/prcntfld.cxx
@@ -20,7 +20,7 @@
#include "prcntfld.hxx"
PercentField::PercentField()
- : m_pField(NULL)
+ : m_pField(nullptr)
, nRefValue(0)
, nOldMax(0)
, nOldMin(0)
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index a676c00f273d..6cb0b5cdce78 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -97,7 +97,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
{
SwView* pView = ::GetActiveView();
SwWrtShell* pWrtShell;
- if( pView && 0 != (pWrtShell = pView->GetWrtShellPtr()) &&
+ if( pView && nullptr != (pWrtShell = pView->GetWrtShellPtr()) &&
!pWrtShell->SwCrsrShell::HasSelection()&&
!pWrtShell->IsSelFrmMode() &&
!pWrtShell->IsObjSelected())
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 16823c94e688..42fc1d2b6e34 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -261,7 +261,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< lang::XUnoTunnel > xTunnel(xRulesRef, uno::UNO_QUERY);
SwXNumberingRules* pSwXRules = xTunnel.is() ? reinterpret_cast<SwXNumberingRules*>(
- xTunnel->getSomething(SwXNumberingRules::getUnoTunnelId())) : 0;
+ xTunnel->getSomething(SwXNumberingRules::getUnoTunnelId())) : nullptr;
if(pSwXRules)
{
*pRule = *pSwXRules->GetNumRule();
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index c2165ccc2674..34411a54b85c 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -309,7 +309,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Pick out everything and adapt the header format
SwFormatHeader aHeaderFormat(rMaster.GetHeader());
SwFrameFormat *pHeaderFormat = aHeaderFormat.GetHeaderFormat();
- OSL_ENSURE(pHeaderFormat != 0, "no header format");
+ OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
::FillHdFt(pHeaderFormat, rHeaderSet);
@@ -349,7 +349,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Pick out everything and adapt the footer format
SwFormatFooter aFooterFormat(rMaster.GetFooter());
SwFrameFormat *pFooterFormat = aFooterFormat.GetFooterFormat();
- OSL_ENSURE(pFooterFormat != 0, "no footer format");
+ OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
::FillHdFt(pFooterFormat, rFooterSet);
@@ -388,7 +388,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if(!bSet)
- rPageDesc.SetRegisterFormatColl(0);
+ rPageDesc.SetRegisterFormatColl(nullptr);
else if(SfxItemState::SET == rSet.GetItemState(
SID_SWREGISTER_COLLECTION, false, &pItem))
{
@@ -462,7 +462,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFormatHeader &rHeaderFormat = rMaster.GetHeader();
const SwFrameFormat *pHeaderFormat = rHeaderFormat.GetHeaderFormat();
- OSL_ENSURE(pHeaderFormat != 0, "no header format");
+ OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
// HeaderInfo, margins, background, border
SfxItemSet aHeaderSet(*rSet.GetPool(),
@@ -513,7 +513,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFormatFooter &rFooterFormat = rMaster.GetFooter();
const SwFrameFormat *pFooterFormat = rFooterFormat.GetFooterFormat();
- OSL_ENSURE(pFooterFormat != 0, "no footer format");
+ OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
// FooterInfo, margins, background, border
SfxItemSet aFooterSet(*rSet.GetPool(),
@@ -566,7 +566,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// Register compliant
const SwTextFormatColl* pCol = rPageDesc.GetRegisterFormatColl();
- SwRegisterItem aReg(pCol != 0);
+ SwRegisterItem aReg(pCol != nullptr);
aReg.SetWhich(SID_SWREGISTER_MODE);
rSet.Put(aReg);
if(pCol)
@@ -641,7 +641,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// Inquire if in the set is a Sfx-PageDesc combination present and return it.
void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
OUString aName;
::boost::optional<sal_uInt16> oNumOffset;
bool bPut = true;
@@ -762,7 +762,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe
{
if(pSh)
{
- if ( 0 == pSh->GetFlyFrameFormat() )
+ if ( nullptr == pSh->GetFlyFrameFormat() )
{
nWidth = pSh->GetAnyCurRect(RECT_PAGE_PRT).Width();
}
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index fce324cd2e13..e246665e4dc8 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -159,12 +159,12 @@ void SwOneExampleFrame::CreateControl()
void SwOneExampleFrame::DisposeControl()
{
- _xCursor = 0;
+ _xCursor = nullptr;
if(_xControl.is())
_xControl->dispose();
- _xControl = 0;
- _xModel = 0;
- _xController = 0;
+ _xControl = nullptr;
+ _xModel = nullptr;
+ _xController = nullptr;
}
static void disableScrollBars(uno::Reference< beans::XPropertySet > xViewProps,
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 8e4b24e04a62..7bbcc693f425 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -106,7 +106,7 @@ void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
}
if ( GetStatusBar().AreItemsVisible() )
- GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
+ GetStatusBar().SetItemData( GetId(), nullptr ); // force repaint
}
void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index d6dd03a8eb69..dc3ee757940f 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -184,7 +184,7 @@ long SwWrtShell::DelLeft()
// changed the table cell, compare DelRight().
const SwStartNode * pSNdOld = pWasInTableNd ?
GetSwCrsr()->GetNode().FindTableBoxStartNode() :
- 0;
+ nullptr;
// If the cursor is at the beginning of a paragraph, try to step
// backwards. On failure we are done.
@@ -199,7 +199,7 @@ long SwWrtShell::DelLeft()
const SwStartNode* pSNdNew = pIsInTableNd ?
GetSwCrsr()->GetNode().FindTableBoxStartNode() :
- 0;
+ nullptr;
// #i4032# Don't actually call a 'delete' if we
// changed the table cell, compare DelRight().
@@ -234,7 +234,7 @@ long SwWrtShell::DelRight()
if(nSelection & nsSelectionType::SEL_TXT)
nSelection = nsSelectionType::SEL_TXT;
- const SwTableNode * pWasInTableNd = NULL;
+ const SwTableNode * pWasInTableNd = nullptr;
switch( nSelection & ~(nsSelectionType::SEL_BEZ) )
{
@@ -365,7 +365,7 @@ long SwWrtShell::DelRight()
if (GetView().GetDrawFuncPtr())
{
GetView().GetDrawFuncPtr()->Deactivate();
- GetView().SetDrawFuncPtr(NULL);
+ GetView().SetDrawFuncPtr(nullptr);
}
if ( GetView().IsDrawMode() )
{
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 271f75e0b29e..0ab3213a2f99 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -45,7 +45,7 @@ class ShellMoveCrsr
public:
inline ShellMoveCrsr( SwWrtShell* pWrtSh, bool bSel )
{
- bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,false) & FrmTypeFlags::FLY_ANY);
+ bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(nullptr,false) & FrmTypeFlags::FLY_ANY);
( pSh = pWrtSh )->MoveCrsr( bSel );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
@@ -74,7 +74,7 @@ void SwWrtShell::MoveCrsr( bool bWithSelect )
else
{
EndSelect();
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
}
}
@@ -237,7 +237,7 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable,
else
SttSelect();
}
- const FrmTypeFlags nFrmType = GetFrmType(0,false);
+ const FrmTypeFlags nFrmType = GetFrmType(nullptr,false);
if ( FrmTypeFlags::FLY_ANY & nFrmType )
{
if( MoveSection( fnSectionCurr, fnSectionStart ) )
@@ -270,7 +270,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable)
}
else
{
- const FrmTypeFlags nFrmType = GetFrmType(0,false);
+ const FrmTypeFlags nFrmType = GetFrmType(nullptr,false);
if ( FrmTypeFlags::FLY_ANY & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) )
@@ -294,7 +294,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable)
bool SwWrtShell::SttDoc( bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
- return GoStart(false, 0, bSelect );
+ return GoStart(false, nullptr, bSelect );
}
bool SwWrtShell::EndDoc( bool bSelect)
@@ -439,7 +439,7 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect)
LeaveSelFrmMode();
if ( bIsObjSel )
{
- GetView().SetDrawFuncPtr( NULL );
+ GetView().SetDrawFuncPtr( nullptr );
GetView().LeaveDrawCreate();
}
@@ -470,7 +470,7 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect)
bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect)
{
- if( 0 == m_pCrsrStack)
+ if( nullptr == m_pCrsrStack)
return false;
const bool bValidPos = m_pCrsrStack->bValidCurPos;
@@ -507,7 +507,7 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect)
CrsrStack *pTmp = m_pCrsrStack;
m_pCrsrStack = m_pCrsrStack->pNext;
delete pTmp;
- if( 0 == m_pCrsrStack )
+ if( nullptr == m_pCrsrStack )
{
m_ePageMove = MV_NO;
m_bDestOnStack = false;
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index e7a3806b95e2..d617c02ed977 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -131,7 +131,7 @@ long SwWrtShell::SelAll()
bool bMoveTable = false;
std::unique_ptr<SwPosition> pStartPos;
std::unique_ptr<SwPosition> pEndPos;
- SwShellCrsr* pTmpCrsr = 0;
+ SwShellCrsr* pTmpCrsr = nullptr;
// Query these early, before we move the cursor.
bool bHasWholeTabSelection = HasWholeTabSelection();
@@ -237,7 +237,7 @@ sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl,
if(!(eFlags & FND_IN_SEL))
ClearMark();
SwTextFormatColl *pColl = GetParaStyle(rTempl, SwWrtShell::GETSTYLE_CREATESOME);
- SwTextFormatColl *pReplaceColl = 0;
+ SwTextFormatColl *pReplaceColl = nullptr;
if( pReplTempl )
pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME );
@@ -284,7 +284,7 @@ void SwWrtShell::PushMode()
void SwWrtShell::PopMode()
{
- if ( 0 == m_pModeStack )
+ if ( nullptr == m_pModeStack )
return;
if ( m_bExtMode && !m_pModeStack->bExt )
@@ -400,11 +400,11 @@ void SwWrtShell::EndSelect()
m_bInSelect = false;
if (m_bAddMode)
{
- AddLeaveSelect(0);
+ AddLeaveSelect(nullptr);
}
else
{
- SttLeaveSelect(0);
+ SttLeaveSelect(nullptr);
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 922b06b7404d..5bab7f7ae218 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -115,9 +115,9 @@ using namespace com::sun::star;
m_fnSetCrsr(&SwWrtShell::SetCrsr),\
m_fnEndDrag(&SwWrtShell::DefaultEndDrag),\
m_fnKillSel(&SwWrtShell::Ignore),\
- m_pModeStack(0), \
+ m_pModeStack(nullptr), \
m_ePageMove(MV_NO),\
- m_pCrsrStack(0), \
+ m_pCrsrStack(nullptr), \
m_rView(rShell),\
m_aNavigationMgr(*this), \
m_bDestOnStack(false)
@@ -142,7 +142,7 @@ static SvxAutoCorrect* lcl_IsAutoCorr()
if( pACorr && !pACorr->IsAutoCorrFlag( CapitalStartSentence | CapitalStartWord |
AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))
- pACorr = 0;
+ pACorr = nullptr;
return pACorr;
}
@@ -408,8 +408,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
{
- SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, 0, xObj.GetObject() ).Pos();
+ SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
MapMode aMapMode( MAP_TWIP );
Size aSize = xObj.GetSize( &aMapMode );
aArea.Width( aSize.Width() );
@@ -573,7 +573,7 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
{
svt::EmbeddedObjectRef& xRef = GetOLEObject();
OSL_ENSURE( xRef.is(), "OLE not found" );
- SfxInPlaceClient* pCli=0;
+ SfxInPlaceClient* pCli=nullptr;
pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().GetEditWin() );
if ( !pCli )
@@ -638,7 +638,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
// TODO/MBA: testing
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ));
+ : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
if( !aRect.IsEmpty() )
{
// TODO/LEAN: getMapUnit can switch object to running state
@@ -759,7 +759,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( pFlyPrtRect )
aObjArea = pFlyPrtRect->SSize();
else
- aObjArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ).SSize();
+ aObjArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ).SSize();
// differ the aObjArea and _aVisArea by 1 Pixel then set new VisArea
long nX, nY;
@@ -793,8 +793,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
else
{
- aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, 0, xObj.GetObject() ).Pos();
+ aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
}
if ( bUseObjectSize )
@@ -806,7 +806,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
const Point &rPoint = pFlyFrameFormat->GetLastFlyFrmPrtRectPos();
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ));
+ : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
}
aArea.Width ( _aVisArea.Width() );
@@ -851,7 +851,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio
}
const SwPageDesc *pDesc = pPageDesc
- ? FindPageDescByName( *pPageDesc, true ) : 0;
+ ? FindPageDescByName( *pPageDesc, true ) : nullptr;
if( pDesc )
{
SwFormatPageDesc aDesc( pDesc );
@@ -1010,7 +1010,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
mpDoc->FindNumRulePtr(pColl->GetNumRule( false ).GetValue());
if ( !pDirectCollRule )
{
- pCollRule = 0;
+ pCollRule = nullptr;
}
}
@@ -1109,12 +1109,12 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
{
if ( !pNumRule->IsAutoRule() )
{
- pNumRule = 0;
+ pNumRule = nullptr;
}
else if ( pNumRule == GetDoc()->GetOutlineNumRule() &&
!bActivateOutlineRule && !bContinueFoundNumRule )
{
- pNumRule = 0;
+ pNumRule = nullptr;
}
}
@@ -1125,7 +1125,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
pNumRule = GetDoc()->SearchNumRule( *GetCrsr()->GetPoint(),
false, bNum, false, 0,
sContinuedListId );
- bContinueFoundNumRule = pNumRule != 0;
+ bContinueFoundNumRule = pNumRule != nullptr;
}
if (pNumRule)
@@ -1188,7 +1188,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// Only apply user defined default bullet font
const vcl::Font* pFnt = numfunc::IsDefBulletFontUserDefined()
? &numfunc::GetDefBulletFont()
- : 0;
+ : nullptr;
if (bNum)
{
@@ -1488,7 +1488,7 @@ SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName)
pFormat->GetName() == rFormatName && IsUsed( *pFormat ) )
return pFormat;
}
- return 0;
+ return nullptr;
}
void SwWrtShell::addCurrentPosition() {
@@ -1635,8 +1635,8 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, vcl::Window *_pWin, SwView &rShell )
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
// place the cursor on the first field...
- IFieldmark *pBM = NULL;
- if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) {
+ IFieldmark *pBM = nullptr;
+ if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
GotoFieldmark(pBM);
}
}
@@ -1652,8 +1652,8 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView &rShell,
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
// place the cursor on the first field...
- IFieldmark *pBM = NULL;
- if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) {
+ IFieldmark *pBM = nullptr;
+ if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
GotoFieldmark(pBM);
}
}
@@ -1736,7 +1736,7 @@ OUString SwWrtShell::GetSelDescr() const
}
break;
default:
- if (0 != mpDoc)
+ if (nullptr != mpDoc)
aResult = GetCrsrDescr();
}
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 42fc249e9888..bb5242b99e0b 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -119,7 +119,7 @@ void SwWrtShell::Insert(SwField &rField)
if ( pAnnotationTextRange )
{
- if ( GetDoc() != NULL )
+ if ( GetDoc() != nullptr )
{
IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess();
pMarksAccess->makeAnnotationMark( *pAnnotationTextRange, OUString() );
@@ -154,7 +154,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst )
if(pField->GetTyp()->Which() == RES_DROPDOWN)
bCancel = StartDropDownFieldDlg( pField, true, &aDlgPos );
else
- bCancel = StartInputFieldDlg( pField, true, 0, &aDlgPos);
+ bCancel = StartInputFieldDlg( pField, true, nullptr, &aDlgPos);
if (!bCancel)
{
@@ -179,7 +179,7 @@ class FieldDeletionModify : public SwModify
public:
FieldDeletionModify(AbstractFieldInputDlg* pInputFieldDlg, SwField* pField)
: mpInputFieldDlg(pInputFieldDlg)
- , mpFormatField(NULL)
+ , mpFormatField(nullptr)
{
SwInputField *const pInputField(dynamic_cast<SwInputField*>(pField));
SwSetExpField *const pSetExpField(dynamic_cast<SwSetExpField*>(pField));
@@ -216,7 +216,7 @@ class FieldDeletionModify : public SwModify
{
case RES_REMOVE_UNO_OBJECT:
case RES_OBJECTDYING:
- mpFormatField = NULL;
+ mpFormatField = nullptr;
mpInputFieldDlg->EndDialog(RET_CANCEL);
break;
}
@@ -259,7 +259,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OStrin
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pField, bNextButton));
+ std::unique_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(nullptr, *this, pField, bNextButton));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState);
@@ -299,7 +299,7 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
bResult = SwEditShell::UpdateTableOf(rTOX, pSet);
- if (pSet == NULL)
+ if (pSet == nullptr)
{
SwDoc *const pDoc_ = GetDoc();
if (pDoc_)
@@ -388,7 +388,7 @@ void SwWrtShell::ClickToField( const SwField& rField )
case RES_INPUTFLD:
{
const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rField);
- if ( pInputField == NULL )
+ if ( pInputField == nullptr )
{
StartInputFieldDlg( const_cast<SwField*>(&rField), false );
}
@@ -516,7 +516,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
&aReferer,
&aView, &aTargetFrameName,
&aBrowse,
- 0L
+ nullptr
};
pViewFrm->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0,
@@ -573,7 +573,7 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
// any undoobject. - BUG 69145
bool bDoesUndo = DoesUndo();
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (GetLastUndoInfo(0, & nLastUndoId))
+ if (GetLastUndoInfo(nullptr, & nLastUndoId))
{
if (UNDO_INSSECTION != nLastUndoId)
{
diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx
index b7e615dc3677..12665242cbc1 100644
--- a/sw/source/uibase/wrtsh/wrtsh3.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh3.cxx
@@ -43,7 +43,7 @@ extern bool g_bNoInterrupt; // in swmodule.cxx
bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
addCurrentPosition();
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = true;
switch(eFuncId)
@@ -69,7 +69,7 @@ bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co
bool SwWrtShell::GotoField( const SwFormatField& rField )
{
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = SwCrsrShell::GotoFormatField( rField );
if( bRet && IsSelFrmMode() )
@@ -89,7 +89,7 @@ bool SwWrtShell::GotoField( const SwFormatField& rField )
bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
{
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = SwCrsrShell::GotoFieldmark(pMark);
if( bRet && IsSelFrmMode() )
{
diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx
index 6071417b681d..1756fdd53b22 100644
--- a/sw/source/uibase/wrtsh/wrtundo.cxx
+++ b/sw/source/uibase/wrtsh/wrtundo.cxx
@@ -102,7 +102,7 @@ OUString SwWrtShell::GetDoString( DoType eDoType ) const
{
case UNDO:
nResStr = STR_UNDO;
- (void)GetLastUndoInfo(&aUndoStr, 0);
+ (void)GetLastUndoInfo(&aUndoStr, nullptr);
break;
case REDO:
nResStr = STR_REDO;