summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:25:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:53 +0100
commit01b49802c7cda7fd4d5ba71263cef7bc95234b89 (patch)
treeb8d92f1c6abf5ac548d0bcb0c581ebfcffd8bfac /sw/source
parent6cd7bf2043146a630925a2e49336f02c802f707a (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source')
-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
779 files changed, 10727 insertions, 10727 deletions
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 Sw