summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:22:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:36 +0100
commitde29ac09535d814e4be7e1bf0f10beb9f0f847e3 (patch)
tree139f75d657cb825622e812254b8b7df4e509140b /sc
parent60c40af090e420a8619b5236bde1ff4ef79100c6 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/address.hxx34
-rw-r--r--sc/inc/attarray.hxx12
-rw-r--r--sc/inc/attrib.hxx30
-rw-r--r--sc/inc/autoform.hxx4
-rw-r--r--sc/inc/chartlis.hxx2
-rw-r--r--sc/inc/chartpos.hxx10
-rw-r--r--sc/inc/chgtrack.hxx30
-rw-r--r--sc/inc/chgviset.hxx2
-rw-r--r--sc/inc/colorscale.hxx6
-rw-r--r--sc/inc/column.hxx28
-rw-r--r--sc/inc/compare.hxx4
-rw-r--r--sc/inc/conditio.hxx14
-rw-r--r--sc/inc/consoli.hxx2
-rw-r--r--sc/inc/dapiuno.hxx2
-rw-r--r--sc/inc/dbdocutl.hxx2
-rw-r--r--sc/inc/defaultsoptions.hxx2
-rw-r--r--sc/inc/dociter.hxx2
-rw-r--r--sc/inc/docoptio.hxx2
-rw-r--r--sc/inc/docpool.hxx4
-rw-r--r--sc/inc/document.hxx106
-rw-r--r--sc/inc/documentimport.hxx2
-rw-r--r--sc/inc/dpfilteredcache.hxx2
-rw-r--r--sc/inc/dpobject.hxx12
-rw-r--r--sc/inc/dpsave.hxx2
-rw-r--r--sc/inc/dptabres.hxx6
-rw-r--r--sc/inc/drwlayer.hxx2
-rw-r--r--sc/inc/editutil.hxx6
-rw-r--r--sc/inc/externalrefmgr.hxx8
-rw-r--r--sc/inc/filter.hxx4
-rw-r--r--sc/inc/formulacell.hxx4
-rw-r--r--sc/inc/formulaopt.hxx2
-rw-r--r--sc/inc/global.hxx2
-rw-r--r--sc/inc/listenercontext.hxx4
-rw-r--r--sc/inc/mtvelements.hxx8
-rw-r--r--sc/inc/patattr.hxx34
-rw-r--r--sc/inc/postit.hxx2
-rw-r--r--sc/inc/printopt.hxx2
-rw-r--r--sc/inc/rangelst.hxx4
-rw-r--r--sc/inc/rangenam.hxx2
-rw-r--r--sc/inc/rangeutl.hxx14
-rw-r--r--sc/inc/reffind.hxx2
-rw-r--r--sc/inc/scabstdlg.hxx10
-rw-r--r--sc/inc/scmatrix.hxx2
-rw-r--r--sc/inc/scmod.hxx12
-rw-r--r--sc/inc/sharedformula.hxx2
-rw-r--r--sc/inc/styleuno.hxx2
-rw-r--r--sc/inc/table.hxx46
-rw-r--r--sc/inc/token.hxx2
-rw-r--r--sc/inc/viewopti.hxx4
-rw-r--r--sc/qa/extras/htmlexporttest.cxx2
-rw-r--r--sc/qa/extras/macros-test.cxx2
-rw-r--r--sc/qa/extras/sccondformats.cxx12
-rw-r--r--sc/qa/unit/copy_paste_test.cxx6
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx2
-rw-r--r--sc/qa/unit/helper/qahelper.cxx16
-rw-r--r--sc/qa/unit/helper/qahelper.hxx6
-rw-r--r--sc/qa/unit/rangelst_test.cxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx14
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx26
-rw-r--r--sc/qa/unit/test_ScChartListenerCollection.cxx10
-rw-r--r--sc/qa/unit/ucalc.cxx156
-rw-r--r--sc/qa/unit/ucalc_formula.cxx56
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx196
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx4
-rw-r--r--sc/qa/unit/ucalc_sort.cxx54
-rw-r--r--sc/source/core/data/attarray.cxx40
-rw-r--r--sc/source/core/data/attrib.cxx34
-rw-r--r--sc/source/core/data/bcaslot.cxx26
-rw-r--r--sc/source/core/data/cellvalues.cxx8
-rw-r--r--sc/source/core/data/clipcontext.cxx6
-rw-r--r--sc/source/core/data/colorscale.cxx34
-rw-r--r--sc/source/core/data/column.cxx34
-rw-r--r--sc/source/core/data/column2.cxx46
-rw-r--r--sc/source/core/data/column3.cxx18
-rw-r--r--sc/source/core/data/column4.cxx12
-rw-r--r--sc/source/core/data/columnspanset.cxx4
-rw-r--r--sc/source/core/data/conditio.cxx54
-rw-r--r--sc/source/core/data/dociter.cxx58
-rw-r--r--sc/source/core/data/docpool.cxx56
-rw-r--r--sc/source/core/data/documen2.cxx122
-rw-r--r--sc/source/core/data/documen3.cxx42
-rw-r--r--sc/source/core/data/documen4.cxx28
-rw-r--r--sc/source/core/data/documen6.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx20
-rw-r--r--sc/source/core/data/documen8.cxx34
-rw-r--r--sc/source/core/data/documen9.cxx8
-rw-r--r--sc/source/core/data/document.cxx102
-rw-r--r--sc/source/core/data/document10.cxx2
-rw-r--r--sc/source/core/data/documentimport.cxx8
-rw-r--r--sc/source/core/data/dpcache.cxx26
-rw-r--r--sc/source/core/data/dpdimsave.cxx16
-rw-r--r--sc/source/core/data/dpfilteredcache.cxx8
-rw-r--r--sc/source/core/data/dpgroup.cxx10
-rw-r--r--sc/source/core/data/dpobject.cxx90
-rw-r--r--sc/source/core/data/dpoutput.cxx6
-rw-r--r--sc/source/core/data/dpresfilter.cxx12
-rw-r--r--sc/source/core/data/dpsdbtab.cxx4
-rw-r--r--sc/source/core/data/dpshttab.cxx4
-rw-r--r--sc/source/core/data/dptabdat.cxx10
-rw-r--r--sc/source/core/data/dptabres.cxx148
-rw-r--r--sc/source/core/data/drawpage.cxx4
-rw-r--r--sc/source/core/data/drwlayer.cxx60
-rw-r--r--sc/source/core/data/edittextiterator.cxx4
-rw-r--r--sc/source/core/data/fillinfo.cxx42
-rw-r--r--sc/source/core/data/formulacell.cxx134
-rw-r--r--sc/source/core/data/funcdesc.cxx28
-rw-r--r--sc/source/core/data/global.cxx88
-rw-r--r--sc/source/core/data/global2.cxx16
-rw-r--r--sc/source/core/data/markarr.cxx4
-rw-r--r--sc/source/core/data/markdata.cxx8
-rw-r--r--sc/source/core/data/mtvelements.cxx6
-rw-r--r--sc/source/core/data/olinetab.cxx22
-rw-r--r--sc/source/core/data/patattr.cxx30
-rw-r--r--sc/source/core/data/poolhelp.cxx10
-rw-r--r--sc/source/core/data/postit.cxx32
-rw-r--r--sc/source/core/data/sheetevents.cxx14
-rw-r--r--sc/source/core/data/simpleformulacalc.cxx4
-rw-r--r--sc/source/core/data/stlpool.cxx24
-rw-r--r--sc/source/core/data/stlsheet.cxx4
-rw-r--r--sc/source/core/data/subtotalparam.cxx12
-rw-r--r--sc/source/core/data/table2.cxx70
-rw-r--r--sc/source/core/data/table3.cxx22
-rw-r--r--sc/source/core/data/table4.cxx28
-rw-r--r--sc/source/core/data/table5.cxx18
-rw-r--r--sc/source/core/data/table6.cxx6
-rw-r--r--sc/source/core/data/types.cxx2
-rw-r--r--sc/source/core/data/validat.cxx28
-rw-r--r--sc/source/core/inc/cellkeytranslator.hxx2
-rw-r--r--sc/source/core/inc/doubleref.hxx6
-rw-r--r--sc/source/core/inc/interpre.hxx8
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx128
-rw-r--r--sc/source/core/opencl/opbase.cxx2
-rw-r--r--sc/source/core/tool/addincol.cxx36
-rw-r--r--sc/source/core/tool/addinhelpid.cxx2
-rw-r--r--sc/source/core/tool/addinlis.cxx4
-rw-r--r--sc/source/core/tool/address.cxx120
-rw-r--r--sc/source/core/tool/adiasync.cxx10
-rw-r--r--sc/source/core/tool/appoptio.cxx8
-rw-r--r--sc/source/core/tool/autoform.cxx6
-rw-r--r--sc/source/core/tool/callform.cxx14
-rw-r--r--sc/source/core/tool/cellform.cxx6
-rw-r--r--sc/source/core/tool/cellkeytranslator.cxx4
-rw-r--r--sc/source/core/tool/cellkeywords.inl6
-rw-r--r--sc/source/core/tool/chartarr.cxx8
-rw-r--r--sc/source/core/tool/chartlock.cxx2
-rw-r--r--sc/source/core/tool/chartpos.cxx30
-rw-r--r--sc/source/core/tool/chgtrack.cxx192
-rw-r--r--sc/source/core/tool/chgviset.cxx8
-rw-r--r--sc/source/core/tool/compare.cxx4
-rw-r--r--sc/source/core/tool/compiler.cxx26
-rw-r--r--sc/source/core/tool/consoli.cxx16
-rw-r--r--sc/source/core/tool/dbdata.cxx10
-rw-r--r--sc/source/core/tool/ddelink.cxx8
-rw-r--r--sc/source/core/tool/detfunc.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx2
-rw-r--r--sc/source/core/tool/doubleref.cxx8
-rw-r--r--sc/source/core/tool/editdataarray.cxx4
-rw-r--r--sc/source/core/tool/editutil.cxx12
-rw-r--r--sc/source/core/tool/formulagroup.cxx34
-rw-r--r--sc/source/core/tool/formularesult.cxx10
-rw-r--r--sc/source/core/tool/grouparealistener.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx58
-rw-r--r--sc/source/core/tool/interpr2.cxx6
-rw-r--r--sc/source/core/tool/interpr3.cxx8
-rw-r--r--sc/source/core/tool/interpr4.cxx38
-rw-r--r--sc/source/core/tool/interpr5.cxx56
-rw-r--r--sc/source/core/tool/interpr6.cxx4
-rw-r--r--sc/source/core/tool/jumpmatrix.cxx4
-rw-r--r--sc/source/core/tool/parclass.cxx4
-rw-r--r--sc/source/core/tool/prnsave.cxx10
-rw-r--r--sc/source/core/tool/progress.cxx16
-rw-r--r--sc/source/core/tool/queryentry.cxx16
-rw-r--r--sc/source/core/tool/queryparam.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx20
-rw-r--r--sc/source/core/tool/rangenam.cxx28
-rw-r--r--sc/source/core/tool/rangeseq.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx16
-rw-r--r--sc/source/core/tool/rechead.cxx2
-rw-r--r--sc/source/core/tool/refreshtimer.cxx8
-rw-r--r--sc/source/core/tool/scmatrix.cxx8
-rw-r--r--sc/source/core/tool/sharedformula.cxx2
-rw-r--r--sc/source/core/tool/stringutil.cxx2
-rw-r--r--sc/source/core/tool/stylehelper.cxx2
-rw-r--r--sc/source/core/tool/token.cxx66
-rw-r--r--sc/source/core/tool/tokenstringcontext.cxx2
-rw-r--r--sc/source/filter/dif/difimp.cxx12
-rw-r--r--sc/source/filter/excel/colrowst.cxx2
-rw-r--r--sc/source/filter/excel/excdoc.cxx10
-rw-r--r--sc/source/filter/excel/excel.cxx4
-rw-r--r--sc/source/filter/excel/excform.cxx22
-rw-r--r--sc/source/filter/excel/excform8.cxx2
-rw-r--r--sc/source/filter/excel/excimp8.cxx8
-rw-r--r--sc/source/filter/excel/excrecds.cxx66
-rw-r--r--sc/source/filter/excel/exctools.cxx22
-rw-r--r--sc/source/filter/excel/fontbuff.cxx2
-rw-r--r--sc/source/filter/excel/frmbase.cxx6
-rw-r--r--sc/source/filter/excel/impop.cxx12
-rw-r--r--sc/source/filter/excel/namebuff.cxx4
-rw-r--r--sc/source/filter/excel/tokstack.cxx24
-rw-r--r--sc/source/filter/excel/xechart.cxx4
-rw-r--r--sc/source/filter/excel/xecontent.cxx30
-rw-r--r--sc/source/filter/excel/xedbdata.cxx2
-rw-r--r--sc/source/filter/excel/xeextlst.cxx6
-rw-r--r--sc/source/filter/excel/xeformula.cxx36
-rw-r--r--sc/source/filter/excel/xehelper.cxx14
-rw-r--r--sc/source/filter/excel/xelink.cxx20
-rw-r--r--sc/source/filter/excel/xename.cxx4
-rw-r--r--sc/source/filter/excel/xepage.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx16
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx14
-rw-r--r--sc/source/filter/excel/xestream.cxx36
-rw-r--r--sc/source/filter/excel/xestring.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx28
-rw-r--r--sc/source/filter/excel/xetable.cxx16
-rw-r--r--sc/source/filter/excel/xichart.cxx26
-rw-r--r--sc/source/filter/excel/xicontent.cxx16
-rw-r--r--sc/source/filter/excel/xiescher.cxx24
-rw-r--r--sc/source/filter/excel/xiformula.cxx4
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx26
-rw-r--r--sc/source/filter/excel/xiname.cxx8
-rw-r--r--sc/source/filter/excel/xipage.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx42
-rw-r--r--sc/source/filter/excel/xistyle.cxx30
-rw-r--r--sc/source/filter/excel/xlchart.cxx20
-rw-r--r--sc/source/filter/excel/xlformula.cxx550
-rw-r--r--sc/source/filter/excel/xlpivot.cxx12
-rw-r--r--sc/source/filter/excel/xlroot.cxx4
-rw-r--r--sc/source/filter/excel/xlstyle.cxx26
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx2
-rw-r--r--sc/source/filter/excel/xlview.cxx2
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx4
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx6
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/ftools/sharedformulagroups.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx8
-rw-r--r--sc/source/filter/html/htmlimp.cxx4
-rw-r--r--sc/source/filter/html/htmlpars.cxx60
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx4
-rw-r--r--sc/source/filter/inc/drawingfragment.hxx4
-rw-r--r--sc/source/filter/inc/eeimport.hxx2
-rw-r--r--sc/source/filter/inc/eeparser.hxx10
-rw-r--r--sc/source/filter/inc/fapihelper.hxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx2
-rw-r--r--sc/source/filter/inc/htmlimp.hxx2
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx8
-rw-r--r--sc/source/filter/inc/richstring.hxx6
-rw-r--r--sc/source/filter/inc/scflt.hxx2
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx12
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx2
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx2
-rw-r--r--sc/source/filter/inc/xechart.hxx2
-rw-r--r--sc/source/filter/inc/xecontent.hxx2
-rw-r--r--sc/source/filter/inc/xeformula.hxx2
-rw-r--r--sc/source/filter/inc/xehelper.hxx2
-rw-r--r--sc/source/filter/inc/xelink.hxx6
-rw-r--r--sc/source/filter/inc/xestream.hxx4
-rw-r--r--sc/source/filter/inc/xichart.hxx2
-rw-r--r--sc/source/filter/inc/xiescher.hxx8
-rw-r--r--sc/source/filter/inc/xilink.hxx2
-rw-r--r--sc/source/filter/inc/xistyle.hxx8
-rw-r--r--sc/source/filter/inc/xlescher.hxx4
-rw-r--r--sc/source/filter/inc/xlformula.hxx10
-rw-r--r--sc/source/filter/inc/xlstyle.hxx2
-rw-r--r--sc/source/filter/inc/xltools.hxx4
-rw-r--r--sc/source/filter/lotus/lotfilter.hxx20
-rw-r--r--sc/source/filter/lotus/lotform.cxx470
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx4
-rw-r--r--sc/source/filter/lotus/tool.cxx6
-rw-r--r--sc/source/filter/oox/autofilterbuffer.cxx2
-rw-r--r--sc/source/filter/oox/autofiltercontext.cxx12
-rw-r--r--sc/source/filter/oox/biffinputstream.cxx2
-rw-r--r--sc/source/filter/oox/chartsheetfragment.cxx4
-rw-r--r--sc/source/filter/oox/commentsfragment.cxx4
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx16
-rw-r--r--sc/source/filter/oox/condformatcontext.cxx28
-rw-r--r--sc/source/filter/oox/connectionsfragment.cxx8
-rw-r--r--sc/source/filter/oox/defnamesbuffer.cxx2
-rw-r--r--sc/source/filter/oox/drawingbase.cxx2
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx6
-rw-r--r--sc/source/filter/oox/excelfilter.cxx6
-rw-r--r--sc/source/filter/oox/externallinkbuffer.cxx4
-rw-r--r--sc/source/filter/oox/externallinkfragment.cxx8
-rw-r--r--sc/source/filter/oox/extlstcontext.cxx16
-rw-r--r--sc/source/filter/oox/formulabase.cxx108
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx20
-rw-r--r--sc/source/filter/oox/formulaparser.cxx64
-rw-r--r--sc/source/filter/oox/numberformatsbuffer.cxx6
-rw-r--r--sc/source/filter/oox/ooxformulaparser.cxx2
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx8
-rw-r--r--sc/source/filter/oox/pivotcachefragment.cxx12
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx10
-rw-r--r--sc/source/filter/oox/pivottablefragment.cxx12
-rw-r--r--sc/source/filter/oox/querytablefragment.cxx4
-rw-r--r--sc/source/filter/oox/revisionfragment.cxx6
-rw-r--r--sc/source/filter/oox/richstring.cxx6
-rw-r--r--sc/source/filter/oox/richstringcontext.cxx2
-rw-r--r--sc/source/filter/oox/scenariocontext.cxx8
-rw-r--r--sc/source/filter/oox/sharedstringsfragment.cxx4
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx4
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx20
-rw-r--r--sc/source/filter/oox/stylesfragment.cxx18
-rw-r--r--sc/source/filter/oox/tablecolumnsbuffer.cxx2
-rw-r--r--sc/source/filter/oox/tablecolumnscontext.cxx8
-rw-r--r--sc/source/filter/oox/tablefragment.cxx4
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx4
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx8
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx20
-rw-r--r--sc/source/filter/orcus/interface.cxx6
-rw-r--r--sc/source/filter/orcus/xmlcontext.cxx4
-rw-r--r--sc/source/filter/qpro/qproform.cxx24
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx20
-rw-r--r--sc/source/filter/rtf/expbase.cxx2
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx2
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx14
-rw-r--r--sc/source/filter/starcalc/collect.cxx6
-rw-r--r--sc/source/filter/starcalc/scflt.cxx28
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx134
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx18
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx28
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx12
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx8
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx20
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx8
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.cxx8
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx8
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx30
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.cxx8
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.hxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx6
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx28
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.hxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapesContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx36
-rw-r--r--sc/source/filter/xml/editattributemap.cxx4
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx8
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx6
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx18
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx4
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx22
-rw-r--r--sc/source/filter/xml/xmlconti.cxx2
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx10
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx50
-rw-r--r--sc/source/filter/xml/xmldrani.cxx26
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx62
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx14
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx8
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx220
-rw-r--r--sc/source/filter/xml/xmllabri.cxx2
-rw-r--r--sc/source/filter/xml/xmlnexpi.cxx2
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx4
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx84
-rw-r--r--sc/source/filter/xml/xmlstyle.hxx10
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx38
-rw-r--r--sc/source/filter/xml/xmltabi.cxx4
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx16
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx56
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx26
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx16
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx20
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx104
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx16
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx2
-rw-r--r--sc/source/ui/app/client.cxx4
-rw-r--r--sc/source/ui/app/drwtrans.cxx16
-rw-r--r--sc/source/ui/app/inputhdl.cxx112
-rw-r--r--sc/source/ui/app/inputwin.cxx38
-rw-r--r--sc/source/ui/app/msgpool.cxx16
-rw-r--r--sc/source/ui/app/scmod.cxx72
-rw-r--r--sc/source/ui/app/seltrans.cxx20
-rw-r--r--sc/source/ui/app/transobj.cxx20
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx18
-rw-r--r--sc/source/ui/attrdlg/scabstdlg.cxx4
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx18
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx10
-rw-r--r--sc/source/ui/attrdlg/scuiexp.cxx2
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx4
-rw-r--r--sc/source/ui/condformat/colorformat.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx46
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx14
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx8
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx20
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeList.cxx6
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx10
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListData.cxx14
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx20
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx14
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx4
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx10
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx18
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx10
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx6
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx18
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/subtdlg.cxx8
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx14
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx12
-rw-r--r--sc/source/ui/dbgui/validate.cxx44
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx4
-rw-r--r--sc/source/ui/docshell/arealink.cxx18
-rw-r--r--sc/source/ui/docshell/autostyl.cxx2
-rw-r--r--sc/source/ui/docshell/datastream.cxx6
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx56
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx16
-rw-r--r--sc/source/ui/docshell/docfunc.cxx108
-rw-r--r--sc/source/ui/docshell/docsh.cxx74
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx30
-rw-r--r--sc/source/ui/docshell/docsh4.cxx50
-rw-r--r--sc/source/ui/docshell/docsh5.cxx24
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx4
-rw-r--r--sc/source/ui/docshell/docshimp.hxx6
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx46
-rw-r--r--sc/source/ui/docshell/impex.cxx56
-rw-r--r--sc/source/ui/docshell/olinefun.cxx26
-rw-r--r--sc/source/ui/docshell/pagedata.cxx10
-rw-r--r--sc/source/ui/docshell/servobj.cxx4
-rw-r--r--sc/source/ui/docshell/tablink.cxx24
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx10
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx6
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx4
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx10
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx6
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx20
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx8
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx24
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx4
-rw-r--r--sc/source/ui/drawfunc/futext.cxx14
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx10
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx8
-rw-r--r--sc/source/ui/formdlg/formdata.cxx4
-rw-r--r--sc/source/ui/formdlg/formula.cxx32
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx8
-rw-r--r--sc/source/ui/inc/ChildWindowWrapper.hxx10
-rw-r--r--sc/source/ui/inc/IAnyRefDialog.hxx2
-rw-r--r--sc/source/ui/inc/acredlin.hxx4
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx16
-rw-r--r--sc/source/ui/inc/cellsh.hxx6
-rw-r--r--sc/source/ui/inc/condformatdlgentry.hxx14
-rw-r--r--sc/source/ui/inc/content.hxx2
-rw-r--r--sc/source/ui/inc/dbfunc.hxx6
-rw-r--r--sc/source/ui/inc/docsh.hxx8
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx4
-rw-r--r--sc/source/ui/inc/drawview.hxx10
-rw-r--r--sc/source/ui/inc/formula.hxx6
-rw-r--r--sc/source/ui/inc/futext.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx10
-rw-r--r--sc/source/ui/inc/inputhdl.hxx6
-rw-r--r--sc/source/ui/inc/inscodlg.hxx2
-rw-r--r--sc/source/ui/inc/instbdlg.hxx4
-rw-r--r--sc/source/ui/inc/navipi.hxx8
-rw-r--r--sc/source/ui/inc/output.hxx4
-rw-r--r--sc/source/ui/inc/printfun.hxx12
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx4
-rw-r--r--sc/source/ui/inc/spellparam.hxx2
-rw-r--r--sc/source/ui/inc/tabpages.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx6
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/inc/tpcalc.hxx2
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx2
-rw-r--r--sc/source/ui/inc/tpdefaults.hxx2
-rw-r--r--sc/source/ui/inc/tpformula.hxx2
-rw-r--r--sc/source/ui/inc/tphf.hxx2
-rw-r--r--sc/source/ui/inc/tpprint.hxx2
-rw-r--r--sc/source/ui/inc/tpsort.hxx4
-rw-r--r--sc/source/ui/inc/tptable.hxx2
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx2
-rw-r--r--sc/source/ui/inc/tpview.hxx4
-rw-r--r--sc/source/ui/inc/transobj.hxx2
-rw-r--r--sc/source/ui/inc/uiitems.hxx18
-rw-r--r--sc/source/ui/inc/undobase.hxx2
-rw-r--r--sc/source/ui/inc/undoblk.hxx6
-rw-r--r--sc/source/ui/inc/undocell.hxx4
-rw-r--r--sc/source/ui/inc/undotab.hxx6
-rw-r--r--sc/source/ui/inc/validate.hxx8
-rw-r--r--sc/source/ui/inc/viewfunc.hxx26
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx206
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx34
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx4
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx34
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx22
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx8
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx12
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx8
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx18
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx28
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx8
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx4
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx6
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx4
-rw-r--r--sc/source/ui/navipi/content.cxx68
-rw-r--r--sc/source/ui/navipi/navipi.cxx22
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx12
-rw-r--r--sc/source/ui/optdlg/tpview.cxx8
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx14
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx48
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx8
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx14
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx16
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx4
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.cxx40
-rw-r--r--sc/source/ui/sidebar/CellBorderUpdater.cxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx2
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/ScPanelFactory.cxx12
-rw-r--r--sc/source/ui/undo/areasave.cxx4
-rw-r--r--sc/source/ui/undo/refundo.cxx14
-rw-r--r--sc/source/ui/undo/undobase.cxx6
-rw-r--r--sc/source/ui/undo/undoblk.cxx10
-rw-r--r--sc/source/ui/undo/undoblk2.cxx2
-rw-r--r--sc/source/ui/undo/undoblk3.cxx16
-rw-r--r--sc/source/ui/undo/undocell.cxx10
-rw-r--r--sc/source/ui/undo/undodat.cxx18
-rw-r--r--sc/source/ui/undo/undodraw.cxx2
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undorangename.cxx4
-rw-r--r--sc/source/ui/undo/undosort.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx8
-rw-r--r--sc/source/ui/undo/undotab.cxx18
-rw-r--r--sc/source/ui/unoobj/ChartRangeSelectionListener.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/appluno.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx190
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx16
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx112
-rw-r--r--sc/source/ui/unoobj/datauno.cxx38
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx10
-rw-r--r--sc/source/ui/unoobj/docuno.cxx92
-rw-r--r--sc/source/ui/unoobj/drdefuno.cxx6
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx8
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx6
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx12
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx46
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx54
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx8
-rw-r--r--sc/source/ui/unoobj/optuno.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx2
-rw-r--r--sc/source/ui/unoobj/servuno.cxx8
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx16
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx2
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx36
-rw-r--r--sc/source/ui/unoobj/targuno.cxx6
-rw-r--r--sc/source/ui/unoobj/textuno.cxx28
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx44
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx18
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx4
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx2
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx10
-rw-r--r--sc/source/ui/vba/vbafont.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.hxx2
-rw-r--r--sc/source/ui/vba/vbainterior.hxx2
-rw-r--r--sc/source/ui/vba/vbapalette.hxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx22
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx4
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx4
-rw-r--r--sc/source/ui/view/cellsh.cxx14
-rw-r--r--sc/source/ui/view/cellsh1.cxx6
-rw-r--r--sc/source/ui/view/cellsh2.cxx20
-rw-r--r--sc/source/ui/view/cellsh3.cxx16
-rw-r--r--sc/source/ui/view/cellsh4.cxx6
-rw-r--r--sc/source/ui/view/colrowba.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx10
-rw-r--r--sc/source/ui/view/dbfunc3.cxx42
-rw-r--r--sc/source/ui/view/drawutil.cxx2
-rw-r--r--sc/source/ui/view/drawvie3.cxx6
-rw-r--r--sc/source/ui/view/drawvie4.cxx10
-rw-r--r--sc/source/ui/view/drawview.cxx30
-rw-r--r--sc/source/ui/view/editsh.cxx10
-rw-r--r--sc/source/ui/view/formatsh.cxx58
-rw-r--r--sc/source/ui/view/gridwin.cxx52
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx8
-rw-r--r--sc/source/ui/view/gridwin5.cxx22
-rw-r--r--sc/source/ui/view/imapwrap.cxx2
-rw-r--r--sc/source/ui/view/notemark.cxx6
-rw-r--r--sc/source/ui/view/olinewin.cxx8
-rw-r--r--sc/source/ui/view/output.cxx52
-rw-r--r--sc/source/ui/view/output2.cxx62
-rw-r--r--sc/source/ui/view/output3.cxx2
-rw-r--r--sc/source/ui/view/pfuncache.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx24
-rw-r--r--sc/source/ui/view/prevloc.cxx14
-rw-r--r--sc/source/ui/view/prevwsh.cxx10
-rw-r--r--sc/source/ui/view/printfun.cxx66
-rw-r--r--sc/source/ui/view/reffact.cxx12
-rw-r--r--sc/source/ui/view/scextopt.cxx2
-rw-r--r--sc/source/ui/view/select.cxx4
-rw-r--r--sc/source/ui/view/spellcheckcontext.cxx2
-rw-r--r--sc/source/ui/view/spelldialog.cxx20
-rw-r--r--sc/source/ui/view/spelleng.cxx4
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx18
-rw-r--r--sc/source/ui/view/tabview2.cxx12
-rw-r--r--sc/source/ui/view/tabview3.cxx10
-rw-r--r--sc/source/ui/view/tabview5.cxx24
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx14
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx66
-rw-r--r--sc/source/ui/view/tabvwsh8.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx18
-rw-r--r--sc/source/ui/view/tabvwshb.cxx10
-rw-r--r--sc/source/ui/view/tabvwshc.cxx8
-rw-r--r--sc/source/ui/view/tabvwshe.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx18
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx36
-rw-r--r--sc/source/ui/view/viewfun2.cxx34
-rw-r--r--sc/source/ui/view/viewfun3.cxx58
-rw-r--r--sc/source/ui/view/viewfun4.cxx26
-rw-r--r--sc/source/ui/view/viewfun5.cxx10
-rw-r--r--sc/source/ui/view/viewfun7.cxx14
-rw-r--r--sc/source/ui/view/viewfunc.cxx32
-rw-r--r--sc/source/ui/view/viewutil.cxx4
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx8
678 files changed, 6159 insertions, 6159 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index bacbbd5a8be1..aa700d99b6df 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -292,22 +292,22 @@ public:
}
SC_DLLPUBLIC sal_uInt16 Parse(
- const OUString&, ScDocument* = NULL,
+ const OUString&, ScDocument* = nullptr,
const Details& rDetails = detailsOOOa1,
- ExternalInfo* pExtInfo = NULL,
- const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = NULL );
+ ExternalInfo* pExtInfo = nullptr,
+ const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr );
SC_DLLPUBLIC void Format( OStringBuffer& r, sal_uInt16 nFlags = 0,
- const ScDocument* pDocument = NULL,
+ const ScDocument* pDocument = nullptr,
const Details& rDetails = detailsOOOa1) const;
SC_DLLPUBLIC OUString Format( sal_uInt16 nFlags = 0,
- const ScDocument* pDocument = NULL,
+ const ScDocument* pDocument = nullptr,
const Details& rDetails = detailsOOOa1) const;
// The document for the maximum defined sheet number
SC_DLLPUBLIC bool Move( SCsCOL nDeltaX, SCsROW nDeltaY, SCsTAB nDeltaZ,
- ScDocument* pDocument = NULL );
+ ScDocument* pDocument = nullptr );
inline bool operator==( const ScAddress& rAddress ) const;
inline bool operator!=( const ScAddress& rAddress ) const;
@@ -491,16 +491,16 @@ public:
inline bool In( const ScAddress& ) const; ///< is Address& in Range?
inline bool In( const ScRange& ) const; ///< is Range& in Range?
- SC_DLLPUBLIC sal_uInt16 Parse( const OUString&, ScDocument* = NULL,
+ SC_DLLPUBLIC sal_uInt16 Parse( const OUString&, ScDocument* = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1,
- ScAddress::ExternalInfo* pExtInfo = NULL,
- const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = NULL );
+ ScAddress::ExternalInfo* pExtInfo = nullptr,
+ const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr );
- SC_DLLPUBLIC sal_uInt16 ParseAny( const OUString&, ScDocument* = NULL,
+ SC_DLLPUBLIC sal_uInt16 ParseAny( const OUString&, ScDocument* = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- SC_DLLPUBLIC sal_uInt16 ParseCols( const OUString&, ScDocument* = NULL,
+ SC_DLLPUBLIC sal_uInt16 ParseCols( const OUString&, ScDocument* = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- SC_DLLPUBLIC sal_uInt16 ParseRows( const OUString&, ScDocument* = NULL,
+ SC_DLLPUBLIC sal_uInt16 ParseRows( const OUString&, ScDocument* = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
/** Parse an Excel style reference up to and including the sheet name
@@ -527,16 +527,16 @@ public:
OUString& rExternDocName, OUString& rStartTabName,
OUString& rEndTabName, sal_uInt16& nFlags,
bool bOnlyAcceptSingle,
- const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = NULL );
+ const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr );
- SC_DLLPUBLIC OUString Format(sal_uInt16 nFlags= 0, const ScDocument* pDocument = NULL,
+ SC_DLLPUBLIC OUString Format(sal_uInt16 nFlags= 0, const ScDocument* pDocument = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1) const;
inline void GetVars( SCCOL& nCol1, SCROW& nRow1, SCTAB& nTab1,
SCCOL& nCol2, SCROW& nRow2, SCTAB& nTab2 ) const;
SC_DLLPUBLIC void PutInOrder();
// The document for the maximum defined sheet number
- SC_DLLPUBLIC bool Move( SCsCOL aDeltaX, SCsROW aDeltaY, SCsTAB aDeltaZ, ScDocument* pDocument = NULL );
+ SC_DLLPUBLIC bool Move( SCsCOL aDeltaX, SCsROW aDeltaY, SCsTAB aDeltaZ, ScDocument* pDocument = nullptr );
SC_DLLPUBLIC void ExtendTo( const ScRange& rRange );
SC_DLLPUBLIC bool Intersects( const ScRange& rRange ) const; // do two ranges intersect?
@@ -852,13 +852,13 @@ template< typename T > void PutInOrder( T& nStart, T& nEnd )
bool ConvertSingleRef( ScDocument* pDocument, const OUString& rRefString,
SCTAB nDefTab, ScRefAddress& rRefAddress,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1,
- ScAddress::ExternalInfo* pExtInfo = NULL );
+ ScAddress::ExternalInfo* pExtInfo = nullptr );
bool ConvertDoubleRef( ScDocument* pDocument, const OUString& rRefString,
SCTAB nDefTab, ScRefAddress& rStartRefAddress,
ScRefAddress& rEndRefAddress,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1,
- ScAddress::ExternalInfo* pExtInfo = NULL );
+ ScAddress::ExternalInfo* pExtInfo = nullptr );
/// append alpha representation of column to buffer
SC_DLLPUBLIC void ScColToAlpha( OUStringBuffer& rBuffer, SCCOL nCol);
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index 1b0a646d5ee9..6dd84817b134 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -63,7 +63,7 @@ struct ScMergePatternState
const ScPatternAttr* pOld1; ///< existing objects, temporary
const ScPatternAttr* pOld2;
- ScMergePatternState() : pItemSet(NULL), pOld1(NULL), pOld2(NULL) {}
+ ScMergePatternState() : pItemSet(nullptr), pOld1(nullptr), pOld2(nullptr) {}
};
struct ScAttrEntry
@@ -121,10 +121,10 @@ public:
void SetPattern( SCROW nRow, const ScPatternAttr* pPattern, bool bPutToPool = false );
void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern,
- bool bPutToPool = false, ScEditDataArray* pDataArray = NULL );
+ bool bPutToPool = false, ScEditDataArray* pDataArray = nullptr );
void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle );
void ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache,
- ScEditDataArray* pDataArray = NULL );
+ ScEditDataArray* pDataArray = nullptr );
bool SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize);
void ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
@@ -142,11 +142,11 @@ public:
/// May return -1 if not found
SCsROW SearchStyle(
SCsROW nRow, const ScStyleSheet* pSearchStyle, bool bUp,
- const ScMarkArray* pMarkArray = NULL) const;
+ const ScMarkArray* pMarkArray = nullptr) const;
bool SearchStyleRange(
SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
- const ScMarkArray* pMarkArray = NULL) const;
+ const ScMarkArray* pMarkArray = nullptr) const;
bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
@@ -233,7 +233,7 @@ inline const ScPatternAttr* ScAttrIterator::Next( SCROW& rTop, SCROW& rBottom )
++nPos;
}
else
- pRet = NULL;
+ pRet = nullptr;
return pRet;
}
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index a1721ea85dca..5c9070b84933 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -57,7 +57,7 @@ public:
virtual ~ScMergeAttr();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
SCsCOL GetColMerge() const {return nColMerge; }
@@ -116,10 +116,10 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString& rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -166,8 +166,8 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
private:
ScRange aRange;
@@ -215,8 +215,8 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
public:
sal_uInt16 nCount;
@@ -224,7 +224,7 @@ public:
};
inline ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP )
- : SfxPoolItem(nWhichP), nCount(0), pTabArr(NULL)
+ : SfxPoolItem(nWhichP), nCount(0), pTabArr(nullptr)
{}
// page format item: contents of header and footer
@@ -246,7 +246,7 @@ public:
virtual ~ScPageHFItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
@@ -277,14 +277,14 @@ public:
virtual ~ScViewObjectModeItem();
virtual sal_uInt16 GetValueCount() const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString& rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
};
class ScDoubleItem : public SfxPoolItem
@@ -296,7 +296,7 @@ public:
virtual ~ScDoubleItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
@@ -321,7 +321,7 @@ public:
virtual ~ScPageScaleToItem();
- virtual ScPageScaleToItem* Clone( SfxItemPool* = 0 ) const override;
+ virtual ScPageScaleToItem* Clone( SfxItemPool* = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& rCmp ) const override;
@@ -338,7 +338,7 @@ public:
SfxItemPresentation ePresentation,
SfxMapUnit, SfxMapUnit,
OUString& rText,
- const IntlWrapper* = 0 ) const override;
+ const IntlWrapper* = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rAny, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rAny, sal_uInt8 nMemberId ) override;
@@ -359,7 +359,7 @@ public:
virtual ~ScCondFormatItem();
virtual bool operator==(const SfxPoolItem& rCmp ) const override;
- virtual ScCondFormatItem* Clone( SfxItemPool* = 0 ) const override;
+ virtual ScCondFormatItem* Clone( SfxItemPool* = nullptr ) const override;
const std::vector<sal_uInt32>& GetCondFormatData() const { return maIndex;}
void AddCondFormatData( sal_uInt32 nIndex );
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index ffdc8cedbbe3..a290aca170a8 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -75,7 +75,7 @@ struct AutoFormatSwBlob : ::boost::noncopyable
sal_uInt8 *pData;
sal_Size size;
- AutoFormatSwBlob() : pData(0), size(0)
+ AutoFormatSwBlob() : pData(nullptr), size(0)
{
}
@@ -87,7 +87,7 @@ struct AutoFormatSwBlob : ::boost::noncopyable
void Reset()
{
delete[] pData;
- pData = 0;
+ pData = nullptr;
size = 0;
}
};
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index 3bc0fb8bf30f..8671f182e5e8 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -88,7 +88,7 @@ public:
css::uno::Reference< css::chart::XChartDataChangeEventListener > GetUnoListener() const;
css::uno::Reference< css::chart::XChartData > GetUnoSource() const;
- bool IsUno() const { return (pUnoData != NULL); }
+ bool IsUno() const { return (pUnoData != nullptr); }
virtual void Notify( const SfxHint& rHint ) override;
void StartListeningTo();
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx
index 33eba6a1b88d..75e2e14bcadc 100644
--- a/sc/inc/chartpos.hxx
+++ b/sc/inc/chartpos.hxx
@@ -65,7 +65,7 @@ public:
{
if ( nIndex < nCount )
return ppData[ nIndex ];
- return NULL;
+ return nullptr;
}
//! might be NULL indicating "no value"
@@ -73,19 +73,19 @@ public:
{
if ( IsValid( nChartCol, nChartRow ) )
return ppData[ GetIndex( nChartCol, nChartRow ) ];
- return NULL;
+ return nullptr;
}
const ScAddress* GetColHeaderPosition( SCCOL nChartCol ) const
{
if ( nChartCol < nColCount )
return ppColHeader[ nChartCol ];
- return NULL;
+ return nullptr;
}
const ScAddress* GetRowHeaderPosition( SCROW nChartRow ) const
{
if ( nChartRow < nRowCount )
return ppRowHeader[ nChartRow ];
- return NULL;
+ return nullptr;
}
};
@@ -141,7 +141,7 @@ public:
if ( pPositionMap )
{
delete pPositionMap;
- pPositionMap = NULL;
+ pPositionMap = nullptr;
}
}
const ScChartPositionMap* GetPositionMap();
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index da827c8556df..2cdc14b2d1c2 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -116,7 +116,7 @@ public:
: pNext( *ppPrevP ),
ppPrev( ppPrevP ),
pAction( pActionP ),
- pLink( NULL )
+ pLink( nullptr )
{
if ( pNext )
pNext->ppPrev = &pNext;
@@ -146,8 +146,8 @@ public:
{
if ( pLink )
{
- pLink->pLink = NULL;
- pLink = NULL;
+ pLink->pLink = nullptr;
+ pLink = nullptr;
}
}
@@ -155,9 +155,9 @@ public:
{
if ( ppPrev )
{
- if ( ( *ppPrev = pNext ) != NULL )
+ if ( ( *ppPrev = pNext ) != nullptr )
pNext->ppPrev = ppPrev;
- ppPrev = NULL; // not inserted
+ ppPrev = nullptr; // not inserted
}
}
@@ -413,7 +413,7 @@ class ScChangeActionIns : public ScChangeAction
virtual bool Reject(ScDocument* pDoc) override;
- virtual const ScChangeTrack* GetChangeTrack() const override { return 0; }
+ virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
public:
ScChangeActionIns(
@@ -552,7 +552,7 @@ class ScChangeActionMove : public ScChangeAction
: ScChangeAction( SC_CAT_MOVE, rToRange ),
aFromRange( rFromRange ),
pTrack( pTrackP ),
- pFirstCell( NULL ),
+ pFirstCell( nullptr ),
nStartLastCut(0),
nEndLastCut(0)
{}
@@ -652,7 +652,7 @@ class ScChangeActionContent : public ScChangeAction
if ( !ppPrevInSlot )
{
ppPrevInSlot = pp;
- if ( ( pNextInSlot = *pp ) != NULL )
+ if ( ( pNextInSlot = *pp ) != nullptr )
pNextInSlot->ppPrevInSlot = &pNextInSlot;
*pp = this;
}
@@ -662,9 +662,9 @@ class ScChangeActionContent : public ScChangeAction
{
if ( ppPrevInSlot )
{
- if ( ( *ppPrevInSlot = pNextInSlot ) != NULL )
+ if ( ( *ppPrevInSlot = pNextInSlot ) != nullptr )
pNextInSlot->ppPrevInSlot = ppPrevInSlot;
- ppPrevInSlot = NULL; // not inserted
+ ppPrevInSlot = nullptr; // not inserted
}
}
@@ -706,7 +706,7 @@ class ScChangeActionContent : public ScChangeAction
virtual bool Reject(ScDocument* pDoc) override;
- virtual const ScChangeTrack* GetChangeTrack() const override { return 0; }
+ virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
// pRejectActions!=NULL: reject actions get
// stacked, no SetNewValue, no Append
@@ -742,7 +742,7 @@ public:
ScChangeActionContent* GetNextContent() const { return pNextContent; }
ScChangeActionContent* GetPrevContent() const { return pPrevContent; }
ScChangeActionContent* GetTopContent() const;
- bool IsTopContent() const { return pNextContent == NULL; }
+ bool IsTopContent() const { return pNextContent == nullptr; }
virtual ScChangeActionLinkEntry* GetDeletedIn() const override;
virtual ScChangeActionLinkEntry** GetDeletedInAddress() override;
@@ -816,7 +816,7 @@ class ScChangeActionReject : public ScChangeAction
virtual bool Reject(ScDocument* pDoc) override;
- virtual const ScChangeTrack* GetChangeTrack() const override { return 0; }
+ virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
public:
ScChangeActionReject(const sal_uLong nActionNumber,
@@ -1072,7 +1072,7 @@ public:
// old value from pOldCell, nOldFormat,
// RefDoc==NULL => Doc
void AppendContent( const ScAddress& rPos, const ScCellValue& rOldCell,
- sal_uLong nOldFormat, ScDocument* pRefDoc = NULL );
+ sal_uLong nOldFormat, ScDocument* pRefDoc = nullptr );
// after new value was set in the document,
// old value from pOldCell, format from Doc
SC_DLLPUBLIC void AppendContent( const ScAddress& rPos, const ScCellValue& rOldCell );
@@ -1111,7 +1111,7 @@ public:
if ( pLastCutMove )
{
delete pLastCutMove;
- pLastCutMove = NULL;
+ pLastCutMove = nullptr;
}
}
bool HasLastCut() const
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index 14bfdf3922de..61bf99131c6c 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -56,7 +56,7 @@ private:
public:
ScChangeViewSettings()
- : pCommentSearcher(NULL)
+ : pCommentSearcher(nullptr)
, aFirstDateTime(DateTime::EMPTY)
, aLastDateTime(DateTime::EMPTY)
, eDateMode(SvxRedlinDateMode::BEFORE)
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index a8d9f1f5f225..a593e4ddaf78 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -260,7 +260,7 @@ public:
ScColorScaleFormat(ScDocument* pDoc);
ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleFormat& rFormat);
virtual ~ScColorScaleFormat();
- virtual ScColorFormat* Clone(ScDocument* pDoc = NULL) const override;
+ virtual ScColorFormat* Clone(ScDocument* pDoc = nullptr) const override;
Color* GetColor(const ScAddress& rAddr) const;
void AddEntry(ScColorScaleEntry* pEntry);
@@ -295,7 +295,7 @@ class SC_DLLPUBLIC ScDataBarFormat : public ScColorFormat
public:
ScDataBarFormat(ScDocument* pDoc);
ScDataBarFormat(ScDocument* pDoc, const ScDataBarFormat& rFormat);
- virtual ScColorFormat* Clone(ScDocument* pDoc = NULL) const override;
+ virtual ScColorFormat* Clone(ScDocument* pDoc = nullptr) const override;
ScDataBarInfo* GetDataBarInfo(const ScAddress& rAddr) const;
@@ -357,7 +357,7 @@ public:
ScIconSetFormat(ScDocument* pDoc);
ScIconSetFormat(ScDocument* pDoc, const ScIconSetFormat& rFormat);
- virtual ScColorFormat* Clone(ScDocument* pDoc = NULL) const override;
+ virtual ScColorFormat* Clone(ScDocument* pDoc = nullptr) const override;
ScIconSetInfo* GetIconSetInfo(const ScAddress& rAddr) const;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 7817df6fb38f..69cb0366fccb 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -250,11 +250,11 @@ public:
* @param pGroupPos when non-NULL, stores the top position of formula
* group that's been merged as a result of row deletion.
*/
- void DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>* pGroupPos = NULL );
+ void DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>* pGroupPos = nullptr );
void DeleteArea(
SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
- bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = NULL );
+ bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag, bool bBroadcast );
@@ -293,11 +293,11 @@ public:
void CopyToColumn(
sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
- ScColumn& rColumn, const ScMarkData* pMarkData = NULL, bool bAsLink = false) const;
+ ScColumn& rColumn, const ScMarkData* pMarkData = nullptr, bool bAsLink = false) const;
void UndoToColumn(
sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
- ScColumn& rColumn, const ScMarkData* pMarkData = NULL) const;
+ ScColumn& rColumn, const ScMarkData* pMarkData = nullptr) const;
void CopyScenarioFrom( const ScColumn& rSrcCol );
void CopyScenarioTo( ScColumn& rDestCol ) const;
@@ -313,7 +313,7 @@ public:
bool SetString(
SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
- ScSetStringParam* pParam = NULL );
+ ScSetStringParam* pParam = nullptr );
void SetEditText( SCROW nRow, EditTextObject* pEditText );
void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, EditTextObject* pEditText );
@@ -397,7 +397,7 @@ public:
void ResetChanged( SCROW nStartRow, SCROW nEndRow );
- bool UpdateReferenceOnCopy( const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL );
+ bool UpdateReferenceOnCopy( const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr );
/**
* Update reference addresses in formula cell in response to mass cell
@@ -406,7 +406,7 @@ public:
* @return true if reference of at least one formula cell has been
* updated, false otherwise.
*/
- bool UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL );
+ bool UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr );
void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
void UpdateInsertTabOnlyCells( sc::RefUpdateInsertTabContext& rCxt );
@@ -447,7 +447,7 @@ public:
void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
void ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr,
- ScEditDataArray* pDataArray = NULL );
+ ScEditDataArray* pDataArray = nullptr );
void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false );
void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr& rPatAttr, bool bPutToPool = false );
@@ -484,7 +484,7 @@ public:
void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
- SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
+ SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = nullptr );
void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast );
void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
@@ -518,11 +518,11 @@ public:
void StartListeningFormulaCells(
sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2,
- SCROW* pStartRow = NULL, SCROW* pEndRow = NULL );
+ SCROW* pStartRow = nullptr, SCROW* pEndRow = nullptr );
void EndListeningFormulaCells(
sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2,
- SCROW* pStartRow = NULL, SCROW* pEndRow = NULL );
+ SCROW* pStartRow = nullptr, SCROW* pEndRow = nullptr );
void StartListening( SvtListener& rLst, SCROW nRow );
void EndListening( SvtListener& rLst, SCROW nRow );
@@ -627,7 +627,7 @@ public:
/**
* Regroup formula cells for the entire column.
*/
- void RegroupFormulaCells( std::vector<ScAddress>* pGroupPos = NULL );
+ void RegroupFormulaCells( std::vector<ScAddress>* pGroupPos = nullptr );
/**
* Reset column position of formula cells within specified row range.
@@ -707,10 +707,10 @@ private:
std::vector<sc::FormulaGroupEntry> GetFormulaGroupEntries();
void EndListeningIntersectedGroup(
- sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos = NULL );
+ sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningIntersectedGroups(
- sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos = NULL );
+ sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningGroup( sc::EndListeningContext& rCxt, SCROW nRow );
void SetNeedsListeningGroup( SCROW nRow );
diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index 19e2a4155e97..adfdfbc67597 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -67,8 +67,8 @@ private:
Case sensitivity document option is always to be passed in
rComp.mbIgnoreCase.
*/
-double CompareFunc( const Compare& rComp, CompareOptions* pOptions = NULL );
-double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions = NULL );
+double CompareFunc( const Compare& rComp, CompareOptions* pOptions = nullptr );
+double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions = nullptr );
double CompareFunc( double fCell1, double fCell2 );
/**
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 026efb171981..d33ecc6fd8aa 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -104,9 +104,9 @@ enum ScFormatEntryType
struct ScCondFormatData
{
ScCondFormatData():
- pColorScale(NULL),
- pDataBar(NULL),
- pIconSet(NULL) {}
+ pColorScale(nullptr),
+ pDataBar(nullptr),
+ pIconSet(nullptr) {}
Color* pColorScale;
ScDataBarInfo* pDataBar;
@@ -126,7 +126,7 @@ public:
virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) = 0;
virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) = 0;
- virtual ScFormatEntry* Clone( ScDocument* pDoc = NULL ) const = 0;
+ virtual ScFormatEntry* Clone( ScDocument* pDoc = nullptr ) const = 0;
virtual void SetParent( ScConditionalFormat* pNew ) = 0;
@@ -240,7 +240,7 @@ public:
virtual condformat::ScFormatEntryType GetType() const override { return condformat::CONDITION; }
- virtual ScFormatEntry* Clone(ScDocument* pDoc = NULL) const override;
+ virtual ScFormatEntry* Clone(ScDocument* pDoc = nullptr) const override;
static ScConditionMode GetModeFromApi(sal_Int32 nOperator);
@@ -358,7 +358,7 @@ public:
virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& ) override {}
virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& ) override {}
- virtual ScFormatEntry* Clone( ScDocument* pDoc = NULL ) const override;
+ virtual ScFormatEntry* Clone( ScDocument* pDoc = nullptr ) const override;
virtual void SetParent( ScConditionalFormat* ) override {}
@@ -390,7 +390,7 @@ public:
~ScConditionalFormat();
// true copy of formulas (for Ref-Undo / between documents)
- ScConditionalFormat* Clone(ScDocument* pNewDoc = NULL) const;
+ ScConditionalFormat* Clone(ScDocument* pNewDoc = nullptr) const;
void AddEntry( ScFormatEntry* pNew );
void RemoveEntry(size_t nIndex);
diff --git a/sc/inc/consoli.hxx b/sc/inc/consoli.hxx
index 3b1b65d89862..9d994710b7b2 100644
--- a/sc/inc/consoli.hxx
+++ b/sc/inc/consoli.hxx
@@ -42,7 +42,7 @@ private:
ScReferenceEntry* pData;
public:
- void Init() { nCount=0; nFullSize=0; pData=NULL; }
+ void Init() { nCount=0; nFullSize=0; pData=nullptr; }
void Clear() { delete[] pData; }
SCSIZE GetCount() { return nCount; }
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index bc0ec6105977..8d7b324fee8f 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -393,7 +393,7 @@ protected:
void SetDPObject( ScDPObject* pDPObject );
/** Returns the DataPilot dimension object related to the field described by maFieldId. */
- ScDPSaveDimension* GetDPDimension( ScDPObject** ppDPObject = 0 ) const;
+ ScDPSaveDimension* GetDPDimension( ScDPObject** ppDPObject = nullptr ) const;
/** Returns the number of members for the field described by maFieldId. */
sal_Int32 GetMemberCount() const;
diff --git a/sc/inc/dbdocutl.hxx b/sc/inc/dbdocutl.hxx
index fc0dfd303dc0..deddb108b4a4 100644
--- a/sc/inc/dbdocutl.hxx
+++ b/sc/inc/dbdocutl.hxx
@@ -45,7 +45,7 @@ public:
static void PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
const css::uno::Reference< css::sdbc::XRow>& xRow,
long nRowPos,
- long nType, bool bCurrency, StrData* pStrData = NULL );
+ long nType, bool bCurrency, StrData* pStrData = nullptr );
};
#endif
diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx
index db992ac8542e..7157db86c80b 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -52,7 +52,7 @@ public:
virtual ~ScTpDefaultsItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScDefaultsOptions& GetDefaultsOptions() const { return theOptions; }
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 858c204be7bb..adc76796b4b5 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -595,7 +595,7 @@ public:
*/
explicit ScDocRowHeightUpdater(
ScDocument& rDoc, OutputDevice* pOutDev, double fPPTX, double fPPTY,
- const ::std::vector<TabRanges>* pTabRangesArray = NULL);
+ const ::std::vector<TabRanges>* pTabRangesArray = nullptr);
void update();
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 8ab144d83e40..995fc26736fe 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -157,7 +157,7 @@ public:
virtual ~ScTpCalcItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScDocOptions& GetDocOptions() const { return theOptions; }
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index bd1cba625838..bbe2e84a70ba 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -45,7 +45,7 @@ class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool
static sal_uInt16* pVersionMap12;
public:
- ScDocumentPool( SfxItemPool* pSecPool = NULL );
+ ScDocumentPool( SfxItemPool* pSecPool = nullptr );
protected:
virtual ~ScDocumentPool();
public:
@@ -63,7 +63,7 @@ public:
const SfxPoolItem& rItem,
SfxMapUnit ePresentationMetric,
OUString& rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
static void InitVersionMaps();
static void DeleteVersionMaps();
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 83f12bc53912..fc13ec9cf5f1 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -484,7 +484,7 @@ public:
// number formatter
public:
SC_DLLPUBLIC ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
- SfxObjectShell* pDocShell = NULL );
+ SfxObjectShell* pDocShell = nullptr );
SC_DLLPUBLIC ~ScDocument();
void SetName( const OUString& r ) { aDocName = r; }
@@ -494,7 +494,7 @@ public:
void GetDocStat( ScDocStat& rDocStat );
- SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
+ SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
rtl::Reference<XColorList> GetColorList();
SC_DLLPUBLIC sfx2::LinkManager* GetLinkManager();
@@ -571,7 +571,7 @@ public:
ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
void RefreshDirtyTableColumnNames();
- SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString* pName=NULL ) const;
+ SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString* pName=nullptr ) const;
SC_DLLPUBLIC bool HasPivotTable() const;
SC_DLLPUBLIC ScDPCollection* GetDPCollection();
@@ -646,9 +646,9 @@ public:
bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
- bool* pOnlyNotBecauseOfMatrix = NULL ) const;
+ bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
bool IsSelectionEditable( const ScMarkData& rMark,
- bool* pOnlyNotBecauseOfMatrix = NULL ) const;
+ bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const;
@@ -682,9 +682,9 @@ public:
SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
bool bUpdateRef = true,
bool bExternalDocument = false );
- bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = NULL );
+ bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
- const ScMarkData* pOnlyMarked = NULL );
+ const ScMarkData* pOnlyMarked = nullptr );
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
bool bInsertNew = true,
bool bResultsOnly = false );
@@ -793,7 +793,7 @@ public:
void BeginDrawUndo();
void BeginUnoRefUndo();
- bool HasUnoRefUndo() const { return ( pUnoRefUndoList != NULL ); }
+ bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
ScUnoRefList* EndUnoRefUndo(); // must be deleted by caller!
sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
@@ -840,8 +840,8 @@ public:
// return TRUE = number format is set
SC_DLLPUBLIC bool SetString(
SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
- ScSetStringParam* pParam = NULL );
- SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString, ScSetStringParam* pParam = NULL );
+ ScSetStringParam* pParam = nullptr );
+ SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString, ScSetStringParam* pParam = nullptr );
/**
* This method manages the lifecycle of the passed edit text object. When
@@ -904,7 +904,7 @@ public:
SCCOL nCol2, SCROW nRow2,
const ScMarkData& rMark,
const OUString& rFormula,
- const ScTokenArray* p = NULL,
+ const ScTokenArray* p = nullptr,
const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT,
bool bDirtyFlag=true );
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
@@ -1022,8 +1022,8 @@ public:
bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
bool bLeftIsEmpty = false,
- ScRange* pLastRange = NULL,
- Rectangle* pLastMM = NULL ) const;
+ ScRange* pLastRange = nullptr,
+ Rectangle* pLastMM = nullptr ) const;
void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
@@ -1198,28 +1198,28 @@ public:
bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
- SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL,
- const ScMarkData* pTabMark = NULL );
- SC_DLLPUBLIC bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
+ SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
+ const ScMarkData* pTabMark = nullptr );
+ SC_DLLPUBLIC bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = nullptr );
void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize,
- ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL,
- const ScMarkData* pTabMark = NULL );
+ ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
+ const ScMarkData* pTabMark = nullptr );
SC_DLLPUBLIC void DeleteRow( const ScRange& rRange,
- ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL );
+ ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr );
bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
- SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL,
- const ScMarkData* pTabMark = NULL );
- SC_DLLPUBLIC bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
+ SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
+ const ScMarkData* pTabMark = nullptr );
+ SC_DLLPUBLIC bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = nullptr );
void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize,
- ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL,
- const ScMarkData* pTabMark = NULL );
+ ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
+ const ScMarkData* pTabMark = nullptr );
void DeleteCol( const ScRange& rRange,
- ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL );
+ ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr );
bool CanInsertRow( const ScRange& rRange ) const;
bool CanInsertCol( const ScRange& rRange ) const;
@@ -1252,7 +1252,7 @@ public:
SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
void SetDocVisible( bool bSet );
- bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL );
+ bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMarkData& rMark );
@@ -1261,14 +1261,14 @@ public:
void DeleteArea(
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
InsertDeleteFlags nDelFlag, bool bBroadcast = true,
- sc::ColumnSpanSet* pBroadcastSpans = NULL );
+ sc::ColumnSpanSet* pBroadcastSpans = nullptr );
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCTAB nTab, InsertDeleteFlags nDelFlag);
void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc,
- const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false,
+ const ScMarkData* pMarks = nullptr, bool bAllTabs = false, bool bKeepScenarioFlags = false,
bool bIncludeObjects = false, bool bCloneNoteCaptions = true, bool bUseRangeForVBA = false );
/**
@@ -1292,7 +1292,7 @@ public:
void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- SCTAB nTab, ScDocument* pClipDoc = NULL);
+ SCTAB nTab, ScDocument* pClipDoc = nullptr);
bool InitColumnBlockPosition( sc::ColumnBlockPosition& rBlokPos, SCTAB nTab, SCCOL nCol );
@@ -1320,13 +1320,13 @@ public:
case is the overall encompassing range. */
void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
InsertDeleteFlags nInsFlag,
- ScDocument* pRefUndoDoc = NULL,
- ScDocument* pClipDoc = NULL,
+ ScDocument* pRefUndoDoc = nullptr,
+ ScDocument* pClipDoc = nullptr,
bool bResetCut = true,
bool bAsLink = false,
bool bIncludeFiltered = true,
bool bSkipAttrForEmpty = false,
- const ScRangeList * pDestRanges = NULL );
+ const ScRangeList * pDestRanges = nullptr );
void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
@@ -1369,18 +1369,18 @@ public:
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = NULL, bool bColRowFlags = true);
+ const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = NULL);
+ const ScMarkData* pMarks = nullptr);
void CopyToDocument(const ScRange& rRange,
InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = NULL, bool bColRowFlags = true);
+ const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
void UndoToDocument(const ScRange& rRange,
InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = NULL);
+ const ScMarkData* pMarks = nullptr);
void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
@@ -1393,11 +1393,11 @@ public:
SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
void UpdateReference(
- sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL, bool bIncludeDraw = true,
+ sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr, bool bIncludeDraw = true,
bool bUpdateNoteCaptionPos = true );
SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
- const ScMarkData& rMark, ScDocument* pUndoDoc = NULL );
+ const ScMarkData& rMark, ScDocument* pUndoDoc = nullptr );
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
@@ -1480,7 +1480,7 @@ public:
SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark, const ScPatternAttr& rAttr,
- ScEditDataArray* pDataArray = NULL );
+ ScEditDataArray* pDataArray = nullptr );
SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
const ScPatternAttr& rAttr );
@@ -1531,7 +1531,7 @@ public:
bool SearchAndReplace( const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
const ScMarkData& rMark, ScRangeList& rMatchedRanges,
- OUString& rUndoStr, ScDocument* pUndoDoc = NULL );
+ OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
// determine Col/Row of subsequent calls
// (e.g. not found from the beginning, or subsequent tables)
@@ -1544,7 +1544,7 @@ public:
const OUString& sValStr, double& nX);
SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
- ScEditDataArray* pDataArray = NULL );
+ ScEditDataArray* pDataArray = nullptr );
void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
@@ -1579,13 +1579,13 @@ public:
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
bool bFormula,
- const ScMarkData* pMarkData = NULL,
- const ScColWidthParam* pParam = NULL );
+ const ScMarkData* pMarkData = nullptr,
+ const ScColWidthParam* pParam = nullptr );
SC_DLLPUBLIC bool SetOptimalHeight(
sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
- void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark = NULL );
+ void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark = nullptr );
long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
@@ -1613,18 +1613,18 @@ public:
css::uno::Sequence<
css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
- SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+ SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
- SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
+ SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
- bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+ bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
- bool ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
+ bool ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
@@ -1678,11 +1678,11 @@ public:
void SetPageSize( SCTAB nTab, const Size& rSize );
void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
void InvalidatePageBreaks(SCTAB nTab);
- void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = NULL );
+ void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
void RemoveManualBreaks( SCTAB nTab );
bool HasManualBreaks( SCTAB nTab ) const;
- bool IsPageStyleInUse( const OUString& rStrPageStyle, SCTAB* pInTab = NULL );
+ bool IsPageStyleInUse( const OUString& rStrPageStyle, SCTAB* pInTab = nullptr );
bool RemovePageStyleInUse( const OUString& rStrPageStyle );
bool RenamePageStyleInUse( const OUString& rOld, const OUString& rNew );
void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
@@ -1729,7 +1729,7 @@ public:
void FillInfo(
ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode,
- const ScMarkData* pMarkData = NULL );
+ const ScMarkData* pMarkData = nullptr );
SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
SC_DLLPUBLIC SvNumberFormatter* CreateFormatTable() const;
@@ -2224,10 +2224,10 @@ private:
void SharePooledResources( ScDocument* pSrcDoc );
void EndListeningIntersectedGroup(
- sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos = NULL );
+ sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningIntersectedGroups(
- sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos = NULL );
+ sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index e7fc0b63a829..5567260c47b4 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -82,7 +82,7 @@ public:
void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
void setAutoInput(const ScAddress& rPos, const OUString& rStr,
- ScSetStringParam* pStringParam = NULL);
+ ScSetStringParam* pStringParam = nullptr);
void setNumericCell(const ScAddress& rPos, double fVal);
void setStringCell(const ScAddress& rPos, const OUString& rStr);
void setEditCell(const ScAddress& rPos, EditTextObject* pEditText);
diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx
index 6ed9a5167e15..546625d69918 100644
--- a/sc/inc/dpfilteredcache.hxx
+++ b/sc/inc/dpfilteredcache.hxx
@@ -115,7 +115,7 @@ public:
/** Check whether a specified row is active or not. When a row is active,
it is used in calculation of the results data. A row becomes inactive
when it is filtered out by page field. */
- bool isRowActive(sal_Int32 nRow, sal_Int32* pLastRow = NULL) const;
+ bool isRowActive(sal_Int32 nRow, sal_Int32* pLastRow = nullptr) const;
/** Set filter on/off flag to each row to control visibility. The caller
must ensure that the table is filled before calling this function. */
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index db2a6897e795..9cb613574b07 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -155,8 +155,8 @@ public:
css::uno::Reference<css::sheet::XDimensionsSupplier> GetSource();
bool IsSheetData() const;
- bool IsImportData() const { return(pImpDesc != NULL); }
- bool IsServiceData() const { return(pServDesc != NULL); }
+ bool IsImportData() const { return(pImpDesc != nullptr); }
+ bool IsServiceData() const { return(pServDesc != nullptr); }
void SetName(const OUString& rNew);
const OUString& GetName() const { return aTableName; }
@@ -171,7 +171,7 @@ public:
bool IsDataDescriptionCell(const ScAddress& rPos);
bool IsDimNameInUse(const OUString& rName) const;
- OUString GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFlags = NULL );
+ OUString GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFlags = nullptr );
bool IsDuplicated( long nDim );
long GetDimCount();
void GetHeaderPositionData(const ScAddress& rPos, css::sheet::DataPilotTableHeaderData& rData);
@@ -246,9 +246,9 @@ public:
const ScPivotFieldVector& rFields, sal_uInt16 nOrient,
const css::uno::Reference< css::sheet::XDimensionsSupplier>& xSource,
const ScDPLabelDataVector& rLabels,
- const ScPivotFieldVector* pRefColFields = NULL,
- const ScPivotFieldVector* pRefRowFields = NULL,
- const ScPivotFieldVector* pRefPageFields = NULL );
+ const ScPivotFieldVector* pRefColFields = nullptr,
+ const ScPivotFieldVector* pRefRowFields = nullptr,
+ const ScPivotFieldVector* pRefPageFields = nullptr );
static bool IsOrientationAllowed( sal_uInt16 nOrient, sal_Int32 nDimFlags );
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 4d7467aa2a16..fb52ffa63326 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -353,7 +353,7 @@ public:
const ScDPDimensionSaveData* GetExistingDimensionData() const
{ return pDimensionData; }
- void RemoveAllGroupDimensions( const OUString& rSrcDimName, std::vector<OUString>* pDeletedNames = NULL );
+ void RemoveAllGroupDimensions( const OUString& rSrcDimName, std::vector<OUString>* pDeletedNames = nullptr );
SC_DLLPUBLIC ScDPDimensionSaveData* GetDimensionData(); // create if not there
void SetDimensionData( const ScDPDimensionSaveData* pNew ); // copied
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index e12b88f33689..d2e0b99fcbc6 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -162,7 +162,7 @@ private:
ScDPAggData* pChild;
public:
- ScDPAggData() : fVal(0.0), fAux(0.0), nCount(SC_DPAGG_EMPTY), pChild(NULL) {}
+ ScDPAggData() : fVal(0.0), fAux(0.0), nCount(SC_DPAGG_EMPTY), pChild(nullptr) {}
~ScDPAggData() { delete pChild; }
void Update( const ScDPValue& rNext, ScSubTotalFunc eFunc, const ScDPSubTotalState& rSubState );
@@ -377,7 +377,7 @@ public:
bool HasHiddenDetails() const { return bHasHiddenDetails; }
bool IsSubTotalInTitle(long nMeasure) const;
- long GetSubTotalCount( long* pUserSubStart = NULL ) const;
+ long GetSubTotalCount( long* pUserSubStart = nullptr ) const;
bool IsNamedItem( SCROW nIndex ) const;
bool IsValidEntry( const ::std::vector< SCROW >& aMembers ) const;
@@ -424,7 +424,7 @@ public:
const ScDPLevel* GetParentLevel() const { return aParentDimData.mpParentLevel; } //! Ref
const ScDPMember* GetDPMember()const { return aParentDimData.mpMemberDesc; } //! Ref
SCROW GetOrder() const { return aParentDimData.mnOrder; } //! Ref
- bool IsRoot() const { return GetParentLevel() == NULL; }
+ bool IsRoot() const { return GetParentLevel() == nullptr; }
SCROW GetDataId( ) const ;
ScDPAggData* GetColTotal( long nMeasure ) const;
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 10d7414a34af..2bd6d55d72ed 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -170,7 +170,7 @@ public:
SdrObject* GetNamedObject( const OUString& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const;
// if pnCounter != NULL, the search for a name starts with this index + 1,
// and the index really used is returned.
- OUString GetNewGraphicName( long* pnCounter = NULL ) const;
+ OUString GetNewGraphicName( long* pnCounter = nullptr ) const;
void EnsureGraphicNames();
static bool IsCellAnchored( const SdrObject& rObj );
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 3d58582fea91..cdce6204d6c1 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -181,7 +181,7 @@ public:
ScTabEditEngine( ScDocument* pDoc ); // Default
ScTabEditEngine( const ScPatternAttr& rPattern,
SfxItemPool* pEnginePool,
- SfxItemPool* pTextObjectPool = NULL );
+ SfxItemPool* pTextObjectPool = nullptr );
};
struct ScHeaderFieldData
@@ -208,7 +208,7 @@ private:
public:
ScFieldEditEngine(
- ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = NULL,
+ ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = nullptr,
bool bDeleteEnginePool = false);
void SetExecuteURL(bool bSet) { bExecuteURL = bSet; }
@@ -237,7 +237,7 @@ class ScNoteEditEngine : public ScEditEngineDefaulter
public:
ScNoteEditEngine( SfxItemPool* pEnginePool,
- SfxItemPool* pTextObjectPool = NULL,
+ SfxItemPool* pTextObjectPool = nullptr,
bool bDeleteEnginePool = false );
};
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index d341b797f854..ae4decdda6c2 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -154,7 +154,7 @@ public:
* values, for performance reasons.
*/
SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong nFmtIndex = 0, bool bSetCacheRange = true);
- SC_DLLPUBLIC TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = NULL) const;
+ SC_DLLPUBLIC TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = nullptr) const;
bool hasRow( SCROW nRow ) const;
/** Set/clear referenced status flag only if current status is not
REFERENCED_PERMANENT. */
@@ -473,7 +473,7 @@ public:
*
* @return shared_ptr to the cache table instance
*/
- ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, const OUString& rTabName, bool bCreateNew, size_t* pnIndex = 0);
+ ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, const OUString& rTabName, bool bCreateNew, size_t* pnIndex = nullptr);
/** Returns a vector containing all (real) table names and cache tables of
the specified file.
@@ -537,7 +537,7 @@ public:
ScExternalRefCache::TokenRef getSingleRefToken(
sal_uInt16 nFileId, const OUString& rTabName, const ScAddress& rCell,
- const ScAddress* pCurPos, SCTAB* pTab, ScExternalRefCache::CellFormat* pFmt = NULL);
+ const ScAddress* pCurPos, SCTAB* pTab, ScExternalRefCache::CellFormat* pFmt = nullptr);
/**
* Get an array of tokens that consist of the specified external cell
@@ -567,7 +567,7 @@ public:
* @return shared_ptr to array of tokens composing the name
*/
ScExternalRefCache::TokenArrayRef getRangeNameTokens(
- sal_uInt16 nFileId, const OUString& rName, const ScAddress* pCurPos = NULL);
+ sal_uInt16 nFileId, const OUString& rName, const ScAddress* pCurPos = nullptr);
bool isValidRangeName(sal_uInt16 nFileId, const OUString& rName);
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 987daf39e425..9de700bf76e0 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -76,7 +76,7 @@ class ScEEAbsImport {
virtual ScRange GetRange() = 0;
virtual void WriteToDocument(
bool bSizeColsRows = false, double nOutputFactor = 1.0,
- SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0;
+ SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) = 0;
};
class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
@@ -94,7 +94,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
const rtl_TextEncoding eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
virtual FltError ScImportRTF( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange ) = 0;
virtual FltError ScImportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0,
- bool bCalcWidthHeight = true, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0;
+ bool bCalcWidthHeight = true, SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) = 0;
// various import helpers
virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0;
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 3171af631898..5f1c43a0fd95 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -244,7 +244,7 @@ public:
bool HasRelNameReference() const;
bool UpdateReference(
- const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL, const ScAddress* pUndoCellPos = NULL );
+ const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr, const ScAddress* pUndoCellPos = nullptr );
/**
* Shift the position of formula cell as part of reference update.
@@ -394,7 +394,7 @@ public:
void StartListeningTo( ScDocument* pDoc );
void StartListeningTo( sc::StartListeningContext& rCxt );
void EndListeningTo(
- ScDocument* pDoc, ScTokenArray* pArr = NULL, ScAddress aPos = ScAddress() );
+ ScDocument* pDoc, ScTokenArray* pArr = nullptr, ScAddress aPos = ScAddress() );
void EndListeningTo( sc::EndListeningContext& rCxt );
bool IsShared() const;
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index f06968780644..6cd50464a313 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -92,7 +92,7 @@ public:
virtual ~ScTpFormulaItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScFormulaOptions& GetFormulaOptions() const { return theOptions; }
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3a47f55e3228..7f74550281bd 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -530,7 +530,7 @@ public:
SC_DLLPUBLIC static const OUString& GetRscString( sal_uInt16 nIndex );
/// Open the specified URL.
/// If pDrawLayer is specified, check if tiled-rendering, and leave clients to handle the openURL action if that's the case.
- static void OpenURL(const OUString& rURL, const OUString& rTarget, const SdrModel* pDrawLayer = NULL);
+ static void OpenURL(const OUString& rURL, const OUString& rTarget, const SdrModel* pDrawLayer = nullptr);
SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName,
SfxObjectShell* pShell );
SC_DLLPUBLIC static OUString GetDocTabName( const OUString& rFileName,
diff --git a/sc/inc/listenercontext.hxx b/sc/inc/listenercontext.hxx
index 0aa7eb204473..0ecbd8b2b50b 100644
--- a/sc/inc/listenercontext.hxx
+++ b/sc/inc/listenercontext.hxx
@@ -45,8 +45,8 @@ class EndListeningContext : boost::noncopyable
ScAddress maPosDelta; // Add this to get the old position prior to the move.
public:
- EndListeningContext(ScDocument& rDoc, ScTokenArray* pOldCode = NULL);
- EndListeningContext(ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet, ScTokenArray* pOldCode = NULL);
+ EndListeningContext(ScDocument& rDoc, ScTokenArray* pOldCode = nullptr);
+ EndListeningContext(ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet, ScTokenArray* pOldCode = nullptr);
void setPositionDelta( const ScAddress& rDelta );
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 49a164627a72..0bc516223968 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -71,10 +71,10 @@ MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(CellTextAttr, element_type_celltextattr, CellT
}
/// These need to be in global namespace just like their respective types are.
-MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScPostIt, sc::element_type_cellnote, NULL, sc::cellnote_block)
-MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(SvtBroadcaster, sc::element_type_broadcaster, NULL, sc::broadcaster_block)
-MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScFormulaCell, sc::element_type_formula, NULL, sc::formula_block)
-MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(EditTextObject, sc::element_type_edittext, NULL, sc::edittext_block)
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScPostIt, sc::element_type_cellnote, nullptr, sc::cellnote_block)
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(SvtBroadcaster, sc::element_type_broadcaster, nullptr, sc::broadcaster_block)
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScFormulaCell, sc::element_type_formula, nullptr, sc::formula_block)
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(EditTextObject, sc::element_type_edittext, nullptr, sc::edittext_block)
namespace svl {
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index ee30a0da0612..4080e76fab2b 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -54,13 +54,13 @@ class SC_DLLPUBLIC ScPatternAttr: public SfxSetItem
ScStyleSheet* pStyle;
public:
ScPatternAttr(SfxItemSet* pItemSet, const OUString& rStyleName);
- ScPatternAttr(SfxItemSet* pItemSet, ScStyleSheet* pStyleSheet = NULL);
+ ScPatternAttr(SfxItemSet* pItemSet, ScStyleSheet* pStyleSheet = nullptr);
ScPatternAttr(SfxItemPool* pItemPool);
ScPatternAttr(const ScPatternAttr& rPatternAttr);
virtual ~ScPatternAttr();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const override;
virtual SvStream& Store(SvStream& rStream, sal_uInt16 nItemVersion) const override;
@@ -78,31 +78,31 @@ public:
void DeleteUnchanged( const ScPatternAttr* pOldAttrs );
- static SvxCellOrientation GetCellOrientation( const SfxItemSet& rItemSet, const SfxItemSet* pCondSet = 0 );
- SvxCellOrientation GetCellOrientation( const SfxItemSet* pCondSet = 0 ) const;
+ static SvxCellOrientation GetCellOrientation( const SfxItemSet& rItemSet, const SfxItemSet* pCondSet = nullptr );
+ SvxCellOrientation GetCellOrientation( const SfxItemSet* pCondSet = nullptr ) const;
/** Static helper function to fill a font object from the passed item set. */
static void GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet,
ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev = NULL,
- const Fraction* pScale = NULL,
- const SfxItemSet* pCondSet = NULL,
- SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = NULL,
- const Color* pTextConfigColor = NULL );
+ OutputDevice* pOutDev = nullptr,
+ const Fraction* pScale = nullptr,
+ const SfxItemSet* pCondSet = nullptr,
+ SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = nullptr,
+ const Color* pTextConfigColor = nullptr );
static ScDxfFont GetDxfFont(const SfxItemSet& rSet, SvtScriptType nScript);
/** Fills a font object from the own item set. */
void GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev = NULL,
- const Fraction* pScale = NULL,
- const SfxItemSet* pCondSet = NULL,
- SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = NULL,
- const Color* pTextConfigColor = NULL ) const;
+ OutputDevice* pOutDev = nullptr,
+ const Fraction* pScale = nullptr,
+ const SfxItemSet* pCondSet = nullptr,
+ SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = nullptr,
+ const Color* pTextConfigColor = nullptr ) const;
/** Converts all Calc items contained in rSrcSet to edit engine items and puts them into rEditSet. */
- static void FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& rSrcSet, const SfxItemSet* pCondSet = NULL );
+ static void FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& rSrcSet, const SfxItemSet* pCondSet = nullptr );
/** Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSet. */
- void FillEditItemSet( SfxItemSet* pEditSet, const SfxItemSet* pCondSet = NULL ) const;
+ void FillEditItemSet( SfxItemSet* pEditSet, const SfxItemSet* pCondSet = nullptr ) const;
/** Converts all edit engine items contained in rEditSet to Calc items and puts them into rDestSet. */
static void GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet& rEditSet );
@@ -149,7 +149,7 @@ class ScFontToSubsFontConverter_AutoPtr
public:
ScFontToSubsFontConverter_AutoPtr()
- : h(0)
+ : h(nullptr)
{}
~ScFontToSubsFontConverter_AutoPtr()
{
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 8640e480e33b..5b111c404217 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -148,7 +148,7 @@ private:
/** Creates the caption object from initial caption data if existing. */
void CreateCaptionFromInitData( const ScAddress& rPos ) const;
/** Creates a new caption object at the passed cell position, clones passed existing caption. */
- void CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCaption = 0 );
+ void CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCaption = nullptr );
/** Removes the caption object from the drawing layer, if this note is its owner. */
void RemoveCaption();
diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index 8ab7e8e30f9e..0cc93968cdf5 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -62,7 +62,7 @@ public:
virtual ~ScTpPrintItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScPrintOptions& GetPrintOptions() const { return theOptions; }
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 062e618a5ce2..9eae5b95e80f 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -38,12 +38,12 @@ public:
ScRangeList& operator=(const ScRangeList& rList);
void Append( const ScRange& rRange );
- sal_uInt16 Parse( const OUString&, ScDocument* = NULL,
+ sal_uInt16 Parse( const OUString&, ScDocument* = nullptr,
sal_uInt16 nMask = SCA_VALID,
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 );
- void Format( OUString&, sal_uInt16 nFlags = 0, ScDocument* = NULL,
+ void Format( OUString&, sal_uInt16 nFlags = 0, ScDocument* = nullptr,
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
sal_Unicode cDelimiter = 0 ) const;
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 426329a1818f..4db3e39d320a 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -94,7 +94,7 @@ public:
const OUString& rName,
const ScAddress& rTarget );
// rTarget is ABSPOS jump label
- ScRangeData(const ScRangeData& rScRangeData, ScDocument* pDocument = NULL);
+ ScRangeData(const ScRangeData& rScRangeData, ScDocument* pDocument = nullptr);
SC_DLLPUBLIC ~ScRangeData();
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index c30880816609..fb129017b5a8 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -55,24 +55,24 @@ public:
static bool IsAbsTabArea ( const OUString& rAreaStr,
ScDocument* pDoc,
- ScArea*** pppAreas = 0,
- sal_uInt16* pAreaCount = 0,
+ ScArea*** pppAreas = nullptr,
+ sal_uInt16* pAreaCount = nullptr,
bool bAcceptCellRef = false,
ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 );
static bool IsAbsArea ( const OUString& rAreaStr,
ScDocument* pDoc,
SCTAB nTab,
- OUString* pCompleteStr = 0,
- ScRefAddress* pStartPos = 0,
- ScRefAddress* pEndPos = 0,
+ OUString* pCompleteStr = nullptr,
+ ScRefAddress* pStartPos = nullptr,
+ ScRefAddress* pEndPos = nullptr,
ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 );
static bool IsAbsPos ( const OUString& rPosStr,
ScDocument* pDoc,
SCTAB nTab,
- OUString* pCompleteStr = 0,
- ScRefAddress* pPosTripel = 0,
+ OUString* pCompleteStr = nullptr,
+ ScRefAddress* pPosTripel = nullptr,
ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 );
static bool MakeRangeFromName( const OUString& rName,
diff --git a/sc/inc/reffind.hxx b/sc/inc/reffind.hxx
index 1123a670dfb0..2cc64dac4db7 100644
--- a/sc/inc/reffind.hxx
+++ b/sc/inc/reffind.hxx
@@ -36,7 +36,7 @@ class ScRefFinder
public:
ScRefFinder(
- const OUString& rFormula, const ScAddress& rPos, ScDocument* pDoc = NULL,
+ const OUString& rFormula, const ScAddress& rPos, ScDocument* pDoc = nullptr,
formula::FormulaGrammar::AddressConvention eConvP = formula::FormulaGrammar::CONV_OOO );
~ScRefFinder();
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index c2373aada6f4..5aafb1de18e7 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -175,11 +175,11 @@ class AbstractScInsertTableDlg : public VclAbstractDialog
public:
virtual bool GetTablesFromFile() = 0;
virtual bool GetTablesAsLink() = 0;
- virtual const OUString* GetFirstTable( sal_uInt16* pN = NULL ) = 0;
+ virtual const OUString* GetFirstTable( sal_uInt16* pN = nullptr ) = 0;
virtual ScDocShell* GetDocShellTables() = 0;
virtual bool IsTableBefore() = 0;
virtual sal_uInt16 GetTableCount() = 0;
- virtual const OUString* GetNextTable( sal_uInt16* pN = NULL ) = 0;
+ virtual const OUString* GetNextTable( sal_uInt16* pN = nullptr ) = 0;
};
@@ -382,7 +382,7 @@ public:
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent,
InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
- const OUString* pStrTitle = NULL ) = 0;
+ const OUString* pStrTitle = nullptr ) = 0;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
SCTAB nTabCount, bool bFromFile) = 0;
@@ -457,8 +457,8 @@ public:
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( vcl::Window* pParent,
bool bAscii = true,
- const ScImportOptions* pOptions = NULL,
- const OUString* pStrTitle = NULL,
+ const ScImportOptions* pOptions = nullptr,
+ const OUString* pStrTitle = nullptr,
bool bMultiByte = false,
bool bOnlyDbtoolsEncodings = false,
bool bImport = true ) = 0;
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index ed3bd59058c3..c6513815fa44 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -377,7 +377,7 @@ public:
double GetMinValue( bool bTextAsZero ) const;
ScMatrixRef CompareMatrix(
- sc::Compare& rComp, size_t nMatPos, sc::CompareOptions* pOptions = NULL ) const;
+ sc::Compare& rComp, size_t nMatPos, sc::CompareOptions* pOptions = nullptr ) const;
/**
* Convert the content of matrix into a linear array of numeric values.
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index c54a28d72723..ec935631a256 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -203,13 +203,13 @@ public:
// InputHandler:
bool IsEditMode(); // not for SC_INPUT_TYPE
bool IsInputMode(); // also for SC_INPUT_TYPE
- void SetInputMode( ScInputMode eMode, const OUString* pInitText = NULL );
+ void SetInputMode( ScInputMode eMode, const OUString* pInitText = nullptr );
bool InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit = false );
SC_DLLPUBLIC void InputEnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL );
void InputCancelHandler();
void InputSelection( EditView* pView );
void InputChanged( EditView* pView );
- ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = NULL, bool bUseRef = true );
+ ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = nullptr, bool bUseRef = true );
void SetRefInputHdl( ScInputHandler* pNew );
ScInputHandler* GetRefInputHdl() { return pRefInputHandler;}
@@ -222,7 +222,7 @@ public:
void InputReplaceSelection( const OUString& rStr );
void InputTurnOffWinEngine();
OUString InputGetFormulaStr();
- void ActivateInputWindow( const OUString* pStr = NULL,
+ void ActivateInputWindow( const OUString* pStr = nullptr,
bool bMatrix = false );
void InitFormEditData();
@@ -230,13 +230,13 @@ public:
ScFormEditData* GetFormEditData() { return pFormEditData; }
// input of reference:
- SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm = NULL );
- bool IsModalMode(SfxObjectShell* pDocSh = NULL);
+ SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm = nullptr );
+ bool IsModalMode(SfxObjectShell* pDocSh = nullptr);
bool IsFormulaMode();
bool IsRefDialogOpen();
bool IsTableLocked();
void SetReference( const ScRange& rRef, ScDocument* pDoc,
- const ScMarkData* pMarkData = NULL );
+ const ScMarkData* pMarkData = nullptr );
void AddRefEntry();
void EndReference();
sal_uInt16 GetCurRefDlgId() const { return nCurRefDlgId; }
diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
index 33a2d48dcef6..b3d761585a35 100644
--- a/sc/inc/sharedformula.hxx
+++ b/sc/inc/sharedformula.hxx
@@ -34,7 +34,7 @@ public:
{
_Iter it = itBeg;
ScFormulaCell* pPrev = *it;
- ScFormulaCell* pCur = NULL;
+ ScFormulaCell* pCur = nullptr;
for (++it; it != itEnd; ++it, pPrev = pCur)
{
pCur = *it;
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index b76632e611a9..a53269853f04 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -237,7 +237,7 @@ public:
virtual ~ScStyleObj();
// created by getImplementation:
- bool IsInserted() const { return pDocShell != NULL; }
+ bool IsInserted() const { return pDocShell != nullptr; }
SfxStyleFamily GetFamily() const { return eFamily; }
void InitDoc( ScDocShell* pNewDocSh, const OUString& rNewName );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 3ae472becd9c..da2876f5a366 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -320,9 +320,9 @@ public:
void UnlockTable();
bool IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
- SCROW nRow2, bool* pOnlyNotBecauseOfMatrix = NULL ) const;
+ SCROW nRow2, bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
bool IsSelectionEditable( const ScMarkData& rMark,
- bool* pOnlyNotBecauseOfMatrix = NULL ) const;
+ bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
bool HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
@@ -330,7 +330,7 @@ public:
bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const;
bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
- ScSetStringParam* pParam = NULL );
+ ScSetStringParam* pParam = nullptr );
bool SetEditText( SCCOL nCol, SCROW nRow, EditTextObject* pEditText );
void SetEditText( SCCOL nCol, SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
@@ -401,17 +401,17 @@ public:
void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
void DeleteRow(
const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
- bool* pUndoOutline = NULL, std::vector<ScAddress>* pGroupPos = NULL );
+ bool* pUndoOutline = nullptr, std::vector<ScAddress>* pGroupPos = nullptr );
bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const;
void InsertCol(
const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize );
void DeleteCol(
- const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline = NULL );
+ const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline = nullptr );
void DeleteArea(
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag,
- bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = NULL );
+ bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
void CopyToClip( sc::CopyToClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable );
void CopyToClip( sc::CopyToClipContext& rCxt, const ScRangeList& rRanges, ScTable* pTable );
@@ -444,11 +444,11 @@ public:
void CopyToTable(
sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab,
- const ScMarkData* pMarkData = NULL, bool bAsLink = false, bool bColRowFlags = true );
+ const ScMarkData* pMarkData = nullptr, bool bAsLink = false, bool bColRowFlags = true );
void UndoToTable(
sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = NULL );
+ InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = nullptr );
void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCsCOL nDx, SCsROW nDy, ScTable* pTable);
@@ -546,7 +546,7 @@ public:
bool CompileErrorCells( sc::CompileFormulaContext& rCxt, sal_uInt16 nErrCode );
void UpdateReference(
- sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = NULL,
+ sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr,
bool bIncludeDraw = true, bool bUpdateNoteCaptionPos = true );
void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
@@ -613,7 +613,7 @@ public:
void ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = NULL );
+ const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr );
void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, bool bPutToPool = false )
{
@@ -647,7 +647,7 @@ public:
bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
- void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
+ void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = nullptr );
void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
@@ -680,11 +680,11 @@ public:
const ScColWidthParam* pParam );
bool SetOptimalHeight(
sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
- ScProgress* pOuterProgress = NULL, sal_uLong nProgressStart = 0 );
+ ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
void SetOptimalHeightOnly(
sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
- ScProgress* pOuterProgress = NULL, sal_uLong nProgressStart = 0 );
+ ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
long GetNeededSize( SCCOL nCol, SCROW nRow,
OutputDevice* pDev,
@@ -711,7 +711,7 @@ public:
sal_uInt16 GetColWidth( SCCOL nCol, bool bHiddenAsZero = true ) const;
sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZero = true ) const;
- SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const;
+ SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = nullptr, SCROW* pEndRow = nullptr, bool bHiddenAsZero = true ) const;
sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const;
sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const;
sal_uLong GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const;
@@ -796,10 +796,10 @@ public:
css::uno::Sequence<
css::sheet::TablePageBreakData> GetRowBreakData() const;
- bool RowHidden(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
- bool RowHiddenLeaf(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+ bool RowHidden(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
+ bool RowHiddenLeaf(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
- bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
+ bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
bool SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
void CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
@@ -812,8 +812,8 @@ public:
SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
- bool RowFiltered(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
- bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
+ bool RowFiltered(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
+ bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
void CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
void CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
@@ -840,8 +840,8 @@ public:
void Reorder( const sc::ReorderParam& rParam, ScProgress* pProgress );
bool ValidQuery(
- SCROW nRow, const ScQueryParam& rQueryParam, ScRefCellValue* pCell = NULL,
- bool* pbTestEqualCondition = NULL);
+ SCROW nRow, const ScQueryParam& rQueryParam, ScRefCellValue* pCell = nullptr,
+ bool* pbTestEqualCondition = nullptr);
void TopTenQuery( ScQueryParam& );
SCSIZE Query(ScQueryParam& rQueryParam, bool bKeepSub);
bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
@@ -1115,11 +1115,11 @@ private:
const ScColumn* FetchColumn( SCCOL nCol ) const;
void EndListeningIntersectedGroup(
- sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow, std::vector<ScAddress>* pGroupPos = NULL );
+ sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow, std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningIntersectedGroups(
sc::EndListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- std::vector<ScAddress>* pGroupPos = NULL );
+ std::vector<ScAddress>* pGroupPos = nullptr );
void EndListeningGroup( sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow );
void SetNeedsListeningGroup( SCCOL nCol, SCROW nRow );
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 9cf02bf36671..63c5ec77398b 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -431,7 +431,7 @@ public:
}
else
{
- pS = 0;
+ pS = nullptr;
pD = rT.GetDoubleRef();
// aDub intentionally not initialized, unnecessary
// because unused.
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 91617f7baf6f..c4398c3e0cfb 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -92,7 +92,7 @@ public:
ScVObjMode GetObjMode( ScVObjType eObj ) const { return aModeArr[eObj]; }
void SetGridColor( const Color& rCol, const OUString& rName ) { aGridCol = rCol; aGridColName = rName;}
- Color GetGridColor( OUString* pStrName = NULL ) const;
+ Color GetGridColor( OUString* pStrName = nullptr ) const;
const ScGridOptions& GetGridOptions() const { return aGridOpt; }
void SetGridOptions( const ScGridOptions& rNew ) { aGridOpt = rNew; }
@@ -121,7 +121,7 @@ public:
virtual ~ScTpViewItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScViewOptions& GetViewOptions() const { return theOptions; }
diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx
index 1151070b0e29..58936c878e4d 100644
--- a/sc/qa/extras/htmlexporttest.cxx
+++ b/sc/qa/extras/htmlexporttest.cxx
@@ -74,7 +74,7 @@ public:
void testHtmlSkipImage()
{
// need a temp dir, because there's an image exported too
- TempFile aTempDir(0, true);
+ TempFile aTempDir(nullptr, true);
OUString const url(aTempDir.GetURL());
TempFile aTempFile(&url, false);
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index bfd0bf33917c..70b70095715f 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -84,7 +84,7 @@ void ScMacrosTest::testMSP()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh != NULL);
+ CPPUNIT_ASSERT(xDocSh != nullptr);
SfxObjectShell::CallXScript(
xComponent,
diff --git a/sc/qa/extras/sccondformats.cxx b/sc/qa/extras/sccondformats.cxx
index 85a9d592bba0..02ebd5146b4e 100644
--- a/sc/qa/extras/sccondformats.cxx
+++ b/sc/qa/extras/sccondformats.cxx
@@ -134,18 +134,18 @@ void ScConditionalFormatTest::testUndoAnchor()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh != NULL);
+ CPPUNIT_ASSERT(xDocSh != nullptr);
// Check whether graphic imported well
ScDocument& rDoc = xDocSh->GetDocument();
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawLayer != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawLayer != nullptr );
const SdrPage *pPage = pDrawLayer->GetPage(0);
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != nullptr );
SdrGrafObj* pObject = dynamic_cast<SdrGrafObj*>(pPage->GetObj(0));
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != nullptr );
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject->IsLinkedGraphic() );
const GraphicObject& rGraphicObj = pObject->GetGraphicObject(true);
@@ -155,11 +155,11 @@ void ScConditionalFormatTest::testUndoAnchor()
// Get the document controller
ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pViewShell != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pViewShell != nullptr );
// Get the draw view of the document
ScDrawView* pDrawView = pViewShell->GetViewData().GetScDrawView();
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawView != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawView != nullptr );
// Select graphic object
pDrawView->MarkNextObj();
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 195e3ce585dd..a2f305cbb9a0 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -73,7 +73,7 @@ void ScCopyPasteTest::testCopyPasteXLS()
// Get the document controller
ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
- CPPUNIT_ASSERT(pViewShell != NULL);
+ CPPUNIT_ASSERT(pViewShell != nullptr);
// 2. Highlight B2:C5
ScRange aSrcRange;
@@ -109,11 +109,11 @@ void ScCopyPasteTest::testCopyPasteXLS()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh != NULL);
+ CPPUNIT_ASSERT(xDocSh != nullptr);
// Get the document controller
pViewShell = xDocSh->GetBestViewShell(false);
- CPPUNIT_ASSERT(pViewShell != NULL);
+ CPPUNIT_ASSERT(pViewShell != nullptr);
// 6. Paste
pViewShell->GetViewData().GetView()->PasteFromClip(InsertDeleteFlags::ALL, &aClipDoc);
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index 59f21370c959..115b6bc11e12 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -131,7 +131,7 @@ public:
}
else
{
- char* pRemainingChars = NULL;
+ char* pRemainingChars = nullptr;
std::string aStr(p, n);
double nValue = strtod(&aStr[0], &pRemainingChars);
if (*pRemainingChars)
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 2ac7ee8cf33b..c8b73c890281 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -184,7 +184,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
//formatting for B5: # ??/100 gets lost during import
//test Sheet2
- const ScPatternAttr* pPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
pPattern = pDoc->GetPattern(0,0,1);
vcl::Font aFont;
pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
@@ -296,40 +296,40 @@ const SdrOle2Obj* getSingleChartObject(ScDocument& rDoc, sal_uInt16 nPage)
if (!pDrawLayer)
{
cout << "Failed to retrieve the drawing layer object." << endl;
- return NULL;
+ return nullptr;
}
const SdrPage* pPage = pDrawLayer->GetPage(nPage);
if (!pPage)
{
cout << "Failed to retrieve the page object." << endl;
- return NULL;
+ return nullptr;
}
if (pPage->GetObjCount() != 1)
{
cout << "This page should contain one drawing object." << endl;
- return NULL;
+ return nullptr;
}
const SdrObject* pObj = pPage->GetObj(0);
if (!pObj)
{
cout << "Failed to retrieve the drawing object." << endl;
- return NULL;
+ return nullptr;
}
if (pObj->GetObjIdentifier() != OBJ_OLE2)
{
cout << "This is not an OLE2 object." << endl;
- return NULL;
+ return nullptr;
}
const SdrOle2Obj& rOleObj = static_cast<const SdrOle2Obj&>(*pObj);
if (!rOleObj.IsChart())
{
cout << "This should be a chart object." << endl;
- return NULL;
+ return nullptr;
}
return &rOleObj;
@@ -415,7 +415,7 @@ ScTokenArray* getTokens(ScDocument& rDoc, const ScAddress& rPos)
{
OUString aStr = rPos.Format(SCA_VALID);
cerr << aStr << " is not a formula cell." << endl;
- return NULL;
+ return nullptr;
}
return pCell->GetCode();
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index e7a6d5f75040..2a33b6562819 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -133,7 +133,7 @@ SCQAHELPER_DLLPUBLIC bool checkFormulaPositions(
ScDocument& rDoc, SCTAB nTab, SCCOL nCol, const SCROW* pRows, size_t nRowCount);
SCQAHELPER_DLLPUBLIC ScTokenArray* compileFormula(
- ScDocument* pDoc, const OUString& rFormula, const ScAddress* pPos = NULL,
+ ScDocument* pDoc, const OUString& rFormula, const ScAddress* pPos = nullptr,
formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_NATIVE );
template<size_t _Size>
@@ -206,12 +206,12 @@ protected:
ScDocShellRef load(
bool bReadWrite, const OUString& rURL, const OUString& rFilter, const OUString &rUserData,
const OUString& rTypeName, SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = NULL );
+ sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = nullptr );
ScDocShellRef load(
const OUString& rURL, const OUString& rFilter, const OUString &rUserData,
const OUString& rTypeName, SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = NULL );
+ sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = nullptr );
ScDocShellRef loadDoc(const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite = false );
diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index b22ca7cf0f35..7b13b0d09af4 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -19,7 +19,7 @@ class Test : public test::BootstrapFixture
{
public:
Test()
- : m_pDoc(NULL)
+ : m_pDoc(nullptr)
{
}
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 3fe86d995ca0..0a16302312f7 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -1378,8 +1378,8 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
{
- const editeng::SvxBorderLine* pLine = NULL;
- rDoc.GetBorderLines(2, aChecks[i].mnRow, 0, NULL, &pLine, NULL, NULL);
+ const editeng::SvxBorderLine* pLine = nullptr;
+ rDoc.GetBorderLines(2, aChecks[i].mnRow, 0, nullptr, &pLine, nullptr, nullptr);
CPPUNIT_ASSERT(pLine);
CPPUNIT_ASSERT_EQUAL(toBorderName(aChecks[i].mnStyle), toBorderName(pLine->GetBorderLineStyle()));
if (aChecks[i].mnWidth >= 0)
@@ -1392,8 +1392,8 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
ScDocument& rDoc = xNewDocSh->GetDocument();
for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
{
- const editeng::SvxBorderLine* pLine = NULL;
- rDoc.GetBorderLines(2, aChecks[i].mnRow, 0, NULL, &pLine, NULL, NULL);
+ const editeng::SvxBorderLine* pLine = nullptr;
+ rDoc.GetBorderLines(2, aChecks[i].mnRow, 0, nullptr, &pLine, nullptr, nullptr);
CPPUNIT_ASSERT(pLine);
CPPUNIT_ASSERT_EQUAL(toBorderName(aChecks[i].mnStyle), toBorderName(pLine->GetBorderLineStyle()));
if (aChecks[i].mnWidth >= 0)
@@ -2479,11 +2479,11 @@ void ScExportTest::testLinkedGraphicRT()
// Check whether graphic imported well after export
ScDocument& rDoc = xDocSh->GetDocument();
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawLayer != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDrawLayer != nullptr );
const SdrPage *pPage = pDrawLayer->GetPage(0);
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != nullptr );
SdrGrafObj* pObject = dynamic_cast<SdrGrafObj*>(pPage->GetObj(0));
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != nullptr );
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject->IsLinkedGraphic() );
const GraphicObject& rGraphicObj = pObject->GetGraphicObject(true);
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index b4c0451ef358..cdb0aedf1dc7 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -878,10 +878,10 @@ void ScFiltersTest::testBorderODS()
CPPUNIT_ASSERT_MESSAGE("Failed to load border.*", xDocSh.Is());
ScDocument& rDoc = xDocSh->GetDocument();
- const editeng::SvxBorderLine* pLeft = NULL;
- const editeng::SvxBorderLine* pTop = NULL;
- const editeng::SvxBorderLine* pRight = NULL;
- const editeng::SvxBorderLine* pBottom = NULL;
+ const editeng::SvxBorderLine* pLeft = nullptr;
+ const editeng::SvxBorderLine* pTop = nullptr;
+ const editeng::SvxBorderLine* pRight = nullptr;
+ const editeng::SvxBorderLine* pBottom = nullptr;
rDoc.GetBorderLines( 0, 1, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(!pLeft);
@@ -974,17 +974,17 @@ void ScFiltersTest::testBordersOoo33()
CPPUNIT_ASSERT_MESSAGE("Failed to load borders_ooo33.*", xDocSh.Is());
ScDocument& rDoc = xDocSh->GetDocument();
- const editeng::SvxBorderLine* pLeft = NULL;
- const editeng::SvxBorderLine* pTop = NULL;
- const editeng::SvxBorderLine* pRight = NULL;
- const editeng::SvxBorderLine* pBottom = NULL;
+ const editeng::SvxBorderLine* pLeft = nullptr;
+ const editeng::SvxBorderLine* pTop = nullptr;
+ const editeng::SvxBorderLine* pRight = nullptr;
+ const editeng::SvxBorderLine* pBottom = nullptr;
sal_Int16 temp = 0;
for(sal_Int16 i = 0; i<6; ++i)
{
for(sal_Int32 j = 0; j<22; ++j)
{
rDoc.GetBorderLines( i, j, 0, &pLeft, &pTop, &pRight, &pBottom );
- if(pLeft!=NULL && pTop!=NULL && pRight!=NULL && pBottom!=NULL)
+ if(pLeft!=nullptr && pTop!=nullptr && pRight!=nullptr && pBottom!=nullptr)
{
CPPUNIT_ASSERT_EQUAL(borders[temp].column, i);
CPPUNIT_ASSERT_EQUAL(borders[temp].row, j);
@@ -2119,7 +2119,7 @@ void ScFiltersTest::testRichTextContentODS()
CPPUNIT_ASSERT_MESSAGE("Unexpected text.", aParaText.startsWith("Sheet name is "));
CPPUNIT_ASSERT_MESSAGE("Sheet name field item not found.", pEditText->HasField(text::textfield::Type::TABLE));
CPPUNIT_ASSERT_EQUAL(OUString("Sheet name is Test."), ScEditUtil::GetString(*pEditText, &rDoc));
- CPPUNIT_ASSERT_EQUAL(OUString("Sheet name is ?."), ScEditUtil::GetString(*pEditText, NULL));
+ CPPUNIT_ASSERT_EQUAL(OUString("Sheet name is ?."), ScEditUtil::GetString(*pEditText, nullptr));
// Cell with URL field item.
aPos.IncRow();
@@ -2131,7 +2131,7 @@ void ScFiltersTest::testRichTextContentODS()
CPPUNIT_ASSERT_MESSAGE("Unexpected text.", aParaText.startsWith("URL: "));
CPPUNIT_ASSERT_MESSAGE("URL field item not found.", pEditText->HasField(text::textfield::Type::URL));
CPPUNIT_ASSERT_EQUAL(OUString("URL: http://libreoffice.org"), ScEditUtil::GetString(*pEditText, &rDoc));
- CPPUNIT_ASSERT_EQUAL(OUString("URL: http://libreoffice.org"), ScEditUtil::GetString(*pEditText, NULL));
+ CPPUNIT_ASSERT_EQUAL(OUString("URL: http://libreoffice.org"), ScEditUtil::GetString(*pEditText, nullptr));
// Cell with Date field item.
aPos.IncRow();
@@ -2143,7 +2143,7 @@ void ScFiltersTest::testRichTextContentODS()
CPPUNIT_ASSERT_MESSAGE("Unexpected text.", aParaText.startsWith("Date: "));
CPPUNIT_ASSERT_MESSAGE("Date field item not found.", pEditText->HasField(text::textfield::Type::DATE));
CPPUNIT_ASSERT_MESSAGE("Date field not resolved with rDoc.", ScEditUtil::GetString(*pEditText, &rDoc).indexOf("/20") > 0);
- CPPUNIT_ASSERT_MESSAGE("Date field not resolved with NULL.", ScEditUtil::GetString(*pEditText, NULL).indexOf("/20") > 0);
+ CPPUNIT_ASSERT_MESSAGE("Date field not resolved with NULL.", ScEditUtil::GetString(*pEditText, nullptr).indexOf("/20") > 0);
// Cell with DocInfo title field item.
aPos.IncRow();
@@ -2155,7 +2155,7 @@ void ScFiltersTest::testRichTextContentODS()
CPPUNIT_ASSERT_MESSAGE("Unexpected text.", aParaText.startsWith("Title: "));
CPPUNIT_ASSERT_MESSAGE("DocInfo title field item not found.", pEditText->HasField(text::textfield::Type::DOCINFO_TITLE));
CPPUNIT_ASSERT_EQUAL(OUString("Title: Test Document"), ScEditUtil::GetString(*pEditText, &rDoc));
- CPPUNIT_ASSERT_EQUAL(OUString("Title: ?"), ScEditUtil::GetString(*pEditText, NULL));
+ CPPUNIT_ASSERT_EQUAL(OUString("Title: ?"), ScEditUtil::GetString(*pEditText, nullptr));
// Cell with sentence with both bold and italic sequences.
aPos.IncRow();
diff --git a/sc/qa/unit/test_ScChartListenerCollection.cxx b/sc/qa/unit/test_ScChartListenerCollection.cxx
index fccf3f0ddc62..82aa66a5d705 100644
--- a/sc/qa/unit/test_ScChartListenerCollection.cxx
+++ b/sc/qa/unit/test_ScChartListenerCollection.cxx
@@ -56,7 +56,7 @@ struct MockedHiddenRangeListener : public ScChartHiddenRangeListener {
void ChartListenerCollectionTest::ListenerGetsNotifiedWhenItsRangeIsSetDirty() {
MockedHiddenRangeListener listener;
- ScChartListenerCollection sut(NULL);
+ ScChartListenerCollection sut(nullptr);
sut.StartListeningHiddenRange(RANGE_1, &listener);
sut.SetRangeDirty(RANGE_INTERSECTING_1_AND_2);
@@ -66,7 +66,7 @@ void ChartListenerCollectionTest::ListenerGetsNotifiedWhenItsRangeIsSetDirty() {
void ChartListenerCollectionTest::ListenerGetsNotifiedTwiceWhenRegisteredTwoTimes() {
MockedHiddenRangeListener listener;
- ScChartListenerCollection sut(NULL);
+ ScChartListenerCollection sut(nullptr);
sut.StartListeningHiddenRange(RANGE_1, &listener);
sut.StartListeningHiddenRange(RANGE_2, &listener);
@@ -77,7 +77,7 @@ void ChartListenerCollectionTest::ListenerGetsNotifiedTwiceWhenRegisteredTwoTime
void ChartListenerCollectionTest::ListenerDoesNotGetNotifiedWhenListeningStops() {
MockedHiddenRangeListener listener;
- ScChartListenerCollection sut(NULL);
+ ScChartListenerCollection sut(nullptr);
sut.StartListeningHiddenRange(RANGE_1, &listener);
sut.EndListeningHiddenRange(&listener);
@@ -89,7 +89,7 @@ void ChartListenerCollectionTest::ListenerDoesNotGetNotifiedWhenListeningStops()
void ChartListenerCollectionTest::ListenerStopsListeningForAllRanges() {
MockedHiddenRangeListener listener;
- ScChartListenerCollection sut(NULL);
+ ScChartListenerCollection sut(nullptr);
sut.StartListeningHiddenRange(RANGE_1, &listener);
sut.StartListeningHiddenRange(RANGE_2, &listener);
@@ -103,7 +103,7 @@ void ChartListenerCollectionTest::ListenersStopListeningIdependently() {
MockedHiddenRangeListener listener1;
MockedHiddenRangeListener listener2;
- ScChartListenerCollection sut(NULL);
+ ScChartListenerCollection sut(nullptr);
sut.StartListeningHiddenRange(RANGE_1, &listener1);
sut.StartListeningHiddenRange(RANGE_2, &listener2);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 356222868e4d..81bc4152b9dc 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -142,7 +142,7 @@ public:
Test::Test() :
m_pImpl(new TestImpl),
- m_pDoc(0)
+ m_pDoc(nullptr)
{
}
@@ -1093,7 +1093,7 @@ void Test::testHorizontalIterator()
// Raw data - 'hole' data
const char* aData[][2] = {
{ "A", "B" },
- { "C", 0 },
+ { "C", nullptr },
{ "D", "E" },
};
@@ -1115,15 +1115,15 @@ void Test::testHorizontalIterator()
{
// Very holy data
const char* aData[][2] = {
- { 0, "A" },
- { 0, 0 },
- { 0, "1" },
- { "B", 0 },
+ { nullptr, "A" },
+ { nullptr, nullptr },
+ { nullptr, "1" },
+ { "B", nullptr },
{ "C", "2" },
{ "D", "3" },
- { "E", 0 },
- { 0, "G" },
- { 0, 0 },
+ { "E", nullptr },
+ { nullptr, "G" },
+ { nullptr, nullptr },
};
HoriIterCheck aChecks[] = {
@@ -1148,13 +1148,13 @@ void Test::testHorizontalIterator()
{
// Degenerate case
const char* aData[][2] = {
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
+ { nullptr, nullptr },
+ { nullptr, nullptr },
+ { nullptr, nullptr },
};
bool bRes = checkHorizontalIterator(
- m_pDoc, aData, SAL_N_ELEMENTS(aData), NULL, 0);
+ m_pDoc, aData, SAL_N_ELEMENTS(aData), nullptr, 0);
if (!bRes)
CPPUNIT_FAIL("Failed on test degenerate.");
@@ -1163,9 +1163,9 @@ void Test::testHorizontalIterator()
{
// Data at end
const char* aData[][2] = {
- { 0, 0 },
- { 0, 0 },
- { 0, "A" },
+ { nullptr, nullptr },
+ { nullptr, nullptr },
+ { nullptr, "A" },
};
HoriIterCheck aChecks[] = {
@@ -1182,11 +1182,11 @@ void Test::testHorizontalIterator()
{
// Data in middle
const char* aData[][2] = {
- { 0, 0 },
- { 0, 0 },
- { 0, "A" },
- { 0, "1" },
- { 0, 0 },
+ { nullptr, nullptr },
+ { nullptr, nullptr },
+ { nullptr, "A" },
+ { nullptr, "1" },
+ { nullptr, nullptr },
};
HoriIterCheck aChecks[] = {
@@ -1300,21 +1300,21 @@ formula::FormulaToken* getSingleRefToken(ScDocument& rDoc, const ScAddress& rPos
if (!pFC)
{
cerr << "Formula cell expected, but not found." << endl;
- return NULL;
+ return nullptr;
}
ScTokenArray* pTokens = pFC->GetCode();
if (!pTokens)
{
cerr << "Token array is not present." << endl;
- return NULL;
+ return nullptr;
}
formula::FormulaToken* pToken = pTokens->First();
if (!pToken || pToken->GetType() != formula::svSingleRef)
{
cerr << "Not a single reference token." << endl;
- return NULL;
+ return nullptr;
}
return pToken;
@@ -1732,7 +1732,7 @@ void Test::testNamedRange()
CPPUNIT_ASSERT_MESSAGE("wrong range name is retrieved with the copied instance.", aName.equalsAscii(aNames[i].mpName));
}
- m_pDoc->SetRangeName(NULL); // Delete the names.
+ m_pDoc->SetRangeName(nullptr); // Delete the names.
m_pDoc->DeleteTab(0);
}
@@ -2236,7 +2236,7 @@ void Test::testDataArea()
CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
// Now, set borders in some cells....
- ::editeng::SvxBorderLine aLine(NULL, 50, table::BorderLineStyle::SOLID);
+ ::editeng::SvxBorderLine aLine(nullptr, 50, table::BorderLineStyle::SOLID);
SvxBoxItem aBorderItem(ATTR_BORDER);
aBorderItem.SetLine(&aLine, SvxBoxItemLine::LEFT);
aBorderItem.SetLine(&aLine, SvxBoxItemLine::RIGHT);
@@ -2349,7 +2349,7 @@ void Test::testFunctionLists()
"DSUM",
"DVAR",
"DVARP",
- 0
+ nullptr
};
const char* aDateTime[] = {
@@ -2382,7 +2382,7 @@ void Test::testFunctionLists()
"WORKDAY.INTL",
"YEAR",
"YEARS",
- 0
+ nullptr
};
const char* aFinancial[] = {
@@ -2412,7 +2412,7 @@ void Test::testFunctionLists()
"SLN",
"SYD",
"VDB",
- 0
+ nullptr
};
const char* aInformation[] = {
@@ -2435,7 +2435,7 @@ void Test::testFunctionLists()
"N",
"NA",
"TYPE",
- 0
+ nullptr
};
const char* aLogical[] = {
@@ -2448,7 +2448,7 @@ void Test::testFunctionLists()
"OR",
"TRUE",
"XOR",
- 0
+ nullptr
};
const char* aMathematical[] = {
@@ -2522,7 +2522,7 @@ void Test::testFunctionLists()
"TAN",
"TANH",
"TRUNC",
- 0
+ nullptr
};
const char* aArray[] = {
@@ -2540,7 +2540,7 @@ void Test::testFunctionLists()
"SUMXMY2",
"TRANSPOSE",
"TREND",
- 0
+ nullptr
};
const char* aStatistical[] = {
@@ -2685,7 +2685,7 @@ void Test::testFunctionLists()
"WEIBULL.DIST",
"Z.TEST",
"ZTEST",
- 0
+ nullptr
};
const char* aSpreadsheet[] = {
@@ -2711,7 +2711,7 @@ void Test::testFunctionLists()
"SHEETS",
"STYLE",
"VLOOKUP",
- 0
+ nullptr
};
const char* aText[] = {
@@ -2756,7 +2756,7 @@ void Test::testFunctionLists()
"UPPER",
"VALUE",
"WEBSERVICE",
- 0
+ nullptr
};
struct {
@@ -2772,8 +2772,8 @@ void Test::testFunctionLists()
{ "Statistical", aStatistical },
{ "Spreadsheet", aSpreadsheet },
{ "Text", aText },
- { "Add-in", 0 },
- { 0, 0 }
+ { "Add-in", nullptr },
+ { nullptr, nullptr }
};
ScFunctionMgr* pFuncMgr = ScGlobal::GetStarCalcFunctionMgr();
@@ -2801,9 +2801,9 @@ void Test::testGraphicsInGroup()
m_pDoc->InitDrawLayer();
ScDrawLayer *pDrawLayer = m_pDoc->GetDrawLayer();
- CPPUNIT_ASSERT_MESSAGE("must have a draw layer", pDrawLayer != NULL);
+ CPPUNIT_ASSERT_MESSAGE("must have a draw layer", pDrawLayer != nullptr);
SdrPage* pPage = pDrawLayer->GetPage(0);
- CPPUNIT_ASSERT_MESSAGE("must have a draw page", pPage != NULL);
+ CPPUNIT_ASSERT_MESSAGE("must have a draw page", pPage != nullptr);
{
//Add a square
@@ -3119,7 +3119,7 @@ void Test::testAutofilter()
const char* aData[][3] = {
{ "C1", "C2", "C3" },
{ "0", "1", "A" },
- { "1", "2", 0 },
+ { "1", "2", nullptr },
{ "1", "2", "B" },
{ "0", "2", "B" }
};
@@ -3260,7 +3260,7 @@ void Test::testCopyPaste()
std::unique_ptr<ScUndoPaste> pUndo(createUndoPaste(getDocShell(), aRange, pUndoDoc));
ScMarkData aMark;
aMark.SetMarkArea(aRange);
- m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::ALL, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::ALL, nullptr, &aClipDoc);
//check values after copying
OUString aString;
@@ -3279,7 +3279,7 @@ void Test::testCopyPaste()
CPPUNIT_ASSERT_MESSAGE("local range name 1 should be valid", bIsValidRef);
CPPUNIT_ASSERT_MESSAGE("local range 1 should still point to Sheet1.A1",aRangeLocal1 == ScRange(0,0,0,0,0,0));
pLocal2 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
- CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", pLocal2 == NULL);
+ CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", pLocal2 == nullptr);
// check notes after copying
CPPUNIT_ASSERT_MESSAGE("There should be a note on Sheet2.A2", m_pDoc->HasNote(ScAddress(0, 1, 1)));
@@ -3343,7 +3343,7 @@ void Test::testCopyPasteAsLink()
ScMarkData aMark;
aMark.SetMarkArea(aRange);
// Paste range as link.
- m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::CONTENTS, NULL, &aClipDoc, true, true);
+ m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::CONTENTS, nullptr, &aClipDoc, true, true);
// Check pasted content to make sure they reference the correct cells.
ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(1,1,1));
@@ -3400,7 +3400,7 @@ void Test::testCopyPasteTranspose()
ScRange aDestRange = ScRange(3,1,1,3,3,1);//target: Sheet2.D2:D4
ScMarkData aMark;
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, NULL, pTransposedClip);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pTransposedClip);
//check cell content after transposed copy/paste
OUString aString = m_pDoc->GetString(3, 3, 1);
@@ -3687,7 +3687,7 @@ void Test::testCopyPasteSkipEmpty2()
ScRange aDestRange(0,2,0,2,2,0);
ScMarkData aMark;
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, NULL, &aClipDoc, false, false, true, true);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, nullptr, &aClipDoc, false, false, true, true);
CPPUNIT_ASSERT_EQUAL(OUString("A"), m_pDoc->GetString(ScAddress(0,2,0)));
CPPUNIT_ASSERT_MESSAGE("B3 should be empty.", m_pDoc->GetCellType(ScAddress(1,2,0)) == CELLTYPE_NONE);
@@ -3801,7 +3801,7 @@ void Test::testCutPasteRefUndo()
if (!checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2"))
CPPUNIT_FAIL("A2 in the undo document should be referencing B2.");
- ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false, NULL);
+ ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, nullptr, InsertDeleteFlags::CONTENTS, nullptr, false, nullptr);
aUndo.Undo();
// Now A2 should be referencing B2 once again.
@@ -3990,7 +3990,7 @@ void Test::testCopyPasteRelativeFormula()
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
ScRange aDestRange(1,0,0,1,1,0);
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, nullptr, &aClipDoc);
// B2 references A2, so the value should be 1.
CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,1,0)));
@@ -4016,7 +4016,7 @@ void Test::testCopyPasteRelativeFormula()
// Paste to A3.
aDestRange = ScRange(0,2,0,0,2,0);
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, nullptr, &aClipDoc);
pFC = m_pDoc->GetFormulaCell(ScAddress(0,2,0));
CPPUNIT_ASSERT(pFC);
@@ -4073,7 +4073,7 @@ void Test::testCopyPasteRepeatOneFormula()
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
ScRange aDestRange(2,1,0,2,9,0);
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, nullptr, &aClipDoc);
// Make sure C1:C10 are grouped.
const ScFormulaCell* pFC = m_pDoc->GetFormulaCell(aPos);
@@ -4509,7 +4509,7 @@ void Test::testAutoFill()
ScMarkData aMarkData;
aMarkData.SelectTable(0, true);
- m_pDoc->Fill( 0, 0, 0, 0, NULL, aMarkData, 5);
+ m_pDoc->Fill( 0, 0, 0, 0, nullptr, aMarkData, 5);
for (SCROW i = 0; i< 6; ++i)
ASSERT_DOUBLES_EQUAL(static_cast<double>(i+1.0), m_pDoc->GetValue(0, i, 0));
@@ -4519,14 +4519,14 @@ void Test::testAutoFill()
m_pDoc->SetValue(0,2,0,10);
m_pDoc->SetRowHidden(1, 2, 0, true);
- m_pDoc->Fill( 0, 0, 0, 0, NULL, aMarkData, 8);
+ m_pDoc->Fill( 0, 0, 0, 0, nullptr, aMarkData, 8);
ASSERT_DOUBLES_EQUAL(10.0, m_pDoc->GetValue(0,1,0));
ASSERT_DOUBLES_EQUAL(10.0, m_pDoc->GetValue(0,2,0));
for (SCROW i = 3; i< 8; ++i)
ASSERT_DOUBLES_EQUAL(static_cast<double>(i-1.0), m_pDoc->GetValue(0, i, 0));
- m_pDoc->Fill( 0, 0, 0, 8, NULL, aMarkData, 5, FILL_TO_RIGHT );
+ m_pDoc->Fill( 0, 0, 0, 8, nullptr, aMarkData, 5, FILL_TO_RIGHT );
for (SCCOL i = 0; i < 5; ++i)
{
for(SCROW j = 0; j < 8; ++j)
@@ -4551,7 +4551,7 @@ void Test::testAutoFill()
// test auto fill user data lists
m_pDoc->SetString( 0, 100, 0, "January" );
- m_pDoc->Fill( 0, 100, 0, 100, NULL, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
+ m_pDoc->Fill( 0, 100, 0, 100, nullptr, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
OUString aTestValue = m_pDoc->GetString( 0, 101, 0 );
CPPUNIT_ASSERT_EQUAL( aTestValue, OUString("February") );
aTestValue = m_pDoc->GetString( 0, 102, 0 );
@@ -4559,7 +4559,7 @@ void Test::testAutoFill()
// test that two same user data list entries will not result in incremental fill
m_pDoc->SetString( 0, 101, 0, "January" );
- m_pDoc->Fill( 0, 100, 0, 101, NULL, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
+ m_pDoc->Fill( 0, 100, 0, 101, nullptr, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
for ( SCROW i = 102; i <= 103; ++i )
{
aTestValue = m_pDoc->GetString( 0, i, 0 );
@@ -4607,7 +4607,7 @@ void Test::testAutoFill()
m_pDoc->SetString(100, 110, 0, "=A111");
- m_pDoc->Fill(100, 110, 100, 110, NULL, aMarkData, 10, FILL_TO_TOP, FILL_AUTO);
+ m_pDoc->Fill(100, 110, 100, 110, nullptr, aMarkData, 10, FILL_TO_TOP, FILL_AUTO);
for(SCROW nRow = 110; nRow >= 100; --nRow)
{
OUString aExpected = "=A" + OUString::number(nRow +1);
@@ -4629,7 +4629,7 @@ void Test::testAutoFillSimple()
ScMarkData aMarkData;
aMarkData.SelectTable(0, true);
- m_pDoc->Fill( 0, 0, 0, 1, NULL, aMarkData, 6, FILL_TO_BOTTOM, FILL_AUTO);
+ m_pDoc->Fill( 0, 0, 0, 1, nullptr, aMarkData, 6, FILL_TO_BOTTOM, FILL_AUTO);
for(SCROW nRow = 0; nRow < 8; ++nRow)
{
@@ -4697,7 +4697,7 @@ void Test::testCopyPasteFormulasExternalDoc()
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
- findLoadedDocShellByName(aExtDocName) != NULL);
+ findLoadedDocShellByName(aExtDocName) != nullptr);
ScDocument& rExtDoc = xExtDocSh->GetDocument();
rExtDoc.InsertTab(0, aExtSh1Name);
@@ -4724,7 +4724,7 @@ void Test::testCopyPasteFormulasExternalDoc()
aRange = ScRange(1,1,1,1,6,1);
ScMarkData aMarkData2;
aMarkData2.SetMarkArea(aRange);
- rExtDoc.CopyFromClip(aRange, aMarkData2, nFlags, NULL, pClipDoc);
+ rExtDoc.CopyFromClip(aRange, aMarkData2, nFlags, nullptr, pClipDoc);
OUString aFormula;
rExtDoc.GetFormula(1,1,1, aFormula);
@@ -4749,12 +4749,12 @@ void Test::testCopyPasteFormulasExternalDoc()
void Test::testFindAreaPosVertical()
{
const char* aData[][3] = {
- { 0, "1", "1" },
- { "1", 0, "1" },
+ { nullptr, "1", "1" },
+ { "1", nullptr, "1" },
{ "1", "1", "1" },
- { 0, "1", "1" },
+ { nullptr, "1", "1" },
{ "1", "1", "1" },
- { "1", 0, "1" },
+ { "1", nullptr, "1" },
{ "1", "1", "1" },
};
@@ -4939,7 +4939,7 @@ void Test::testNoteBasic()
bool bInsertRow = m_pDoc->InsertRow(0, 0, MAXCOL, 0, 1, 1);
CPPUNIT_ASSERT_MESSAGE("failed to insert row", bInsertRow );
- CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == NULL);
+ CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == nullptr);
aAddr.IncRow(); // cell C4
CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(aAddr) == pNote);
@@ -4947,13 +4947,13 @@ void Test::testNoteBasic()
bool bInsertCol = m_pDoc->InsertCol(0, 0, MAXROW, 0, 1, 1);
CPPUNIT_ASSERT_MESSAGE("failed to insert column", bInsertCol );
- CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == NULL);
+ CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == nullptr);
aAddr.IncCol(); // cell D4
CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(aAddr) == pNote);
// Insert a new sheet to shift the current sheet to the right.
m_pDoc->InsertTab(0, "Table2");
- CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == NULL);
+ CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(aAddr) == nullptr);
aAddr.IncTab(); // Move to the next sheet.
CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(aAddr) == pNote);
@@ -5224,7 +5224,7 @@ void Test::testNoteCopyPaste()
// Paste to B6:B8 but only cell notes.
ScRange aDestRange(1,5,0,1,7,0);
- m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::NOTE, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::NOTE, nullptr, &aClipDoc);
// Make sure the notes are there.
pNote = m_pDoc->GetNote(ScAddress(1,5,0));
@@ -5349,9 +5349,9 @@ void Test::testAnchoredRotatedShape()
m_pDoc->InitDrawLayer();
ScDrawLayer *pDrawLayer = m_pDoc->GetDrawLayer();
- CPPUNIT_ASSERT_MESSAGE("must have a draw layer", pDrawLayer != NULL);
+ CPPUNIT_ASSERT_MESSAGE("must have a draw layer", pDrawLayer != nullptr);
SdrPage* pPage = pDrawLayer->GetPage(0);
- CPPUNIT_ASSERT_MESSAGE("must have a draw page", pPage != NULL);
+ CPPUNIT_ASSERT_MESSAGE("must have a draw page", pPage != nullptr);
m_pDoc->SetRowHeightRange( 0, MAXROW, 0, sc::HMMToTwips( 1000 ) );
const long TOLERANCE = 30; //30 hmm
for ( SCCOL nCol = 0; nCol < MAXCOL; ++nCol )
@@ -5513,7 +5513,7 @@ bool checkEditTextIterator(sc::EditTextIterator& rIter, const char** pChecks)
{
if (!pText)
// No more edit cells. The check string array should end too.
- return p == NULL;
+ return p == nullptr;
if (!p)
// More edit cell, but no more check string. Bad.
@@ -5542,7 +5542,7 @@ void Test::testEditTextIterator()
{
// First, try with an empty sheet.
sc::EditTextIterator aIter(*m_pDoc,0);
- const char* pChecks[] = { NULL };
+ const char* pChecks[] = { nullptr };
CPPUNIT_ASSERT_MESSAGE("Wrong iterator behavior.", checkEditTextIterator(aIter, pChecks));
}
@@ -5553,7 +5553,7 @@ void Test::testEditTextIterator()
rEditEngine.SetText("A2");
m_pDoc->SetEditText(ScAddress(0,1,0), rEditEngine.CreateTextObject());
sc::EditTextIterator aIter(*m_pDoc,0);
- const char* pChecks[] = { "A2", NULL };
+ const char* pChecks[] = { "A2", nullptr };
CPPUNIT_ASSERT_MESSAGE("Wrong iterator behavior.", checkEditTextIterator(aIter, pChecks));
}
@@ -5566,7 +5566,7 @@ void Test::testEditTextIterator()
rEditEngine.SetText("A7");
m_pDoc->SetEditText(ScAddress(0,6,0), rEditEngine.CreateTextObject());
sc::EditTextIterator aIter(*m_pDoc,0);
- const char* pChecks[] = { "A2", "A5", "A6", "A7", NULL };
+ const char* pChecks[] = { "A2", "A5", "A6", "A7", nullptr };
CPPUNIT_ASSERT_MESSAGE("Wrong iterator behavior.", checkEditTextIterator(aIter, pChecks));
}
@@ -5579,7 +5579,7 @@ void Test::testEditTextIterator()
rEditEngine.SetText("C4");
m_pDoc->SetEditText(ScAddress(2,3,0), rEditEngine.CreateTextObject());
sc::EditTextIterator aIter(*m_pDoc,0);
- const char* pChecks[] = { "A2", "A5", "A6", "A7", "C1", "C3", "C4", NULL };
+ const char* pChecks[] = { "A2", "A5", "A6", "A7", "C1", "C3", "C4", nullptr };
CPPUNIT_ASSERT_MESSAGE("Wrong iterator behavior.", checkEditTextIterator(aIter, pChecks));
}
@@ -5589,7 +5589,7 @@ void Test::testEditTextIterator()
m_pDoc->SetValue(ScAddress(1,3,0), 1.2);
m_pDoc->SetString(ScAddress(2,4,0), "Simple string");
sc::EditTextIterator aIter(*m_pDoc,0);
- const char* pChecks[] = { "A2", "A5", "A6", "A7", "C1", "C3", "C4", NULL };
+ const char* pChecks[] = { "A2", "A5", "A6", "A7", "C1", "C3", "C4", nullptr };
CPPUNIT_ASSERT_MESSAGE("Wrong iterator behavior.", checkEditTextIterator(aIter, pChecks));
}
@@ -6775,7 +6775,7 @@ ScDocShell* Test::findLoadedDocShellByName(const OUString& rName)
}
pShell = static_cast<ScDocShell*>(SfxObjectShell::GetNext(*pShell, checkSfxObjectShell<ScDocShell>, false));
}
- return NULL;
+ return nullptr;
}
bool Test::insertRangeNames(
@@ -6844,7 +6844,7 @@ void Test::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocu
{
ScMarkData aMark;
aMark.SetMarkArea(rDestRange);
- pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, NULL, pClipDoc);
+ pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pClipDoc);
}
ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pUndoDoc)
@@ -6855,7 +6855,7 @@ ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, Sc
ScRefUndoData* pRefUndoData = new ScRefUndoData(&rDoc);
return new ScUndoPaste(
- &rDocSh, rRange, aMarkData, pUndoDoc, NULL, InsertDeleteFlags::ALL, pRefUndoData, false);
+ &rDocSh, rRange, aMarkData, pUndoDoc, nullptr, InsertDeleteFlags::ALL, pRefUndoData, false);
}
void Test::setExpandRefs(bool bExpand)
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index b97dabb75084..7a0158e7b6b0 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -926,7 +926,7 @@ void Test::testFormulaCompiler()
{
std::unique_ptr<ScTokenArray> pArray;
{
- pArray.reset(compileFormula(m_pDoc, OUString::createFromAscii(aTests[i].pInput), NULL, aTests[i].eInputGram));
+ pArray.reset(compileFormula(m_pDoc, OUString::createFromAscii(aTests[i].pInput), nullptr, aTests[i].eInputGram));
CPPUNIT_ASSERT_MESSAGE("Token array shouldn't be NULL!", pArray.get());
}
@@ -3184,11 +3184,11 @@ void Test::testFuncCOUNTBLANK()
m_pDoc->InsertTab(0, "Formula");
const char* aData[][4] = {
- { "1", 0, "=B1", "=\"\"" },
- { "2", 0, "=B2", "=\"\"" },
- { "A", 0, "=B3", "=\"\"" },
- { "B", 0, "=B4", "=D3" },
- { 0, 0, "=B5", "=D4" },
+ { "1", nullptr, "=B1", "=\"\"" },
+ { "2", nullptr, "=B2", "=\"\"" },
+ { "A", nullptr, "=B3", "=\"\"" },
+ { "B", nullptr, "=B4", "=D3" },
+ { nullptr, nullptr, "=B5", "=D4" },
{ "=COUNTBLANK(A1:A5)", "=COUNTBLANK(B1:B5)", "=COUNTBLANK(C1:C5)", "=COUNTBLANK(D1:D5)" }
};
@@ -3208,7 +3208,7 @@ void Test::testFuncCOUNTBLANK()
const char* aData2[][2] = {
{ "1", "=COUNTBLANK(A1)" },
{ "A", "=COUNTBLANK(A2)" },
- { 0, "=COUNTBLANK(A3)" },
+ { nullptr, "=COUNTBLANK(A3)" },
{ "=\"\"", "=COUNTBLANK(A4)" },
{ "=A4" , "=COUNTBLANK(A5)" },
};
@@ -4010,7 +4010,7 @@ void Test::testFuncLOOKUP()
{ "=CONCATENATE(\"A\")", "1" },
{ "=CONCATENATE(\"B\")", "2" },
{ "=CONCATENATE(\"C\")", "3" },
- { 0, 0 } // terminator
+ { nullptr, nullptr } // terminator
};
// Insert raw data into A1:B3.
@@ -4024,7 +4024,7 @@ void Test::testFuncLOOKUP()
{ "A", "=LOOKUP(RC[-1];R1C1:R3C1;R1C2:R3C2)" },
{ "B", "=LOOKUP(RC[-1];R1C1:R3C1;R1C2:R3C2)" },
{ "C", "=LOOKUP(RC[-1];R1C1:R3C1;R1C2:R3C2)" },
- { 0, 0 } // terminator
+ { nullptr, nullptr } // terminator
};
// Insert check formulas into A5:B7.
@@ -4075,7 +4075,7 @@ void Test::testFuncVLOOKUP()
{ "D", "13" },
{ "E", "14" },
{ "F", "15" },
- { 0, 0 } // terminator
+ { nullptr, nullptr } // terminator
};
// Insert raw data into A1:B14.
@@ -4091,7 +4091,7 @@ void Test::testFuncVLOOKUP()
struct {
const char* pLookup; const char* pFormula; const char* pRes;
} aChecks[] = {
- { "Lookup", "Formula", 0 },
+ { "Lookup", "Formula", nullptr },
{ "12", "=VLOOKUP(D2;A2:B14;2;1)", "3" },
{ "29", "=VLOOKUP(D3;A2:B14;2;1)", "4" },
{ "31", "=VLOOKUP(D4;A2:B14;2;1)", "5" },
@@ -4828,8 +4828,8 @@ void Test::testFormulaDepTracking3()
const char* pData[][4] = {
{ "1", "2", "=SUM(A1:B1)", "=SUM(C1:C3)" },
- { "3", "4", "=SUM(A2:B2)", 0 },
- { "5", "6", "=SUM(A3:B3)", 0 },
+ { "3", "4", "=SUM(A2:B2)", nullptr },
+ { "5", "6", "=SUM(A3:B3)", nullptr },
};
insertRangeData(m_pDoc, ScAddress(0,0,0), pData, SAL_N_ELEMENTS(pData));
@@ -4910,7 +4910,7 @@ void Test::testFormulaDepTrackingDeleteCol()
const char* aData[][3] = {
{ "2", "=A1", "=B1" }, // not grouped
- { 0, 0, 0 }, // empty row to separate the formula groups.
+ { nullptr, nullptr, nullptr }, // empty row to separate the formula groups.
{ "3", "=A3", "=B3" }, // grouped
{ "4", "=A4", "=B4" }, // grouped
};
@@ -4948,7 +4948,7 @@ void Test::testFormulaDepTrackingDeleteCol()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "#REF!", "#REF!" },
- { 0, 0 },
+ { nullptr, nullptr },
{ "#REF!", "#REF!" },
{ "#REF!", "#REF!" },
};
@@ -4967,7 +4967,7 @@ void Test::testFormulaDepTrackingDeleteCol()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][3] = {
{ "2", "2", "2" },
- { 0, 0, 0 },
+ { nullptr, nullptr, nullptr },
{ "3", "3", "3" },
{ "4", "4", "4" },
};
@@ -4983,7 +4983,7 @@ void Test::testFormulaDepTrackingDeleteCol()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "#REF!", "#REF!" },
- { 0, 0 },
+ { nullptr, nullptr },
{ "#REF!", "#REF!" },
{ "#REF!", "#REF!" },
};
@@ -5003,7 +5003,7 @@ void Test::testFormulaDepTrackingDeleteCol()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][3] = {
{ "22", "22", "22" },
- { 0, 0, 0 },
+ { nullptr, nullptr, nullptr },
{ "23", "23", "23" },
{ "24", "24", "24" },
};
@@ -5054,7 +5054,7 @@ void Test::testExternalRef()
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
- findLoadedDocShellByName(aExtDocName) != NULL);
+ findLoadedDocShellByName(aExtDocName) != nullptr);
// Populate the external source document.
ScDocument& rExtDoc = xExtDocSh->GetDocument();
@@ -5190,7 +5190,7 @@ void Test::testExternalRef()
// have been cached.
ScExternalRefCache::TableTypeRef pCacheTab = pRefMgr->getCacheTable(
nFileId, aExtSh1Name, false);
- CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 1 should exist.", pCacheTab.get() != NULL);
+ CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 1 should exist.", pCacheTab.get() != nullptr);
ScRange aCachedRange = getCachedRange(pCacheTab);
CPPUNIT_ASSERT_MESSAGE("Unexpected cached data range.",
aCachedRange.aStart.Col() == 0 && aCachedRange.aEnd.Col() == 1 &&
@@ -5198,11 +5198,11 @@ void Test::testExternalRef()
// Sheet2 is not referenced at all; the cache table shouldn't even exist.
pCacheTab = pRefMgr->getCacheTable(nFileId, aExtSh2Name, false);
- CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 2 should *not* exist.", pCacheTab.get() == NULL);
+ CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 2 should *not* exist.", pCacheTab.get() == nullptr);
// Sheet3's row 5 is not referenced; it should not be cached.
pCacheTab = pRefMgr->getCacheTable(nFileId, aExtSh3Name, false);
- CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 3 should exist.", pCacheTab.get() != NULL);
+ CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 3 should exist.", pCacheTab.get() != nullptr);
aCachedRange = getCachedRange(pCacheTab);
CPPUNIT_ASSERT_MESSAGE("Unexpected cached data range.",
aCachedRange.aStart.Col() == 0 && aCachedRange.aEnd.Col() == 1 &&
@@ -5211,7 +5211,7 @@ void Test::testExternalRef()
// Unload the external document shell.
xExtDocSh->DoClose();
CPPUNIT_ASSERT_MESSAGE("external document instance should have been unloaded.",
- findLoadedDocShellByName(aExtDocName) == NULL);
+ findLoadedDocShellByName(aExtDocName) == nullptr);
m_pDoc->DeleteTab(0);
}
@@ -5224,7 +5224,7 @@ void Test::testExternalRangeName()
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
- findLoadedDocShellByName(aExtDocName) != NULL);
+ findLoadedDocShellByName(aExtDocName) != nullptr);
ScDocument& rExtDoc = xExtDocSh->GetDocument();
rExtDoc.InsertTab(0, aExtSh1Name);
@@ -5243,7 +5243,7 @@ void Test::testExternalRangeName()
xExtDocSh->DoClose();
CPPUNIT_ASSERT_MESSAGE("external document instance should have been unloaded.",
- findLoadedDocShellByName(aExtDocName) == NULL);
+ findLoadedDocShellByName(aExtDocName) == nullptr);
m_pDoc->DeleteTab(0);
}
@@ -5319,7 +5319,7 @@ void Test::testExternalRefFunctions()
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
- findLoadedDocShellByName(aExtDocName) != NULL);
+ findLoadedDocShellByName(aExtDocName) != nullptr);
ScExternalRefManager* pRefMgr = m_pDoc->GetExternalRefManager();
CPPUNIT_ASSERT_MESSAGE("external reference manager doesn't exist.", pRefMgr);
@@ -5374,7 +5374,7 @@ void Test::testExternalRefFunctions()
// Unload the external document shell.
xExtDocSh->DoClose();
CPPUNIT_ASSERT_MESSAGE("external document instance should have been unloaded.",
- findLoadedDocShellByName(aExtDocName) == NULL);
+ findLoadedDocShellByName(aExtDocName) == nullptr);
m_pDoc->DeleteTab(0);
}
@@ -5519,7 +5519,7 @@ void Test::testFuncFORMULA()
// Data in B1:D3
const char* aData[][3] = {
{ "=A1", "=FORMULA(B1)", "=FORMULA(B1:B3)" },
- { 0, "=FORMULA(B2)", "=FORMULA(B1:B3)" },
+ { nullptr, "=FORMULA(B2)", "=FORMULA(B1:B3)" },
{ "=A3", "=FORMULA(B3)", "=FORMULA(B1:B3)" },
};
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 53d1019d0edb..619af2b0b91e 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -116,7 +116,7 @@ ScDPObject* createDPFromSourceDesc(
eFunc = static_cast<sheet::GeneralFunction>(aFields[i].eFunc);
pDim->SetFunction(eFunc);
- pDim->SetReferenceValue(NULL);
+ pDim->SetReferenceValue(nullptr);
}
else
{
@@ -232,14 +232,14 @@ void Test::testPivotTable()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - Score", "Group", 0, 0, 0 },
+ { "Sum - Score", "Group", nullptr, nullptr, nullptr },
{ "Name", "A", "B", "C", "Total Result" },
- { "Andy", "30", 0, 0, "30" },
- { "Bruce", "20", 0, 0, "20" },
- { "Charlie", 0, "45", 0, "45" },
- { "David", 0, "12", 0, "12" },
- { "Edward", 0, 0, "8", "8" },
- { "Frank", 0, 0, "15", "15" },
+ { "Andy", "30", nullptr, nullptr, "30" },
+ { "Bruce", "20", nullptr, nullptr, "20" },
+ { "Charlie", nullptr, "45", nullptr, "45" },
+ { "David", nullptr, "12", nullptr, "12" },
+ { "Edward", nullptr, nullptr, "8", "8" },
+ { "Frank", nullptr, nullptr, "15", "15" },
{ "Total Result", "50", "57", "23", "130" }
};
@@ -270,14 +270,14 @@ void Test::testPivotTable()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - Score", "Group", 0, 0, 0 },
+ { "Sum - Score", "Group", nullptr, nullptr, nullptr },
{ "Name", "A", "B", "C", "Total Result" },
- { "Andy", "30", 0, 0, "30" },
- { "Bruce", "20", 0, 0, "20" },
- { "Charlie", 0, "45", 0, "45" },
- { "David", 0, "12", 0, "12" },
- { "Edward", 0, 0, "8", "8" },
- { "Frank", 0, 0, "15", "15" },
+ { "Andy", "30", nullptr, nullptr, "30" },
+ { "Bruce", "20", nullptr, nullptr, "20" },
+ { "Charlie", nullptr, "45", nullptr, "45" },
+ { "David", nullptr, "12", nullptr, "12" },
+ { "Edward", nullptr, nullptr, "8", "8" },
+ { "Frank", nullptr, nullptr, "15", "15" },
{ "Total Result", "50", "57", "23", "130" }
};
@@ -307,14 +307,14 @@ void Test::testPivotTable()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - Score", "Group", 0, 0, 0 },
+ { "Sum - Score", "Group", nullptr, nullptr, nullptr },
{ "Name", "A", "B", "C", "Total Result" },
- { "Andy", "100", 0, 0, "100" },
- { "Bruce", "200", 0, 0, "200" },
- { "Charlie", 0, "300", 0, "300" },
- { "David", 0, "400", 0, "400" },
- { "Edward", 0, 0, "500", "500" },
- { "Frank", 0, 0, "600", "600" },
+ { "Andy", "100", nullptr, nullptr, "100" },
+ { "Bruce", "200", nullptr, nullptr, "200" },
+ { "Charlie", nullptr, "300", nullptr, "300" },
+ { "David", nullptr, "400", nullptr, "400" },
+ { "Edward", nullptr, nullptr, "500", "500" },
+ { "Frank", nullptr, nullptr, "600", "600" },
{ "Total Result", "300", "700", "1100", "2100" }
};
@@ -408,7 +408,7 @@ void Test::testPivotTableLabels()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - 1.2.3", "Version", 0, 0, 0 },
+ { "Sum - 1.2.3", "Version", nullptr, nullptr, nullptr },
{ "Software", "3.3.0", "3.3.1", "3.4.0", "Total Result" },
{ "LibreOffice", "30", "20", "45", "95" },
{ "Total Result", "30", "20", "45", "95" }
@@ -464,11 +464,11 @@ void Test::testPivotTableDateLabels()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - Value", "Date", 0, 0, 0 },
+ { "Sum - Value", "Date", nullptr, nullptr, nullptr },
{ "Name", "2011-01-01", "2011-01-02", "2011-01-03", "Total Result" },
- { "Xavior", 0, 0, "45", "45" },
- { "Yodel", 0, "20", 0, "20" },
- { "Zena", "30", 0, 0, "30" },
+ { "Xavior", nullptr, nullptr, "45", "45" },
+ { "Yodel", nullptr, "20", nullptr, "20" },
+ { "Zena", "30", nullptr, nullptr, "30" },
{ "Total Result", "30", "20", "45", "95" }
};
@@ -547,10 +547,10 @@ void Test::testPivotTableFilters()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
- { "Filter", 0 },
+ { "Filter", nullptr },
{ "Group2", "- all -" },
- { 0, 0 },
- { "Data", 0 },
+ { nullptr, nullptr },
+ { "Data", nullptr },
{ "Sum - Val1", "8" },
{ "Sum - Val2", "80" }
};
@@ -581,10 +581,10 @@ void Test::testPivotTableFilters()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
- { "Filter", 0 },
+ { "Filter", nullptr },
{ "Group2", "A" },
- { 0, 0 },
- { "Data", 0 },
+ { nullptr, nullptr },
+ { "Data", nullptr },
{ "Sum - Val1", "4" },
{ "Sum - Val2", "40" }
};
@@ -610,10 +610,10 @@ void Test::testPivotTableFilters()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
- { "Filter", 0 },
+ { "Filter", nullptr },
{ "Group2", "A" },
- { 0, 0 },
- { "Data", 0 },
+ { nullptr, nullptr },
+ { "Data", nullptr },
{ "Sum - Val1", "2" },
{ "Sum - Val2", "20" }
};
@@ -627,16 +627,16 @@ void Test::testPivotTableFilters()
// Set the current page of 'Group2' back to '- all -'. The query filter
// should still be in effect.
- pPageDim->SetCurrentPage(NULL); // Remove the page.
+ pPageDim->SetCurrentPage(nullptr); // Remove the page.
pDPObj->SetSaveData(aSaveData);
aOutRange = refresh(pDPObj);
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
- { "Filter", 0 },
+ { "Filter", nullptr },
{ "Group2", "- all -" },
- { 0, 0 },
- { "Data", 0 },
+ { nullptr, nullptr },
+ { "Data", nullptr },
{ "Sum - Val1", "4" },
{ "Sum - Val2", "40" }
};
@@ -707,14 +707,14 @@ void Test::testPivotTableNamedSource()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][5] = {
- { "Sum - Score", "Group", 0, 0, 0 },
+ { "Sum - Score", "Group", nullptr, nullptr, nullptr },
{ "Name", "A", "B", "C", "Total Result" },
- { "Andy", "30", 0, 0, "30" },
- { "Bruce", "20", 0, 0, "20" },
- { "Charlie", 0, "45", 0, "45" },
- { "David", 0, "12", 0, "12" },
- { "Edward", 0, 0, "8", "8" },
- { "Frank", 0, 0, "15", "15" },
+ { "Andy", "30", nullptr, nullptr, "30" },
+ { "Bruce", "20", nullptr, nullptr, "20" },
+ { "Charlie", nullptr, "45", nullptr, "45" },
+ { "David", nullptr, "12", nullptr, "12" },
+ { "Edward", nullptr, nullptr, "8", "8" },
+ { "Frank", nullptr, nullptr, "15", "15" },
{ "Total Result", "50", "57", "23", "130" }
};
@@ -984,13 +984,13 @@ void Test::testPivotTableDuplicateDataFields()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][3] = {
- { "Name", "Data", 0 },
+ { "Name", "Data", nullptr },
{ "A", "Sum - Value", "144" },
- { 0, "Count - Value", "5" },
+ { nullptr, "Count - Value", "5" },
{ "B", "Sum - Value", "267" },
- { 0, "Count - Value", "5" },
- { "Total Sum - Value", 0, "411" },
- { "Total Count - Value", 0, "10" },
+ { nullptr, "Count - Value", "5" },
+ { "Total Sum - Value", nullptr, "411" },
+ { "Total Count - Value", nullptr, "10" },
};
bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output");
@@ -1010,7 +1010,7 @@ void Test::testPivotTableDuplicateDataFields()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][3] = {
- { 0, "Data", 0 },
+ { nullptr, "Data", nullptr },
{ "Name", "Sum - Value", "Count - Value" },
{ "A", "144", "5" },
{ "B", "267", "5" },
@@ -1100,7 +1100,7 @@ void Test::testPivotTableNormalGrouping()
OUString aGroupPrefix("Group");
OUString aBaseDimName("Name");
OUString aGroupDimName =
- pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, NULL);
+ pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, nullptr);
{
// Group A, B and C together.
@@ -1131,9 +1131,9 @@ void Test::testPivotTableNormalGrouping()
{ "F", "F", "6" },
{ "G", "G", "7" },
{ "Group1", "A", "1" },
- { 0, "B", "2" },
- { 0, "C", "3" },
- { "Total Result", 0, "28" }
+ { nullptr, "B", "2" },
+ { nullptr, "C", "3" },
+ { "Total Result", nullptr, "28" }
};
bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "A, B, C grouped by Group1.");
@@ -1165,12 +1165,12 @@ void Test::testPivotTableNormalGrouping()
{ "Name2", "Name", "Sum - Value" },
{ "G", "G", "7" },
{ "Group1", "A", "1" },
- { 0, "B", "2" },
- { 0, "C", "3" },
+ { nullptr, "B", "2" },
+ { nullptr, "C", "3" },
{ "Group2", "D", "4" },
- { 0, "E", "5" },
- { 0, "F", "6" },
- { "Total Result", 0, "28" }
+ { nullptr, "E", "5" },
+ { nullptr, "F", "6" },
+ { "Total Result", nullptr, "28" }
};
bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "D, E, F grouped by Group2.");
@@ -1343,7 +1343,7 @@ void Test::testPivotTableDateGrouping()
// Add quarter dimension. This will be an additional dimension.
OUString aGroupDimName =
pDimData->CreateDateGroupDimName(
- sheet::DataPilotFieldGroupBy::QUARTERS, *pDPObj, true, NULL);
+ sheet::DataPilotFieldGroupBy::QUARTERS, *pDPObj, true, nullptr);
ScDPSaveGroupDimension aGroupDim(aBaseDimName, aGroupDimName);
aGroupDim.SetDateInfo(aInfo, sheet::DataPilotFieldGroupBy::QUARTERS);
pDimData->AddGroupDimension(aGroupDim);
@@ -1358,7 +1358,7 @@ void Test::testPivotTableDateGrouping()
// Add year dimension. This is a new dimension also.
OUString aGroupDimName =
pDimData->CreateDateGroupDimName(
- sheet::DataPilotFieldGroupBy::YEARS, *pDPObj, true, NULL);
+ sheet::DataPilotFieldGroupBy::YEARS, *pDPObj, true, nullptr);
ScDPSaveGroupDimension aGroupDim(aBaseDimName, aGroupDimName);
aGroupDim.SetDateInfo(aInfo, sheet::DataPilotFieldGroupBy::YEARS);
pDimData->AddGroupDimension(aGroupDim);
@@ -1376,13 +1376,13 @@ void Test::testPivotTableDateGrouping()
const char* aOutputCheck[][4] = {
{ "Years", "Quarters", "Date", "Sum - Value" },
{ "2011", "Q1", "Jan", "1" },
- { 0, 0, "Mar", "2" },
- { 0, "Q3", "Sep", "7" },
+ { nullptr, nullptr, "Mar", "2" },
+ { nullptr, "Q3", "Sep", "7" },
{ "2012", "Q1", "Jan", "3" },
- { 0, 0, "Feb", "9" },
- { 0, 0, "Mar", "6" },
- { 0, "Q4", "Dec", "8" },
- { "Total Result", 0, 0, "36" },
+ { nullptr, nullptr, "Feb", "9" },
+ { nullptr, nullptr, "Mar", "6" },
+ { nullptr, "Q4", "Dec", "8" },
+ { "Total Result", nullptr, nullptr, "36" },
};
bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Years, quarters and months date groups.");
@@ -1408,9 +1408,9 @@ void Test::testPivotTableDateGrouping()
const char* aOutputCheck[][4] = {
{ "Years", "Quarters", "Date", "Sum - Value" },
{ "2011", "Q1", "Jan", "1" },
- { 0, 0, "Mar", "2" },
- { 0, "Q3", "Sep", "7" },
- { "Total Result", 0, 0, "10" },
+ { nullptr, nullptr, "Mar", "2" },
+ { nullptr, "Q3", "Sep", "7" },
+ { "Total Result", nullptr, nullptr, "10" },
};
bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Year 2012 data now hidden");
@@ -1503,7 +1503,7 @@ void Test::testPivotTableEmptyRows()
{ "B", "2" },
{ "C", "3" },
{ "D", "4" },
- { "(empty)", 0 },
+ { "(empty)", nullptr },
{ "Total Result", "10" },
};
@@ -1654,9 +1654,9 @@ void Test::testPivotTableTextNumber()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "Name", "0004" },
- { 0, 0 },
- { "Sum - Value", 0 },
- { "4", 0 }
+ { nullptr, nullptr },
+ { "Sum - Value", nullptr },
+ { "4", nullptr }
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members");
@@ -1901,11 +1901,11 @@ void Test::testPivotTableFieldReference()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "Name", "Sum - Value" },
- { "A", 0 },
+ { "A", nullptr },
{ "B", "1" },
{ "C", "3" },
{ "D", "7" },
- { "Total Result", 0 },
+ { "Total Result", nullptr },
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (difference from)");
@@ -1925,7 +1925,7 @@ void Test::testPivotTableFieldReference()
{ "B", "200.00%" },
{ "C", "400.00%" },
{ "D", "800.00%" },
- { "Total Result", 0 },
+ { "Total Result", nullptr },
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% of)");
@@ -1941,11 +1941,11 @@ void Test::testPivotTableFieldReference()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "Name", "Sum - Value" },
- { "A", 0 },
+ { "A", nullptr },
{ "B", "100.00%" },
{ "C", "300.00%" },
{ "D", "700.00%" },
- { "Total Result", 0 },
+ { "Total Result", nullptr },
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% difference from)");
@@ -1965,7 +1965,7 @@ void Test::testPivotTableFieldReference()
{ "B", "3" },
{ "C", "7" },
{ "D", "15" },
- { "Total Result", 0 },
+ { "Total Result", nullptr },
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (Running total)");
@@ -2089,7 +2089,7 @@ void Test::testFuncGETPIVOTDATA()
ScRange aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
- ScDPObject* pDPObj = NULL;
+ ScDPObject* pDPObj = nullptr;
{
// Dimension definition
@@ -2172,13 +2172,13 @@ void Test::testFuncGETPIVOTDATA()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][3] = {
- { "Name", "Data", 0 },
+ { "Name", "Data", nullptr },
{ "A", "Sum - Value", "6" },
- { 0, "Count - Value", "3" },
+ { nullptr, "Count - Value", "3" },
{ "B", "Sum - Value", "15" },
- { 0, "Count - Value", "3" },
- { "Total Sum - Value", 0, "21" },
- { "Total Count - Value", 0, "6" },
+ { nullptr, "Count - Value", "3" },
+ { "Total Sum - Value", nullptr, "21" },
+ { "Total Count - Value", nullptr, "6" },
};
bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed");
@@ -2248,7 +2248,7 @@ void Test::testFuncGETPIVOTDATALeafAccess()
ScRange aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
- ScDPObject* pDPObj = NULL;
+ ScDPObject* pDPObj = nullptr;
// Dimension definition
DPFieldDef aFields[] = {
@@ -2274,10 +2274,10 @@ void Test::testFuncGETPIVOTDATALeafAccess()
const char* aOutputCheck[][3] = {
{ "Type", "Member", "Sum - Value" },
{ "A", "Anna", "1" },
- { 0, "Cecilia", "3" },
+ { nullptr, "Cecilia", "3" },
{ "B", "Brittany", "2" },
- { 0, "Donna", "4" },
- { "Total Result", 0, "10" },
+ { nullptr, "Donna", "4" },
+ { "Total Result", nullptr, "10" },
};
bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed");
@@ -2376,14 +2376,14 @@ void Test::testPivotTableRepeatItemLabels()
const char* aOutputCheck[][4] = {
{ "Name", "Country", "Year", "Sum - Score" },
{ "Andy", "US", "1999", "30" },
- { "Andy", 0, "2002", "20" },
- { "Andy", 0, "2010", "45" },
+ { "Andy", nullptr, "2002", "20" },
+ { "Andy", nullptr, "2010", "45" },
{ "David", "GB", "1998", "12" },
{ "Edward", "NO", "2000", "8" },
{ "Frank", "FR", "2007", "45" },
- { "Frank", 0, "2008", "45" },
- { "Frank", 0, "2009", "15" },
- { "Total Result", 0, 0, "220" }
+ { "Frank", nullptr, "2008", "45" },
+ { "Frank", nullptr, "2009", "15" },
+ { "Total Result", nullptr, nullptr, "220" }
};
bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output");
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 8d70e4defd2d..656bce67b436 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -613,7 +613,7 @@ void Test::testSharedFormulasRefUpdateRangeDeleteRow()
const char* aData[][3] = {
{ "1", "2", "=SUM(A1:B1)" },
{ "3", "4", "=SUM(A2:B2)" },
- { 0, 0, 0 },
+ { nullptr, nullptr, nullptr },
{ "5", "6", "=SUM(A4:B4)" },
{ "7", "8", "=SUM(A5:B5)" }
};
@@ -1712,7 +1712,7 @@ void Test::testSharedFormulaUnshareAreaListeners()
{ "=SUM(B1:B2)", "1" },
{ "=SUM(B2:B3)", "2" },
{ "=SUM(B3:B4)", "4" },
- { 0, "8" }
+ { nullptr, "8" }
};
insertRangeData(m_pDoc, ScAddress(0,0,0), pData, SAL_N_ELEMENTS(pData));
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index 8e183fff2f20..bb8151d24d07 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -61,7 +61,7 @@ void Test::testSort()
aSortData.maKeyState[0].nField = 1;
aSortData.maKeyState[0].bAscending = true;
- m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
double nVal = m_pDoc->GetValue(1,0,0);
ASSERT_DOUBLES_EQUAL(nVal, 1.0);
@@ -75,8 +75,8 @@ void Test::testSort()
// 0 = empty cell
const char* aData[][1] = {
{ "Title" },
- { 0 },
- { 0 },
+ { nullptr },
+ { nullptr },
{ "12" },
{ "b" },
{ "1" },
@@ -94,7 +94,7 @@ void Test::testSort()
aSortData.nRow2 = aDataRange.aEnd.Row();
aSortData.bHasHeader = true;
aSortData.maKeyState[0].nField = 0;
- m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
// Title should stay at the top, numbers should be sorted numerically,
// numbers always come before strings, and empty cells always occur at the
@@ -411,7 +411,7 @@ void Test::testSortWithFormulaRefs()
aSortData.maKeyState[0].bDoSort = true;
aSortData.maKeyState[0].nField = 0;
- m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
for (size_t i = 0; i < SAL_N_ELEMENTS(aResults); ++i)
{
@@ -446,7 +446,7 @@ void Test::testSortWithStrings()
aParam.maKeyState[0].bAscending = true;
aParam.maKeyState[0].nField = 1;
- m_pDoc->Sort(0, aParam, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aParam, false, true, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
CPPUNIT_ASSERT_EQUAL(OUString("Val1"), m_pDoc->GetString(ScAddress(1,2,0)));
@@ -454,7 +454,7 @@ void Test::testSortWithStrings()
aParam.maKeyState[0].bAscending = false;
- m_pDoc->Sort(0, aParam, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aParam, false, true, nullptr, nullptr);
CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(1,1,0)));
CPPUNIT_ASSERT_EQUAL(OUString("Val2"), m_pDoc->GetString(ScAddress(1,2,0)));
@@ -499,7 +499,7 @@ void Test::testSortInFormulaGroup()
aSortData.maKeyState[0].nField = 0;
aSortData.maKeyState[0].bAscending = true;
- m_pDoc->Sort(0, aSortData, false, true, NULL, NULL);
+ m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
static struct {
SCCOL nCol;
@@ -543,7 +543,7 @@ void Test::testSortWithCellFormats()
return false;
}
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (!pPat->GetItemSet().HasItem(ATTR_FONT_WEIGHT, &pItem))
{
cerr << "Pattern does not have a font weight item, but it should." << endl;
@@ -569,7 +569,7 @@ void Test::testSortWithCellFormats()
return false;
}
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (!pPat->GetItemSet().HasItem(ATTR_FONT_POSTURE, &pItem))
{
cerr << "Pattern does not have a font posture item, but it should." << endl;
@@ -595,7 +595,7 @@ void Test::testSortWithCellFormats()
return false;
}
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (pPat->GetItemSet().HasItem(ATTR_FONT_WEIGHT, &pItem))
{
// Check if the font weight is applied.
@@ -864,7 +864,7 @@ void Test::testSortRefUpdate2()
{ "2", "=RC[-1]" },
{ "6", "=RC[-1]" },
{ "4", "=RC[-1]" },
- { 0, 0 } // terminator
+ { nullptr, nullptr } // terminator
};
for (SCROW i = 0; aData[i][0]; ++i)
@@ -951,7 +951,7 @@ void Test::testSortRefUpdate3()
"2",
"=A4+10",
"=A2+A4",
- 0 // terminator
+ nullptr // terminator
};
for (SCROW i = 0; pData[i]; ++i)
@@ -1491,8 +1491,8 @@ void Test::testSortBroadcaster()
{
const char* aData[][7] = {
- { "1", 0, 0, "=B1", "=$B$1", "=SUM(A1:B1)", "=SUM($A$1:$B$1)" },
- { "2", "8", 0, "=B2", "=$B$2", "=SUM(A2:B2)", "=SUM($A$2:$B$2)" },
+ { "1", nullptr, nullptr, "=B1", "=$B$1", "=SUM(A1:B1)", "=SUM($A$1:$B$1)" },
+ { "2", "8", nullptr, "=B2", "=$B$2", "=SUM(A2:B2)", "=SUM($A$2:$B$2)" },
};
ScAddress aPos(0,0,0);
@@ -1502,8 +1502,8 @@ void Test::testSortBroadcaster()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][7] = {
- { "1", 0, 0, "0", "0", "1", "1" },
- { "2", "8", 0, "8", "8", "10", "10" },
+ { "1", nullptr, nullptr, "0", "0", "1", "1" },
+ { "2", "8", nullptr, "8", "8", "10", "10" },
};
bool bSuccess = checkOutput<7>(m_pDoc, aDataRange, aOutputCheck, "Initial value");
@@ -1533,8 +1533,8 @@ void Test::testSortBroadcaster()
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][7] = {
- { "2", "8", 0, "8", "8", "10", "10" },
- { "1", 0, 0, "0", "0", "1", "1" },
+ { "2", "8", nullptr, "8", "8", "10", "10" },
+ { "1", nullptr, nullptr, "0", "0", "1", "1" },
};
bool bSuccess = checkOutput<7>(m_pDoc, aDataRange, aOutputCheck, "Sorted without reference update");
@@ -1587,8 +1587,8 @@ void Test::testSortBroadcaster()
{
const char* aData[][2] = {
{ "1", "2" },
- { 0, "8" },
- { 0, 0 },
+ { nullptr, "8" },
+ { nullptr, nullptr },
{ "=A6", "=B6" },
{ "=$A$6", "=$B$6" },
{ "=SUM(A5:A6)", "=SUM(B5:B6)" },
@@ -1603,8 +1603,8 @@ void Test::testSortBroadcaster()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "1", "2" },
- { 0, "8" },
- { 0, 0 },
+ { nullptr, "8" },
+ { nullptr, nullptr },
{ "0", "8" },
{ "0", "8" },
{ "1", "10" },
@@ -1639,8 +1639,8 @@ void Test::testSortBroadcaster()
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "2", "1" },
- { "8", 0 },
- { 0, 0 },
+ { "8", nullptr },
+ { nullptr, nullptr },
{ "8", "0" },
{ "8", "0" },
{ "10", "1" },
@@ -1707,7 +1707,7 @@ void Test::testSortOutOfPlaceResult()
"2",
"9",
"-2",
- 0 // terminator
+ nullptr // terminator
};
// source data in A1:A6.
@@ -1781,7 +1781,7 @@ void Test::testSortPartialFormulaGroup()
{ "8", "=RC[-1]" },
{ "47", "=RC[-1]" },
{ "28", "=RC[-1]" },
- { 0, 0 } // terminator
+ { nullptr, nullptr } // terminator
};
// A1:B6.
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 0701254e1249..8d91cc7c99a3 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -148,7 +148,7 @@ bool ScAttrArray::Concat(SCSIZE nPos)
pData[nPos - 1].nRow = pData[nPos].nRow;
pDocument->GetPool()->Remove(*pData[nPos].pPattern);
memmove(&pData[nPos], &pData[nPos + 1], (nCount - nPos - 1) * sizeof(ScAttrEntry));
- pData[nCount - 1].pPattern = NULL;
+ pData[nCount - 1].pPattern = nullptr;
pData[nCount - 1].nRow = 0;
nCount--;
nPos--;
@@ -162,7 +162,7 @@ bool ScAttrArray::Concat(SCSIZE nPos)
pData[nPos].nRow = pData[nPos + 1].nRow;
pDocument->GetPool()->Remove(*pData[nPos].pPattern);
memmove(&pData[nPos + 1], &pData[nPos + 2], (nCount - nPos - 2) * sizeof(ScAttrEntry));
- pData[nCount - 1].pPattern = NULL;
+ pData[nCount - 1].pPattern = nullptr;
pData[nCount - 1].nRow = 0;
nCount--;
bRet = true;
@@ -209,7 +209,7 @@ const ScPatternAttr* ScAttrArray::GetPattern( SCROW nRow ) const
if (Search( nRow, i ))
return pData[i].pPattern;
else
- return NULL;
+ return nullptr;
}
const ScPatternAttr* ScAttrArray::GetPatternRange( SCROW& rStartRow,
@@ -225,7 +225,7 @@ const ScPatternAttr* ScAttrArray::GetPatternRange( SCROW& rStartRow,
rEndRow = pData[nIndex].nRow;
return pData[nIndex].pPattern;
}
- return NULL;
+ return nullptr;
}
void ScAttrArray::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
@@ -252,7 +252,7 @@ void ScAttrArray::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nInd
GetPatternRange( nPatternStartRow, nPatternEndRow, nTempStartRow );
nTempEndRow = std::min<SCROW>( nPatternEndRow, nEndRow );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pItem );
std::vector< sal_uInt32 > aCondFormatData;
if(pItem)
@@ -302,7 +302,7 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
GetPatternRange( nPatternStartRow, nPatternEndRow, nTempStartRow );
nTempEndRow = std::min<SCROW>( nPatternEndRow, nEndRow );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pItem );
if(pItem)
{
@@ -347,7 +347,7 @@ void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
if (aCell.meType != CELLTYPE_EDIT || !aCell.mpEditText)
continue;
- EditTextObject* pOldData = NULL;
+ EditTextObject* pOldData = nullptr;
if (pDataArray)
pOldData = aCell.mpEditText->Clone();
@@ -670,11 +670,11 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
{
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
- const SfxPoolItem* pBoxItem = 0;
+ const SfxPoolItem* pBoxItem = nullptr;
SfxItemState eState = rOldSet.GetItemState( ATTR_BORDER, true, &pBoxItem );
- const SfxPoolItem* pTLBRItem = 0;
+ const SfxPoolItem* pTLBRItem = nullptr;
SfxItemState eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, true, &pTLBRItem );
- const SfxPoolItem* pBLTRItem = 0;
+ const SfxPoolItem* pBLTRItem = nullptr;
SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem );
if ( (SfxItemState::SET == eState) || (SfxItemState::SET == eTLBRState) || (SfxItemState::SET == eBLTRState) )
@@ -684,9 +684,9 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
SCROW nY1 = nStart;
SCROW nY2 = pData[nPos].nRow;
- SvxBoxItem* pNewBoxItem = pBoxItem ? static_cast<SvxBoxItem*>(pBoxItem->Clone()) : 0;
- SvxLineItem* pNewTLBRItem = pTLBRItem ? static_cast<SvxLineItem*>(pTLBRItem->Clone()) : 0;
- SvxLineItem* pNewBLTRItem = pBLTRItem ? static_cast<SvxLineItem*>(pBLTRItem->Clone()) : 0;
+ SvxBoxItem* pNewBoxItem = pBoxItem ? static_cast<SvxBoxItem*>(pBoxItem->Clone()) : nullptr;
+ SvxLineItem* pNewTLBRItem = pTLBRItem ? static_cast<SvxLineItem*>(pTLBRItem->Clone()) : nullptr;
+ SvxLineItem* pNewBLTRItem = pBLTRItem ? static_cast<SvxLineItem*>(pBLTRItem->Clone()) : nullptr;
// fetch line and update attributes with parameters
@@ -694,15 +694,15 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
{
if( pNewBoxItem )
{
- if ( pNewBoxItem->GetTop() ) pNewBoxItem->SetLine( NULL, SvxBoxItemLine::TOP );
- if ( pNewBoxItem->GetBottom() ) pNewBoxItem->SetLine( NULL, SvxBoxItemLine::BOTTOM );
- if ( pNewBoxItem->GetLeft() ) pNewBoxItem->SetLine( NULL, SvxBoxItemLine::LEFT );
- if ( pNewBoxItem->GetRight() ) pNewBoxItem->SetLine( NULL, SvxBoxItemLine::RIGHT );
+ if ( pNewBoxItem->GetTop() ) pNewBoxItem->SetLine( nullptr, SvxBoxItemLine::TOP );
+ if ( pNewBoxItem->GetBottom() ) pNewBoxItem->SetLine( nullptr, SvxBoxItemLine::BOTTOM );
+ if ( pNewBoxItem->GetLeft() ) pNewBoxItem->SetLine( nullptr, SvxBoxItemLine::LEFT );
+ if ( pNewBoxItem->GetRight() ) pNewBoxItem->SetLine( nullptr, SvxBoxItemLine::RIGHT );
}
if( pNewTLBRItem && pNewTLBRItem->GetLine() )
- pNewTLBRItem->SetLine( 0 );
+ pNewTLBRItem->SetLine( nullptr );
if( pNewBLTRItem && pNewBLTRItem->GetLine() )
- pNewBLTRItem->SetLine( 0 );
+ pNewBLTRItem->SetLine( nullptr );
}
else
{
@@ -980,7 +980,7 @@ static bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pN
}
rModified = SC_LINE_DONTCARE;
- rpNew = NULL;
+ rpNew = nullptr;
return true; // another line -> don't care
}
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 9adee79936d9..9e4c1029efe8 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -446,7 +446,7 @@ ScTableListItem::ScTableListItem( const ScTableListItem& rCpy )
pTabArr[i] = rCpy.pTabArr[i];
}
else
- pTabArr = NULL;
+ pTabArr = nullptr;
}
ScTableListItem::~ScTableListItem()
@@ -465,7 +465,7 @@ ScTableListItem& ScTableListItem::operator=( const ScTableListItem& rCpy )
pTabArr[i] = rCpy.pTabArr[i];
}
else
- pTabArr = NULL;
+ pTabArr = nullptr;
nCount = rCpy.nCount;
@@ -542,17 +542,17 @@ bool ScTableListItem::GetPresentation
*/
ScPageHFItem::ScPageHFItem( sal_uInt16 nWhichP )
: SfxPoolItem ( nWhichP ),
- pLeftArea ( NULL ),
- pCenterArea ( NULL ),
- pRightArea ( NULL )
+ pLeftArea ( nullptr ),
+ pCenterArea ( nullptr ),
+ pRightArea ( nullptr )
{
}
ScPageHFItem::ScPageHFItem( const ScPageHFItem& rItem )
: SfxPoolItem ( rItem ),
- pLeftArea ( NULL ),
- pCenterArea ( NULL ),
- pRightArea ( NULL )
+ pLeftArea ( nullptr ),
+ pCenterArea ( nullptr ),
+ pRightArea ( nullptr )
{
if ( rItem.pLeftArea )
pLeftArea = rItem.pLeftArea->Clone();
@@ -592,15 +592,15 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
{
const EditTextObject* pImpLeft = pImp->GetLeftEditObject();
delete pLeftArea;
- pLeftArea = pImpLeft ? pImpLeft->Clone() : NULL;
+ pLeftArea = pImpLeft ? pImpLeft->Clone() : nullptr;
const EditTextObject* pImpCenter = pImp->GetCenterEditObject();
delete pCenterArea;
- pCenterArea = pImpCenter ? pImpCenter->Clone() : NULL;
+ pCenterArea = pImpCenter ? pImpCenter->Clone() : nullptr;
const EditTextObject* pImpRight = pImp->GetRightEditObject();
delete pRightArea;
- pRightArea = pImpRight ? pImpRight->Clone() : NULL;
+ pRightArea = pImpRight ? pImpRight->Clone() : nullptr;
if ( !pLeftArea || !pCenterArea || !pRightArea )
{
@@ -709,25 +709,25 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
OSL_ENSURE( pLeft && pCenter && pRight, "Error reading ScPageHFItem" );
- if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 ||
- pCenter == NULL || pCenter->GetParagraphCount() == 0 ||
- pRight == NULL || pRight->GetParagraphCount() == 0 )
+ if ( pLeft == nullptr || pLeft->GetParagraphCount() == 0 ||
+ pCenter == nullptr || pCenter->GetParagraphCount() == 0 ||
+ pRight == nullptr || pRight->GetParagraphCount() == 0 )
{
// If successfully loaded, each object contains at least one paragraph.
// Excel import in 5.1 created broken TextObjects (#67442#) that are
// corrected here to avoid saving wrong files again (#90487#).
ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
- if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 )
+ if ( pLeft == nullptr || pLeft->GetParagraphCount() == 0 )
{
delete pLeft;
pLeft = aEngine.CreateTextObject();
}
- if ( pCenter == NULL || pCenter->GetParagraphCount() == 0 )
+ if ( pCenter == nullptr || pCenter->GetParagraphCount() == 0 )
{
delete pCenter;
pCenter = aEngine.CreateTextObject();
}
- if ( pRight == NULL || pRight->GetParagraphCount() == 0 )
+ if ( pRight == nullptr || pRight->GetParagraphCount() == 0 )
{
delete pRight;
pRight = aEngine.CreateTextObject();
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 41814d9e2ee5..feee464648b9 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -134,7 +134,7 @@ static SCSIZE nBcaSlots = initSlotDistribution( aSlotDistribution, nBcaSlotsRow)
#endif
ScBroadcastArea::ScBroadcastArea( const ScRange& rRange ) :
- pUpdateChainNext(NULL),
+ pUpdateChainNext(nullptr),
aRange(rRange),
nRefCount(0),
mbInUpdateChain(false),
@@ -216,7 +216,7 @@ bool ScBroadcastAreaSlot::StartListeningArea(
{
OSL_FAIL("StartListeningArea: area not found and not inserted in slot?!?");
delete rpArea;
- rpArea = 0;
+ rpArea = nullptr;
}
}
if (rpArea)
@@ -255,7 +255,7 @@ void ScBroadcastAreaSlot::EndListeningArea(
if ( !rpArea->GetBroadcaster().HasListeners() )
{ // if nobody is listening we can dispose it
if (rpArea->GetRef() == 1)
- rpArea = NULL; // will be deleted by erase
+ rpArea = nullptr; // will be deleted by erase
EraseArea( aIter);
}
}
@@ -268,7 +268,7 @@ void ScBroadcastAreaSlot::EndListeningArea(
return;
OSL_ENSURE( (*aIter).mpArea == rpArea, "EndListeningArea: area pointer mismatch");
if (rpArea->GetRef() == 1)
- rpArea = NULL; // will be deleted by erase
+ rpArea = nullptr; // will be deleted by erase
EraseArea( aIter);
}
}
@@ -673,10 +673,10 @@ ScBroadcastAreaSlotMachine::TableSlots::~TableSlots()
ScBroadcastAreaSlotMachine::ScBroadcastAreaSlotMachine(
ScDocument* pDocument ) :
- pBCAlways( NULL ),
+ pBCAlways( nullptr ),
pDoc( pDocument ),
- pUpdateChain( NULL ),
- pEOUpdateChain( NULL ),
+ pUpdateChain( nullptr ),
+ pEOUpdateChain( nullptr ),
nInBulkBroadcast( 0 )
{
}
@@ -770,7 +770,7 @@ void ScBroadcastAreaSlotMachine::StartListeningArea(
SCSIZE nOff = nStart;
SCSIZE nBreak = nOff + nRowBreak;
ScBroadcastAreaSlot** pp = ppSlots + nOff;
- ScBroadcastArea* pArea = NULL;
+ ScBroadcastArea* pArea = nullptr;
while ( !bDone && nOff <= nEnd )
{
if ( !*pp )
@@ -803,7 +803,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea(
if (!pBCAlways->HasListeners())
{
delete pBCAlways;
- pBCAlways = NULL;
+ pBCAlways = nullptr;
}
}
}
@@ -819,7 +819,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea(
SCSIZE nOff = nStart;
SCSIZE nBreak = nOff + nRowBreak;
ScBroadcastAreaSlot** pp = ppSlots + nOff;
- ScBroadcastArea* pArea = NULL;
+ ScBroadcastArea* pArea = nullptr;
if (nOff == 0 && nEnd == nBcaSlots-1)
{
// Slightly optimized for 0,0,MAXCOL,MAXROW calls as they
@@ -1095,7 +1095,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
}
// unchain
- pArea->SetUpdateChainNext( NULL );
+ pArea->SetUpdateChainNext( nullptr );
pArea->SetInUpdateChain( false );
// Delete if not inserted to any slot. RemoveBulkArea(pArea) was
@@ -1103,7 +1103,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
if (!pArea->GetRef())
delete pArea;
}
- pEOUpdateChain = NULL;
+ pEOUpdateChain = nullptr;
}
void ScBroadcastAreaSlotMachine::EnterBulkBroadcast()
@@ -1147,7 +1147,7 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
if (maBulkGroupAreas.empty())
return;
- sc::BulkDataHint aHint(*pDoc, NULL);
+ sc::BulkDataHint aHint(*pDoc, nullptr);
bool bBroadcasted = false;
BulkGroupAreasType::iterator it = maBulkGroupAreas.begin(), itEnd = maBulkGroupAreas.end();
diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx
index 63ebd96e90dc..ca319ee6e4ce 100644
--- a/sc/source/core/data/cellvalues.cxx
+++ b/sc/source/core/data/cellvalues.cxx
@@ -293,17 +293,17 @@ struct TableValues::Impl
{
if (nTab < maRange.aStart.Tab() || maRange.aEnd.Tab() < nTab)
// sheet index out of bound.
- return NULL;
+ return nullptr;
if (nCol < maRange.aStart.Col() || maRange.aEnd.Col() < nCol)
// column index out of bound.
- return NULL;
+ return nullptr;
size_t nTabOffset = nTab - maRange.aStart.Tab();
if (nTabOffset >= m_Tables.size())
- return NULL;
+ return nullptr;
std::unique_ptr<TableType>& rTab2 = m_Tables[nTab-maRange.aStart.Tab()];
size_t nColOffset = nCol - maRange.aStart.Col();
if(nColOffset >= rTab2.get()->size())
- return NULL;
+ return nullptr;
return &rTab2.get()[0][nColOffset].get()[0];
}
};
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index 25479d572d7f..b0ac3019c67c 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -40,7 +40,7 @@ CopyFromClipContext::CopyFromClipContext(ScDocument& rDoc,
mrDestDoc(rDoc),
mpRefUndoDoc(pRefUndoDoc), mpClipDoc(pClipDoc),
mnInsertFlag(nInsertFlag), mnDeleteFlag(InsertDeleteFlags::NONE),
- mpCondFormatList(NULL),
+ mpCondFormatList(nullptr),
mbAsLink(bAsLink), mbSkipAttrForEmptyCells(bSkipAttrForEmptyCells),
mbCloneNotes (mnInsertFlag & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES)),
mbTableProtected(false)
@@ -114,8 +114,8 @@ void CopyFromClipContext::setSingleCellColumnSize( size_t nSize )
{
maSingleCells.resize(nSize);
maSingleCellAttrs.resize(nSize);
- maSinglePatterns.resize(nSize, NULL);
- maSingleNotes.resize(nSize, NULL);
+ maSinglePatterns.resize(nSize, nullptr);
+ maSingleNotes.resize(nSize, nullptr);
}
ScCellValue& CopyFromClipContext::getSingleCell( size_t nColOffset )
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 74e4e334c362..50cecc21e43a 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -50,7 +50,7 @@ void ScFormulaListener::startListening(ScTokenArray* pArr, const ScAddress& rPos
{
pArr->Reset();
formula::FormulaToken* t;
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
{
switch (t->GetType())
{
@@ -202,7 +202,7 @@ const ScTokenArray* ScColorScaleEntry::GetFormula() const
return mpCell->GetCode();
}
- return NULL;
+ return nullptr;
}
OUString ScColorScaleEntry::GetFormula( formula::FormulaGrammar::Grammar eGrammar ) const
@@ -288,7 +288,7 @@ void ScColorScaleEntry::SetColor(const Color& rColor)
ScColorFormat::ScColorFormat(ScDocument* pDoc)
: ScFormatEntry(pDoc)
- , mpParent(NULL)
+ , mpParent(nullptr)
{
}
@@ -533,20 +533,20 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
{
CellType eCellType = mpDoc->GetCellType(rAddr);
if(eCellType != CELLTYPE_VALUE && eCellType != CELLTYPE_FORMULA)
- return NULL;
+ return nullptr;
if (eCellType == CELLTYPE_FORMULA)
{
ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
if (!pCell || !pCell->IsValue())
- return NULL;
+ return nullptr;
}
// now we have for sure a value
double nVal = mpDoc->GetValue(rAddr);
if (maColorScales.size() < 2)
- return NULL;
+ return nullptr;
double nMin = std::numeric_limits<double>::max();
double nMax = std::numeric_limits<double>::min();
@@ -554,7 +554,7 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
// this check is for safety
if(nMin >= nMax)
- return NULL;
+ return nullptr;
ScColorScaleEntries::const_iterator itr = begin();
double nValMin = CalcValue(nMin, nMax, itr);
@@ -643,7 +643,7 @@ ScColorScaleEntries::const_iterator ScColorScaleFormat::end() const
ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos)
{
if (maColorScales.size() <= nPos)
- return NULL;
+ return nullptr;
return maColorScales[nPos].get();
}
@@ -651,7 +651,7 @@ ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos)
const ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos) const
{
if (maColorScales.size() <= nPos)
- return NULL;
+ return nullptr;
return maColorScales[nPos].get();
}
@@ -790,13 +790,13 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const
{
CellType eCellType = mpDoc->GetCellType(rAddr);
if(eCellType != CELLTYPE_VALUE && eCellType != CELLTYPE_FORMULA)
- return NULL;
+ return nullptr;
if (eCellType == CELLTYPE_FORMULA)
{
ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
if (!pCell || !pCell->IsValue())
- return NULL;
+ return nullptr;
}
// now we have for sure a value
@@ -976,27 +976,27 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
{
CellType eCellType = mpDoc->GetCellType(rAddr);
if(eCellType != CELLTYPE_VALUE && eCellType != CELLTYPE_FORMULA)
- return NULL;
+ return nullptr;
if (eCellType == CELLTYPE_FORMULA)
{
ScFormulaCell *pCell = mpDoc->GetFormulaCell(rAddr);
if (!pCell || !pCell->IsValue())
- return NULL;
+ return nullptr;
}
// now we have for sure a value
double nVal = mpDoc->GetValue(rAddr);
if (mpFormatData->m_Entries.size() < 2)
- return NULL;
+ return nullptr;
double nMin = GetMinValue();
double nMax = GetMaxValue();
// this check is for safety
if(nMin > nMax)
- return NULL;
+ return nullptr;
sal_Int32 nIndex = 0;
const_iterator itr = begin();
@@ -1028,7 +1028,7 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
if (nCustomIndex == -1)
{
delete pInfo;
- return NULL;
+ return nullptr;
}
pInfo->eIconSetType = eCustomType;
@@ -1190,7 +1190,7 @@ ScIconSetMap aIconSetMap[] = {
{ "5Rating", IconSet_5Ratings, 5 },
{ "5Quarters", IconSet_5Quarters, 5 },
{ "5Boxes", IconSet_5Boxes, 5 },
- { NULL, IconSet_3Arrows, 0 }
+ { nullptr, IconSet_3Arrows, 0 }
};
}
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 7bb8d77f5ae3..064e3b3cc59b 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -76,7 +76,7 @@ inline bool IsAmbiguousScriptNonZero( SvtScriptType nScript )
}
ScNeededSizeOptions::ScNeededSizeOptions() :
- pPattern(NULL), bFormula(false), bSkipMerged(true), bGetFont(true), bTotalSize(false)
+ pPattern(nullptr), bFormula(false), bSkipMerged(true), bGetFont(true), bTotalSize(false)
{
}
@@ -87,8 +87,8 @@ ScColumn::ScColumn() :
maCells(MAXROWCOUNT),
nCol( 0 ),
nTab( 0 ),
- pAttrArray( NULL ),
- pDocument( NULL ),
+ pAttrArray( nullptr ),
+ pDocument( nullptr ),
mbDirtyGroups(true)
{
}
@@ -380,14 +380,14 @@ const SfxPoolItem& ScColumn::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW nStartRow, SCROW nEndRow ) const
{
::std::map< const ScPatternAttr*, size_t > aAttrMap;
- const ScPatternAttr* pMaxPattern = 0;
+ const ScPatternAttr* pMaxPattern = nullptr;
size_t nMaxCount = 0;
ScAttrIterator aAttrIter( pAttrArray, nStartRow, nEndRow );
const ScPatternAttr* pPattern;
SCROW nAttrRow1 = 0, nAttrRow2 = 0;
- while( (pPattern = aAttrIter.Next( nAttrRow1, nAttrRow2 )) != 0 )
+ while( (pPattern = aAttrIter.Next( nAttrRow1, nAttrRow2 )) != nullptr )
{
size_t& rnCount = aAttrMap[ pPattern ];
rnCount += (nAttrRow2 - nAttrRow1 + 1);
@@ -603,12 +603,12 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
if (!rMark.IsMultiMarked())
{
OSL_FAIL("No selection in ScColumn::GetSelectionStyle");
- return NULL;
+ return nullptr;
}
bool bEqual = true;
- const ScStyleSheet* pStyle = NULL;
+ const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
ScMarkArrayIter aMarkIter( rMark.GetArray() + nCol );
@@ -620,7 +620,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
SCROW nRow;
SCROW nDummy;
const ScPatternAttr* pPattern;
- while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL)
+ while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != nullptr)
{
pNewStyle = pPattern->GetStyleSheet();
rFound = true;
@@ -630,7 +630,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
}
}
- return bEqual ? pStyle : NULL;
+ return bEqual ? pStyle : nullptr;
}
const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRow2 ) const
@@ -639,14 +639,14 @@ const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRo
bool bEqual = true;
- const ScStyleSheet* pStyle = NULL;
+ const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
ScAttrIterator aAttrIter( pAttrArray, nRow1, nRow2 );
SCROW nRow;
SCROW nDummy;
const ScPatternAttr* pPattern;
- while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL)
+ while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != nullptr)
{
pNewStyle = pPattern->GetStyleSheet();
rFound = true;
@@ -655,7 +655,7 @@ const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRo
pStyle = pNewStyle;
}
- return bEqual ? pStyle : NULL;
+ return bEqual ? pStyle : nullptr;
}
void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset )
@@ -774,12 +774,12 @@ const sc::CellTextAttr* ScColumn::GetCellTextAttr( sc::ColumnBlockConstPosition&
{
sc::CellTextAttrStoreType::const_position_type aPos = maCellTextAttrs.position(rBlockPos.miCellTextAttrPos, nRow);
if (aPos.first == maCellTextAttrs.end())
- return NULL;
+ return nullptr;
rBlockPos.miCellTextAttrPos = aPos.first;
if (aPos.first->type != sc::element_type_celltextattr)
- return NULL;
+ return nullptr;
return &sc::celltextattr_block::at(*aPos.first->data, aPos.second);
}
@@ -1680,7 +1680,7 @@ void ScColumn::CopyToColumn(
// within the same document. If not, re-intern shared strings.
svl::SharedStringPool* pSharedStringPool =
(pDocument->GetPool() != rColumn.pDocument->GetPool()) ?
- &rColumn.pDocument->GetSharedStringPool() : NULL;
+ &rColumn.pDocument->GetSharedStringPool() : nullptr;
CopyByCloneHandler aFunc(*this, rColumn, rCxt.getBlockPosition(rColumn.nTab, rColumn.nCol), nFlags,
pSharedStringPool);
aFunc.setStartListening(rCxt.isStartListening());
@@ -1719,7 +1719,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
aRangeSet.getSpans(aRanges);
bool bCopyNotes = true;
- CopyToClipHandler aFunc(*this, rDestCol, NULL, bCopyNotes);
+ CopyToClipHandler aFunc(*this, rDestCol, nullptr, bCopyNotes);
sc::CellStoreType::const_iterator itPos = maCells.begin();
sc::SingleColumnSpanSet::SpansType::const_iterator it = aRanges.begin(), itEnd = aRanges.end();
for (; it != itEnd; ++it)
@@ -3325,7 +3325,7 @@ void ScColumn::TransferListeners(
rDestCol.maBroadcasters.position(itDestPos, nDestRow);
itDestPos = aPos.first;
- SvtBroadcaster* pDestBrd = NULL;
+ SvtBroadcaster* pDestBrd = nullptr;
if (aPos.first->type == sc::element_type_broadcaster)
{
// Existing broadcaster.
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index cb1f14590a01..17b51337581a 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -685,7 +685,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
{
ScNeededSizeOptions aOptions;
aOptions.bFormula = bFormula;
- const ScPatternAttr* pOldPattern = NULL;
+ const ScPatternAttr* pOldPattern = nullptr;
SvtScriptType nOldScript = SvtScriptType::NONE;
// Go though all non-empty cells within selection.
@@ -1416,7 +1416,7 @@ SCROW ScColumn::FindNextVisibleRow(SCROW nRow, bool bForward) const
{
nRow++;
SCROW nEndRow = 0;
- bool bHidden = pDocument->RowHidden(nRow, nTab, NULL, &nEndRow);
+ bool bHidden = pDocument->RowHidden(nRow, nTab, nullptr, &nEndRow);
if(bHidden)
return std::min<SCROW>(MAXROW, nEndRow + 1);
else
@@ -1443,7 +1443,7 @@ SCROW ScColumn::FindNextVisibleRowWithContent(
{
nRow++;
SCROW nEndRow = 0;
- bool bHidden = pDocument->RowHidden(nRow, nTab, NULL, &nEndRow);
+ bool bHidden = pDocument->RowHidden(nRow, nTab, nullptr, &nEndRow);
if (bHidden)
{
nRow = nEndRow + 1;
@@ -1753,7 +1753,7 @@ const SvtBroadcaster* ScColumn::GetBroadcaster( sc::ColumnBlockConstPosition& rB
rBlockPos.miBroadcasterPos = aPos.first;
if (aPos.first->type != sc::element_type_broadcaster)
- return NULL;
+ return nullptr;
return sc::broadcaster_block::at(*aPos.first->data, aPos.second);
}
@@ -1807,7 +1807,7 @@ const ScPostIt* ScColumn::GetCellNote( sc::ColumnBlockConstPosition& rBlockPos,
rBlockPos.miCellNotePos = aPos.first;
if (aPos.first->type != sc::element_type_cellnote)
- return NULL;
+ return nullptr;
return sc::cellnote_block::at(*aPos.first->data, aPos.second);
}
@@ -2468,8 +2468,8 @@ copyFirstFormulaBlock(
sc::formula_block::iterator it = sc::formula_block::begin(*itBlk->data);
sc::formula_block::iterator itEnd;
- sc::FormulaGroupContext::NumArrayType* pNumArray = NULL;
- sc::FormulaGroupContext::StrArrayType* pStrArray = NULL;
+ sc::FormulaGroupContext::NumArrayType* pNumArray = nullptr;
+ sc::FormulaGroupContext::StrArrayType* pStrArray = nullptr;
itEnd = it;
std::advance(itEnd, nLen);
@@ -2486,7 +2486,7 @@ copyFirstFormulaBlock(
rFC.SetErrCode(0);
rFC.SetDirtyVar();
}
- return NULL;
+ return nullptr;
}
if (aRes.meType == sc::FormulaResultValue::Value)
@@ -2515,14 +2515,14 @@ copyFirstFormulaBlock(
if (!pNumArray && !pStrArray)
// At least one of these arrays should be allocated.
- return NULL;
+ return nullptr;
return rCxt.setCachedColArray(nTab, nCol, pNumArray, pStrArray);
}
struct NonNullStringFinder : std::unary_function<const rtl_uString*, bool>
{
- bool operator() (const rtl_uString* p) const { return p != NULL; }
+ bool operator() (const rtl_uString* p) const { return p != nullptr; }
};
bool hasNonEmpty( const sc::FormulaGroupContext::StrArrayType& rArray, SCROW nRow1, SCROW nRow2 )
@@ -2547,11 +2547,11 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
sc::FormulaGroupContext::ColArray* pColArray = rCxt.getCachedColArray(nTab, nCol, nRow2+1);
if (pColArray)
{
- const double* pNum = NULL;
+ const double* pNum = nullptr;
if (pColArray->mpNumArray)
pNum = &(*pColArray->mpNumArray)[nRow1];
- rtl_uString** pStr = NULL;
+ rtl_uString** pStr = nullptr;
if (pColArray->mpStrArray && hasNonEmpty(*pColArray->mpStrArray, nRow1, nRow2))
pStr = &(*pColArray->mpStrArray)[nRow1];
@@ -2582,7 +2582,7 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
sc::FormulaGroupContext::NumArrayType& rArray = *rCxt.m_NumArrays.back();
rArray.resize(nRow2+1, fNan); // allocate to the requested length.
- pColArray = rCxt.setCachedColArray(nTab, nCol, &rArray, NULL);
+ pColArray = rCxt.setCachedColArray(nTab, nCol, &rArray, nullptr);
if (!pColArray)
// Failed to insert a new cached column array.
return formula::VectorRefArray(formula::VectorRefArray::Invalid);
@@ -2605,7 +2605,7 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
rCxt.m_StrArrays.push_back(
o3tl::make_unique<sc::FormulaGroupContext::StrArrayType>(nRow2+1, nullptr));
sc::FormulaGroupContext::StrArrayType& rArray = *rCxt.m_StrArrays.back();
- pColArray = rCxt.setCachedColArray(nTab, nCol, NULL, &rArray);
+ pColArray = rCxt.setCachedColArray(nTab, nCol, nullptr, &rArray);
if (!pColArray)
// Failed to insert a new cached column array.
return formula::VectorRefArray();
@@ -2642,8 +2642,8 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
// Failed to insert a new cached column array.
return formula::VectorRefArray(formula::VectorRefArray::Invalid);
- const double* pNum = NULL;
- rtl_uString** pStr = NULL;
+ const double* pNum = nullptr;
+ rtl_uString** pStr = nullptr;
if (pColArray->mpNumArray)
pNum = &(*pColArray->mpNumArray)[nRow1];
if (pColArray->mpStrArray)
@@ -2662,8 +2662,8 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
if (!appendToBlock(pDocument, rCxt, *pColArray, nPos, nRow2+1, itBlk, maCells.end()))
return formula::VectorRefArray(formula::VectorRefArray::Invalid);
- const double* pNum = NULL;
- rtl_uString** pStr = NULL;
+ const double* pNum = nullptr;
+ rtl_uString** pStr = nullptr;
if (pColArray->mpNumArray)
pNum = &(*pColArray->mpNumArray)[nRow1];
if (pColArray->mpStrArray)
@@ -2678,7 +2678,7 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
rCxt.m_NumArrays.push_back(
o3tl::make_unique<sc::FormulaGroupContext::NumArrayType>(nRow2+1, fNan));
sc::FormulaGroupContext::NumArrayType& rArray = *rCxt.m_NumArrays.back();
- pColArray = rCxt.setCachedColArray(nTab, nCol, &rArray, NULL);
+ pColArray = rCxt.setCachedColArray(nTab, nCol, &rArray, nullptr);
if (!pColArray)
// Failed to insert a new cached column array.
return formula::VectorRefArray(formula::VectorRefArray::Invalid);
@@ -2771,7 +2771,7 @@ ScFormulaCell * const * ScColumn::GetFormulaCellBlockAddress( SCROW nRow, size_t
if (!ValidRow(nRow))
{
rBlockSize = 0;
- return NULL;
+ return nullptr;
}
std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nRow);
@@ -2779,14 +2779,14 @@ ScFormulaCell * const * ScColumn::GetFormulaCellBlockAddress( SCROW nRow, size_t
if (it == maCells.end())
{
rBlockSize = 0;
- return NULL;
+ return nullptr;
}
if (it->type != sc::element_type_formula)
{
// Not a formula cell.
rBlockSize = 0;
- return NULL;
+ return nullptr;
}
rBlockSize = it->size;
@@ -2797,7 +2797,7 @@ const ScFormulaCell* ScColumn::FetchFormulaCell( SCROW nRow ) const
{
size_t nBlockSize = 0;
ScFormulaCell const * const * pp = GetFormulaCellBlockAddress( nRow, nBlockSize );
- return pp ? *pp : NULL;
+ return pp ? *pp : nullptr;
}
void ScColumn::FindDataAreaPos(SCROW& rRow, bool bDown) const
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 065f0d51a6b1..98b4caae831b 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -339,7 +339,7 @@ void ScColumn::DetachFormulaCells(
if (pDocument->IsClipOrUndo())
return;
- DetachFormulaCellsHandler aFunc(pDocument, NULL);
+ DetachFormulaCellsHandler aFunc(pDocument, nullptr);
sc::ProcessFormula(aPos.first, maCells, nRow, nNextTopRow-1, aFunc);
}
@@ -508,7 +508,7 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, const sc::
ScRefCellValue aCell = GetCellValue( itr2, nOffset );
ScAddress aPos(nCol, nRow, nTab);
- const SfxItemSet* pCondSet = NULL;
+ const SfxItemSet* pCondSet = nullptr;
ScConditionalFormatList* pCFList = pDocument->GetCondFormList(nTab);
if (pCFList)
{
@@ -1093,7 +1093,7 @@ void ScColumn::CopyFromClip(
// Compare the ScDocumentPool* to determine if we are copying within the
// same document. If not, re-intern shared strings.
svl::SharedStringPool* pSharedStringPool = (rColumn.pDocument->GetPool() != pDocument->GetPool()) ?
- &pDocument->GetSharedStringPool() : NULL;
+ &pDocument->GetSharedStringPool() : nullptr;
// nRow1 to nRow2 is for destination (this) column. Subtract nDy to get the source range.
// Copy all cells in the source column (rColumn) from nRow1-nDy to nRow2-nDy to this column.
@@ -2467,7 +2467,7 @@ void ScColumn::GetString( SCROW nRow, OUString& rString ) const
aCell.mpFormula->MaybeInterpret();
sal_uLong nFormat = GetNumberFormat(nRow);
- Color* pColor = NULL;
+ Color* pColor = nullptr;
ScCellFormat::GetString(aCell, nFormat, rString, &pColor, *(pDocument->GetFormatTable()), pDocument);
}
@@ -2476,10 +2476,10 @@ double* ScColumn::GetValueCell( SCROW nRow )
std::pair<sc::CellStoreType::iterator,size_t> aPos = maCells.position(nRow);
sc::CellStoreType::iterator it = aPos.first;
if (it == maCells.end())
- return NULL;
+ return nullptr;
if (it->type != sc::element_type_numeric)
- return NULL;
+ return nullptr;
return &sc::numeric_block::at(*it->data, aPos.second);
}
@@ -2517,10 +2517,10 @@ const EditTextObject* ScColumn::GetEditText( SCROW nRow ) const
std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nRow);
sc::CellStoreType::const_iterator it = aPos.first;
if (it == maCells.end())
- return NULL;
+ return nullptr;
if (it->type != sc::element_type_edittext)
- return NULL;
+ return nullptr;
return sc::edittext_block::at(*it->data, aPos.second);
}
@@ -2967,7 +2967,7 @@ public:
++nRow;
}
- ScFormulaCell* pCur = NULL;
+ ScFormulaCell* pCur = nullptr;
ScFormulaCellGroupRef xCurGrp;
for (; it != itEnd; pPrev = pCur, xPrevGrp = xCurGrp)
{
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index b374d52655f5..dc42d74762ac 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -184,7 +184,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
{
// Compare the ScDocumentPool* to determine if we are copying within the
// same document. If not, re-intern shared strings.
- svl::SharedStringPool* pSharedStringPool = (bSameDocPool ? NULL : &pDocument->GetSharedStringPool());
+ svl::SharedStringPool* pSharedStringPool = (bSameDocPool ? nullptr : &pDocument->GetSharedStringPool());
svl::SharedString aStr = (pSharedStringPool ?
pSharedStringPool->intern( rSrcCell.mpString->getString()) :
*rSrcCell.mpString);
@@ -216,7 +216,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
std::vector<sc::RowSpan> aRanges;
aRanges.reserve(1);
aRanges.push_back(sc::RowSpan(nRow1, nRow2));
- CloneFormulaCell(*rSrcCell.mpFormula, rSrcAttr, aRanges, NULL);
+ CloneFormulaCell(*rSrcCell.mpFormula, rSrcAttr, aRanges, nullptr);
}
break;
default:
@@ -553,9 +553,9 @@ void ScColumn::CloneFormulaCell(
ScPostIt* ScColumn::ReleaseNote( SCROW nRow )
{
if (!ValidRow(nRow))
- return NULL;
+ return nullptr;
- ScPostIt* p = NULL;
+ ScPostIt* p = nullptr;
maCellNotes.release(nRow, p);
return p;
}
@@ -727,7 +727,7 @@ public:
// Perform end listening, remove from formula tree, and set them up
// for re-compilation.
- ScFormulaCell* pTop = NULL;
+ ScFormulaCell* pTop = nullptr;
if (rEntry.mbShared)
{
@@ -911,7 +911,7 @@ private:
// In theory this should never return NULL. But let's be safe.
return;
- const SfxItemSet* pCondSet = NULL;
+ const SfxItemSet* pCondSet = nullptr;
if (mpCFList)
{
maPos.SetRow(nRow);
diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx
index 8ef96d622ff6..6c19bd952c87 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -75,14 +75,14 @@ ColumnSpanSet::~ColumnSpanSet()
ColumnSpanSet::ColumnType& ColumnSpanSet::getColumn(SCTAB nTab, SCCOL nCol)
{
if (static_cast<size_t>(nTab) >= maDoc.size())
- maDoc.resize(nTab+1, NULL);
+ maDoc.resize(nTab+1, nullptr);
if (!maDoc[nTab])
maDoc[nTab] = new TableType;
TableType& rTab = *maDoc[nTab];
if (static_cast<size_t>(nCol) >= rTab.size())
- rTab.resize(nCol+1, NULL);
+ rTab.resize(nCol+1, nullptr);
if (!rTab[nCol])
rTab[nCol] = new ColumnType(0, MAXROW, mbInit);
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index d8ecee616974..61aee695de72 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -154,12 +154,12 @@ ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) :
eTempGrammar2(r.eTempGrammar2),
bIsStr1(r.bIsStr1),
bIsStr2(r.bIsStr2),
- pFormula1(NULL),
- pFormula2(NULL),
+ pFormula1(nullptr),
+ pFormula2(nullptr),
aSrcPos(r.aSrcPos),
aSrcString(r.aSrcString),
- pFCell1(NULL),
- pFCell2(NULL),
+ pFCell1(nullptr),
+ pFCell2(nullptr),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
bFirstRun(true),
@@ -188,12 +188,12 @@ ScConditionEntry::ScConditionEntry( ScDocument* pDocument, const ScConditionEntr
eTempGrammar2(r.eTempGrammar2),
bIsStr1(r.bIsStr1),
bIsStr2(r.bIsStr2),
- pFormula1(NULL),
- pFormula2(NULL),
+ pFormula1(nullptr),
+ pFormula2(nullptr),
aSrcPos(r.aSrcPos),
aSrcString(r.aSrcString),
- pFCell1(NULL),
- pFCell2(NULL),
+ pFCell1(nullptr),
+ pFCell2(nullptr),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
bFirstRun(true),
@@ -224,15 +224,15 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
eTempGrammar2(eGrammar2),
bIsStr1(false),
bIsStr2(false),
- pFormula1(NULL),
- pFormula2(NULL),
+ pFormula1(nullptr),
+ pFormula2(nullptr),
aSrcPos(rPos),
- pFCell1(NULL),
- pFCell2(NULL),
+ pFCell1(nullptr),
+ pFCell2(nullptr),
bRelRef1(false),
bRelRef2(false),
bFirstRun(true),
- pCondFormat(NULL)
+ pCondFormat(nullptr)
{
Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, false );
@@ -251,15 +251,15 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
eTempGrammar2(FormulaGrammar::GRAM_DEFAULT),
bIsStr1(false),
bIsStr2(false),
- pFormula1(NULL),
- pFormula2(NULL),
+ pFormula1(nullptr),
+ pFormula2(nullptr),
aSrcPos(rPos),
- pFCell1(NULL),
- pFCell2(NULL),
+ pFCell1(nullptr),
+ pFCell2(nullptr),
bRelRef1(false),
bRelRef2(false),
bFirstRun(true),
- pCondFormat(NULL)
+ pCondFormat(nullptr)
{
if ( pArr1 )
{
@@ -716,7 +716,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
if (bDirty && !bFirstRun)
{
// Repaint everything for dependent formats
- DataChanged( NULL );
+ DataChanged( nullptr );
}
bFirstRun = false;
@@ -1315,7 +1315,7 @@ OUString ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 n
ScTokenArray* ScConditionEntry::CreateTokenArry( sal_uInt16 nIndex ) const
{
assert(nIndex <= 1);
- ScTokenArray* pRet = NULL;
+ ScTokenArray* pRet = nullptr;
ScAddress aAddr;
if ( nIndex==0 )
@@ -1363,7 +1363,7 @@ void ScConditionEntry::SourceChanged( const ScAddress& rChanged )
{
pFormula->Reset();
formula::FormulaToken* t;
- while ( ( t = pFormula->GetNextReference() ) != NULL )
+ while ( ( t = pFormula->GetNextReference() ) != nullptr )
{
SingleDoubleRefProvider aProv( *t );
if ( aProv.Ref1.IsColRel() || aProv.Ref1.IsRowRel() || aProv.Ref1.IsTabRel() ||
@@ -1453,7 +1453,7 @@ ScAddress ScConditionEntry::GetValidSrcPos() const
{
pFormula->Reset();
formula::FormulaToken* t;
- while ( ( t = pFormula->GetNextReference() ) != NULL )
+ while ( ( t = pFormula->GetNextReference() ) != nullptr )
{
ScSingleRefData& rRef1 = *t->GetSingleRef();
ScAddress aAbs = rRef1.toAbs(aSrcPos);
@@ -1857,7 +1857,7 @@ void ScConditionalFormat::RemoveEntry(size_t n)
if (n < maEntries.size())
{
maEntries.erase(maEntries.begin() + n);
- DoRepaint(NULL);
+ DoRepaint(nullptr);
}
}
@@ -1880,7 +1880,7 @@ const ScFormatEntry* ScConditionalFormat::GetEntry( sal_uInt16 nPos ) const
if ( nPos < size() )
return maEntries[nPos].get();
else
- return NULL;
+ return nullptr;
}
const OUString& ScConditionalFormat::GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const
@@ -2113,7 +2113,7 @@ void ScConditionalFormat::SourceChanged( const ScAddress& rAddr )
if(rFormat.NeedsRepaint())
{
// we need to repaint the whole range anyway
- DoRepaint(NULL);
+ DoRepaint(nullptr);
return;
}
}
@@ -2187,7 +2187,7 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
return itr->get();
SAL_WARN("sc", "ScConditionalFormatList: Entry not found");
- return NULL;
+ return nullptr;
}
const ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey ) const
@@ -2198,7 +2198,7 @@ const ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
return itr->get();
SAL_WARN("sc", "ScConditionalFormatList: Entry not found");
- return NULL;
+ return nullptr;
}
void ScConditionalFormatList::CompileAll()
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 986b17e5d3cc..8e3234d258d4 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -100,7 +100,7 @@ void ScAttrArray_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rp
ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
sal_uInt16 nSubTotalFlags, bool bTextZero )
: pDoc(pDocument)
- , pAttrArray(NULL)
+ , pAttrArray(nullptr)
, nNumFormat(0) // Initialized in GetNumberFormat
, nNumFmtIndex(0)
, maStartPos(rRange.aStart)
@@ -113,7 +113,7 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
, bNumValid(false)
, bCalcAsShown(pDocument->GetDocOptions().IsCalcAsShown())
, bTextAsZero(bTextZero)
- , mpCells(NULL)
+ , mpCells(nullptr)
{
SCTAB nDocMaxTab = pDocument->GetTableCount() - 1;
@@ -193,9 +193,9 @@ bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
SCROW nLastRow;
// Skip all filtered or hidden rows, depending on mnSubTotalFlags
if ( ( ( mnSubTotalFlags & SUBTOTAL_IGN_FILTERED ) &&
- pDoc->RowFiltered( nCurRow, mnTab, NULL, &nLastRow ) ) ||
+ pDoc->RowFiltered( nCurRow, mnTab, nullptr, &nLastRow ) ) ||
( ( mnSubTotalFlags & SUBTOTAL_IGN_HIDDEN ) &&
- pDoc->RowHidden( nCurRow, mnTab, NULL, &nLastRow ) ) )
+ pDoc->RowHidden( nCurRow, mnTab, nullptr, &nLastRow ) ) )
{
SetPos(nLastRow+1);
continue;
@@ -294,7 +294,7 @@ bool ScValueIterator::GetFirst(double& rValue, sal_uInt16& rErr)
return false;
nNumFormat = 0; // Initialized in GetNumberFormat
- pAttrArray = 0;
+ pAttrArray = nullptr;
nAttrEndRow = 0;
mpCells = &pTab->aCol[maStartPos.Col()].maCells;
@@ -321,7 +321,7 @@ const sc::CellStoreType* ScDBQueryDataIterator::GetColumnCellStore(ScDocument& r
{
ScTable* pTab = rDoc.FetchTable(nTab);
if (!pTab)
- return NULL;
+ return nullptr;
return &pTab->aCol[nCol].maCells;
}
@@ -344,10 +344,10 @@ bool ScDBQueryDataIterator::IsQueryValid(
ScDBQueryDataIterator::DataAccessInternal::DataAccessInternal(const ScDBQueryDataIterator* pParent, ScDBQueryParamInternal* pParam, ScDocument* pDoc)
: DataAccess(pParent)
- , mpCells(NULL)
+ , mpCells(nullptr)
, mpParam(pParam)
, mpDoc(pDoc)
- , pAttrArray(0)
+ , pAttrArray(nullptr)
, nNumFormat(0) // Initialized in GetNumberFormat
, nNumFmtIndex(0)
, nCol(mpParam->mnField)
@@ -402,7 +402,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
continue;
}
- ScRefCellValue* pCell = NULL;
+ ScRefCellValue* pCell = nullptr;
if (nCol == static_cast<SCCOL>(nFirstQueryField))
{
aCell = sc::toRefCell(maCurPos.first, maCurPos.second);
@@ -820,7 +820,7 @@ sc::FormulaGroupEntry* ScFormulaGroupIterator::next()
mnCol = 0;
mnTab++;
if (mnTab >= mpDoc->GetTableCount())
- return NULL;
+ return nullptr;
}
ScTable *pTab = mpDoc->FetchTable(mnTab);
ScColumn *pCol = pTab->FetchColumn(mnCol);
@@ -953,9 +953,9 @@ bool ScCellIterator::getCurrent()
SCROW nLastRow;
// Skip all filtered or hidden rows, depending on mSubTotalFlags
if ( ( ( mnSubTotalFlags & SUBTOTAL_IGN_FILTERED ) &&
- pCol->GetDoc().RowFiltered(maCurPos.Row(), maCurPos.Tab(), NULL, &nLastRow) ) ||
+ pCol->GetDoc().RowFiltered(maCurPos.Row(), maCurPos.Tab(), nullptr, &nLastRow) ) ||
( ( mnSubTotalFlags & SUBTOTAL_IGN_HIDDEN ) &&
- pCol->GetDoc().RowHidden(maCurPos.Row(), maCurPos.Tab(), NULL, &nLastRow) ) )
+ pCol->GetDoc().RowHidden(maCurPos.Row(), maCurPos.Tab(), nullptr, &nLastRow) ) )
{
setPos(nLastRow+1);
continue;
@@ -1085,7 +1085,7 @@ ScQueryCellIterator::ScQueryCellIterator(ScDocument* pDocument, SCTAB nTable,
}
}
nNumFormat = 0; // Initialized in GetNumberFormat
- pAttrArray = 0;
+ pAttrArray = nullptr;
nAttrEndRow = 0;
}
@@ -1196,8 +1196,8 @@ bool ScQueryCellIterator::GetThis()
{
bool bTestEqualCondition = false;
if ( pDoc->maTabs[nTab]->ValidQuery( nRow, *mpParam,
- (nCol == static_cast<SCCOL>(nFirstQueryField) ? &aCell : NULL),
- (nTestEqualCondition ? &bTestEqualCondition : NULL) ) )
+ (nCol == static_cast<SCCOL>(nFirstQueryField) ? &aCell : nullptr),
+ (nTestEqualCondition ? &bTestEqualCondition : nullptr) ) )
{
if ( nTestEqualCondition && bTestEqualCondition )
nTestEqualCondition |= nTestEqualConditionMatched;
@@ -2010,7 +2010,7 @@ ScRefCellValue* ScHorizontalCellIterator::GetNext( SCCOL& rCol, SCROW& rRow )
if (!mbMore)
{
debugiter("no more !\n");
- return NULL;
+ return nullptr;
}
// Return the current non-empty cell, and move the cursor to the next one.
@@ -2202,7 +2202,7 @@ ScHorizontalValueIterator::ScHorizontalValueIterator( ScDocument* pDocument,
nCurTab = nStartTab;
nNumFormat = 0; // Will be initialized in GetNumberFormat()
- pAttrArray = 0;
+ pAttrArray = nullptr;
nAttrEndRow = 0;
pCellIter = new ScHorizontalCellIterator( pDoc, nStartTab, nStartCol,
@@ -2348,7 +2348,7 @@ void ScHorizontalAttrIterator::InitForNextRow(bool bInitialization)
SCROW nThisEnd = pArray->pData[nIndex].nRow;
if ( IsDefaultItem( pPattern ) )
- pPattern = NULL;
+ pPattern = nullptr;
else
bEmpty = false; // Found attributes
@@ -2360,7 +2360,7 @@ void ScHorizontalAttrIterator::InitForNextRow(bool bInitialization)
{
OSL_FAIL("AttrArray does not range to MAXROW");
pNextEnd[nPos] = MAXROW;
- ppPatterns[nPos] = NULL;
+ ppPatterns[nPos] = nullptr;
}
}
else if ( ppPatterns[nPos] )
@@ -2418,7 +2418,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
// Next row
++nRow;
if ( nRow > nEndRow ) // Already at the end?
- return NULL; // Found nothing
+ return nullptr; // Found nothing
nCol = nStartCol; // Start at the left again
if ( bRowEmpty || nRow > nMinNextEnd )
@@ -2445,7 +2445,7 @@ ScUsedAreaIterator::ScUsedAreaIterator( ScDocument* pDocument, SCTAB nTable,
, nFoundStartCol( 0 )
, nFoundEndCol( 0 )
, nFoundRow( 0 )
- , pFoundPattern( NULL )
+ , pFoundPattern( nullptr )
{
pCell = aCellIter.GetNext( nCellCol, nCellRow );
pPattern = aAttrIter.GetNext( nAttrCol1, nAttrCol2, nAttrRow );
@@ -2493,12 +2493,12 @@ bool ScUsedAreaIterator::GetNext()
if ( nAttrRow == nCellRow && nAttrCol1 == nCellCol ) // Attributes on the cell?
pFoundPattern = pPattern;
else
- pFoundPattern = NULL;
+ pFoundPattern = nullptr;
}
}
else if ( pCell ) // Just a cell -> take over right away
{
- pFoundPattern = NULL;
+ pFoundPattern = nullptr;
bUseCell = true; // Cell position
}
else if ( pPattern ) // Just attributes -> take over right away
@@ -2545,7 +2545,7 @@ ScDocAttrIterator::ScDocAttrIterator(ScDocument* pDocument, SCTAB nTable,
if ( ValidTab(nTab) && nTab < pDoc->GetTableCount() && pDoc->maTabs[nTab] )
pColIter = pDoc->maTabs[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
else
- pColIter = NULL;
+ pColIter = nullptr;
}
ScDocAttrIterator::~ScDocAttrIterator()
@@ -2569,9 +2569,9 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& rCol, SCROW& rRow1, SCRO
if ( nCol <= nEndCol )
pColIter = pDoc->maTabs[nTab]->aCol[nCol].CreateAttrIterator( nStartRow, nEndRow );
else
- pColIter = NULL;
+ pColIter = nullptr;
}
- return NULL; // Nothing anymore
+ return nullptr; // Nothing anymore
}
ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab) :
@@ -2681,7 +2681,7 @@ ScAttrRectIterator::ScAttrRectIterator(ScDocument* pDocument, SCTAB nTable,
++nIterEndCol;
}
else
- pColIter = NULL;
+ pColIter = nullptr;
}
ScAttrRectIterator::~ScAttrRectIterator()
@@ -2724,9 +2724,9 @@ const ScPatternAttr* ScAttrRectIterator::GetNext( SCCOL& rCol1, SCCOL& rCol2,
++nIterEndCol;
}
else
- pColIter = NULL;
+ pColIter = nullptr;
}
- return NULL; // Nothing anymore
+ return nullptr; // Nothing anymore
}
SCROW ScRowBreakIterator::NOT_FOUND = -1;
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index b6888e776a4b..4d5ecc107655 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -74,18 +74,18 @@
// STATIC DATA -----------------------------------------------------------
-sal_uInt16* ScDocumentPool::pVersionMap1 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap2 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap3 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap4 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap5 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap6 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap7 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap8 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap9 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap10 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap11 = 0;
-sal_uInt16* ScDocumentPool::pVersionMap12 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap1 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap2 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap3 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap4 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap5 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap6 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap7 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap8 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap9 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap10 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap11 = nullptr;
+sal_uInt16* ScDocumentPool::pVersionMap12 = nullptr;
// ATTR_FONT_TWOLINES (not used) was changed to ATTR_USERDEF (not saved in binary format) in 641c
@@ -192,7 +192,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool)
: SfxItemPool ( OUString("ScDocumentPool"),
ATTR_STARTINDEX, ATTR_ENDINDEX,
- aItemInfos, NULL, false/*bLoadRefCounts*/ ),
+ aItemInfos, nullptr, false/*bLoadRefCounts*/ ),
pSecondary ( pSecPool )
{
// latin font from GetDefaultFonts is not used, DEFAULTFONT_LATIN_SPREADSHEET instead
@@ -218,8 +218,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool)
ATTR_PAGE_ON, ATTR_PAGE_SHARED,
0 );
- pGlobalBorderInnerAttr->SetLine(NULL, SvxBoxInfoItemLine::HORI);
- pGlobalBorderInnerAttr->SetLine(NULL, SvxBoxInfoItemLine::VERT);
+ pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::HORI);
+ pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::VERT);
pGlobalBorderInnerAttr->SetTable(true);
pGlobalBorderInnerAttr->SetDist(true);
pGlobalBorderInnerAttr->SetMinDist(false);
@@ -572,29 +572,29 @@ void ScDocumentPool::DeleteVersionMaps()
pVersionMap11 && pVersionMap12 , "DeleteVersionMaps without maps" );
delete[] pVersionMap12;
- pVersionMap12 = 0;
+ pVersionMap12 = nullptr;
delete[] pVersionMap11;
- pVersionMap11 = 0;
+ pVersionMap11 = nullptr;
delete[] pVersionMap10;
- pVersionMap10 = 0;
+ pVersionMap10 = nullptr;
delete[] pVersionMap9;
- pVersionMap9 = 0;
+ pVersionMap9 = nullptr;
delete[] pVersionMap8;
- pVersionMap8 = 0;
+ pVersionMap8 = nullptr;
delete[] pVersionMap7;
- pVersionMap7 = 0;
+ pVersionMap7 = nullptr;
delete[] pVersionMap6;
- pVersionMap6 = 0;
+ pVersionMap6 = nullptr;
delete[] pVersionMap5;
- pVersionMap5 = 0;
+ pVersionMap5 = nullptr;
delete[] pVersionMap4;
- pVersionMap4 = 0;
+ pVersionMap4 = nullptr;
delete[] pVersionMap3;
- pVersionMap3 = 0;
+ pVersionMap3 = nullptr;
delete[] pVersionMap2;
- pVersionMap2 = 0;
+ pVersionMap2 = nullptr;
delete[] pVersionMap1;
- pVersionMap1 = 0;
+ pVersionMap1 = nullptr;
}
/**
@@ -675,7 +675,7 @@ void ScDocumentPool::CellStyleCreated( const OUString& rName, ScDocument* pDoc )
ScPatternAttr *const pPattern =
const_cast<ScPatternAttr*>(
static_cast<ScPatternAttr const*>(GetItem2(ATTR_PATTERN, i)));
- if ( pPattern && pPattern->GetStyleSheet() == NULL )
+ if ( pPattern && pPattern->GetStyleSheet() == nullptr )
{
const OUString* pStyleName = pPattern->GetStyleName();
if ( pStyleName && *pStyleName == rName )
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index b7cc1ed0689b..5582176f9b61 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -133,40 +133,40 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mpCellStringPool(new svl::SharedStringPool(ScGlobal::pCharClass)),
mpFormulaGroupCxt(nullptr),
maCalcConfig( ScInterpreter::GetGlobalConfig()),
- mpUndoManager( NULL ),
- pEditEngine( NULL ),
- pNoteEngine( NULL ),
+ mpUndoManager( nullptr ),
+ pEditEngine( nullptr ),
+ pNoteEngine( nullptr ),
pShell( pDocShell ),
- pPrinter( NULL ),
- pVirtualDevice_100th_mm( NULL ),
- pDrawLayer( NULL ),
- pValidationList( NULL ),
- pFormatExchangeList( NULL ),
- pRangeName(NULL),
- pDPCollection( NULL ),
- pFormulaTree( NULL ),
- pEOFormulaTree( NULL ),
- pFormulaTrack( NULL ),
- pEOFormulaTrack( NULL ),
- pClipData( NULL ),
- pDetOpList(NULL),
- pChangeTrack( NULL ),
- pUnoBroadcaster( NULL ),
- pUnoListenerCalls( NULL ),
- pUnoRefUndoList( NULL ),
- pChangeViewSettings( NULL ),
- pScriptTypeData( NULL ),
- mpAnonymousDBData( NULL ),
- pCacheFieldEditEngine( NULL ),
- pViewOptions( NULL ),
- pDocOptions( NULL ),
- pExtDocOptions( NULL ),
- pConsolidateDlgData( NULL ),
- pRecursionHelper( NULL ),
- pAutoNameCache( NULL ),
- pLookupCacheMapImpl( NULL ),
- pPreviewFont( NULL ),
- pPreviewCellStyle( NULL ),
+ pPrinter( nullptr ),
+ pVirtualDevice_100th_mm( nullptr ),
+ pDrawLayer( nullptr ),
+ pValidationList( nullptr ),
+ pFormatExchangeList( nullptr ),
+ pRangeName(nullptr),
+ pDPCollection( nullptr ),
+ pFormulaTree( nullptr ),
+ pEOFormulaTree( nullptr ),
+ pFormulaTrack( nullptr ),
+ pEOFormulaTrack( nullptr ),
+ pClipData( nullptr ),
+ pDetOpList(nullptr),
+ pChangeTrack( nullptr ),
+ pUnoBroadcaster( nullptr ),
+ pUnoListenerCalls( nullptr ),
+ pUnoRefUndoList( nullptr ),
+ pChangeViewSettings( nullptr ),
+ pScriptTypeData( nullptr ),
+ mpAnonymousDBData( nullptr ),
+ pCacheFieldEditEngine( nullptr ),
+ pViewOptions( nullptr ),
+ pDocOptions( nullptr ),
+ pExtDocOptions( nullptr ),
+ pConsolidateDlgData( nullptr ),
+ pRecursionHelper( nullptr ),
+ pAutoNameCache( nullptr ),
+ pLookupCacheMapImpl( nullptr ),
+ pPreviewFont( nullptr ),
+ pPreviewCellStyle( nullptr ),
nUnoObjectId( 0 ),
nRangeOverflowType( 0 ),
aCurTextWidthCalcPos(MAXCOL,0,0),
@@ -235,12 +235,12 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
}
else
{
- pBASM = NULL;
- pChartListenerCollection = NULL;
- pRefreshTimerControl = NULL;
+ pBASM = nullptr;
+ pChartListenerCollection = nullptr;
+ pRefreshTimerControl = nullptr;
}
pDBCollection = new ScDBCollection(this);
- pSelectionAttr = NULL;
+ pSelectionAttr = nullptr;
pChartCollection = new ScChartCollection;
apTemporaryChartLock.reset( new ScTemporaryChartLock(this) );
xColNameRanges = new ScRangePairList;
@@ -317,7 +317,7 @@ void ScDocument::StartChangeTracking()
void ScDocument::EndChangeTracking()
{
delete pChangeTrack;
- pChangeTrack = NULL;
+ pChangeTrack = nullptr;
}
void ScDocument::SetChangeTrack( ScChangeTrack* pTrack )
@@ -377,7 +377,7 @@ ScDocument::~ScDocument()
{ // To be sure there isn't anything running do it with a protector,
// this ensures also that nothing needs the control anymore.
ScRefreshTimerProtector aProt( GetRefreshTimerControlAddress() );
- delete pRefreshTimerControl, pRefreshTimerControl = NULL;
+ delete pRefreshTimerControl, pRefreshTimerControl = nullptr;
}
mxFormulaParserPool.reset();
@@ -391,10 +391,10 @@ ScDocument::~ScDocument()
DELETEZ( pLookupCacheMapImpl); // before pBASM because of listeners
// destroy BroadcastAreas first to avoid un-needed Single-EndListenings of Formula-Cells
delete pBASM; // BroadcastAreaSlotMachine
- pBASM = NULL;
+ pBASM = nullptr;
delete pUnoBroadcaster; // broadcasted nochmal SFX_HINT_DYING
- pUnoBroadcaster = NULL;
+ pUnoBroadcaster = nullptr;
delete pUnoRefUndoList;
delete pUnoListenerCalls;
@@ -476,7 +476,7 @@ void ScDocument::InitClipPtrs( ScDocument* pSourceDoc )
pSourceDoc->SaveDdeLinks(*pClipData);
}
else
- pClipData = NULL;
+ pClipData = nullptr;
// Options pointers exist (ImplCreateOptions) for any document.
// Must be copied for correct results in OLE objects (#i42666#).
@@ -555,7 +555,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
{
if( i > static_cast<SCTAB>(maTabs.size()) )
{
- maTabs.resize(i, NULL );
+ maTabs.resize(i, nullptr );
}
maTabs.push_back(new ScTable(this, i, aString));
}
@@ -575,7 +575,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
InitClipPtrs(pSourceDoc);
if (nTab >= static_cast<SCTAB>(maTabs.size()))
{
- maTabs.resize(nTab+1, NULL );
+ maTabs.resize(nTab+1, nullptr );
}
maTabs[nTab] = new ScTable(this, nTab,
OUString("baeh"));
@@ -592,7 +592,7 @@ void ScDocument::EnsureTable( SCTAB nTab )
{
bool bExtras = !bIsUndo; // Column-Widths, Row-Heights, Flags
if (static_cast<size_t>(nTab) >= maTabs.size())
- maTabs.resize(nTab+1, NULL);
+ maTabs.resize(nTab+1, nullptr);
if (!maTabs[nTab])
maTabs[nTab] = new ScTable(this, nTab, "temp", bExtras, bExtras);
@@ -854,7 +854,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
if (*it && it != (maTabs.begin() + nOldPos))
(*it)->UpdateInsertTab(aCxt);
- maTabs.push_back(NULL);
+ maTabs.push_back(nullptr);
for (i = static_cast<SCTAB>(maTabs.size())-1; i > nNewPos; i--)
maTabs[i] = maTabs[i - 1];
if (nNewPos <= nOldPos)
@@ -884,7 +884,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
{
SetNoListening( true ); // noch nicht bei CopyToTable/Insert
sc::CopyToDocContext aCopyDocCxt(*this);
- maTabs[nOldPos]->CopyToTable(aCopyDocCxt, 0, 0, MAXCOL, MAXROW, InsertDeleteFlags::ALL, (pOnlyMarked != NULL),
+ maTabs[nOldPos]->CopyToTable(aCopyDocCxt, 0, 0, MAXCOL, MAXROW, InsertDeleteFlags::ALL, (pOnlyMarked != nullptr),
maTabs[nNewPos], pOnlyMarked );
maTabs[nNewPos]->SetTabBgColor(maTabs[nOldPos]->GetTabBgColor());
@@ -1099,7 +1099,7 @@ ScFormulaCell* ScDocument::SetFormulaCell( const ScAddress& rPos, ScFormulaCell*
if (!TableExists(rPos.Tab()))
{
delete pCell;
- return NULL;
+ return nullptr;
}
return maTabs[rPos.Tab()]->SetFormulaCell(rPos.Col(), rPos.Row(), pCell);
@@ -1124,12 +1124,12 @@ void ScDocument::SetConsolidateDlgData( const ScConsolidateParam* pData )
if ( pData )
pConsolidateDlgData = new ScConsolidateParam( *pData );
else
- pConsolidateDlgData = NULL;
+ pConsolidateDlgData = nullptr;
}
void ScDocument::SetChangeViewSettings(const ScChangeViewSettings& rNew)
{
- if (pChangeViewSettings==NULL)
+ if (pChangeViewSettings==nullptr)
pChangeViewSettings = new ScChangeViewSettings;
OSL_ENSURE( pChangeViewSettings, "Oops. No ChangeViewSettings :-( by!" );
@@ -1139,7 +1139,7 @@ void ScDocument::SetChangeViewSettings(const ScChangeViewSettings& rNew)
ScFieldEditEngine* ScDocument::CreateFieldEditEngine()
{
- ScFieldEditEngine* pNewEditEngine = NULL;
+ ScFieldEditEngine* pNewEditEngine = nullptr;
if (!pCacheFieldEditEngine)
{
pNewEditEngine = new ScFieldEditEngine(
@@ -1156,7 +1156,7 @@ ScFieldEditEngine* ScDocument::CreateFieldEditEngine()
}
pNewEditEngine = pCacheFieldEditEngine;
- pCacheFieldEditEngine = NULL;
+ pCacheFieldEditEngine = nullptr;
}
return pNewEditEngine;
}
@@ -1170,7 +1170,7 @@ void ScDocument::DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine)
}
else
delete rpEditEngine;
- rpEditEngine = NULL;
+ rpEditEngine = nullptr;
}
ScRecursionHelper* ScDocument::CreateRecursionHelperInstance()
@@ -1180,7 +1180,7 @@ ScRecursionHelper* ScDocument::CreateRecursionHelperInstance()
ScLookupCache & ScDocument::GetLookupCache( const ScRange & rRange )
{
- ScLookupCache* pCache = 0;
+ ScLookupCache* pCache = nullptr;
if (!pLookupCacheMapImpl)
pLookupCacheMapImpl = new ScLookupCacheMapImpl;
ScLookupCacheMap::iterator it( pLookupCacheMapImpl->aCacheMap.find( rRange));
@@ -1255,7 +1255,7 @@ bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder)
{
if (aRange.In(cell))
{
- if (pColCellBoder != NULL)
+ if (pColCellBoder != nullptr)
{
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
@@ -1275,7 +1275,7 @@ bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder)
{
if (aRange.In(cell))
{
- if (pColCellBoder != NULL)
+ if (pColCellBoder != nullptr)
{
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
@@ -1299,9 +1299,9 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT
ScChangeViewSettings* pSettings = GetChangeViewSettings();
if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
{
- const ScChangeAction* pFound = NULL;
- const ScChangeAction* pFoundContent = NULL;
- const ScChangeAction* pFoundMove = NULL;
+ const ScChangeAction* pFound = nullptr;
+ const ScChangeAction* pFoundContent = nullptr;
+ const ScChangeAction* pFoundMove = nullptr;
long nModified = 0;
const ScChangeAction* pAction = pTrack->GetFirst();
while (pAction)
@@ -1395,7 +1395,7 @@ void ScDocument::SetPreviewSelection( ScMarkData& rSel )
SfxItemSet* ScDocument::GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- SfxItemSet* pRet = NULL;
+ SfxItemSet* pRet = nullptr;
if ( pPreviewFont )
{
ScMarkData aSel = GetPreviewSelection();
@@ -1407,7 +1407,7 @@ SfxItemSet* ScDocument::GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab )
ScStyleSheet* ScDocument::GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- ScStyleSheet* pRet = NULL;
+ ScStyleSheet* pRet = nullptr;
ScMarkData aSel = GetPreviewSelection();
if ( pPreviewCellStyle && aSel.IsCellMarked( nCol, nRow ) && aSel.GetFirstSelected() == nTab )
pRet = pPreviewCellStyle;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 21decad75207..f7b662aafad1 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -130,7 +130,7 @@ void ScDocument::SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRan
delete pRangeName;
const ScRangeName *const pName = itr->second.get();
if (pName->empty())
- pRangeName = NULL;
+ pRangeName = nullptr;
else
pRangeName = new ScRangeName( *pName );
}
@@ -141,7 +141,7 @@ void ScDocument::SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRan
bool bFound = GetTable(itr->first, nTab);
assert(bFound); (void)bFound; // fouled up?
if (pName->empty())
- SetRangeName( nTab, NULL );
+ SetRangeName( nTab, nullptr );
else
SetRangeName( nTab, new ScRangeName( *pName ) );
}
@@ -180,7 +180,7 @@ void ScDocument::GetRangeNameMap(std::map<OUString, ScRangeName*>& aRangeNameMap
ScRangeName* ScDocument::GetRangeName(SCTAB nTab) const
{
if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
- return NULL;
+ return nullptr;
return maTabs[nTab]->GetRangeName();
}
@@ -221,7 +221,7 @@ bool ScDocument::InsertNewRangeName( const OUString& rName, const ScAddress& rPo
const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, OUString* pName ) const
{
- const ScRangeData* pData = NULL;
+ const ScRangeData* pData = nullptr;
if ( pRangeName )
{
pData = pRangeName->findByRange( rBlock );
@@ -286,7 +286,7 @@ const ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, Sc
if (pDBCollection)
return pDBCollection->GetDBAtCursor(nCol, nRow, nTab, ePortion);
else
- return NULL;
+ return nullptr;
}
ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion)
@@ -294,7 +294,7 @@ ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBData
if (pDBCollection)
return pDBCollection->GetDBAtCursor(nCol, nRow, nTab, ePortion);
else
- return NULL;
+ return nullptr;
}
const ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
@@ -302,7 +302,7 @@ const ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SC
if (pDBCollection)
return pDBCollection->GetDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2);
else
- return NULL;
+ return nullptr;
}
ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
@@ -310,7 +310,7 @@ ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nC
if (pDBCollection)
return pDBCollection->GetDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2);
else
- return NULL;
+ return nullptr;
}
void ScDocument::RefreshDirtyTableColumnNames()
@@ -339,7 +339,7 @@ const ScDPCollection* ScDocument::GetDPCollection() const
ScDPObject* ScDocument::GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
{
if (!pDPCollection)
- return NULL;
+ return nullptr;
sal_uInt16 nCount = pDPCollection->GetCount();
ScAddress aPos( nCol, nRow, nTab );
@@ -347,13 +347,13 @@ ScDPObject* ScDocument::GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
if ( (*pDPCollection)[i].GetOutRange().In( aPos ) )
return &(*pDPCollection)[i];
- return NULL;
+ return nullptr;
}
ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const
{
if (!pDPCollection)
- return NULL;
+ return nullptr;
/* Walk the collection in reverse order to get something of an
* approximation of MS Excels 'most recent' effect. */
@@ -362,7 +362,7 @@ ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const
if ( (*pDPCollection)[i].GetOutRange().In( rBlock ) )
return &(*pDPCollection)[i];
- return NULL;
+ return nullptr;
}
void ScDocument::StopTemporaryChartLock()
@@ -621,7 +621,7 @@ const ScSheetEvents* ScDocument::GetSheetEvents( SCTAB nTab ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetSheetEvents();
- return NULL;
+ return nullptr;
}
void ScDocument::SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew )
@@ -696,7 +696,7 @@ void ScDocument::ResetCalcNotifications()
ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, bool bCreate )
{
- ScOutlineTable* pVal = NULL;
+ ScOutlineTable* pVal = nullptr;
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
@@ -833,7 +833,7 @@ const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetScenarioRanges();
- return NULL;
+ return nullptr;
}
bool ScDocument::IsActiveScenario( SCTAB nTab ) const
@@ -958,7 +958,7 @@ void ScDocument::BeginUnoRefUndo()
ScUnoRefList* ScDocument::EndUnoRefUndo()
{
ScUnoRefList* pRet = pUnoRefUndoList;
- pUnoRefUndoList = NULL;
+ pUnoRefUndoList = nullptr;
return pRet; // Must be deleted by caller!
}
@@ -1420,7 +1420,7 @@ bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
const ScDBData* pDBData = GetDBAtCursor( nCurCol, nCurRow, nCurTab, ScDBDataPortion::AREA );
- bool bHasAutoFilter = (pDBData != NULL);
+ bool bHasAutoFilter = (pDBData != nullptr);
if ( pDBData )
{
@@ -1637,7 +1637,7 @@ void ScDocument::GetEmbedded( ScRange& rRange ) const
Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm
{
Rectangle aRect;
- ScTable* pTable = NULL;
+ ScTable* pTable = nullptr;
if ( aEmbedRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) )
pTable = maTabs[aEmbedRange.aStart.Tab()];
else
@@ -1691,7 +1691,7 @@ static bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SC
while (rTwips < nStopTwips && nRow <= nEndRow && !bStop)
{
SCROW nHeightEndRow;
- sal_uInt16 nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow, bHiddenAsZero );
+ sal_uInt16 nHeight = pTable->GetRowHeight( nRow, nullptr, &nHeightEndRow, bHiddenAsZero );
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -1728,7 +1728,7 @@ static bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SC
ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHiddenAsZero ) const
{
- ScTable* pTable = NULL;
+ ScTable* pTable = nullptr;
if (nTab < static_cast<SCTAB>(maTabs.size()))
pTable = maTabs[nTab];
else
@@ -1843,7 +1843,7 @@ ScTableProtection* ScDocument::GetTabProtection( SCTAB nTab ) const
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetProtection();
- return NULL;
+ return nullptr;
}
void ScDocument::SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect)
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 12ed06107063..b0b6cc9643f5 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -82,7 +82,7 @@ bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
GetCellType(nVCol, nVRow, nVTab, eVType);
// #i108005# convert target value to number using default format,
// as previously done in ScInterpreter::GetDouble
- ScFormulaCell* pFormula = NULL;
+ ScFormulaCell* pFormula = nullptr;
double fTargetVal = 0.0;
sal_uInt32 nFIndex = 0;
if ( eFType == CELLTYPE_FORMULA && eVType == CELLTYPE_VALUE &&
@@ -475,11 +475,11 @@ bool ScDocument::MarkUsedExternalReferences( ScTokenArray& rArr, const ScAddress
if (!rArr.GetLen())
return false;
- ScExternalRefManager* pRefMgr = NULL;
+ ScExternalRefManager* pRefMgr = nullptr;
rArr.Reset();
- formula::FormulaToken* t = NULL;
+ formula::FormulaToken* t = nullptr;
bool bAllMarked = false;
- while (!bAllMarked && (t = rArr.GetNextReferenceOrName()) != NULL)
+ while (!bAllMarked && (t = rArr.GetNextReferenceOrName()) != nullptr)
{
if (t->IsExternalRef())
{
@@ -773,14 +773,14 @@ const SfxPoolItem* ScDocument::GetEffItem(
return &rSet.Get( nWhich );
}
OSL_FAIL("no pattern");
- return NULL;
+ return nullptr;
}
const SfxItemSet* ScDocument::GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
ScConditionalFormatList* pFormatList = GetCondFormList(nTab);
if (!pFormatList)
- return NULL;
+ return nullptr;
ScAddress aPos(nCol, nRow, nTab);
ScRefCellValue aCell(const_cast<ScDocument&>(*this), aPos);
@@ -815,7 +815,7 @@ const SfxItemSet* ScDocument::GetCondResult(
}
}
- return NULL;
+ return nullptr;
}
ScConditionalFormat* ScDocument::GetCondFormat(
@@ -838,7 +838,7 @@ ScConditionalFormat* ScDocument::GetCondFormat(
}
}
- return NULL;
+ return nullptr;
}
ScConditionalFormatList* ScDocument::GetCondFormList(SCTAB nTab) const
@@ -846,7 +846,7 @@ ScConditionalFormatList* ScDocument::GetCondFormList(SCTAB nTab) const
if(ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetCondFormList();
- return NULL;
+ return nullptr;
}
void ScDocument::SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab )
@@ -860,7 +860,7 @@ const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) const
if ( pValidationList )
return pValidationList->GetData( nIndex );
else
- return NULL;
+ return nullptr;
}
void ScDocument::DeleteConditionalFormat(sal_uLong nOldIndex, SCTAB nTab)
@@ -885,7 +885,7 @@ void ScDocument::AddDetectiveOperation( const ScDetOpData& rData )
void ScDocument::ClearDetectiveOperations()
{
delete pDetOpList; // deletes also the entries
- pDetOpList = NULL;
+ pDetOpList = nullptr;
}
void ScDocument::SetDetOpList(ScDetOpList* pNew)
@@ -1185,10 +1185,10 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
// 1
FindOrder( pTempRows.get(), nThisEndRow, nOtherEndRow, false,
- rOtherDoc, nThisTab, nOtherTab, nEndCol, NULL, &aProgress, 0 );
+ rOtherDoc, nThisTab, nOtherTab, nEndCol, nullptr, &aProgress, 0 );
// 2
FindOrder( pOtherCols.get(), nThisEndCol, nOtherEndCol, true,
- rOtherDoc, nThisTab, nOtherTab, nEndRow, NULL, NULL, 0 );
+ rOtherDoc, nThisTab, nOtherTab, nEndRow, nullptr, nullptr, 0 );
FindOrder( pOtherRows.get(), nThisEndRow, nOtherEndRow, false,
rOtherDoc, nThisTab, nOtherTab, nThisEndCol,
pOtherCols.get(), &aProgress, nThisEndRow );
@@ -1198,7 +1198,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
if (ValidRow(pTempRows[nThisRow]))
nMatch1 += SC_DOCCOMP_MAXDIFF -
RowDifferences( nThisRow, nThisTab, rOtherDoc, pTempRows[nThisRow],
- nOtherTab, nEndCol, NULL );
+ nOtherTab, nEndCol, nullptr );
sal_uLong nMatch2 = 0; // pOtherRows, pOtherCols
for (nThisRow = 0; nThisRow<=nThisEndRow; nThisRow++)
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index b9db4df8375e..e8a80ff9b6ca 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -140,7 +140,7 @@ SvtScriptType ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab )
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
if (!pPattern) return SvtScriptType::NONE;
- const SfxItemSet* pCondSet = NULL;
+ const SfxItemSet* pCondSet = nullptr;
if ( !static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData().empty() )
pCondSet = GetCondResult( nCol, nRow, nTab );
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index b86370ebdb61..b4c136793ebf 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -345,7 +345,7 @@ void ScDocument::PutInFormulaTree( ScFormulaCell* pCell )
else
pFormulaTree = pCell; // No end, no beginning..
pCell->SetPrevious( pEOFormulaTree );
- pCell->SetNext( 0 );
+ pCell->SetNext( nullptr );
pEOFormulaTree = pCell;
nFormulaCodeInTree += pCell->GetCode()->GetCodeLen();
}
@@ -378,8 +378,8 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell )
{
pEOFormulaTree = pPrev; // this cell was last cell
}
- pCell->SetPrevious( 0 );
- pCell->SetNext( 0 );
+ pCell->SetPrevious( nullptr );
+ pCell->SetNext( nullptr );
sal_uInt16 nRPN = pCell->GetCode()->GetCodeLen();
if ( nFormulaCodeInTree >= nRPN )
nFormulaCodeInTree -= nRPN;
@@ -455,7 +455,7 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
ScProgress::CreateInterpretProgress( this );
pCell = pFormulaTree;
- ScFormulaCell* pLastNoGood = 0;
+ ScFormulaCell* pLastNoGood = nullptr;
while ( pCell )
{
// Interpret resets bDirty and calls Remove, also the referenced!
@@ -481,7 +481,7 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
if ( pFormulaTree->GetDirty() && !bOnlyForced )
{
pCell = pFormulaTree;
- pLastNoGood = 0;
+ pLastNoGood = nullptr;
}
else
{
@@ -500,10 +500,10 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
}
}
else
- pCell = 0;
+ pCell = nullptr;
}
if ( ScProgress::IsUserBreak() )
- pCell = 0;
+ pCell = nullptr;
}
if ( bProgress )
ScProgress::DeleteInterpretProgress();
@@ -539,7 +539,7 @@ void ScDocument::AppendToFormulaTrack( ScFormulaCell* pCell )
else
pFormulaTrack = pCell; // No end, no beginning..
pCell->SetPreviousTrack( pEOFormulaTrack );
- pCell->SetNextTrack( 0 );
+ pCell->SetNextTrack( nullptr );
pEOFormulaTrack = pCell;
++nFormulaTrackCount;
}
@@ -572,8 +572,8 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell )
{
pEOFormulaTrack = pPrev; // this cell was last cell
}
- pCell->SetPreviousTrack( 0 );
- pCell->SetNextTrack( 0 );
+ pCell->SetPreviousTrack( nullptr );
+ pCell->SetNextTrack( nullptr );
--nFormulaTrackCount;
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 3666fc46310b..d975c3f908c1 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -163,7 +163,7 @@ void ScDocument::SetPrinter( SfxPrinter* pNewPrinter )
UpdateDrawPrinter();
pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
}
- InvalidateTextWidth(NULL, NULL, false); // in both cases
+ InvalidateTextWidth(nullptr, nullptr, false); // in both cases
}
void ScDocument::SetPrintOptions()
@@ -208,7 +208,7 @@ VirtualDevice* ScDocument::GetVirtualDevice_100th_mm()
OutputDevice* ScDocument::GetRefDevice()
{
// Create printer like ref device, see Writer...
- OutputDevice* pRefDevice = NULL;
+ OutputDevice* pRefDevice = nullptr;
if ( SC_MOD()->GetInputOptions().GetTextWysiwyg() )
pRefDevice = GetPrinter();
else
@@ -236,7 +236,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
if( SvtLanguageOptions().IsCTLFontEnabled() )
{
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if( rChanges.GetItemState(ATTR_WRITINGDIR, true, &pItem ) == SfxItemState::SET )
ScChartHelper::DoUpdateAllCharts( this );
}
@@ -248,7 +248,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rSet, rChanges ) )
- InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
+ InvalidateTextWidth( nullptr, nullptr, bNumFormatChanged );
for (SCTAB nTab=0; nTab<=MAXTAB; ++nTab)
if (maTabs[nTab] && maTabs[nTab]->IsStreamValid())
@@ -439,7 +439,7 @@ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress
const SCTAB nTab = pAdrFrom->Tab();
if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
- maTabs[nTab]->InvalidateTextWidth( pAdrFrom, NULL, bNumFormatChanged, bBroadcast );
+ maTabs[nTab]->InvalidateTextWidth( pAdrFrom, nullptr, bNumFormatChanged, bBroadcast );
}
else
{
@@ -534,7 +534,7 @@ public:
bool ScDocument::IdleCalcTextWidth() // true = try next again
{
// #i75610# if a printer hasn't been set or created yet, don't create one for this
- if (!mbIdleEnabled || IsInLinkUpdate() || GetPrinter(false) == NULL)
+ if (!mbIdleEnabled || IsInLinkUpdate() || GetPrinter(false) == nullptr)
return false;
IdleCalcTextWidthScope aScope(*this, aCurTextWidthCalcPos);
@@ -573,7 +573,7 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
ScColumn* pCol = &pTab->aCol[aScope.Col()];
std::unique_ptr<ScColumnTextWidthIterator> pColIter(new ScColumnTextWidthIterator(*pCol, aScope.Row(), MAXROW));
- OutputDevice* pDev = NULL;
+ OutputDevice* pDev = nullptr;
sal_uInt16 nRestart = 0;
sal_uInt16 nCount = 0;
while ( (nZoom > 0) && (nCount < CALCMAX) && (nRestart < 2) )
@@ -833,7 +833,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
// Update failed. Notify the user.
OUString aFile;
- sfx2::LinkManager::GetDisplayNames(pRefLink, NULL, &aFile);
+ sfx2::LinkManager::GetDisplayNames(pRefLink, nullptr, &aFile);
// Decode encoded URL for display friendliness.
INetURLObject aUrl(aFile,INetURLObject::WAS_ENCODED);
aFile = aUrl.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
@@ -910,7 +910,7 @@ namespace {
ScDdeLink* lclGetDdeLink(
const sfx2::LinkManager* pLinkManager,
const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode,
- size_t* pnDdePos = NULL )
+ size_t* pnDdePos = nullptr )
{
if( pLinkManager )
{
@@ -931,7 +931,7 @@ ScDdeLink* lclGetDdeLink(
}
}
}
- return NULL;
+ return nullptr;
}
/** Returns a pointer to the specified DDE link.
@@ -955,7 +955,7 @@ ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, size_t nDdePos
}
}
}
- return NULL;
+ return nullptr;
}
} // namespace
@@ -963,7 +963,7 @@ ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, size_t nDdePos
bool ScDocument::FindDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem,
sal_uInt8 nMode, size_t& rnDdePos )
{
- return lclGetDdeLink( GetLinkManager(), rAppl, rTopic, rItem, nMode, &rnDdePos ) != NULL;
+ return lclGetDdeLink( GetLinkManager(), rAppl, rTopic, rItem, nMode, &rnDdePos ) != nullptr;
}
bool ScDocument::GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const
@@ -991,7 +991,7 @@ bool ScDocument::GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const
const ScMatrix* ScDocument::GetDdeLinkResultMatrix( size_t nDdePos ) const
{
const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos );
- return pDdeLink ? pDdeLink->GetResult() : NULL;
+ return pDdeLink ? pDdeLink->GetResult() : nullptr;
}
bool ScDocument::CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, ScMatrixRef pResults )
@@ -1044,7 +1044,7 @@ bool ScDocument::HasAreaLinks() const
const ::sfx2::SvBaseLinks& rLinks = pMgr->GetLinks();
sal_uInt16 nCount = rLinks.size();
for (sal_uInt16 i=0; i<nCount; i++)
- if (0 != dynamic_cast<const ScAreaLink* >(rLinks[i].get()))
+ if (nullptr != dynamic_cast<const ScAreaLink* >(rLinks[i].get()))
return true;
return false;
@@ -1177,12 +1177,12 @@ SfxBindings* ScDocument::GetViewBindings()
// used to invalidate slots after changes to this document
if ( !pShell )
- return NULL; // no ObjShell -> no view
+ return nullptr; // no ObjShell -> no view
// first check current view
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
if ( pViewFrame && pViewFrame->GetObjectShell() != pShell ) // wrong document?
- pViewFrame = NULL;
+ pViewFrame = nullptr;
// otherwise use first view for this doc
if ( !pViewFrame )
@@ -1191,7 +1191,7 @@ SfxBindings* ScDocument::GetViewBindings()
if (pViewFrame)
return &pViewFrame->GetBindings();
else
- return NULL;
+ return nullptr;
}
void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType )
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index e1d0479edf1e..e438b1e4d4c1 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -244,11 +244,11 @@ void ScDocument::DeleteDrawLayer()
if(pLocalPool && pLocalPool->GetSecondaryPool())
{
- pLocalPool->SetSecondaryPool(0);
+ pLocalPool->SetSecondaryPool(nullptr);
}
}
delete pDrawLayer;
- pDrawLayer = 0;
+ pDrawLayer = nullptr;
}
bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const
@@ -415,7 +415,7 @@ void ScDocument::EnsureGraphicNames()
SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos )
{
// for Drag&Drop on draw object
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
if (pDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
@@ -520,7 +520,7 @@ void ScDocument::Clear( bool bFromDestructor )
delete *it;
maTabs.clear();
delete pSelectionAttr;
- pSelectionAttr = NULL;
+ pSelectionAttr = nullptr;
if (pDrawLayer)
{
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 06d0fd78ef37..ba750bc17c57 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -174,7 +174,7 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck )
else
{
while(nTab > static_cast<SCTAB>(maTabs.size()))
- maTabs.push_back(NULL);
+ maTabs.push_back(nullptr);
maTabs.push_back( new ScTable(this, nTab, aString) );
}
maTabs[nTab]->SetLoadingMedium(bLoadingMedium);
@@ -288,7 +288,7 @@ ScDBData* ScDocument::GetAnonymousDBData(SCTAB nTab)
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetAnonymousDBData();
- return NULL;
+ return nullptr;
}
SCTAB ScDocument::GetTableCount() const
@@ -526,7 +526,7 @@ bool ScDocument::InsertTab(
for (; it != maTabs.end(); ++it)
if ( *it )
(*it)->UpdateInsertTab(aCxt);
- maTabs.push_back(NULL);
+ maTabs.push_back(nullptr);
for (i = nTabCount; i > nPos; i--)
{
maTabs[i] = maTabs[i - 1];
@@ -615,7 +615,7 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
if ( *it )
(*it)->UpdateInsertTab(aCxt);
it = maTabs.begin();
- maTabs.insert(it+nPos,nNewSheets, NULL);
+ maTabs.insert(it+nPos,nNewSheets, nullptr);
for (SCTAB i = 0; i < nNewSheets; ++i)
{
maTabs[nPos + i] = new ScTable(this, nPos + i, rNames.at(i));
@@ -1865,9 +1865,9 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
else
{
if (nTab < static_cast<SCTAB>(maTabs.size()))
- maTabs[nTab]=NULL;
+ maTabs[nTab]=nullptr;
else
- maTabs.push_back(NULL);
+ maTabs.push_back(nullptr);
}
}
else
@@ -1895,7 +1895,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
OUString aString;
if ( nTab2 >= static_cast<SCTAB>(maTabs.size()))
- maTabs.resize(nTab2 + 1, NULL);
+ maTabs.resize(nTab2 + 1, nullptr);
for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
{
ScTable* pTable = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
@@ -1914,7 +1914,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowI
OUString aString;
if (nTab2 >= static_cast<SCTAB>(maTabs.size()))
{
- maTabs.resize(nTab2+1,NULL);
+ maTabs.resize(nTab2+1,nullptr);
}
for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
@@ -2150,8 +2150,8 @@ void ScDocument::CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab,
if (!pDestDoc)
return;
- ScTable* pSrcTab = rSrcRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) ? maTabs[rSrcRange.aStart.Tab()] : NULL;
- ScTable* pDestTab = nDestTab < static_cast<SCTAB>(pDestDoc->maTabs.size()) ? pDestDoc->maTabs[nDestTab] : NULL;
+ ScTable* pSrcTab = rSrcRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) ? maTabs[rSrcRange.aStart.Tab()] : nullptr;
+ ScTable* pDestTab = nDestTab < static_cast<SCTAB>(pDestDoc->maTabs.size()) ? pDestDoc->maTabs[nDestTab] : nullptr;
if (!pSrcTab || !pDestTab)
return;
@@ -2345,7 +2345,7 @@ ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, ScDocument*
ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
{
- mpDoc->pFormatExchangeList = NULL;
+ mpDoc->pFormatExchangeList = nullptr;
}
void ScDocument::ClearFormulaContext()
@@ -2357,7 +2357,7 @@ SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos )
{
ScTable* pTab = FetchTable(rPos.Tab());
if (!pTab)
- return NULL;
+ return nullptr;
return pTab->GetBroadcaster(rPos.Col(), rPos.Row());
}
@@ -2366,7 +2366,7 @@ const SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos ) const
{
const ScTable* pTab = FetchTable(rPos.Tab());
if (!pTab)
- return NULL;
+ return nullptr;
return pTab->GetBroadcaster(rPos.Col(), rPos.Row());
}
@@ -2416,7 +2416,7 @@ bool ScDocument::TableExists( SCTAB nTab ) const
ScTable* ScDocument::FetchTable( SCTAB nTab )
{
if (!TableExists(nTab))
- return NULL;
+ return nullptr;
return maTabs[nTab];
}
@@ -2424,7 +2424,7 @@ ScTable* ScDocument::FetchTable( SCTAB nTab )
const ScTable* ScDocument::FetchTable( SCTAB nTab ) const
{
if (!TableExists(nTab))
- return NULL;
+ return nullptr;
return maTabs[nTab];
}
@@ -2472,7 +2472,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
new sc::ColumnBlockPositionSet(*this));
sc::StartListeningContext aStartCxt(*this, pSet);
- sc::EndListeningContext aEndCxt(*this, pSet, NULL);
+ sc::EndListeningContext aEndCxt(*this, pSet, nullptr);
SCTAB nMax = static_cast<SCTAB>(maTabs.size());
ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end();
@@ -2622,7 +2622,7 @@ void ScDocument::CopyNonFilteredFromClip(
{
// look for more non-filtered rows following
SCROW nLastRow = nSourceRow;
- rCxt.getClipDoc()->RowFiltered(nSourceRow, nFlagTab, NULL, &nLastRow);
+ rCxt.getClipDoc()->RowFiltered(nSourceRow, nFlagTab, nullptr, &nLastRow);
SCROW nFollow = nLastRow - nSourceRow;
if (nFollow > nSourceEnd - nSourceRow)
@@ -2649,7 +2649,7 @@ class BroadcastAction : public sc::ColumnSpanSet::ColumnAction
ScColumn* mpCol;
public:
- BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(NULL) {}
+ BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
virtual void startColumn( ScColumn* pCol ) override
{
@@ -2925,7 +2925,7 @@ void ScDocument::CopyMultiRangeFromClip(
DeleteArea(nCol1, nRow1, nCol1+nColSize-1, nRow1+nRowSize-1, rMark, nDelFlag, false, &aBroadcastSpans);
}
- sc::CopyFromClipContext aCxt(*this, NULL, pClipDoc, nInsFlag, bAsLink, bSkipAttrForEmpty);
+ sc::CopyFromClipContext aCxt(*this, nullptr, pClipDoc, nInsFlag, bAsLink, bSkipAttrForEmpty);
std::pair<SCTAB,SCTAB> aTabRanges = getMarkedTableRange(maTabs, rMark);
aCxt.setTabRange(aTabRanges.first, aTabRanges.second);
@@ -3150,7 +3150,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
}
maTabs[i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags);
maTabs[nSrcTab]->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow,
- nFlags, false, maTabs[i], NULL, bAsLink );
+ nFlags, false, maTabs[i], nullptr, bAsLink );
if (bDoMix)
maTabs[i]->MixData(aMixDocCxt, nStartCol,nStartRow, nEndCol,nEndRow,
@@ -3390,7 +3390,7 @@ OUString ScDocument::GetString( const ScAddress& rPos ) const
double* ScDocument::GetValueCell( const ScAddress& rPos )
{
if (!TableExists(rPos.Tab()))
- return NULL;
+ return nullptr;
return maTabs[rPos.Tab()]->GetValueCell(rPos.Col(), rPos.Row());
}
@@ -3486,7 +3486,7 @@ const EditTextObject* ScDocument::GetEditText( const ScAddress& rPos ) const
{
SCTAB nTab = rPos.Tab();
if (!TableExists(nTab))
- return NULL;
+ return nullptr;
return maTabs[nTab]->GetEditText(rPos.Col(), rPos.Row());
}
@@ -3596,7 +3596,7 @@ void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rForm
const ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos ) const
{
if (!TableExists(rPos.Tab()))
- return NULL;
+ return nullptr;
return maTabs[rPos.Tab()]->GetFormulaCell(rPos.Col(), rPos.Row());
}
@@ -3604,7 +3604,7 @@ const ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos ) const
ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos )
{
if (!TableExists(rPos.Tab()))
- return NULL;
+ return nullptr;
return maTabs[rPos.Tab()]->GetFormulaCell(rPos.Col(), rPos.Row());
}
@@ -4009,7 +4009,7 @@ sal_uInt16 ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
- return maTabs[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
+ return maTabs[nTab]->GetRowHeight( nRow, nullptr, nullptr, bHiddenAsZero );
OSL_FAIL("Wrong sheet number");
return 0;
}
@@ -4477,17 +4477,17 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
bool bHidden;
sal_uInt16 nHeight;
sal_uInt8 nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
- bool bStartHidden = bHidden = maTabs[nTab]->RowHidden( nStart, NULL, &nHiddenEndRow);
- sal_uInt16 nStartHeight = nHeight = maTabs[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
+ bool bStartHidden = bHidden = maTabs[nTab]->RowHidden( nStart, nullptr, &nHiddenEndRow);
+ sal_uInt16 nStartHeight = nHeight = maTabs[nTab]->GetRowHeight( nStart, nullptr, &nHeightEndRow, false);
SCROW nRow;
while ((nRow = std::min( nHiddenEndRow, std::min( nFlagsEndRow, nHeightEndRow)) + 1) <= MAXROW)
{
if (nFlagsEndRow < nRow)
nFlags = pRowFlagsArray->GetValue( nRow, nIndex, nFlagsEndRow);
if (nHiddenEndRow < nRow)
- bHidden = maTabs[nTab]->RowHidden( nRow, NULL, &nHiddenEndRow);
+ bHidden = maTabs[nTab]->RowHidden( nRow, nullptr, &nHiddenEndRow);
if (nHeightEndRow < nRow)
- nHeight = maTabs[nTab]->GetRowHeight( nRow, NULL, &nHeightEndRow, false);
+ nHeight = maTabs[nTab]->GetRowHeight( nRow, nullptr, &nHeightEndRow, false);
if (((nStartFlags & CR_MANUALBREAK) != (nFlags & CR_MANUALBREAK)) ||
((nStartFlags & CR_MANUALSIZE) != (nFlags & CR_MANUALSIZE)) ||
@@ -4590,7 +4590,7 @@ const ScPatternAttr* ScDocument::GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab
{
if (TableExists(nTab))
return maTabs[nTab]->GetPattern( nCol, nRow );
- return NULL;
+ return nullptr;
}
const ScPatternAttr* ScDocument::GetPattern( const ScAddress& rPos ) const
@@ -4598,14 +4598,14 @@ const ScPatternAttr* ScDocument::GetPattern( const ScAddress& rPos ) const
if (TableExists(rPos.Tab()))
return maTabs[rPos.Tab()]->GetPattern(rPos.Col(), rPos.Row());
- return NULL;
+ return nullptr;
}
const ScPatternAttr* ScDocument::GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
return maTabs[nTab]->GetMostUsedPattern( nCol, nStartRow, nEndRow );
- return NULL;
+ return nullptr;
}
void ScDocument::ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem& rAttr )
@@ -4738,7 +4738,7 @@ const ScStyleSheet* ScDocument::GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) c
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
return maTabs[nTab]->GetStyle(nCol, nRow);
else
- return NULL;
+ return nullptr;
}
const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) const
@@ -4746,7 +4746,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
bool bEqual = true;
bool bFound;
- const ScStyleSheet* pStyle = NULL;
+ const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
if ( rMark.IsMultiMarked() )
@@ -4784,7 +4784,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
}
}
- return bEqual ? pStyle : NULL;
+ return bEqual ? pStyle : nullptr;
}
void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
@@ -4926,14 +4926,14 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
SvxBoxItem& rLineOuter,
SvxBoxInfoItem& rLineInner )
{
- rLineOuter.SetLine(NULL, SvxBoxItemLine::TOP);
- rLineOuter.SetLine(NULL, SvxBoxItemLine::BOTTOM);
- rLineOuter.SetLine(NULL, SvxBoxItemLine::LEFT);
- rLineOuter.SetLine(NULL, SvxBoxItemLine::RIGHT);
+ rLineOuter.SetLine(nullptr, SvxBoxItemLine::TOP);
+ rLineOuter.SetLine(nullptr, SvxBoxItemLine::BOTTOM);
+ rLineOuter.SetLine(nullptr, SvxBoxItemLine::LEFT);
+ rLineOuter.SetLine(nullptr, SvxBoxItemLine::RIGHT);
rLineOuter.SetDistance(0);
- rLineInner.SetLine(NULL, SvxBoxInfoItemLine::HORI);
- rLineInner.SetLine(NULL, SvxBoxInfoItemLine::VERT);
+ rLineInner.SetLine(nullptr, SvxBoxInfoItemLine::HORI);
+ rLineInner.SetLine(nullptr, SvxBoxInfoItemLine::VERT);
rLineInner.SetTable(true);
rLineInner.SetDist(true);
rLineInner.SetMinDist(false);
@@ -5187,7 +5187,7 @@ bool ScDocument::IsSelectionEditable( const ScMarkData& rMark,
rMark.GetMarkArea(aRange);
bool bOk = true;
- bool bMatrix = ( pOnlyNotBecauseOfMatrix != NULL );
+ bool bMatrix = ( pOnlyNotBecauseOfMatrix != nullptr );
SCTAB nMax = static_cast<SCTAB>(maTabs.size());
ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd && *itr < nMax && (bOk || bMatrix); ++itr)
@@ -5497,7 +5497,7 @@ bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
// Set Autofilter
- const ScDBData* pData = NULL;
+ const ScDBData* pData = nullptr;
ScDBCollection::NamedDBs& rDBs = pDBCollection->getNamedDBs();
ScDBCollection::NamedDBs::const_iterator itr = rDBs.begin(), itrEnd = rDBs.end();
for (; itr != itrEnd; ++itr)
@@ -5517,7 +5517,7 @@ bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
pData = maTabs[nTab]->GetAnonymousDBData();
else
- pData=NULL;
+ pData=nullptr;
if (pData)
{
if (pData->HasAutoFilter())
@@ -5962,7 +5962,7 @@ const ScRange* ScDocument::GetPrintRange( SCTAB nTab, sal_uInt16 nPos )
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetPrintRange(nPos);
- return NULL;
+ return nullptr;
}
const ScRange* ScDocument::GetRepeatColRange( SCTAB nTab )
@@ -5970,7 +5970,7 @@ const ScRange* ScDocument::GetRepeatColRange( SCTAB nTab )
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetRepeatColRange();
- return NULL;
+ return nullptr;
}
const ScRange* ScDocument::GetRepeatRowRange( SCTAB nTab )
@@ -5978,7 +5978,7 @@ const ScRange* ScDocument::GetRepeatRowRange( SCTAB nTab )
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetRepeatRowRange();
- return NULL;
+ return nullptr;
}
void ScDocument::ClearPrintRanges( SCTAB nTab )
@@ -6068,7 +6068,7 @@ ScRowBreakIterator* ScDocument::GetRowBreakIterator(SCTAB nTab) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return new ScRowBreakIterator(maTabs[nTab]->maRowPageBreaks);
- return NULL;
+ return nullptr;
}
void ScDocument::AddSubTotalCell(ScFormulaCell* pCell)
@@ -6193,7 +6193,7 @@ ScPostIt* ScDocument::GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab)
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
return maTabs[nTab]->aCol[nCol].GetCellNote(nRow);
else
- return NULL;
+ return nullptr;
}
@@ -6222,7 +6222,7 @@ bool ScDocument::HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const
return false;
const ScPostIt* pNote = pTab->aCol[nCol].GetCellNote(nRow);
- return pNote != NULL;
+ return pNote != nullptr;
}
bool ScDocument::HasColNotes(SCCOL nCol, SCTAB nTab) const
@@ -6260,7 +6260,7 @@ ScPostIt* ScDocument::ReleaseNote(const ScAddress& rPos)
{
ScTable* pTab = FetchTable(rPos.Tab());
if (!pTab)
- return NULL;
+ return nullptr;
return pTab->ReleaseNote(rPos.Col(), rPos.Row());
}
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index d520a0f5e6dc..c09b7c4283ba 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -168,7 +168,7 @@ std::set<Color> ScDocument::GetDocColors()
for (sal_uInt32 j=0; j<nCount; j++)
{
const SvxColorItem *pItem = static_cast<const SvxColorItem*>(pPool->GetItem2(nAttrib, j));
- if (pItem == 0)
+ if (pItem == nullptr)
continue;
Color aColor( pItem->GetValue() );
if (COL_AUTO != aColor.GetColor())
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 543181cacbf1..792e13239541 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -61,7 +61,7 @@ struct ScDocumentImportImpl
ColAttr* getColAttr( size_t nTab, size_t nCol )
{
if (nTab > static_cast<size_t>(MAXTAB) || nCol > static_cast<size_t>(MAXCOL))
- return NULL;
+ return nullptr;
if (nTab >= maTabAttrs.size())
maTabAttrs.resize(nTab+1);
@@ -74,7 +74,7 @@ struct ScDocumentImportImpl
}
};
-ScDocumentImport::Attrs::Attrs() : mpData(NULL), mnSize(0), mbLatinNumFmtOnly(false) {}
+ScDocumentImport::Attrs::Attrs() : mpData(nullptr), mnSize(0), mbLatinNumFmtOnly(false) {}
ScDocumentImport::ScDocumentImport(ScDocument& rDoc) : mpImpl(new ScDocumentImportImpl(rDoc)) {}
ScDocumentImport::~ScDocumentImport()
@@ -164,7 +164,7 @@ void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr,
case CELLTYPE_EDIT:
// Cell takes the ownership of the text object.
pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), aCell.mpEditText);
- aCell.mpEditText = NULL;
+ aCell.mpEditText = nullptr;
break;
case CELLTYPE_VALUE:
pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), aCell.mfValue);
@@ -172,7 +172,7 @@ void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr,
case CELLTYPE_FORMULA:
// This formula cell instance is directly placed in the document without copying.
pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), aCell.mpFormula);
- aCell.mpFormula = NULL;
+ aCell.mpFormula = nullptr;
break;
default:
pBlockPos->miCellPos = rCells.set_empty(pBlockPos->miCellPos, rPos.Row(), rPos.Row());
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index dccdfc51e42d..f11d8807ecd6 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -666,7 +666,7 @@ bool ScDPCache::IsRowEmpty(SCROW nRow) const
const ScDPCache::GroupItems* ScDPCache::GetGroupItems(long nDim) const
{
if (nDim < 0)
- return NULL;
+ return nullptr;
long nSourceCount = static_cast<long>(maFields.size());
if (nDim < nSourceCount)
@@ -676,7 +676,7 @@ const ScDPCache::GroupItems* ScDPCache::GetGroupItems(long nDim) const
if (nDim < static_cast<long>(maGroupFields.size()))
return &maGroupFields[nDim];
- return NULL;
+ return nullptr;
}
OUString ScDPCache::GetDimensionName(LabelsType::size_type nDim) const
@@ -794,7 +794,7 @@ SCROW ScDPCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty)
const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const
{
if (nDim < 0 || nId < 0)
- return NULL;
+ return nullptr;
size_t nSourceCount = maFields.size();
size_t nDimPos = static_cast<size_t>(nDim);
@@ -807,12 +807,12 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const
return &rField.maItems[nItemId];
if (!rField.mpGroup)
- return NULL;
+ return nullptr;
nItemId -= rField.maItems.size();
const ItemsType& rGI = rField.mpGroup->maItems;
if (nItemId >= rGI.size())
- return NULL;
+ return nullptr;
return &rGI[nItemId];
}
@@ -820,11 +820,11 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const
// Try group fields.
nDimPos -= nSourceCount;
if (nDimPos >= maGroupFields.size())
- return NULL;
+ return nullptr;
const ItemsType& rGI = maGroupFields[nDimPos].maItems;
if (nItemId >= rGI.size())
- return NULL;
+ return nullptr;
return &rGI[nItemId];
}
@@ -853,7 +853,7 @@ SCROW ScDPCache::GetDataSize() const
const ScDPCache::IndexArrayType* ScDPCache::GetFieldIndexArray( size_t nDim ) const
{
if (nDim >= maFields.size())
- return NULL;
+ return nullptr;
return &maFields[nDim].maData;
}
@@ -911,7 +911,7 @@ const OUString* ScDPCache::InternString(const OUString& rStr) const
return &(*it);
std::pair<StringSetType::iterator, bool> r = maStringPool.insert(rStr);
- return r.second ? &(*r.first) : NULL;
+ return r.second ? &(*r.first) : nullptr;
}
void ScDPCache::AddReference(ScDPObject* pObj) const
@@ -991,7 +991,7 @@ OUString ScDPCache::GetFormattedString(long nDim, const ScDPItemData& rItem) con
SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
if (pFormatter)
{
- Color* pColor = NULL;
+ Color* pColor = nullptr;
OUString aStr;
pFormatter->GetOutputString(rItem.GetValue(), nNumFormat, aStr, &pColor);
return aStr;
@@ -1128,13 +1128,13 @@ void ScDPCache::ClearGroupFields()
const ScDPNumGroupInfo* ScDPCache::GetNumGroupInfo(long nDim) const
{
if (nDim < 0)
- return NULL;
+ return nullptr;
long nSourceCount = static_cast<long>(maFields.size());
if (nDim < nSourceCount)
{
if (!maFields.at(nDim).mpGroup)
- return NULL;
+ return nullptr;
return &maFields[nDim].mpGroup->maInfo;
}
@@ -1143,7 +1143,7 @@ const ScDPNumGroupInfo* ScDPCache::GetNumGroupInfo(long nDim) const
if (nDim < static_cast<long>(maGroupFields.size()))
return &maGroupFields.at(nDim).maInfo;
- return NULL;
+ return nullptr;
}
sal_Int32 ScDPCache::GetGroupType(long nDim) const
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 48d49e5a6625..43cd1cdd32da 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -78,7 +78,7 @@ size_t ScDPSaveGroupItem::GetElementCount() const
const OUString* ScDPSaveGroupItem::GetElementByIndex(size_t nIndex) const
{
- return (nIndex < aElements.size()) ? &aElements[ nIndex ] : 0;
+ return (nIndex < aElements.size()) ? &aElements[ nIndex ] : nullptr;
}
void ScDPSaveGroupItem::Rename( const OUString& rNewName )
@@ -199,7 +199,7 @@ ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroupAcc( const OUString& rGr
if (aIter->GetGroupName().equals(rGroupName)) //TODO: ignore case
return &*aIter;
- return NULL; // none found
+ return nullptr; // none found
}
long ScDPSaveGroupDimension::GetGroupCount() const
@@ -328,8 +328,8 @@ void fillDateGroupDimension(
{
case sheet::DataPilotFieldGroupBy::YEARS:
nStart = ScDPUtil::getDatePartValue(
- fSourceMin, NULL, sheet::DataPilotFieldGroupBy::YEARS, pFormatter);
- nEnd = ScDPUtil::getDatePartValue(fSourceMax, NULL, sheet::DataPilotFieldGroupBy::YEARS, pFormatter);
+ fSourceMin, nullptr, sheet::DataPilotFieldGroupBy::YEARS, pFormatter);
+ nEnd = ScDPUtil::getDatePartValue(fSourceMax, nullptr, sheet::DataPilotFieldGroupBy::YEARS, pFormatter);
break;
case sheet::DataPilotFieldGroupBy::QUARTERS: nStart = 1; nEnd = 4; break;
case sheet::DataPilotFieldGroupBy::MONTHS: nStart = 1; nEnd = 12; break;
@@ -714,14 +714,14 @@ ScDPSaveGroupDimension* ScDPDimensionSaveData::GetNamedGroupDimAcc( const OUStri
{
ScDPSaveGroupDimVec::iterator aIt = ::std::find_if(
maGroupDims.begin(), maGroupDims.end(), ScDPSaveGroupDimNameFunc( rGroupDimName ) );
- return (aIt == maGroupDims.end()) ? 0 : &*aIt;
+ return (aIt == maGroupDims.end()) ? nullptr : &*aIt;
}
ScDPSaveGroupDimension* ScDPDimensionSaveData::GetFirstNamedGroupDimAcc( const OUString& rBaseDimName )
{
ScDPSaveGroupDimVec::iterator aIt = ::std::find_if(
maGroupDims.begin(), maGroupDims.end(), ScDPSaveGroupSourceNameFunc( rBaseDimName ) );
- return (aIt == maGroupDims.end()) ? 0 : &*aIt;
+ return (aIt == maGroupDims.end()) ? nullptr : &*aIt;
}
ScDPSaveGroupDimension* ScDPDimensionSaveData::GetNextNamedGroupDimAcc( const OUString& rGroupDimName )
@@ -732,13 +732,13 @@ ScDPSaveGroupDimension* ScDPDimensionSaveData::GetNextNamedGroupDimAcc( const OU
// find next group dimension based on the same source dimension name
if( aIt != maGroupDims.end() )
aIt = ::std::find_if( aIt + 1, maGroupDims.end(), ScDPSaveGroupSourceNameFunc( aIt->GetSourceDimName() ) );
- return (aIt == maGroupDims.end()) ? 0 : &*aIt;
+ return (aIt == maGroupDims.end()) ? nullptr : &*aIt;
}
ScDPSaveNumGroupDimension* ScDPDimensionSaveData::GetNumGroupDimAcc( const OUString& rGroupDimName )
{
ScDPSaveNumGroupDimMap::iterator aIt = maNumGroupDims.find( rGroupDimName );
- return (aIt == maNumGroupDims.end()) ? 0 : &aIt->second;
+ return (aIt == maNumGroupDims.end()) ? nullptr : &aIt->second;
}
bool ScDPDimensionSaveData::HasGroupDimensions() const
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index 9c4cdb22c0ea..3d93d740c6bf 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -100,7 +100,7 @@ size_t ScDPFilteredCache::GroupFilter::getMatchItemCount() const
ScDPFilteredCache::Criterion::Criterion() :
mnFieldIndex(-1),
- mpFilter(static_cast<FilterBase*>(NULL))
+ mpFilter(static_cast<FilterBase*>(nullptr))
{
}
@@ -173,7 +173,7 @@ void ScDPFilteredCache::fillTable(
{
if (nRow > nEndSegment)
{
- if (!maShowByFilter.search_tree(nRow, bShow, NULL, &nEndSegment).second)
+ if (!maShowByFilter.search_tree(nRow, bShow, nullptr, &nEndSegment).second)
{
OSL_FAIL("Tree search failed!");
continue;
@@ -245,8 +245,8 @@ bool ScDPFilteredCache::isRowActive(sal_Int32 nRow, sal_Int32* pLastRow) const
{
bool bFilter = false, bPage = true;
SCROW nLastRowFilter = MAXROW, nLastRowPage = MAXROW;
- maShowByFilter.search_tree(nRow, bFilter, NULL, &nLastRowFilter);
- maShowByPage.search_tree(nRow, bPage, NULL, &nLastRowPage);
+ maShowByFilter.search_tree(nRow, bFilter, nullptr, &nLastRowFilter);
+ maShowByPage.search_tree(nRow, bPage, nullptr, &nLastRowPage);
if (pLastRow)
{
// Return the last row of current segment.
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 0969665df4e0..1ebb4d832ae7 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -406,7 +406,7 @@ const ScDPGroupItem* ScDPGroupDimension::GetGroupForData( const ScDPItemData& rD
if (aIter->HasElement(rData))
return &*aIter;
- return NULL;
+ return nullptr;
}
const ScDPGroupItem* ScDPGroupDimension::GetGroupForName( const ScDPItemData& rName ) const
@@ -415,13 +415,13 @@ const ScDPGroupItem* ScDPGroupDimension::GetGroupForName( const ScDPItemData& rN
if ( aIter->GetName().IsCaseInsEqual( rName ) )
return &*aIter;
- return NULL;
+ return nullptr;
}
const ScDPGroupItem* ScDPGroupDimension::GetGroupByIndex( size_t nIndex ) const
{
if (nIndex >= aItems.size())
- return NULL;
+ return nullptr;
return &aItems[nIndex];
}
@@ -968,8 +968,8 @@ bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex,
const ScDPItemData& rSecondData, long nSecondIndex ) const
{
- const ScDPGroupDimension* pFirstDim = NULL;
- const ScDPGroupDimension* pSecondDim = NULL;
+ const ScDPGroupDimension* pFirstDim = nullptr;
+ const ScDPGroupDimension* pSecondDim = nullptr;
for ( ScDPGroupDimensionVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end(); ++aIter )
{
const ScDPGroupDimension* pDim = &(*aIter);
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 5ae996cb4bc8..9dc791849a03 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -307,12 +307,12 @@ bool ScDPServiceDesc::operator== ( const ScDPServiceDesc& rOther ) const
ScDPObject::ScDPObject( ScDocument* pD ) :
pDoc( pD ),
- pSaveData( NULL ),
- pSheetDesc( NULL ),
- pImpDesc( NULL ),
- pServDesc( NULL ),
- mpTableData(static_cast<ScDPTableData*>(NULL)),
- pOutput( NULL ),
+ pSaveData( nullptr ),
+ pSheetDesc( nullptr ),
+ pImpDesc( nullptr ),
+ pServDesc( nullptr ),
+ mpTableData(static_cast<ScDPTableData*>(nullptr)),
+ pOutput( nullptr ),
mnAutoFormatIndex( 65535 ),
nHeaderRows( 0 ),
mbHeaderLayout(false),
@@ -324,15 +324,15 @@ ScDPObject::ScDPObject( ScDocument* pD ) :
ScDPObject::ScDPObject(const ScDPObject& r) :
pDoc( r.pDoc ),
- pSaveData( NULL ),
+ pSaveData( nullptr ),
aTableName( r.aTableName ),
aTableTag( r.aTableTag ),
aOutRange( r.aOutRange ),
- pSheetDesc( NULL ),
- pImpDesc( NULL ),
- pServDesc( NULL ),
- mpTableData(static_cast<ScDPTableData*>(NULL)),
- pOutput( NULL ),
+ pSheetDesc( nullptr ),
+ pImpDesc( nullptr ),
+ pServDesc( nullptr ),
+ mpTableData(static_cast<ScDPTableData*>(nullptr)),
+ pOutput( nullptr ),
mnAutoFormatIndex( r.mnAutoFormatIndex ),
nHeaderRows( r.nHeaderRows ),
mbHeaderLayout( r.mbHeaderLayout ),
@@ -497,7 +497,7 @@ void ScDPObject::WriteTempDataTo( ScDPObject& rDest ) const
bool ScDPObject::IsSheetData() const
{
- return ( pSheetDesc != NULL );
+ return ( pSheetDesc != nullptr );
}
void ScDPObject::SetName(const OUString& rNew)
@@ -693,7 +693,7 @@ ScDPTableData* ScDPObject::GetTableData()
if (!mpTableData)
{
shared_ptr<ScDPTableData> pData;
- const ScDPDimensionSaveData* pDimData = pSaveData ? pSaveData->GetExistingDimensionData() : NULL;
+ const ScDPDimensionSaveData* pDimData = pSaveData ? pSaveData->GetExistingDimensionData() : nullptr;
if ( pImpDesc )
{
@@ -808,11 +808,11 @@ void ScDPObject::Clear()
delete pSheetDesc;
delete pImpDesc;
delete pServDesc;
- pOutput = NULL;
- pSaveData = NULL;
- pSheetDesc = NULL;
- pImpDesc = NULL;
- pServDesc = NULL;
+ pOutput = nullptr;
+ pSaveData = nullptr;
+ pSheetDesc = nullptr;
+ pImpDesc = nullptr;
+ pServDesc = nullptr;
ClearTableData();
}
@@ -887,7 +887,7 @@ void ScDPObject::ClearSource()
DBG_UNHANDLED_EXCEPTION();
}
}
- xSource = NULL;
+ xSource = nullptr;
}
ScRange ScDPObject::GetNewOutputRange( bool& rOverflow )
@@ -1773,9 +1773,9 @@ bool ScDPObject::ParseFilters(
{
OUString aFound;
sal_Int32 nMatched = 0;
- if (isAtStart(aRemaining, aDataNames[nDataPos], nMatched, false, NULL))
+ if (isAtStart(aRemaining, aDataNames[nDataPos], nMatched, false, nullptr))
aFound = aDataNames[nDataPos];
- else if (isAtStart(aRemaining, aGivenNames[nDataPos], nMatched, false, NULL))
+ else if (isAtStart(aRemaining, aGivenNames[nDataPos], nMatched, false, nullptr))
aFound = aGivenNames[nDataPos];
if (!aFound.isEmpty())
@@ -1796,7 +1796,7 @@ bool ScDPObject::ParseFilters(
sal_Int32 nMatched = 0;
for ( SCSIZE nField=0; nField<nFieldCount && !bHasFieldName; nField++ )
{
- if (isAtStart(aRemaining, aFieldNames[nField], nMatched, true, NULL))
+ if (isAtStart(aRemaining, aFieldNames[nField], nMatched, true, nullptr))
{
aSpecField = aFieldNames[nField];
aRemaining = aRemaining.copy(nMatched);
@@ -2550,7 +2550,7 @@ void ScDPObject::ConvertOrientation(
sal_uInt16 nFuncs = rField.nFuncMask;
const sheet::DataPilotFieldReference& rFieldRef = rField.maFieldRef;
- ScDPSaveDimension* pDim = NULL;
+ ScDPSaveDimension* pDim = nullptr;
if ( nCol == PIVOT_DATA_FIELD )
pDim = rSaveData.GetDataLayoutDimension();
else
@@ -2559,7 +2559,7 @@ void ScDPObject::ConvertOrientation(
if (!aDocStr.isEmpty())
pDim = rSaveData.GetDimensionByName(aDocStr);
else
- pDim = NULL;
+ pDim = nullptr;
}
if (!pDim)
@@ -2595,7 +2595,7 @@ void ScDPObject::ConvertOrientation(
pDim->SetFunction(sal::static_int_cast<sal_uInt16>(eFunc));
if( rFieldRef.ReferenceType == sheet::DataPilotFieldReferenceType::NONE )
- pDim->SetReferenceValue(0);
+ pDim->SetReferenceValue(nullptr);
else
pDim->SetReferenceValue(&rFieldRef);
}
@@ -2721,7 +2721,7 @@ uno::Sequence<OUString> ScDPObject::GetRegisteredSources()
uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPServiceDesc& rDesc )
{
OUString aImplName = rDesc.aServiceName;
- uno::Reference<sheet::XDimensionsSupplier> xRet = NULL;
+ uno::Reference<sheet::XDimensionsSupplier> xRet = nullptr;
uno::Reference<lang::XMultiServiceFactory> xManager = comphelper::getProcessServiceFactory();
uno::Reference<container::XContentEnumerationAccess> xEnAc(xManager, uno::UNO_QUERY);
@@ -2856,7 +2856,7 @@ const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange& rRange, co
if (itCache == maCaches.end())
{
OSL_FAIL("Cache pool and index pool out-of-sync !!!");
- return NULL;
+ return nullptr;
}
if (pDimData)
@@ -2897,7 +2897,7 @@ ScDPCache* ScDPCollection::SheetCaches::getExistingCache(const ScRange& rRange)
RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange);
if (it == maRanges.end())
// Not cached.
- return NULL;
+ return nullptr;
// Already cached.
size_t nIndex = std::distance(maRanges.begin(), it);
@@ -2905,7 +2905,7 @@ ScDPCache* ScDPCollection::SheetCaches::getExistingCache(const ScRange& rRange)
if (itCache == maCaches.end())
{
OSL_FAIL("Cache pool and index pool out-of-sync !!!");
- return NULL;
+ return nullptr;
}
return itCache->second;
@@ -2916,7 +2916,7 @@ const ScDPCache* ScDPCollection::SheetCaches::getExistingCache(const ScRange& rR
RangeIndexType::const_iterator it = std::find(maRanges.begin(), maRanges.end(), rRange);
if (it == maRanges.end())
// Not cached.
- return NULL;
+ return nullptr;
// Already cached.
size_t nIndex = std::distance(maRanges.begin(), it);
@@ -2924,7 +2924,7 @@ const ScDPCache* ScDPCollection::SheetCaches::getExistingCache(const ScRange& rR
if (itCache == maCaches.end())
{
OSL_FAIL("Cache pool and index pool out-of-sync !!!");
- return NULL;
+ return nullptr;
}
return itCache->second;
@@ -3048,7 +3048,7 @@ const ScDPCache* ScDPCollection::NameCaches::getCache(
ScDPCache* ScDPCollection::NameCaches::getExistingCache(const OUString& rName)
{
CachesType::iterator itr = maCaches.find(rName);
- return itr != maCaches.end() ? itr->second : NULL;
+ return itr != maCaches.end() ? itr->second : nullptr;
}
size_t ScDPCollection::NameCaches::size() const
@@ -3120,19 +3120,19 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(
uno::Reference<sdbc::XRowSet> xRowSet = createRowSet(nSdbType, rDBName, rCommand);
if (!xRowSet.is())
- return NULL;
+ return nullptr;
::std::unique_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
SvNumberFormatter aFormat( comphelper::getProcessComponentContext(), ScGlobal::eLnge);
DBConnector aDB(*pCache, xRowSet, *aFormat.GetNullDate());
if (!aDB.isValid())
- return NULL;
+ return nullptr;
if (!pCache->InitFromDataBase(aDB))
{
// initialization failed.
comphelper::disposeComponent(xRowSet);
- return NULL;
+ return nullptr;
}
if (pDimData)
@@ -3149,7 +3149,7 @@ ScDPCache* ScDPCollection::DBCaches::getExistingCache(
{
DBType aType(nSdbType, rDBName, rCommand);
CachesType::iterator itr = maCaches.find(aType);
- return itr != maCaches.end() ? itr->second : NULL;
+ return itr != maCaches.end() ? itr->second : nullptr;
}
uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
@@ -3166,7 +3166,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if (!xRowProp.is())
{
- xRowSet.set(NULL);
+ xRowSet.set(nullptr);
return xRowSet;
}
@@ -3186,7 +3186,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr),
uno::UNO_QUERY_THROW);
xExecute->executeWithCompletion( xHandler );
}
@@ -3206,7 +3206,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
OSL_FAIL("Unexpected exception in database");
}
- xRowSet.set(NULL);
+ xRowSet.set(nullptr);
return xRowSet;
}
@@ -3386,7 +3386,7 @@ bool ScDPCollection::ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject
// references even when the cache exists. This may become a non-issue
// if/when we implement loading and saving of pivot caches.
- ScDPCache* pCache = NULL;
+ ScDPCache* pCache = nullptr;
if (pDPObj->IsSheetData())
{
@@ -3406,7 +3406,7 @@ bool ScDPCollection::ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject
// Not cached yet. Cache the source dimensions. Groups will
// be added below.
pCache = const_cast<ScDPCache*>(
- rCaches.getCache(pDesc->GetRangeName(), pDesc->GetSourceRange(), NULL));
+ rCaches.getCache(pDesc->GetRangeName(), pDesc->GetSourceRange(), nullptr));
}
GetAllTables(pDesc->GetRangeName(), rRefs);
}
@@ -3421,7 +3421,7 @@ bool ScDPCollection::ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject
// Not cached yet. Cache the source dimensions. Groups will
// be added below.
pCache = const_cast<ScDPCache*>(
- rCaches.getCache(pDesc->GetSourceRange(), NULL));
+ rCaches.getCache(pDesc->GetSourceRange(), nullptr));
}
GetAllTables(pDesc->GetSourceRange(), rRefs);
}
@@ -3442,7 +3442,7 @@ bool ScDPCollection::ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject
// Not cached yet. Cache the source dimensions. Groups will
// be added below.
pCache = const_cast<ScDPCache*>(
- rCaches.getCache(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject, NULL));
+ rCaches.getCache(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject, nullptr));
}
GetAllTables(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject, rRefs);
}
@@ -3579,7 +3579,7 @@ const ScDPObject* ScDPCollection::GetByName(const OUString& rName) const
if (itr->GetName() == rName)
return &(*itr);
- return NULL;
+ return nullptr;
}
OUString ScDPCollection::CreateNewName( sal_uInt16 nMin ) const
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index da6cbe03e325..8858905b430d 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -309,7 +309,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nWidth )
{
- ::editeng::SvxBorderLine aLine(0, nWidth, table::BorderLineStyle::SOLID);
+ ::editeng::SvxBorderLine aLine(nullptr, nWidth, table::BorderLineStyle::SOLID);
SvxBoxItem aBox( ATTR_BORDER );
aBox.SetLine(&aLine, SvxBoxItemLine::LEFT);
aBox.SetLine(&aLine, SvxBoxItemLine::TOP);
@@ -511,8 +511,8 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
pDoc( pD ),
xSource( xSrc ),
aStartPos( rPos ),
- pColNumFmt( NULL ),
- pRowNumFmt( NULL ),
+ pColNumFmt( nullptr ),
+ pRowNumFmt( nullptr ),
nColFmtCount( 0 ),
nRowFmtCount( 0 ),
nSingleNumFmt( 0 ),
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 02b3d80244bb..603ab14b5a84 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -87,7 +87,7 @@ void ScDPResultTree::MemberNode::dump(int nLevel) const
}
#endif
-ScDPResultTree::ScDPResultTree() : mpRoot(new MemberNode(NULL)) {}
+ScDPResultTree::ScDPResultTree() : mpRoot(new MemberNode(nullptr)) {}
ScDPResultTree::~ScDPResultTree()
{
delete mpRoot;
@@ -98,8 +98,8 @@ void ScDPResultTree::add(
{
// TODO: I'll work on the col / row to value node mapping later.
- const OUString* pDimName = NULL;
- const OUString* pMemName = NULL;
+ const OUString* pDimName = nullptr;
+ const OUString* pMemName = nullptr;
MemberNode* pMemNode = mpRoot;
std::vector<ScDPResultFilter>::const_iterator itFilter = rFilters.begin(), itFilterEnd = rFilters.end();
@@ -192,7 +192,7 @@ void ScDPResultTree::clear()
{
maPrimaryDimName = EMPTY_OUSTRING;
delete mpRoot;
- mpRoot = new MemberNode(NULL);
+ mpRoot = new MemberNode(nullptr);
}
const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
@@ -208,7 +208,7 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
if (itDim == pMember->maChildDimensions.end())
// Specified dimension not found.
- return NULL;
+ return nullptr;
const DimensionNode* pDim = itDim->second;
MembersType::const_iterator itMem = pDim->maChildMembers.find(
@@ -216,7 +216,7 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
if (itMem == pDim->maChildMembers.end())
// Specified member not found.
- return NULL;
+ return nullptr;
pMember = itMem->second;
}
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 460fdabe522c..474ab273da58 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -52,11 +52,11 @@ sal_Int32 ScImportSourceDesc::GetCommandType() const
const ScDPCache* ScImportSourceDesc::CreateCache(const ScDPDimensionSaveData* pDimData) const
{
if (!mpDoc)
- return NULL;
+ return nullptr;
sal_Int32 nSdbType = GetCommandType();
if (nSdbType < 0)
- return NULL;
+ return nullptr;
ScDPCollection::DBCaches& rCaches = mpDoc->GetDPCollection()->GetDBCaches();
return rCaches.getCache(nSdbType, aDBName, aObject, pDimData);
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 08a2421e6df1..cd96b08178e7 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -273,13 +273,13 @@ bool ScSheetSourceDesc::operator== (const ScSheetSourceDesc& rOther) const
const ScDPCache* ScSheetSourceDesc::CreateCache(const ScDPDimensionSaveData* pDimData) const
{
if (!mpDoc)
- return NULL;
+ return nullptr;
sal_uLong nErrId = CheckSourceRange();
if (nErrId)
{
OSL_FAIL( "Error Create Cache\n" );
- return NULL;
+ return nullptr;
}
// All cache instances are managed centrally by ScDPCollection.
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index ca1fe1161e8b..bee083a1c800 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -39,9 +39,9 @@ using ::com::sun::star::uno::Any;
using ::std::vector;
ScDPTableData::CalcInfo::CalcInfo() :
- pInitState( NULL ),
- pColRoot( NULL ),
- pRowRoot( NULL ),
+ pInitState( nullptr ),
+ pColRoot( nullptr ),
+ pRowRoot( nullptr ),
bRepeatIfEmpty(false)
{
}
@@ -198,7 +198,7 @@ void ScDPTableData::ProcessRowData(CalcInfo& rInfo, const CalcRowData& rData, bo
if (rInfo.pColRoot->GetChildDimension())
{
vector<SCROW> aEmptyData;
- rInfo.pColRoot->GetChildDimension()->ProcessData(rData.aColData, NULL, aEmptyData, rData.aValues);
+ rInfo.pColRoot->GetChildDimension()->ProcessData(rData.aColData, nullptr, aEmptyData, rData.aValues);
}
rInfo.pRowRoot->ProcessData(rData.aRowData, rInfo.pColRoot->GetChildDimension(),
@@ -257,7 +257,7 @@ long ScDPTableData::GetMembersCount( long nDim )
const ScDPItemData* ScDPTableData::GetMemberByIndex( long nDim, long nIndex )
{
if ( nIndex >= GetMembersCount( nDim ) )
- return NULL;
+ return nullptr;
const ::std::vector<SCROW>& nMembers = GetCacheTable().getFieldEntries( nDim );
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index f152954657f2..6516bc73bf7c 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -170,8 +170,8 @@ static bool lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember
// members can be NULL if used for rows
ScDPSubTotalState aEmptyState;
- const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
+ const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : nullptr;
+ const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : nullptr;
bool bError1 = pAgg1 && pAgg1->HasError();
bool bError2 = pAgg2 && pAgg2->HasError();
@@ -196,8 +196,8 @@ static bool lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMembe
// members can be NULL if used for rows
ScDPSubTotalState aEmptyState;
- const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
+ const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : nullptr;
+ const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : nullptr;
bool bError1 = pAgg1 && pAgg1->HasError();
bool bError2 = pAgg2 && pAgg2->HasError();
@@ -639,7 +639,7 @@ void ScDPAggData::Reset()
fAux = 0.0;
nCount = SC_DPAGG_EMPTY;
delete pChild;
- pChild = NULL;
+ pChild = nullptr;
}
#if DEBUG_PIVOT_TABLE
@@ -890,7 +890,7 @@ ResultMembers* ScDPResultData::GetDimResultMembers(long nDim, ScDPDimension* pDi
if (nDim < static_cast<long>(maDimMembers.size()) && maDimMembers[nDim])
return maDimMembers[nDim];
- maDimMembers.resize(nDim+1, NULL);
+ maDimMembers.resize(nDim+1, nullptr);
ResultMembers* pResultMembers = new ResultMembers();
// global order is used to initialize aMembers, so it doesn't have to be looked at later
@@ -917,8 +917,8 @@ ScDPResultMember::ScDPResultMember(
const ScDPResultData* pData, const ScDPParentDimData& rParentDimData, bool bForceSub ) :
pResultData( pData ),
aParentDimData( rParentDimData ),
- pChildDimension( NULL ),
- pDataRoot( NULL ),
+ pChildDimension( nullptr ),
+ pDataRoot( nullptr ),
bHasElements( false ),
bForceSubTotal( bForceSub ),
bHasHiddenDetails( false ),
@@ -932,8 +932,8 @@ ScDPResultMember::ScDPResultMember(
ScDPResultMember::ScDPResultMember(
const ScDPResultData* pData, bool bForceSub ) :
pResultData( pData ),
- pChildDimension( NULL ),
- pDataRoot( NULL ),
+ pChildDimension( nullptr ),
+ pDataRoot( nullptr ),
bHasElements( false ),
bForceSubTotal( bForceSub ),
bHasHiddenDetails( false ),
@@ -1239,7 +1239,7 @@ void ScDPResultMember::ProcessData( const vector< SCROW >& aChildMembers, const
if ( !pDataRoot )
{
- pDataRoot = new ScDPDataMember( pResultData, NULL );
+ pDataRoot = new ScDPDataMember( pResultData, nullptr );
if ( pDataDim )
pDataRoot->InitFrom( pDataDim ); // recursive
}
@@ -1404,7 +1404,7 @@ void ScDPResultMember::FillMemberResults(
// no extra row for the subtotals is needed
bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1530,7 +1530,7 @@ void ScDPResultMember::FillDataResults(
bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1617,7 +1617,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
// IsVisible() test is in ScDPResultDimension::FillDataResults
// (not on data layout dimension)
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
long nUserSubCount = GetSubTotalCount();
@@ -1663,7 +1663,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
{
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
if (bHasChild)
pChildDimension->SortMembers( pRefMember ); // sorting is done at the dimension
@@ -1678,7 +1678,7 @@ void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember )
{
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
if (bHasChild)
pChildDimension->DoAutoShow( pRefMember ); // sorting is done at the dimension
@@ -1708,7 +1708,7 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
rTotals.SetInColRoot( IsRoot() );
- bool bHasChild = ( pChildDimension != NULL );
+ bool bHasChild = ( pChildDimension != nullptr );
long nUserSubCount = GetSubTotalCount();
//if ( nUserSubCount || !bHasChild )
@@ -1803,7 +1803,7 @@ void ScDPResultMember::FillVisibilityData(ScDPResultVisibilityData& rData) const
ScDPDataMember::ScDPDataMember( const ScDPResultData* pData, const ScDPResultMember* pRes ) :
pResultData( pData ),
pResultMember( pRes ),
- pChildDimension( NULL )
+ pChildDimension( nullptr )
{
// pResultMember is 0 for root members
}
@@ -1919,7 +1919,7 @@ void ScDPDataMember::ProcessData( const vector< SCROW >& aChildMembers, const ve
{
if ( pChildDimension && nUserSubCount > 1 )
{
- const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL;
+ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : nullptr;
aLocalSubState.nColSubTotalFunc = nUserPos;
aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos );
}
@@ -1972,7 +1972,7 @@ ScDPAggData* ScDPDataMember::GetAggData( long nMeasure, const ScDPSubTotalState&
long nSkip = nMeasure;
long nSubPos = lcl_GetSubTotalPos(rSubState);
if (nSubPos == SC_SUBTOTALPOS_SKIP)
- return NULL;
+ return nullptr;
if (nSubPos > 0)
nSkip += nSubPos * pResultData->GetMeasureCount();
@@ -1990,7 +1990,7 @@ const ScDPAggData* ScDPDataMember::GetConstAggData( long nMeasure, const ScDPSub
long nSkip = nMeasure;
long nSubPos = lcl_GetSubTotalPos(rSubState);
if (nSubPos == SC_SUBTOTALPOS_SKIP)
- return NULL;
+ return nullptr;
if (nSubPos > 0)
nSkip += nSubPos * pResultData->GetMeasureCount();
@@ -1998,7 +1998,7 @@ const ScDPAggData* ScDPDataMember::GetConstAggData( long nMeasure, const ScDPSub
{
pAgg = pAgg->GetExistingChild();
if (!pAgg)
- return NULL;
+ return nullptr;
}
return pAgg;
@@ -2040,7 +2040,7 @@ void ScDPDataMember::FillDataRow(
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- bool bHasChild = ( pRefChild != NULL );
+ bool bHasChild = ( pRefChild != nullptr );
if ( bHasChild )
{
@@ -2092,7 +2092,7 @@ void ScDPDataMember::FillDataRow(
{
if ( pChildDimension && nUserSubCount > 1 )
{
- const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL;
+ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : nullptr;
aLocalSubState.nColSubTotalFunc = nUserPos;
aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos );
}
@@ -2146,7 +2146,7 @@ void ScDPDataMember::UpdateDataRow(
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- bool bHasChild = ( pRefChild != NULL );
+ bool bHasChild = ( pRefChild != nullptr );
// process subtotals even if not shown
long nUserSubCount = pRefMember->GetSubTotalCount();
@@ -2165,7 +2165,7 @@ void ScDPDataMember::UpdateDataRow(
{
if ( pChildDimension && nUserSubCount > 1 )
{
- const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL;
+ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : nullptr;
aLocalSubState.nColSubTotalFunc = nUserPos;
aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos );
}
@@ -2252,11 +2252,11 @@ void ScDPDataMember::UpdateRunningTotals(
const ScDPDataDimension* pDataChild = GetChildDimension();
const ScDPResultDimension* pRefChild = pRefMember->GetChildDimension();
- bool bIsRoot = ( pResultMember == NULL || pResultMember->GetParentLevel() == NULL );
+ bool bIsRoot = ( pResultMember == nullptr || pResultMember->GetParentLevel() == nullptr );
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- bool bHasChild = ( pRefChild != NULL );
+ bool bHasChild = ( pRefChild != nullptr );
long nUserSubCount = pRefMember->GetSubTotalCount();
{
@@ -2274,7 +2274,7 @@ void ScDPDataMember::UpdateRunningTotals(
{
if ( pChildDimension && nUserSubCount > 1 )
{
- const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL;
+ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : nullptr;
aLocalSubState.nColSubTotalFunc = nUserPos;
aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos );
}
@@ -2315,7 +2315,7 @@ void ScDPDataMember::UpdateRunningTotals(
bool bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN );
bool bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
- ScDPResultDimension* pSelectDim = NULL;
+ ScDPResultDimension* pSelectDim = nullptr;
long nRowPos = 0;
long nColPos = 0;
@@ -2330,12 +2330,12 @@ void ScDPDataMember::UpdateRunningTotals(
if ( nIndex >= 0 && nIndex < pSelectDim->GetMemberCount() )
pSelectDim = pSelectDim->GetMember(nIndex)->GetChildDimension();
else
- pSelectDim = NULL;
+ pSelectDim = nullptr;
++nRowPos;
}
// child dimension of innermost member?
if ( pSelectDim && rRowSorted[nRowPos] < 0 )
- pSelectDim = NULL;
+ pSelectDim = nullptr;
}
if ( bRefDimInCol ) // look in column dimensions
@@ -2347,12 +2347,12 @@ void ScDPDataMember::UpdateRunningTotals(
if ( nIndex >= 0 && nIndex < pSelectDim->GetMemberCount() )
pSelectDim = pSelectDim->GetMember(nIndex)->GetChildDimension();
else
- pSelectDim = NULL;
+ pSelectDim = nullptr;
++nColPos;
}
// child dimension of innermost member?
if ( pSelectDim && rColSorted[nColPos] < 0 )
- pSelectDim = NULL;
+ pSelectDim = nullptr;
}
bool bNoDetailsInRef = false;
@@ -2369,7 +2369,7 @@ void ScDPDataMember::UpdateRunningTotals(
const ScDPResultMember* pMyRefMember = pSelectDim->GetMember(nMyIndex);
if ( pMyRefMember && pMyRefMember->HasHiddenDetails() )
{
- pSelectDim = NULL; // don't calculate
+ pSelectDim = nullptr; // don't calculate
bNoDetailsInRef = true; // show error, not empty
}
}
@@ -2393,7 +2393,7 @@ void ScDPDataMember::UpdateRunningTotals(
( !bRefDimInRow || rRowParent.HasHiddenDetails() );
if ( bInnerNoDetails )
{
- pSelectDim = NULL;
+ pSelectDim = nullptr;
bNoDetailsInRef = true; // show error, not empty
}
}
@@ -2411,7 +2411,7 @@ void ScDPDataMember::UpdateRunningTotals(
{
ScDPDataMember* pSelectMember;
if ( bRefDimInCol )
- pSelectMember = ScDPResultDimension::GetColReferenceMember( NULL, NULL,
+ pSelectMember = ScDPResultDimension::GetColReferenceMember( nullptr, nullptr,
nColPos, rRunning );
else
{
@@ -2419,7 +2419,7 @@ void ScDPDataMember::UpdateRunningTotals(
const long* pColSorted = &rColSorted[0];
pRowSorted += nRowPos + 1; // including the reference dimension
pSelectMember = pSelectDim->GetRowReferenceMember(
- NULL, NULL, pRowSorted, pColSorted);
+ nullptr, nullptr, pRowSorted, pColSorted);
}
if ( pSelectMember )
@@ -2457,8 +2457,8 @@ void ScDPDataMember::UpdateRunningTotals(
OUString aRefItemName = aReferenceValue.ReferenceItemName;
ScDPRelativePos aRefItemPos( 0, nRelativeDir ); // nBasePos is modified later
- const OUString* pRefName = NULL;
- const ScDPRelativePos* pRefPos = NULL;
+ const OUString* pRefName = nullptr;
+ const ScDPRelativePos* pRefPos = nullptr;
if ( bRelative )
pRefPos = &aRefItemPos;
else
@@ -2762,7 +2762,7 @@ ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const
if ( pResultMember->IsNamedItem( iData ) )
return pResultMember;
}
- return NULL;
+ return nullptr;
}
void ScDPResultDimension::InitFrom(
@@ -2939,7 +2939,7 @@ void ScDPResultDimension::LateInitFrom(
else
{
ScDPResultMember* pResultMember = FindMember( rThisData );
- if( NULL != pResultMember )
+ if( nullptr != pResultMember )
{
rInitState.AddMember( nDimSource, pResultMember->GetDataId() );
pResultMember->LateInitFrom( rParams, pItemData, nPos+1, rInitState );
@@ -2977,7 +2977,7 @@ bool ScDPResultDimension::IsValidEntry( const vector< SCROW >& aMembers ) const
return false;
const ScDPResultMember* pMember = FindMember( aMembers[0] );
- if ( NULL != pMember )
+ if ( nullptr != pMember )
return pMember->IsValidEntry( aMembers );
#if OSL_DEBUG_LEVEL > 1
OStringBuffer strTemp("IsValidEntry: Member not found, DimName = ");
@@ -2996,7 +2996,7 @@ void ScDPResultDimension::ProcessData( const vector< SCROW >& aMembers,
return;
ScDPResultMember* pMember = FindMember( aMembers[0] );
- if ( NULL != pMember )
+ if ( nullptr != pMember )
{
vector<SCROW> aChildMembers;
if (aMembers.size() > 1)
@@ -3032,7 +3032,7 @@ void ScDPResultDimension::FillMemberResults( uno::Sequence<sheet::MemberResult>*
}
else if ( pMember->IsVisible() )
{
- pMember->FillMemberResults( pSequences, nPos, nMeasure, false, NULL, NULL );
+ pMember->FillMemberResults( pSequences, nPos, nMeasure, false, nullptr, nullptr );
}
// nPos is modified
}
@@ -3150,7 +3150,7 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
long nIncluded = nAutoCount;
const ScDPResultMember* pMember1 = maMemberArray[aAutoOrder[nIncluded - 1]];
- const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL;
+ const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : nullptr;
bool bContinue = true;
while ( bContinue )
{
@@ -3158,7 +3158,7 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
if ( nIncluded < nCount )
{
const ScDPResultMember* pMember2 = maMemberArray[aAutoOrder[nIncluded]];
- const ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : NULL;
+ const ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : nullptr;
if ( lcl_IsEqual( pDataMember1, pDataMember2, nAutoMeasure ) )
{
@@ -3232,11 +3232,11 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
{
// get named, previous/next, or first member of this dimension (first existing if pRelativePos and pName are NULL)
- OSL_ENSURE( pRelativePos == NULL || pName == NULL, "can't use position and name" );
+ OSL_ENSURE( pRelativePos == nullptr || pName == nullptr, "can't use position and name" );
- ScDPDataMember* pColMember = NULL;
+ ScDPDataMember* pColMember = nullptr;
- bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ bool bFirstExisting = ( pRelativePos == nullptr && pName == nullptr );
long nMemberCount = maMemberArray.size();
long nMemberIndex = 0; // unsorted
long nDirection = 1; // forward if no relative position is used
@@ -3260,7 +3260,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
if ( nMemberIndex < nMemberCount )
pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)];
else
- pRowMember = NULL;
+ pRowMember = nullptr;
}
}
@@ -3278,7 +3278,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
if ( pRowChild && *pNextRowIndex < pRowChild->GetMemberCount() )
pRowMember = pRowChild->GetMember( *pNextRowIndex );
else
- pRowMember = NULL;
+ pRowMember = nullptr;
++pNextRowIndex;
}
@@ -3289,7 +3289,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
// Also skip if the member is invisible because it has no data,
// for consistent ordering.
if ( pRowMember->HasHiddenDetails() || !pRowMember->IsVisible() )
- pRowMember = NULL;
+ pRowMember = nullptr;
}
if ( pRowMember )
@@ -3303,13 +3303,13 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
if ( pColChild && *pNextColIndex < pColChild->GetMemberCount() )
pColMember = pColChild->GetMember( *pNextColIndex );
else
- pColMember = NULL;
+ pColMember = nullptr;
++pNextColIndex;
}
}
// continue searching only if looking for first existing or relative position
- bContinue = ( pColMember == NULL && ( bFirstExisting || pRelativePos ) );
+ bContinue = ( pColMember == nullptr && ( bFirstExisting || pRelativePos ) );
nMemberIndex += nDirection;
}
@@ -3320,7 +3320,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
const ScDPRelativePos* pRelativePos, const OUString* pName,
long nRefDimPos, const ScDPRunningTotalState& rRunning )
{
- OSL_ENSURE( pRelativePos == NULL || pName == NULL, "can't use position and name" );
+ OSL_ENSURE( pRelativePos == nullptr || pName == nullptr, "can't use position and name" );
const long* pColIndexes = &rRunning.GetColSorted()[0];
const long* pRowIndexes = &rRunning.GetRowSorted()[0];
@@ -3328,7 +3328,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
// get own row member using all indexes
const ScDPResultMember* pRowMember = rRunning.GetRowResRoot();
- ScDPDataMember* pColMember = NULL;
+ ScDPDataMember* pColMember = nullptr;
const long* pNextRowIndex = pRowIndexes;
while ( *pNextRowIndex >= 0 && pRowMember )
@@ -3337,7 +3337,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
if ( pRowChild && *pNextRowIndex < pRowChild->GetMemberCount() )
pRowMember = pRowChild->GetMember( *pNextRowIndex );
else
- pRowMember = NULL;
+ pRowMember = nullptr;
++pNextRowIndex;
}
@@ -3356,7 +3356,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
if ( pColChild && *pNextColIndex < pColChild->GetMemberCount() )
pColMember = pColChild->GetMember( *pNextColIndex );
else
- pColMember = NULL;
+ pColMember = nullptr;
++pNextColIndex;
++nColSkipped;
}
@@ -3371,10 +3371,10 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
{
long nReferenceCount = pReferenceDim->GetMemberCount();
- bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ bool bFirstExisting = ( pRelativePos == nullptr && pName == nullptr );
long nMemberIndex = 0; // unsorted
long nDirection = 1; // forward if no relative position is used
- pColMember = NULL; // don't use parent dimension's member if none found
+ pColMember = nullptr; // don't use parent dimension's member if none found
if ( pRelativePos )
{
nDirection = pRelativePos->nDirection;
@@ -3393,7 +3393,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
if ( nMemberIndex < nReferenceCount )
pColMember = pReferenceDim->GetMember( pReferenceDim->GetSortedIndex( nMemberIndex ) );
else
- pColMember = NULL;
+ pColMember = nullptr;
}
}
@@ -3411,7 +3411,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
if ( pColChild && *pNextColIndex < pColChild->GetMemberCount() )
pColMember = pColChild->GetMember( *pNextColIndex );
else
- pColMember = NULL;
+ pColMember = nullptr;
++pNextColIndex;
}
@@ -3422,16 +3422,16 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
// Also skip if the member is invisible because it has no data,
// for consistent ordering.
if ( pColMember->HasHiddenDetails() || !pColMember->IsVisible() )
- pColMember = NULL;
+ pColMember = nullptr;
}
// continue searching only if looking for first existing or relative position
- bContinue = ( pColMember == NULL && ( bFirstExisting || pRelativePos ) );
+ bContinue = ( pColMember == nullptr && ( bFirstExisting || pRelativePos ) );
nMemberIndex += nDirection;
}
}
else
- pColMember = NULL;
+ pColMember = nullptr;
}
return pColMember;
@@ -3487,7 +3487,7 @@ ScDPResultDimension* ScDPResultDimension::GetFirstChildDimension() const
if ( maMemberArray.size() > 0 )
return maMemberArray[0]->GetChildDimension();
else
- return NULL;
+ return nullptr;
}
void ScDPResultDimension::FillVisibilityData(ScDPResultVisibilityData& rData) const
@@ -3512,7 +3512,7 @@ void ScDPResultDimension::FillVisibilityData(ScDPResultVisibilityData& rData) co
ScDPDataDimension::ScDPDataDimension( const ScDPResultData* pData ) :
pResultData( pData ),
- pResultDimension( NULL ),
+ pResultDimension( nullptr ),
bIsDataLayout( false )
{
}
@@ -3726,7 +3726,7 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
long nIncluded = pRefDim->GetAutoCount();
ScDPDataMember* pDataMember1 = maMembers[aAutoOrder[nIncluded - 1]];
if ( !pDataMember1->IsVisible() )
- pDataMember1 = NULL;
+ pDataMember1 = nullptr;
bool bContinue = true;
while ( bContinue )
{
@@ -3735,7 +3735,7 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
{
ScDPDataMember* pDataMember2 = maMembers[aAutoOrder[nIncluded]];
if ( !pDataMember2->IsVisible() )
- pDataMember2 = NULL;
+ pDataMember2 = nullptr;
if ( lcl_IsEqual( pDataMember1, pDataMember2, pRefDim->GetAutoMeasure() ) )
{
@@ -3999,13 +3999,13 @@ void ScDPResultDimension::InitWithMembers(
ResultMembers* pMembers = pResultData->GetDimResultMembers(nDimSource, pThisDim, pThisLevel);
ScDPGroupCompare aCompare( pResultData, rInitState, nDimSource );
// initialize only specific member (or all if "show empty" flag is set)
- ScDPResultMember* pResultMember = NULL;
+ ScDPResultMember* pResultMember = nullptr;
if ( bInitialized )
pResultMember = FindMember( nDataID );
else
bInitialized = true;
- if ( pResultMember == NULL )
+ if ( pResultMember == nullptr )
{ //only insert found item
ScDPParentDimData* pMemberData = pMembers->FindMember( nDataID );
if ( pMemberData && aCompare.IsIncluded( *( pMemberData->mpMemberDesc ) ) )
@@ -4021,7 +4021,7 @@ void ScDPResultDimension::InitWithMembers(
}
ScDPParentDimData::ScDPParentDimData() :
- mnOrder(-1), mpParentDim(NULL), mpParentLevel(NULL), mpMemberDesc(NULL) {}
+ mnOrder(-1), mpParentDim(nullptr), mpParentLevel(nullptr), mpMemberDesc(nullptr) {}
ScDPParentDimData::ScDPParentDimData(
SCROW nIndex, const ScDPDimension* pDim, const ScDPLevel* pLev, const ScDPMember* pMember) :
@@ -4034,7 +4034,7 @@ ScDPParentDimData* ResultMembers::FindMember( SCROW nIndex ) const
if ( aRes->second->mpMemberDesc && aRes->second->mpMemberDesc->GetItemDataId()==nIndex )
return aRes->second;
}
- return NULL;
+ return nullptr;
}
void ResultMembers::InsertMember( ScDPParentDimData* pNew )
{
diff --git a/sc/source/core/data/drawpage.cxx b/sc/source/core/data/drawpage.cxx
index 1bc969d1080a..488775913e81 100644
--- a/sc/source/core/data/drawpage.cxx
+++ b/sc/source/core/data/drawpage.cxx
@@ -43,13 +43,13 @@ ScDrawPage::~ScDrawPage()
ScDrawPage* ScDrawPage::Clone() const
{
- return Clone(0);
+ return Clone(nullptr);
}
ScDrawPage* ScDrawPage::Clone(SdrModel* const pNewModel) const
{
ScDrawPage* const pNewPage = new ScDrawPage(*this);
- FmFormModel* pScDrawModel = 0;
+ FmFormModel* pScDrawModel = nullptr;
if (pNewModel)
{
pScDrawModel = dynamic_cast<FmFormModel*>(pNewModel);
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 9ee6ed0c4a81..6d484585ee63 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -86,11 +86,11 @@ using namespace ::com::sun::star;
// STATIC DATA -----------------------------------------------------------
-static ScDrawObjFactory* pFac = NULL;
-static E3dObjFactory* pF3d = NULL;
+static ScDrawObjFactory* pFac = nullptr;
+static E3dObjFactory* pF3d = nullptr;
static sal_uInt16 nInst = 0;
-SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = NULL;
+SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = nullptr;
bool bDrawIsInUndo = false; //TODO: Member
@@ -240,21 +240,21 @@ static void lcl_ReverseTwipsToMM( Rectangle& rRect )
ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) :
FmFormModel( SvtPathOptions().GetPalettePath(),
- NULL, // SfxItemPool* Pool
+ nullptr, // SfxItemPool* Pool
pGlobalDrawPersist ?
pGlobalDrawPersist :
- ( pDocument ? pDocument->GetDocumentShell() : NULL ),
+ ( pDocument ? pDocument->GetDocumentShell() : nullptr ),
true ), // bUseExtColorTable (is set below)
aName( rName ),
pDoc( pDocument ),
- pUndoGroup( NULL ),
+ pUndoGroup( nullptr ),
bRecording( false ),
bAdjustEnabled( true ),
bHyphenatorSet( false )
{
- pGlobalDrawPersist = NULL; // Only use once
+ pGlobalDrawPersist = nullptr; // Only use once
- SfxObjectShell* pObjSh = pDocument ? pDocument->GetDocumentShell() : NULL;
+ SfxObjectShell* pObjSh = pDocument ? pDocument->GetDocumentShell() : nullptr;
XColorListRef pXCol = XColorList::GetStdColorList();
if ( pObjSh )
{
@@ -344,8 +344,8 @@ ScDrawLayer::~ScDrawLayer()
delete pUndoGroup;
if( !--nInst )
{
- delete pFac, pFac = NULL;
- delete pF3d, pF3d = NULL;
+ delete pFac, pFac = nullptr;
+ delete pF3d, pF3d = nullptr;
}
}
@@ -385,7 +385,7 @@ SdrModel* ScDrawLayer::AllocModel() const
// Allocated model (for clipboard etc) must not have a pointer
// to the original model's document, pass NULL as document:
- return new ScDrawLayer( NULL, aName );
+ return new ScDrawLayer( nullptr, aName );
}
bool ScDrawLayer::ScAddPage( SCTAB nTab )
@@ -743,9 +743,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
if( bValid1 )
{
Point aPos( pDoc->GetColOffset( nCol1, nTab1 ), pDoc->GetRowOffset( nRow1, nTab1 ) );
- if (!pDoc->ColHidden(nCol1, nTab1, NULL, &nLastCol))
+ if (!pDoc->ColHidden(nCol1, nTab1, nullptr, &nLastCol))
aPos.X() += pDoc->GetColWidth( nCol1, nTab1 ) / 4;
- if (!pDoc->RowHidden(nRow1, nTab1, NULL, &nLastRow))
+ if (!pDoc->RowHidden(nRow1, nTab1, nullptr, &nLastRow))
aPos.Y() += pDoc->GetRowHeight( nRow1, nTab1 ) / 2;
TwipsToMM( aPos.X() );
TwipsToMM( aPos.Y() );
@@ -781,9 +781,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
if( bValid2 )
{
Point aPos( pDoc->GetColOffset( nCol2, nTab2 ), pDoc->GetRowOffset( nRow2, nTab2 ) );
- if (!pDoc->ColHidden(nCol2, nTab2, NULL, &nLastCol))
+ if (!pDoc->ColHidden(nCol2, nTab2, nullptr, &nLastCol))
aPos.X() += pDoc->GetColWidth( nCol2, nTab2 ) / 4;
- if (!pDoc->RowHidden(nRow2, nTab2, NULL, &nLastRow))
+ if (!pDoc->RowHidden(nRow2, nTab2, nullptr, &nLastRow))
aPos.Y() += pDoc->GetRowHeight( nRow2, nTab2 ) / 2;
TwipsToMM( aPos.X() );
TwipsToMM( aPos.Y() );
@@ -1124,7 +1124,7 @@ void ScDrawLayer::BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager)
SdrUndoGroup* ScDrawLayer::GetCalcUndo()
{
SdrUndoGroup* pRet = pUndoGroup;
- pUndoGroup = NULL;
+ pUndoGroup = nullptr;
bRecording = false;
SetDisableTextEditUsesCommonUndoManager(false);
return pRet;
@@ -1353,8 +1353,8 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle&
SdrPage* pSrcPage = GetPage(static_cast<sal_uInt16>(nTab));
if (pSrcPage)
{
- ScDrawLayer* pDestModel = NULL;
- SdrPage* pDestPage = NULL;
+ ScDrawLayer* pDestModel = nullptr;
+ SdrPage* pDestPage = nullptr;
SdrObjListIter aIter( *pSrcPage, IM_FLAT );
SdrObject* pOldObject = aIter.Next();
@@ -1782,7 +1782,7 @@ SdrObject* ScDrawLayer::GetNamedObject( const OUString& rName, sal_uInt16 nId, S
}
}
- return NULL;
+ return nullptr;
}
OUString ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
@@ -1799,7 +1799,7 @@ OUString ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
++nId;
aGraphicName = aBase;
aGraphicName += OUString::number( nId );
- bThere = ( GetNamedObject( aGraphicName, 0, nDummy ) != NULL );
+ bThere = ( GetNamedObject( aGraphicName, 0, nDummy ) != nullptr );
}
if ( pnCounter )
@@ -1849,7 +1849,7 @@ namespace
if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId )
return pData;
}
- return NULL;
+ return nullptr;
}
void DeleteFirstUserDataOfType(SdrObject *pObj, sal_uInt16 nId)
@@ -1951,7 +1951,7 @@ bool ScDrawLayer::IsCellAnchored( const SdrObject& rObj )
{
// Cell anchored object always has a user data, to store the anchor cell
// info. If it doesn't then it's page-anchored.
- return GetFirstUserDataOfType(&rObj, SC_UD_OBJDATA) != NULL;
+ return GetFirstUserDataOfType(&rObj, SC_UD_OBJDATA) != nullptr;
}
void ScDrawLayer::SetPageAnchored( SdrObject &rObj )
@@ -1983,7 +1983,7 @@ ScDrawObjData* ScDrawLayer::GetNonRotatedObjData( SdrObject* pObj, bool bCreate
pObj->AppendUserData(pData);
return pData;
}
- return 0;
+ return nullptr;
}
ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, bool bCreate )
@@ -1997,7 +1997,7 @@ ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, bool bCreate )
pObj->AppendUserData(pData);
return pData;
}
- return 0;
+ return nullptr;
}
ScDrawObjData* ScDrawLayer::GetObjDataTab( SdrObject* pObj, SCTAB nTab )
@@ -2015,14 +2015,14 @@ ScDrawObjData* ScDrawLayer::GetObjDataTab( SdrObject* pObj, SCTAB nTab )
bool ScDrawLayer::IsNoteCaption( SdrObject* pObj )
{
- ScDrawObjData* pData = pObj ? GetObjData( pObj ) : 0;
+ ScDrawObjData* pData = pObj ? GetObjData( pObj ) : nullptr;
return pData && pData->meType == ScDrawObjData::CellNote;
}
ScDrawObjData* ScDrawLayer::GetNoteCaptionData( SdrObject* pObj, SCTAB nTab )
{
- ScDrawObjData* pData = pObj ? GetObjDataTab( pObj, nTab ) : 0;
- return (pData && pData->meType == ScDrawObjData::CellNote) ? pData : 0;
+ ScDrawObjData* pData = pObj ? GetObjDataTab( pObj, nTab ) : nullptr;
+ return (pData && pData->meType == ScDrawObjData::CellNote) ? pData : nullptr;
}
ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj )
@@ -2038,7 +2038,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
Point aRelPoint( rCmpWnd.LogicToLogic( rWinPoint, &aWndMode, &aMap100 ) );
Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 );
ScIMapInfo* pIMapInfo = GetIMapInfo( pObj );
- IMapObject* pIMapObj = NULL;
+ IMapObject* pIMapObj = nullptr;
if ( pIMapInfo )
{
@@ -2104,7 +2104,7 @@ ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, bool bCreate )
pObj->AppendUserData(pData);
return pData;
}
- return 0;
+ return nullptr;
}
ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
@@ -2114,7 +2114,7 @@ ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
{
return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
}
- return NULL;
+ return nullptr;
}
void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist)
diff --git a/sc/source/core/data/edittextiterator.cxx b/sc/source/core/data/edittextiterator.cxx
index e563f04ae562..778ef2ba4a2d 100644
--- a/sc/source/core/data/edittextiterator.cxx
+++ b/sc/source/core/data/edittextiterator.cxx
@@ -35,7 +35,7 @@ const EditTextObject* EditTextIterator::seek()
++mpCol;
if (mpCol == mpColEnd)
// No more columns.
- return NULL;
+ return nullptr;
mpCells = &mpCol->maCells;
maPos = mpCells->position(0);
@@ -75,7 +75,7 @@ const EditTextObject* EditTextIterator::first()
const EditTextObject* EditTextIterator::next()
{
if (maPos.first == miEnd)
- return NULL;
+ return nullptr;
incPos();
return seek();
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index cd1d41270eda..50285c0452bc 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -73,7 +73,7 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
while (bHOver) // nY constant
{
--rStartX;
- if (rStartX >= (SCsCOL) nX1 && !pDoc->ColHidden(rStartX, nTab, NULL, &nLastCol))
+ if (rStartX >= (SCsCOL) nX1 && !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol))
{
bHOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bHOverlapped;
bVOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bVOverlapped;
@@ -95,8 +95,8 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
--nArrY; // local copy !
if (rStartX >= (SCsCOL) nX1 && rStartY >= (SCsROW) nY1 &&
- !pDoc->ColHidden(rStartX, nTab, NULL, &nLastCol) &&
- !pDoc->RowHidden(rStartY, nTab, NULL, &nLastRow) &&
+ !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol) &&
+ !pDoc->RowHidden(rStartY, nTab, nullptr, &nLastRow) &&
(SCsROW) pRowInfo[nArrY].nRowNo == rStartY)
{
bVOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bVOverlapped;
@@ -111,8 +111,8 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
const ScMergeAttr* pMerge;
if (rStartX >= (SCsCOL) nX1 && rStartY >= (SCsROW) nY1 &&
- !pDoc->ColHidden(rStartX, nTab, NULL, &nLastCol) &&
- !pDoc->RowHidden(rStartY, nTab, NULL, &nLastRow) &&
+ !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol) &&
+ !pDoc->RowHidden(rStartY, nTab, nullptr, &nLastRow) &&
(SCsROW) pRowInfo[nArrY].nRowNo == rStartY)
{
pMerge = static_cast<const ScMergeAttr*>( &pRowInfo[nArrY].pCellInfo[rStartX+1].pPatternAttr->
@@ -141,7 +141,7 @@ class RowInfoFiller
{
SCROW nThisRow = static_cast<SCROW>(nRow);
if (nThisRow > mnHiddenEndRow)
- mbHiddenRow = mrDoc.RowHidden(nThisRow, mnTab, NULL, &mnHiddenEndRow);
+ mbHiddenRow = mrDoc.RowHidden(nThisRow, mnTab, nullptr, &mnHiddenEndRow);
return mbHiddenRow;
}
@@ -270,7 +270,7 @@ void ScDocument::FillInfo(
if (nY > nDocHeightEndRow)
{
if (ValidRow(nY))
- nDocHeight = GetRowHeight( nY, nTab, NULL, &nDocHeightEndRow );
+ nDocHeight = GetRowHeight( nY, nTab, nullptr, &nDocHeightEndRow );
else
nDocHeight = ScGlobal::nStdRowHeight;
}
@@ -278,7 +278,7 @@ void ScDocument::FillInfo(
if ( nArrRow==0 || nDocHeight || nY > MAXROW )
{
RowInfo* pThisRowInfo = &pRowInfo[nArrRow];
- pThisRowInfo->pCellInfo = NULL; // is loaded below
+ pThisRowInfo->pCellInfo = nullptr; // is loaded below
sal_uInt16 nHeight = (sal_uInt16) ( nDocHeight * fRowScale );
if (!nHeight)
@@ -374,17 +374,17 @@ void ScDocument::FillInfo(
pInfo->bHideGrid = false; // view-internal
pInfo->bEditEngine = false; // view-internal
- pInfo->pBackground = NULL; //TODO: omit?
- pInfo->pPatternAttr = NULL;
- pInfo->pConditionSet= NULL;
+ pInfo->pBackground = nullptr; //TODO: omit?
+ pInfo->pPatternAttr = nullptr;
+ pInfo->pConditionSet= nullptr;
- pInfo->pLinesAttr = NULL;
- pInfo->mpTLBRLine = NULL;
- pInfo->mpBLTRLine = NULL;
+ pInfo->pLinesAttr = nullptr;
+ pInfo->mpTLBRLine = nullptr;
+ pInfo->mpBLTRLine = nullptr;
pInfo->pShadowAttr = pDefShadow;
- pInfo->pHShadowOrigin = NULL;
- pInfo->pVShadowOrigin = NULL;
+ pInfo->pHShadowOrigin = nullptr;
+ pInfo->pVShadowOrigin = nullptr;
}
}
@@ -502,10 +502,10 @@ void ScDocument::FillInfo(
do
{
SCROW nLastHiddenRow = -1;
- bool bRowHidden = RowHidden(nCurRow, nTab, NULL, &nLastHiddenRow);
+ bool bRowHidden = RowHidden(nCurRow, nTab, nullptr, &nLastHiddenRow);
if ( nArrRow==0 || !bRowHidden )
{
- if ( GetPreviewCellStyle( nX, nCurRow, nTab ) != NULL )
+ if ( GetPreviewCellStyle( nX, nCurRow, nTab ) != nullptr )
bAnyPreview = true;
RowInfo* pThisRowInfo = &pRowInfo[nArrRow];
if (pBackground != pDefBackground) // Column background == Default ?
@@ -687,7 +687,7 @@ void ScDocument::FillInfo(
{
CellInfo* pInfo = &pRowInfo[nArrRow].pCellInfo[nArrCol];
SCCOL nCol = (nArrCol>0) ? nArrCol-1 : MAXCOL+1;
- ScPatternAttr* pModifiedPatt = NULL;
+ ScPatternAttr* pModifiedPatt = nullptr;
if ( ValidCol(nCol) && pRowInfo[nArrRow].nRowNo <= MAXROW )
{
@@ -1085,8 +1085,8 @@ void ScDocument::FillInfo(
}
else
{
- pBox = 0;
- pTLBR = pBLTR = 0;
+ pBox = nullptr;
+ pTLBR = pBLTR = nullptr;
}
}
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 48a6e7cb7bef..b6b6ad9d0994 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -400,7 +400,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
SCTAB aOldTab = aOldPos.Tab();
OUString aRangeName;
int nOldIndex = pToken->GetIndex();
- ScRangeData* pOldRangeData = NULL;
+ ScRangeData* pOldRangeData = nullptr;
//search the name of the RangeName
if (!bOldGlobal)
@@ -422,7 +422,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
//first search for local range name then global range names
SCTAB aNewTab = aNewPos.Tab();
ScRangeName* pRangeName = rNewDoc.GetRangeName(aNewTab);
- ScRangeData* pRangeData = NULL;
+ ScRangeData* pRangeData = nullptr;
bool bNewGlobal = false;
//search local range names
if (pRangeName)
@@ -457,7 +457,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
if (!bInserted)
{
//if this happened we have a real problem
- pRangeData = NULL;
+ pRangeData = nullptr;
pToken->SetIndex(0);
OSL_FAIL("inserting the range name should not fail");
return;
@@ -541,9 +541,9 @@ struct ScFormulaCellGroup::Impl
ScFormulaCellGroup::ScFormulaCellGroup() :
mpImpl(new Impl),
mnRefCount(0),
- mpCode(NULL),
- mpCompiledFormula(NULL),
- mpTopCell(NULL),
+ mpCode(nullptr),
+ mpCompiledFormula(nullptr),
+ mpTopCell(nullptr),
mnLength(0),
mnFormatType(css::util::NumberFormat::NUMBER),
mbInvariant(false),
@@ -633,10 +633,10 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos ) :
eTempGrammar(formula::FormulaGrammar::GRAM_DEFAULT),
pCode(new ScTokenArray),
pDocument(pDoc),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType(css::util::NumberFormat::NUMBER),
cMatrixFlag(MM_NONE),
@@ -662,12 +662,12 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
const FormulaGrammar::Grammar eGrammar,
sal_uInt8 cMatInd ) :
eTempGrammar( eGrammar),
- pCode( NULL ),
+ pCode( nullptr ),
pDocument( pDoc ),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
@@ -699,10 +699,10 @@ ScFormulaCell::ScFormulaCell(
eTempGrammar( eGrammar),
pCode(pArray),
pDocument( pDoc ),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
@@ -749,10 +749,10 @@ ScFormulaCell::ScFormulaCell(
eTempGrammar( eGrammar),
pCode(new ScTokenArray(rArray)),
pDocument( pDoc ),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType ( css::util::NumberFormat::NUMBER ),
cMatrixFlag ( cMatInd ),
@@ -799,10 +799,10 @@ ScFormulaCell::ScFormulaCell(
eTempGrammar( eGrammar),
pCode(xGroup->mpCode ? xGroup->mpCode : new ScTokenArray),
pDocument( pDoc ),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType(xGroup->mnFormatType),
cMatrixFlag ( cInd ),
@@ -831,10 +831,10 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
aResult( rCell.aResult ),
eTempGrammar( rCell.eTempGrammar),
pDocument( &rDoc ),
- pPrevious(0),
- pNext(0),
- pPreviousTrack(0),
- pNextTrack(0),
+ pPrevious(nullptr),
+ pNext(nullptr),
+ pPreviousTrack(nullptr),
+ pNextTrack(nullptr),
nSeenInIteration(0),
nFormatType( rCell.nFormatType ),
cMatrixFlag ( rCell.cMatrixFlag ),
@@ -873,8 +873,8 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{
if (!pDocument->IsClipboardSource() || aPos.Tab() != rCell.aPos.Tab())
{
- formula::FormulaToken* pToken = NULL;
- while((pToken = pCode->GetNextName())!= NULL)
+ formula::FormulaToken* pToken = nullptr;
+ while((pToken = pCode->GetNextName())!= nullptr)
{
OpCode eOpCode = pToken->GetOpCode();
if (eOpCode == ocName)
@@ -903,7 +903,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{ // Name references with references and ColRowNames
pCode->Reset();
formula::FormulaToken* t;
- while ( ( t = pCode->GetNextReferenceOrName() ) != NULL && !bCompile )
+ while ( ( t = pCode->GetNextReferenceOrName() ) != nullptr && !bCompile )
{
if ( t->IsExternalRef() )
{
@@ -1010,7 +1010,7 @@ void ScFormulaCell::GetFormula( OUStringBuffer& rBuffer,
* pCell only if (!this->IsInChangeTrack()),
* GetEnglishFormula() omitted that test.
* Can we live without in all cases? */
- ScFormulaCell* pCell = NULL;
+ ScFormulaCell* pCell = nullptr;
ScSingleRefData& rRef = *p->GetSingleRef();
ScAddress aAbs = rRef.toAbs(aPos);
if (ValidAddress(aAbs))
@@ -1074,7 +1074,7 @@ OUString ScFormulaCell::GetFormula( sc::CompileFormulaContext& rCxt ) const
* pCell only if (!this->IsInChangeTrack()),
* GetEnglishFormula() omitted that test.
* Can we live without in all cases? */
- ScFormulaCell* pCell = NULL;
+ ScFormulaCell* pCell = nullptr;
ScSingleRefData& rRef = *p->GetSingleRef();
ScAddress aAbs = rRef.toAbs(aPos);
if (ValidAddress(aAbs))
@@ -1115,9 +1115,9 @@ void ScFormulaCell::GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows )
{
MaybeInterpret();
- const ScMatrix* pMat = NULL;
+ const ScMatrix* pMat = nullptr;
if (!pCode->GetCodeError() && aResult.GetType() == svMatrixCell &&
- ((pMat = aResult.GetToken().get()->GetMatrix()) != 0))
+ ((pMat = aResult.GetToken().get()->GetMatrix()) != nullptr))
pMat->GetDimensions( rCols, rRows );
else
{
@@ -1232,7 +1232,7 @@ void ScFormulaCell::CompileTokenArray( bool bNoListening )
{
nFormatType = aComp.GetNumFormatType();
bChanged = true;
- aResult.SetToken( NULL);
+ aResult.SetToken( nullptr);
bCompile = false;
if ( !bNoListening )
StartListeningTo( pDocument );
@@ -1272,7 +1272,7 @@ void ScFormulaCell::CompileTokenArray( sc::CompileFormulaContext& rCxt, bool bNo
{
nFormatType = aComp.GetNumFormatType();
bChanged = true;
- aResult.SetToken( NULL);
+ aResult.SetToken( nullptr);
bCompile = false;
if ( !bNoListening )
StartListeningTo( pDocument );
@@ -1413,7 +1413,7 @@ void ScFormulaCell::CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartL
{
rCxt.setGrammar(eTempGrammar);
Compile(rCxt, aResult.GetHybridFormula(), true);
- aResult.SetToken( NULL);
+ aResult.SetToken( nullptr);
bDirty = true;
bNewCompiled = true;
}
@@ -2771,7 +2771,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
std::deque<formula::FormulaToken*> aReferences;
aReferences.push_back(pFirstReference);
FormulaToken* pToken(pCode->NextRPN());
- FormulaToken* pFunction(0);
+ FormulaToken* pFunction(nullptr);
while (pToken)
{
if (lcl_isReference(*pToken))
@@ -2801,7 +2801,7 @@ bool ScFormulaCell::HasRelNameReference() const
{
pCode->Reset();
formula::FormulaToken* t;
- while ( ( t = pCode->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pCode->GetNextReferenceRPN() ) != nullptr )
{
if ( t->GetSingleRef()->IsRelName() ||
(t->GetType() == formula::svDoubleRef &&
@@ -2851,7 +2851,7 @@ bool checkCompileColRowName(
ScRangePairList* pColList = rDoc.GetColNameRanges();
ScRangePairList* pRowList = rDoc.GetRowNameRanges();
rCode.Reset();
- while ((t = rCode.GetNextColRowName()) != NULL)
+ while ((t = rCode.GetNextColRowName()) != nullptr)
{
ScSingleRefData& rRef = *t->GetSingleRef();
if (rCxt.mnRowDelta > 0 && rRef.IsColRel())
@@ -2934,7 +2934,7 @@ void setOldCodeToUndo(
new ScFormulaCell(
pUndoDoc, aUndoPos, pOldCode ? *pOldCode : ScTokenArray(), eTempGrammar, cMatrixFlag);
- pFCell->SetResultToken(NULL); // to recognize it as changed later (Cut/Paste!)
+ pFCell->SetResultToken(nullptr); // to recognize it as changed later (Cut/Paste!)
pUndoDoc->SetFormulaCell(aUndoPos, pFCell);
}
@@ -2960,7 +2960,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
if (!bHasRefs)
{
pCode->Reset();
- bHasColRowNames = (pCode->GetNextColRowName() != NULL);
+ bHasColRowNames = (pCode->GetNextColRowName() != nullptr);
bHasRefs = bHasRefs || bHasColRowNames;
}
bool bOnRefMove = pCode->IsRecalcModeOnRefMove();
@@ -3081,7 +3081,7 @@ bool ScFormulaCell::UpdateReferenceOnMove(
if (!bHasRefs)
{
pCode->Reset();
- bHasColRowNames = (pCode->GetNextColRowName() != NULL);
+ bHasColRowNames = (pCode->GetNextColRowName() != nullptr);
bHasRefs = bHasRefs || bHasColRowNames;
}
bool bOnRefMove = pCode->IsRecalcModeOnRefMove();
@@ -3206,7 +3206,7 @@ bool ScFormulaCell::UpdateReferenceOnCopy(
// Check presence of any references or column row names.
bool bHasRefs = pCode->HasReferences();
pCode->Reset();
- bool bHasColRowNames = (pCode->GetNextColRowName() != NULL);
+ bool bHasColRowNames = (pCode->GetNextColRowName() != nullptr);
bHasRefs = bHasRefs || bHasColRowNames;
bool bOnRefMove = pCode->IsRecalcModeOnRefMove();
@@ -3444,7 +3444,7 @@ void ScFormulaCell::TransposeReference()
bool bFound = false;
pCode->Reset();
formula::FormulaToken* t;
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
ScSingleRefData& rRef1 = *t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.IsRowRel() )
@@ -3498,12 +3498,12 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
bPosChanged = true;
}
- ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
+ ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : nullptr;
bool bRefChanged = false;
formula::FormulaToken* t;
pCode->Reset();
- while( (t = pCode->GetNextReferenceOrName()) != NULL )
+ while( (t = pCode->GetNextReferenceOrName()) != nullptr )
{
if( t->GetOpCode() == ocName )
{
@@ -3535,7 +3535,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
ScFormulaCell* pFCell = new ScFormulaCell(
pUndoDoc, aPos, pOld ? *pOld : ScTokenArray(), eTempGrammar, cMatrixFlag);
- pFCell->aResult.SetToken( NULL); // to recognize it as changed later (Cut/Paste!)
+ pFCell->aResult.SetToken( nullptr); // to recognize it as changed later (Cut/Paste!)
pUndoDoc->SetFormulaCell(aPos, pFCell);
}
@@ -3557,7 +3557,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
formula::FormulaToken* t;
pCode->Reset();
- while( (t = pCode->GetNextReferenceOrName()) != NULL )
+ while( (t = pCode->GetNextReferenceOrName()) != nullptr )
{
if( t->GetOpCode() == ocName )
{
@@ -3939,8 +3939,8 @@ bool ScFormulaCell::InterpretFormulaGroup()
if (nNumParts > 1)
{
mxGroup->mpTopCell->aPos = aOrigPos;
- xGroup->mpTopCell = NULL;
- xGroup->mpCode = NULL;
+ xGroup->mpTopCell = nullptr;
+ xGroup->mpCode = nullptr;
}
return false;
@@ -3950,7 +3950,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
// generate them.
xGroup->meCalcState = mxGroup->meCalcState = sc::GroupCalcRunning;
sc::FormulaGroupInterpreter *pInterpreter = sc::FormulaGroupInterpreter::getStatic();
- if (pInterpreter == NULL ||
+ if (pInterpreter == nullptr ||
!pInterpreter->interpret(*pDocument, xGroup->mpTopCell->aPos, xGroup, aCode))
{
SAL_INFO("sc.opencl", "interpreting group " << mxGroup << " (state " << (int) mxGroup->meCalcState << ") failed, disabling");
@@ -3960,16 +3960,16 @@ bool ScFormulaCell::InterpretFormulaGroup()
if (nNumParts > 1)
{
mxGroup->mpTopCell->aPos = aOrigPos;
- xGroup->mpTopCell = NULL;
- xGroup->mpCode = NULL;
+ xGroup->mpTopCell = nullptr;
+ xGroup->mpCode = nullptr;
}
return false;
}
if (nNumParts > 1)
{
- xGroup->mpTopCell = NULL;
- xGroup->mpCode = NULL;
+ xGroup->mpTopCell = nullptr;
+ xGroup->mpCode = nullptr;
}
}
@@ -4102,7 +4102,7 @@ void ScFormulaCell::StartListeningTo( ScDocument* pDoc )
pArr->Reset();
formula::FormulaToken* t;
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
{
switch (t->GetType())
{
@@ -4143,7 +4143,7 @@ void ScFormulaCell::StartListeningTo( sc::StartListeningContext& rCxt )
pArr->Reset();
formula::FormulaToken* t;
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
{
switch (t->GetType())
{
@@ -4219,7 +4219,7 @@ void ScFormulaCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
}
pArr->Reset();
formula::FormulaToken* t;
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
{
switch (t->GetType())
{
@@ -4265,7 +4265,7 @@ void ScFormulaCell::EndListeningTo( sc::EndListeningContext& rCxt )
pArr->Reset();
formula::FormulaToken* t;
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
{
switch (t->GetType())
{
@@ -4287,7 +4287,7 @@ void ScFormulaCell::EndListeningTo( sc::EndListeningContext& rCxt )
bool ScFormulaCell::IsShared() const
{
- return mxGroup.get() != NULL;
+ return mxGroup.get() != nullptr;
}
bool ScFormulaCell::IsSharedTop() const
@@ -4321,12 +4321,12 @@ sal_Int32 ScFormulaCell::GetWeight() const
ScTokenArray* ScFormulaCell::GetSharedCode()
{
- return mxGroup ? mxGroup->mpCode : NULL;
+ return mxGroup ? mxGroup->mpCode : nullptr;
}
const ScTokenArray* ScFormulaCell::GetSharedCode() const
{
- return mxGroup ? mxGroup->mpCode : NULL;
+ return mxGroup ? mxGroup->mpCode : nullptr;
}
void ScFormulaCell::SyncSharedCode()
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 8ad449b6d255..ff72cdc6a80b 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -61,9 +61,9 @@ public:
// class ScFuncDesc:
ScFuncDesc::ScFuncDesc() :
- pFuncName (NULL),
- pFuncDesc (NULL),
- pDefArgFlags (NULL),
+ pFuncName (nullptr),
+ pFuncDesc (nullptr),
+ pDefArgFlags (nullptr),
nFIndex (0),
nCategory (0),
nArgCount (0),
@@ -90,13 +90,13 @@ void ScFuncDesc::Clear()
nArgCount = 0;
maDefArgNames.clear();
maDefArgDescs.clear();
- pDefArgFlags = NULL;
+ pDefArgFlags = nullptr;
delete pFuncName;
- pFuncName = NULL;
+ pFuncName = nullptr;
delete pFuncDesc;
- pFuncDesc = NULL;
+ pFuncDesc = nullptr;
nFIndex = 0;
nCategory = 0;
@@ -384,7 +384,7 @@ bool ScFuncDesc::compareByName(const ScFuncDesc* a, const ScFuncDesc* b)
ScFunctionList::ScFunctionList() :
nMaxFuncNameLen ( 0 )
{
- ScFuncDesc* pDesc = NULL;
+ ScFuncDesc* pDesc = nullptr;
sal_Int32 nStrLen = 0;
::std::list<ScFuncDesc*> tmpFuncList;
sal_uInt16 nDescBlock[] =
@@ -581,7 +581,7 @@ ScFunctionList::~ScFunctionList()
const ScFuncDesc* ScFunctionList::First()
{
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
aFunctionListIter = aFunctionList.begin();
if(aFunctionListIter != aFunctionList.end())
pDesc = *aFunctionListIter;
@@ -591,7 +591,7 @@ const ScFuncDesc* ScFunctionList::First()
const ScFuncDesc* ScFunctionList::Next()
{
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
if(aFunctionListIter != aFunctionList.end())
{
if((++aFunctionListIter) != aFunctionList.end())
@@ -602,7 +602,7 @@ const ScFuncDesc* ScFunctionList::Next()
const ScFuncDesc* ScFunctionList::GetFunction( sal_uInt32 nIndex ) const
{
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
if(nIndex < aFunctionList.size())
pDesc = aFunctionList.at(nIndex);
@@ -625,7 +625,7 @@ OUString ScFunctionCategory::getName() const
const formula::IFunctionDescription* ScFunctionCategory::getFunction(sal_uInt32 _nPos) const
{
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
if(_nPos < m_pCategory->size())
pDesc = m_pCategory->at(_nPos);
return pDesc;
@@ -699,7 +699,7 @@ const ScFuncDesc* ScFunctionMgr::Get( sal_uInt16 nFIndex ) const
const ScFuncDesc* ScFunctionMgr::First( sal_uInt16 nCategory ) const
{
OSL_ENSURE( nCategory < MAX_FUNCCAT, "Unknown category" );
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
if ( nCategory < MAX_FUNCCAT )
{
pCurCatListIter = aCatLists[nCategory]->begin();
@@ -716,7 +716,7 @@ const ScFuncDesc* ScFunctionMgr::First( sal_uInt16 nCategory ) const
const ScFuncDesc* ScFunctionMgr::Next() const
{
- const ScFuncDesc* pDesc = NULL;
+ const ScFuncDesc* pDesc = nullptr;
if ( pCurCatListIter != pCurCatListEnd )
{
if ( (++pCurCatListIter) != pCurCatListEnd )
@@ -740,7 +740,7 @@ const formula::IFunctionCategory* ScFunctionMgr::getCategory(sal_uInt32 nCategor
m_aCategories[nCategory].reset(new ScFunctionCategory(aCatLists[nCategory+1],nCategory)); // aCatLists[0] is "all"
return m_aCategories[nCategory].get();
}
- return NULL;
+ return nullptr;
}
void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& _rLastRUFunctions) const
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 16d5466ef899..8e02f7fd68d0 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -84,41 +84,41 @@
#include "docsh.hxx"
tools::SvRef<ScDocShell> ScGlobal::xDrawClipDocShellRef;
-SvxSearchItem* ScGlobal::pSearchItem = NULL;
-ScAutoFormat* ScGlobal::pAutoFormat = NULL;
-LegacyFuncCollection* ScGlobal::pLegacyFuncCollection = NULL;
-ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
-ScUserList* ScGlobal::pUserList = NULL;
-OUString** ScGlobal::ppRscString = NULL;
+SvxSearchItem* ScGlobal::pSearchItem = nullptr;
+ScAutoFormat* ScGlobal::pAutoFormat = nullptr;
+LegacyFuncCollection* ScGlobal::pLegacyFuncCollection = nullptr;
+ScUnoAddInCollection* ScGlobal::pAddInCollection = nullptr;
+ScUserList* ScGlobal::pUserList = nullptr;
+OUString** ScGlobal::ppRscString = nullptr;
LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM;
-css::lang::Locale* ScGlobal::pLocale = NULL;
-SvtSysLocale* ScGlobal::pSysLocale = NULL;
-const CharClass* ScGlobal::pCharClass = NULL;
-const LocaleDataWrapper* ScGlobal::pLocaleData = NULL;
-CalendarWrapper* ScGlobal::pCalendar = NULL;
-CollatorWrapper* ScGlobal::pCollator = NULL;
-CollatorWrapper* ScGlobal::pCaseCollator = NULL;
-::utl::TransliterationWrapper* ScGlobal::pTransliteration = NULL;
-::utl::TransliterationWrapper* ScGlobal::pCaseTransliteration = NULL;
-css::uno::Reference< css::i18n::XOrdinalSuffix> ScGlobal::xOrdinalSuffix = NULL;
-IntlWrapper* ScGlobal::pScIntlWrapper = NULL;
+css::lang::Locale* ScGlobal::pLocale = nullptr;
+SvtSysLocale* ScGlobal::pSysLocale = nullptr;
+const CharClass* ScGlobal::pCharClass = nullptr;
+const LocaleDataWrapper* ScGlobal::pLocaleData = nullptr;
+CalendarWrapper* ScGlobal::pCalendar = nullptr;
+CollatorWrapper* ScGlobal::pCollator = nullptr;
+CollatorWrapper* ScGlobal::pCaseCollator = nullptr;
+::utl::TransliterationWrapper* ScGlobal::pTransliteration = nullptr;
+::utl::TransliterationWrapper* ScGlobal::pCaseTransliteration = nullptr;
+css::uno::Reference< css::i18n::XOrdinalSuffix> ScGlobal::xOrdinalSuffix = nullptr;
+IntlWrapper* ScGlobal::pScIntlWrapper = nullptr;
sal_Unicode ScGlobal::cListDelimiter = ',';
-OUString* ScGlobal::pEmptyOUString = NULL;
-OUString* ScGlobal::pStrClipDocName = NULL;
+OUString* ScGlobal::pEmptyOUString = nullptr;
+OUString* ScGlobal::pStrClipDocName = nullptr;
-SvxBrushItem* ScGlobal::pEmptyBrushItem = NULL;
-SvxBrushItem* ScGlobal::pButtonBrushItem = NULL;
-SvxBrushItem* ScGlobal::pEmbeddedBrushItem = NULL;
-SvxBrushItem* ScGlobal::pProtectedBrushItem = NULL;
+SvxBrushItem* ScGlobal::pEmptyBrushItem = nullptr;
+SvxBrushItem* ScGlobal::pButtonBrushItem = nullptr;
+SvxBrushItem* ScGlobal::pEmbeddedBrushItem = nullptr;
+SvxBrushItem* ScGlobal::pProtectedBrushItem = nullptr;
-ImageList* ScGlobal::pOutlineBitmaps = NULL;
+ImageList* ScGlobal::pOutlineBitmaps = nullptr;
-ScFunctionList* ScGlobal::pStarCalcFunctionList = NULL;
-ScFunctionMgr* ScGlobal::pStarCalcFunctionMgr = NULL;
+ScFunctionList* ScGlobal::pStarCalcFunctionList = nullptr;
+ScFunctionMgr* ScGlobal::pStarCalcFunctionMgr = nullptr;
-ScUnitConverter* ScGlobal::pUnitConverter = NULL;
-SvNumberFormatter* ScGlobal::pEnglishFormatter = NULL;
-ScFieldEditEngine* ScGlobal::pFieldEditEngine = NULL;
+ScUnitConverter* ScGlobal::pUnitConverter = nullptr;
+SvNumberFormatter* ScGlobal::pEnglishFormatter = nullptr;
+ScFieldEditEngine* ScGlobal::pFieldEditEngine = nullptr;
double ScGlobal::nScreenPPTX = 96.0;
double ScGlobal::nScreenPPTY = 96.0;
@@ -131,7 +131,7 @@ long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
-SfxViewShell* pScActiveViewShell = NULL; //FIXME: Make this a member
+SfxViewShell* pScActiveViewShell = nullptr; //FIXME: Make this a member
sal_uInt16 nScClickMouseModifier = 0; //FIXME: This too
sal_uInt16 nScFillModeMouseModifier = 0; //FIXME: And this
@@ -252,10 +252,10 @@ void ScGlobal::SetSearchItem( const SvxSearchItem& rNew )
void ScGlobal::ClearAutoFormat()
{
- if (pAutoFormat!=NULL)
+ if (pAutoFormat!=nullptr)
{
delete pAutoFormat;
- pAutoFormat=NULL;
+ pAutoFormat=nullptr;
}
}
@@ -311,7 +311,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
else
{
delete pUserList;
- pUserList = NULL;
+ pUserList = nullptr;
}
}
@@ -511,14 +511,14 @@ void ScGlobal::Init()
pLocaleData = pSysLocale->GetLocaleDataPtr();
ppRscString = new OUString *[ SC_GLOBSTR_STR_COUNT ];
- for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
+ for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ ) ppRscString[ nC ] = nullptr;
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
pEmbeddedBrushItem = new SvxBrushItem( Color( COL_LIGHTCYAN ), ATTR_BACKGROUND );
pProtectedBrushItem = new SvxBrushItem( Color( COL_LIGHTGRAY ), ATTR_BACKGROUND );
- UpdatePPT(NULL);
+ UpdatePPT(nullptr);
//ScCompiler::InitSymbolsNative();
// ScParameterClassification _after_ Compiler, needs function resources if
// arguments are to be merged in, which in turn need strings of function
@@ -616,7 +616,7 @@ void ScGlobal::Clear()
for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ )
if( ppRscString ) delete ppRscString[ nC ];
delete[] ppRscString;
- ppRscString = NULL;
+ ppRscString = nullptr;
DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr!
DELETEZ(pStarCalcFunctionMgr);
@@ -636,9 +636,9 @@ void ScGlobal::Clear()
DELETEZ(pCollator);
DELETEZ(pCalendar);
// Do NOT delete pCharClass since it is a pointer to the single SvtSysLocale instance !
- pCharClass = NULL;
+ pCharClass = nullptr;
// Do NOT delete pLocaleData since it is a pointer to the single SvtSysLocale instance !
- pLocaleData = NULL;
+ pLocaleData = nullptr;
DELETEZ(pSysLocale);
DELETEZ(pLocale);
DELETEZ(pScIntlWrapper);
@@ -700,7 +700,7 @@ OUString ScGlobal::GetCharsetString( rtl_TextEncoding eVal )
bool ScGlobal::HasStarCalcFunctionList()
{
- return ( pStarCalcFunctionList != NULL );
+ return ( pStarCalcFunctionList != nullptr );
}
ScFunctionList* ScGlobal::GetStarCalcFunctionList()
@@ -738,14 +738,14 @@ const sal_Unicode* ScGlobal::UnicodeStrChr( const sal_Unicode* pStr,
sal_Unicode c )
{
if ( !pStr )
- return NULL;
+ return nullptr;
while ( *pStr )
{
if ( *pStr == c )
return pStr;
pStr++;
}
- return NULL;
+ return nullptr;
}
OUString ScGlobal::addToken(const OUString& rTokenList, const OUString& rToken,
@@ -836,7 +836,7 @@ const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unico
}
++p;
}
- return NULL;
+ return nullptr;
}
bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
@@ -897,7 +897,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, const SdrM
SfxStringItem aUrl( SID_FILE_NAME, rURL );
SfxStringItem aTarget( SID_TARGETNAME, rTarget );
aTarget.SetValue("_blank");
- SfxViewFrame* pFrame = NULL;
+ SfxViewFrame* pFrame = nullptr;
OUString aReferName;
if ( pScActiveViewShell )
{
@@ -1139,7 +1139,7 @@ ScFieldEditEngine& ScGlobal::GetStaticFieldEditEngine()
// specific fields not being resolvable! See
// ScFieldEditEngine::CalcFieldValue(). pEnginePool=NULL lets
// EditEngine internally create and delete a default pool.
- pFieldEditEngine = new ScFieldEditEngine( NULL, NULL);
+ pFieldEditEngine = new ScFieldEditEngine( nullptr, nullptr);
}
return *pFieldEditEngine;
}
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 15000f2e9558..b31876a9bd31 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -108,7 +108,7 @@ bool ScImportParam::operator==( const ScImportParam& rOther ) const
// struct ScConsolidateParam:
ScConsolidateParam::ScConsolidateParam() :
- ppDataAreas( NULL )
+ ppDataAreas( nullptr )
{
Clear();
}
@@ -116,7 +116,7 @@ ScConsolidateParam::ScConsolidateParam() :
ScConsolidateParam::ScConsolidateParam( const ScConsolidateParam& r ) :
nCol(r.nCol),nRow(r.nRow),nTab(r.nTab),
eFunction(r.eFunction),nDataAreaCount(0),
- ppDataAreas( NULL ),
+ ppDataAreas( nullptr ),
bByCol(r.bByCol),bByRow(r.bByRow),bReferenceData(r.bReferenceData)
{
if ( r.nDataAreaCount > 0 )
@@ -140,7 +140,7 @@ void ScConsolidateParam::ClearDataAreas()
for ( sal_uInt16 i=0; i<nDataAreaCount; i++ )
delete ppDataAreas[i];
delete [] ppDataAreas;
- ppDataAreas = NULL;
+ ppDataAreas = nullptr;
}
nDataAreaCount = 0;
}
@@ -182,9 +182,9 @@ bool ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
&& (eFunction == r.eFunction);
if ( nDataAreaCount == 0 )
- bEqual = bEqual && (ppDataAreas == NULL) && (r.ppDataAreas == NULL);
+ bEqual = bEqual && (ppDataAreas == nullptr) && (r.ppDataAreas == nullptr);
else
- bEqual = bEqual && (ppDataAreas != NULL) && (r.ppDataAreas != NULL);
+ bEqual = bEqual && (ppDataAreas != nullptr) && (r.ppDataAreas != nullptr);
if ( bEqual && (nDataAreaCount > 0) )
for ( sal_uInt16 i=0; i<nDataAreaCount && bEqual; i++ )
@@ -208,7 +208,7 @@ void ScConsolidateParam::SetAreas( ScArea* const* ppAreas, sal_uInt16 nCount )
// struct ScSolveParam
ScSolveParam::ScSolveParam()
- : pStrTargetVal( NULL )
+ : pStrTargetVal( nullptr )
{
}
@@ -217,7 +217,7 @@ ScSolveParam::ScSolveParam( const ScSolveParam& r )
aRefVariableCell( r.aRefVariableCell ),
pStrTargetVal ( r.pStrTargetVal
? new OUString(*r.pStrTargetVal)
- : NULL )
+ : nullptr )
{
}
@@ -243,7 +243,7 @@ ScSolveParam& ScSolveParam::operator=( const ScSolveParam& r )
aRefVariableCell = r.aRefVariableCell;
pStrTargetVal = r.pStrTargetVal
? new OUString(*r.pStrTargetVal)
- : NULL;
+ : nullptr;
return *this;
}
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index baa9aab5cc3e..f21ce8d0b8e4 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -28,7 +28,7 @@
ScMarkArray::ScMarkArray() :
nCount( 0 ),
nLimit( 0 ),
- pData( NULL )
+ pData( nullptr )
{
// special case "no marks" with pData = NULL
}
@@ -301,7 +301,7 @@ void ScMarkArray::CopyMarksTo( ScMarkArray& rDestMarkArray ) const
memcpy( rDestMarkArray.pData, pData, nCount * sizeof(ScMarkEntry) );
}
else
- rDestMarkArray.pData = NULL;
+ rDestMarkArray.pData = nullptr;
rDestMarkArray.nCount = rDestMarkArray.nLimit = nCount;
}
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 28d5dc96ecf5..137a2e442ee7 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -31,7 +31,7 @@
ScMarkData::ScMarkData() :
maTabMarked(),
- pMultiSel( NULL )
+ pMultiSel( nullptr )
{
ResetMark();
}
@@ -40,7 +40,7 @@ ScMarkData::ScMarkData(const ScMarkData& rData) :
maTabMarked( rData.maTabMarked ),
aMarkRange( rData.aMarkRange ),
aMultiRange( rData.aMultiRange ),
- pMultiSel( NULL )
+ pMultiSel( nullptr )
{
bMarked = rData.bMarked;
bMultiMarked = rData.bMultiMarked;
@@ -61,7 +61,7 @@ ScMarkData& ScMarkData::operator=(const ScMarkData& rData)
return *this;
delete[] pMultiSel;
- pMultiSel = NULL;
+ pMultiSel = nullptr;
aMarkRange = rData.aMarkRange;
aMultiRange = rData.aMultiRange;
@@ -90,7 +90,7 @@ ScMarkData::~ScMarkData()
void ScMarkData::ResetMark()
{
delete[] pMultiSel;
- pMultiSel = NULL;
+ pMultiSel = nullptr;
bMarked = bMultiMarked = false;
bMarking = bMarkIsNeg = false;
diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx
index 3e0a17f89cdb..d3847ed17289 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -27,7 +27,7 @@ ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL
maTables.insert(TablesType::value_type(nTab, ColumnsType()));
if (!r.second)
// insertion failed.
- return NULL;
+ return nullptr;
itTab = r.first;
}
@@ -45,12 +45,12 @@ ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL
if (!r.second)
// insertion failed.
- return NULL;
+ return nullptr;
it = r.first;
if (!mrDoc.InitColumnBlockPosition(it->second, nTab, nCol))
- return NULL;
+ return nullptr;
return &it->second;
}
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index 55f86356a187..cb2b0063c146 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -487,11 +487,11 @@ bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, bool& rSi
ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex)
{
if (nLevel >= nDepth)
- return NULL;
+ return nullptr;
ScOutlineCollection& rColl = aCollections[nLevel];
if (nIndex >= rColl.size())
- return NULL;
+ return nullptr;
ScOutlineCollection::iterator it = rColl.begin();
std::advance(it, nIndex);
@@ -501,11 +501,11 @@ ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex)
const ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex) const
{
if (nLevel >= nDepth)
- return NULL;
+ return nullptr;
const ScOutlineCollection& rColl = aCollections[nLevel];
if (nIndex >= rColl.size())
- return NULL;
+ return nullptr;
ScOutlineCollection::const_iterator it = rColl.begin();
std::advance(it, nIndex);
@@ -523,7 +523,7 @@ size_t ScOutlineArray::GetCount(size_t nLevel) const
const ScOutlineEntry* ScOutlineArray::GetEntryByPos(size_t nLevel, SCCOLROW nPos) const
{
if (nLevel >= nDepth)
- return NULL;
+ return nullptr;
const ScOutlineCollection& rColl = aCollections[nLevel];
ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
@@ -534,7 +534,7 @@ const ScOutlineEntry* ScOutlineArray::GetEntryByPos(size_t nLevel, SCCOLROW nPos
return pEntry;
}
- return NULL;
+ return nullptr;
}
bool ScOutlineArray::GetEntryIndex(size_t nLevel, SCCOLROW nPos, size_t& rnIndex) const
@@ -664,7 +664,7 @@ void ScOutlineArray::InsertSpace(SCCOLROW nStartPos, SCSIZE nSize)
{
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
- while ((pEntry = aIter.GetNext()) != NULL)
+ while ((pEntry = aIter.GetNext()) != nullptr)
{
if ( pEntry->GetStart() >= nStartPos )
pEntry->Move(static_cast<SCsCOLROW>(nSize));
@@ -691,7 +691,7 @@ bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize)
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
- while((pEntry=aIter.GetNext())!=NULL)
+ while((pEntry=aIter.GetNext())!=nullptr)
{
SCCOLROW nEntryStart = pEntry->GetStart();
SCCOLROW nEntryEnd = pEntry->GetEnd();
@@ -731,7 +731,7 @@ bool ScOutlineArray::ManualAction(
bool bModified = false;
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
- while((pEntry=aIter.GetNext())!=NULL)
+ while((pEntry=aIter.GetNext())!=nullptr)
{
SCCOLROW nEntryStart = pEntry->GetStart();
SCCOLROW nEntryEnd = pEntry->GetEnd();
@@ -834,12 +834,12 @@ ScSubOutlineIterator::ScSubOutlineIterator(
ScOutlineEntry* ScSubOutlineIterator::GetNext()
{
- ScOutlineEntry* pEntry = NULL;
+ ScOutlineEntry* pEntry = nullptr;
bool bFound = false;
do
{
if (nSubLevel >= nDepth)
- return NULL;
+ return nullptr;
ScOutlineCollection& rColl = pArray->aCollections[nSubLevel];
if (nSubEntry < rColl.size())
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index edabda2f99bc..05b8ceb4090b 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -70,13 +70,13 @@ using sc::TwipsToHMM;
ScPatternAttr::ScPatternAttr( SfxItemSet* pItemSet, const OUString& rStyleName )
: SfxSetItem ( ATTR_PATTERN, pItemSet ),
pName ( new OUString( rStyleName ) ),
- pStyle ( NULL )
+ pStyle ( nullptr )
{
}
ScPatternAttr::ScPatternAttr( SfxItemSet* pItemSet, ScStyleSheet* pStyleSheet )
: SfxSetItem ( ATTR_PATTERN, pItemSet ),
- pName ( NULL ),
+ pName ( nullptr ),
pStyle ( pStyleSheet )
{
if ( pStyleSheet )
@@ -85,8 +85,8 @@ ScPatternAttr::ScPatternAttr( SfxItemSet* pItemSet, ScStyleSheet* pStyleSheet )
ScPatternAttr::ScPatternAttr( SfxItemPool* pItemPool )
: SfxSetItem ( ATTR_PATTERN, new SfxItemSet( *pItemPool, ATTR_PATTERN_START, ATTR_PATTERN_END ) ),
- pName ( NULL ),
- pStyle ( NULL )
+ pName ( nullptr ),
+ pStyle ( nullptr )
{
}
@@ -97,7 +97,7 @@ ScPatternAttr::ScPatternAttr( const ScPatternAttr& rPatternAttr )
if (rPatternAttr.pName)
pName = new OUString(*rPatternAttr.pName);
else
- pName = NULL;
+ pName = nullptr;
}
ScPatternAttr::~ScPatternAttr()
@@ -110,7 +110,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(true, pPool) );
pPattern->pStyle = pStyle;
- pPattern->pName = pName ? new OUString(*pName) : NULL;
+ pPattern->pName = pName ? new OUString(*pName) : nullptr;
return pPattern;
}
@@ -383,7 +383,7 @@ void ScPatternAttr::GetFont(
// Size
- if ( pOutDev != NULL )
+ if ( pOutDev != nullptr )
{
Size aEffSize;
Fraction aFraction( 1,1 );
@@ -1027,7 +1027,7 @@ static SfxStyleSheetBase* lcl_CopyStyleToPool
if ( !pSrcStyle || !pDestPool || !pSrcPool )
{
OSL_FAIL( "CopyStyleToPool: Invalid Arguments :-/" );
- return NULL;
+ return nullptr;
}
const OUString aStrSrcStyle = pSrcStyle->GetName();
@@ -1105,7 +1105,7 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, false, &pSrcItem );
if (eItemState==SfxItemState::SET)
{
- SfxPoolItem* pNewItem = NULL;
+ SfxPoolItem* pNewItem = nullptr;
if ( nAttrId == ATTR_VALIDDATA )
{
@@ -1213,7 +1213,7 @@ bool ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
const OUString* ScPatternAttr::GetStyleName() const
{
- return pName ? pName : ( pStyle ? &pStyle->GetName() : NULL );
+ return pName ? pName : ( pStyle ? &pStyle->GetName() : nullptr );
}
void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFormat )
@@ -1238,8 +1238,8 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor
else
{
OSL_FAIL( "ScPatternAttr::SetStyleSheet( NULL ) :-|" );
- GetItemSet().SetParent(NULL);
- pStyle = NULL;
+ GetItemSet().SetParent(nullptr);
+ pStyle = nullptr;
}
}
@@ -1265,7 +1265,7 @@ void ScPatternAttr::UpdateStyleSheet(ScDocument* pDoc)
}
}
else
- pStyle = NULL;
+ pStyle = nullptr;
}
void ScPatternAttr::StyleToName()
@@ -1279,8 +1279,8 @@ void ScPatternAttr::StyleToName()
else
pName = new OUString( pStyle->GetName() );
- pStyle = NULL;
- GetItemSet().SetParent( NULL );
+ pStyle = nullptr;
+ GetItemSet().SetParent( nullptr );
}
}
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index d72b8a57e424..40bae0aa690f 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -26,9 +26,9 @@
#include "stlpool.hxx"
ScPoolHelper::ScPoolHelper( ScDocument* pSourceDoc )
-:pFormTable(NULL)
-,pEditPool(NULL)
-,pEnginePool(NULL)
+:pFormTable(nullptr)
+,pEditPool(nullptr)
+,pEnginePool(nullptr)
,m_pSourceDoc(pSourceDoc)
{
OSL_ENSURE( pSourceDoc, "ScPoolHelper: no document" );
@@ -94,7 +94,7 @@ void ScPoolHelper::SetFormTableOpt(const ScDocOptions& rOpt)
SvNumberFormatter* ScPoolHelper::CreateNumberFormatter() const
{
- SvNumberFormatter* p = NULL;
+ SvNumberFormatter* p = nullptr;
{
osl::MutexGuard aGuard(&maMtxCreateNumFormatter);
p = new SvNumberFormatter(comphelper::getProcessComponentContext(), ScGlobal::eLnge);
@@ -113,7 +113,7 @@ SvNumberFormatter* ScPoolHelper::CreateNumberFormatter() const
void ScPoolHelper::SourceDocumentGone()
{
// reset all pointers to the source document
- mxStylePool->SetDocument( NULL );
+ mxStylePool->SetDocument( nullptr );
if ( pFormTable )
pFormTable->SetColorLink( Link<sal_uInt16,Color*>() );
}
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 733df671a63b..509ef41e8b31 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -169,11 +169,11 @@ public:
inline SdrCaptionObj* GetCaption() { return mpCaption; }
/** Moves the caption inside the passed rectangle. Uses page area if 0 is passed. */
- void FitCaptionToRect( const Rectangle* pVisRect = 0 );
+ void FitCaptionToRect( const Rectangle* pVisRect = nullptr );
/** Places the caption inside the passed rectangle, tries to keep the cell rectangle uncovered. Uses page area if 0 is passed. */
- void AutoPlaceCaption( const Rectangle* pVisRect = 0 );
+ void AutoPlaceCaption( const Rectangle* pVisRect = nullptr );
/** Updates caption tail and textbox according to current cell position. Uses page area if 0 is passed. */
- void UpdateCaptionPos( const Rectangle* pVisRect = 0 );
+ void UpdateCaptionPos( const Rectangle* pVisRect = nullptr );
protected:
/** Helper constructor for derived classes. */
@@ -202,7 +202,7 @@ private:
ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, bool bShown, bool bTailFront ) :
mrDoc( rDoc ),
maPos( rPos ),
- mpCaption( 0 )
+ mpCaption( nullptr )
{
Initialize();
CreateCaption( bShown, bTailFront );
@@ -219,7 +219,7 @@ ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, Sdr
ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos ) :
mrDoc( rDoc ),
maPos( rPos ),
- mpCaption( 0 )
+ mpCaption( nullptr )
{
Initialize();
}
@@ -227,7 +227,7 @@ ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos ) :
SdrPage* ScCaptionCreator::GetDrawPage()
{
ScDrawLayer* pDrawLayer = mrDoc.GetDrawLayer();
- return pDrawLayer ? pDrawLayer->GetPage( static_cast< sal_uInt16 >( maPos.Tab() ) ) : 0;
+ return pDrawLayer ? pDrawLayer->GetPage( static_cast< sal_uInt16 >( maPos.Tab() ) ) : nullptr;
}
void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect )
@@ -466,7 +466,7 @@ ScCaptionInitData::ScCaptionInitData() :
}
ScNoteData::ScNoteData( bool bShown ) :
- mpCaption( 0 ),
+ mpCaption( nullptr ),
mbShown( bShown )
{
}
@@ -487,7 +487,7 @@ ScPostIt::ScPostIt( ScDocument& rDoc, const ScAddress& rPos, const ScPostIt& rNo
mrDoc( rDoc ),
maNoteData( rNote.maNoteData )
{
- maNoteData.mpCaption = 0;
+ maNoteData.mpCaption = nullptr;
CreateCaption( rPos, rNote.maNoteData.mpCaption );
}
@@ -532,13 +532,13 @@ const OutlinerParaObject* ScPostIt::GetOutlinerObject() const
return maNoteData.mpCaption->GetOutlinerParaObject();
if( maNoteData.mxInitData.get() )
return maNoteData.mxInitData->mxOutlinerObj.get();
- return 0;
+ return nullptr;
}
const EditTextObject* ScPostIt::GetEditTextObject() const
{
const OutlinerParaObject* pOPO = GetOutlinerObject();
- return pOPO ? &pOPO->GetTextObject() : 0;
+ return pOPO ? &pOPO->GetTextObject() : nullptr;
}
OUString ScPostIt::GetText() const
@@ -579,7 +579,7 @@ void ScPostIt::ForgetCaption()
{
/* This function is used in undo actions to give up the responsibility for
the caption object which is handled by separate drawing undo actions. */
- maNoteData.mpCaption = 0;
+ maNoteData.mpCaption = nullptr;
maNoteData.mxInitData.reset();
}
@@ -675,7 +675,7 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
void ScPostIt::CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCaption )
{
OSL_ENSURE( !maNoteData.mpCaption, "ScPostIt::CreateCaption - unexpected caption object found" );
- maNoteData.mpCaption = 0;
+ maNoteData.mpCaption = nullptr;
/* #i104915# Never try to create notes in Undo document, leads to
crash due to missing document members (e.g. row height array). */
@@ -745,7 +745,7 @@ void ScPostIt::RemoveCaption()
SdrObject::Free( pObj );
}
}
- maNoteData.mpCaption = 0;
+ maNoteData.mpCaption = nullptr;
}
SdrCaptionObj* ScNoteUtil::CreateTempCaption(
@@ -754,7 +754,7 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
{
OUStringBuffer aBuffer( rUserText );
// add plain text of invisible (!) cell note (no formatting etc.)
- SdrCaptionObj* pNoteCaption = 0;
+ SdrCaptionObj* pNoteCaption = nullptr;
const ScPostIt* pNote = rDoc.GetNote( rPos );
if( pNote && !pNote->IsCaptionShown() )
{
@@ -765,7 +765,7 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
// create a caption if any text exists
if( !pNoteCaption && aBuffer.isEmpty() )
- return 0;
+ return nullptr;
// prepare visible rectangle (add default distance to all borders)
Rectangle aVisRect(
@@ -863,7 +863,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromString(
ScDocument& rDoc, const ScAddress& rPos, const OUString& rNoteText,
bool bShown, bool bAlwaysCreateCaption )
{
- ScPostIt* pNote = 0;
+ ScPostIt* pNote = nullptr;
if( !rNoteText.isEmpty() )
{
ScNoteData aNoteData( bShown );
diff --git a/sc/source/core/data/sheetevents.cxx b/sc/source/core/data/sheetevents.cxx
index b3328791d909..ddb893e69595 100644
--- a/sc/source/core/data/sheetevents.cxx
+++ b/sc/source/core/data/sheetevents.cxx
@@ -63,7 +63,7 @@ sal_Int32 ScSheetEvents::GetVbaDocumentEventId(ScSheetEventId nEvent)
}
ScSheetEvents::ScSheetEvents() :
- mpScriptNames(NULL)
+ mpScriptNames(nullptr)
{
}
@@ -79,12 +79,12 @@ void ScSheetEvents::Clear()
for (sal_Int32 nEvent=0; nEvent<COUNT; ++nEvent)
delete mpScriptNames[nEvent];
delete[] mpScriptNames;
- mpScriptNames = NULL;
+ mpScriptNames = nullptr;
}
}
ScSheetEvents::ScSheetEvents(const ScSheetEvents& rOther) :
- mpScriptNames(NULL)
+ mpScriptNames(nullptr)
{
*this = rOther;
}
@@ -99,7 +99,7 @@ const ScSheetEvents& ScSheetEvents::operator=(const ScSheetEvents& rOther)
if (rOther.mpScriptNames[nEvent])
mpScriptNames[nEvent] = new OUString(*rOther.mpScriptNames[nEvent]);
else
- mpScriptNames[nEvent] = NULL;
+ mpScriptNames[nEvent] = nullptr;
}
return *this;
}
@@ -108,7 +108,7 @@ const OUString* ScSheetEvents::GetScript(ScSheetEventId nEvent) const
{
if (mpScriptNames)
return mpScriptNames[static_cast<int>(nEvent)];
- return NULL;
+ return nullptr;
}
void ScSheetEvents::SetScript(ScSheetEventId eEvent, const OUString* pNew)
@@ -118,13 +118,13 @@ void ScSheetEvents::SetScript(ScSheetEventId eEvent, const OUString* pNew)
{
mpScriptNames = new OUString*[COUNT];
for (sal_Int32 nEventIdx=0; nEventIdx<COUNT; ++nEventIdx)
- mpScriptNames[nEventIdx] = NULL;
+ mpScriptNames[nEventIdx] = nullptr;
}
delete mpScriptNames[nEvent];
if (pNew)
mpScriptNames[nEvent] = new OUString(*pNew);
else
- mpScriptNames[nEvent] = NULL;
+ mpScriptNames[nEvent] = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/simpleformulacalc.cxx b/sc/source/core/data/simpleformulacalc.cxx
index 885d4030ae7a..7d2efe2fddc6 100644
--- a/sc/source/core/data/simpleformulacalc.cxx
+++ b/sc/source/core/data/simpleformulacalc.cxx
@@ -44,7 +44,7 @@ void ScSimpleFormulaCalculator::Calculate()
return;
mbCalculated = true;
- ScInterpreter aInt(NULL, mpDoc, maAddr, *mpCode.get());
+ ScInterpreter aInt(nullptr, mpDoc, maAddr, *mpCode.get());
aInt.AssertFormulaMatrix();
formula::StackVar aIntType = aInt.Interpret();
@@ -131,7 +131,7 @@ svl::SharedString ScSimpleFormulaCalculator::GetString()
bool ScSimpleFormulaCalculator::HasColRowName()
{
mpCode->Reset();
- return mpCode->GetNextColRowName() != NULL;
+ return mpCode->GetNextColRowName() != nullptr;
}
ScTokenArray* ScSimpleFormulaCalculator::GetCode()
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 12c7c0dce6ee..450445486cf0 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -58,9 +58,9 @@
ScStyleSheetPool::ScStyleSheetPool( SfxItemPool& rPoolP,
ScDocument* pDocument )
: SfxStyleSheetPool( rPoolP ),
- pActualStyleSheet( NULL ),
+ pActualStyleSheet( nullptr ),
pDoc( pDocument ),
- pForceStdName( NULL )
+ pForceStdName( nullptr )
{
}
@@ -82,7 +82,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
//TODO: only when loading?
- if ( rName == STRING_STANDARD && Find( rName, eFam ) != NULL )
+ if ( rName == STRING_STANDARD && Find( rName, eFam ) != nullptr )
{
OSL_FAIL("renaming additional default style");
sal_uInt32 nCount = GetIndexedStyleSheets().GetNumberOfStyleSheets();
@@ -90,7 +90,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
{
OUString aNewName = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
aNewName += OUString::number( nAdd );
- if ( Find( aNewName, eFam ) == NULL )
+ if ( Find( aNewName, eFam ) == nullptr )
return SfxStyleSheetPool::Make(aNewName, eFam, mask);
}
}
@@ -221,16 +221,16 @@ void ScStyleSheetPool::CreateStandardStyles()
OUString aStr;
sal_Int32 nStrLen;
OUString aHelpFile;//which text???
- SfxItemSet* pSet = NULL;
- SfxItemSet* pHFSet = NULL;
- SvxSetItem* pHFSetItem = NULL;
+ SfxItemSet* pSet = nullptr;
+ SfxItemSet* pHFSet = nullptr;
+ SvxSetItem* pHFSetItem = nullptr;
ScEditEngineDefaulter* pEdEngine = new ScEditEngineDefaulter( EditEngine::CreatePool(), true );
pEdEngine->SetUpdateMode( false );
EditTextObject* pEmptyTxtObj = pEdEngine->CreateTextObject();
- EditTextObject* pTxtObj = NULL;
+ EditTextObject* pTxtObj = nullptr;
ScPageHFItem* pHeaderItem = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT );
ScPageHFItem* pFooterItem = new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT );
- ScStyleSheet* pSheet = NULL;
+ ScStyleSheet* pSheet = nullptr;
::editeng::SvxBorderLine aBorderLine ( &aColBlack, DEF_LINE_WIDTH_2 );
SvxBoxItem aBoxItem ( ATTR_BORDER );
SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
@@ -475,15 +475,15 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const OUString& rName, SfxStyleFami
for (/**/;it != aFoundPositions.end(); ++it)
{
SfxStyleSheetBase *pFound = GetStyleSheetByPositionInIndex(*it).get();
- ScStyleSheet* pSheet = NULL;
+ ScStyleSheet* pSheet = nullptr;
// we do not know what kind of sheets we have.
pSheet = dynamic_cast<ScStyleSheet*>(pFound);
- if (pSheet != NULL)
+ if (pSheet != nullptr)
{
return pSheet;
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 58be8f528e93..b06ab871d5c1 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -123,7 +123,7 @@ bool ScStyleSheet::SetParent( const OUString& rParentName )
void ScStyleSheet::ResetParent()
{
- GetItemSet().SetParent(NULL);
+ GetItemSet().SetParent(nullptr);
}
SfxItemSet& ScStyleSheet::GetItemSet()
@@ -270,7 +270,7 @@ void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- GetItemSet().SetParent( NULL );
+ GetItemSet().SetParent( nullptr );
}
// Dirty tricks, to always save the default template as "standard"
diff --git a/sc/source/core/data/subtotalparam.cxx b/sc/source/core/data/subtotalparam.cxx
index 2cf17fdd6e96..0ed43bb30dba 100644
--- a/sc/source/core/data/subtotalparam.cxx
+++ b/sc/source/core/data/subtotalparam.cxx
@@ -16,8 +16,8 @@ ScSubTotalParam::ScSubTotalParam()
for ( sal_uInt16 i=0; i<MAXSUBTOTAL; i++ )
{
nSubTotals[i] = 0;
- pSubTotals[i] = NULL;
- pFunctions[i] = NULL;
+ pSubTotals[i] = nullptr;
+ pFunctions[i] = nullptr;
}
Clear();
@@ -49,8 +49,8 @@ ScSubTotalParam::ScSubTotalParam( const ScSubTotalParam& r ) :
else
{
nSubTotals[i] = 0;
- pSubTotals[i] = NULL;
- pFunctions[i] = NULL;
+ pSubTotals[i] = nullptr;
+ pFunctions[i] = nullptr;
}
}
}
@@ -117,8 +117,8 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r )
else
{
nSubTotals[i] = 0;
- pSubTotals[i] = NULL;
- pFunctions[i] = NULL;
+ pSubTotals[i] = nullptr;
+ pFunctions[i] = nullptr;
}
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 38208ec35929..11c0d58c7bd9 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -108,7 +108,7 @@ bool ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
nNewSizeY = pOutlineTable->GetRowArray().GetDepth();
}
else
- pOutlineTable = NULL;
+ pOutlineTable = nullptr;
return ( nNewSizeX != nOldSizeX || nNewSizeY != nOldSizeY ); // changed size?
}
@@ -125,7 +125,7 @@ void ScTable::SetSheetEvents( const ScSheetEvents* pNew )
if (pNew)
pSheetEvents = new ScSheetEvents(*pNew);
else
- pSheetEvents = NULL;
+ pSheetEvents = nullptr;
SetCalcNotification( false ); // discard notifications before the events were set
@@ -323,7 +323,7 @@ void ScTable::InsertCol(
std::vector<SCCOL> aRegroupCols;
rRegroupCols.getColumns(nTab, aRegroupCols);
- std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(aCol, NULL));
+ std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(aCol, nullptr));
if (nStartCol>0) // copy old attributes
{
@@ -410,7 +410,7 @@ void ScTable::DeleteCol(
std::vector<SCCOL> aRegroupCols;
rRegroupCols.getColumns(nTab, aRegroupCols);
- std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(aCol, NULL));
+ std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(aCol, nullptr));
InvalidatePageBreaks();
@@ -864,7 +864,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCROW nAttrRow2;
const ScPatternAttr* pPattern;
std::unique_ptr<ScAttrIterator> pAttrIter(aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
- while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) != 0 )
+ while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) != nullptr )
{
if ( !IsDefaultItem( pPattern ) )
{
@@ -1018,7 +1018,7 @@ void ScTable::TransposeColNotes(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SC
ScColumn* ScTable::FetchColumn( SCCOL nCol )
{
if (!ValidCol(nCol))
- return NULL;
+ return nullptr;
return &aCol[nCol];
}
@@ -1026,7 +1026,7 @@ ScColumn* ScTable::FetchColumn( SCCOL nCol )
const ScColumn* ScTable::FetchColumn( SCCOL nCol ) const
{
if (!ValidCol(nCol))
- return NULL;
+ return nullptr;
return &aCol[nCol];
}
@@ -1147,7 +1147,7 @@ void ScTable::CopyToTable(
for (SCROW i = nRow1; i <= nRow2; ++i)
{
SCROW nLastRow;
- bool bHidden = RowHidden(i, NULL, &nLastRow);
+ bool bHidden = RowHidden(i, nullptr, &nLastRow);
if (nLastRow >= nRow2)
// the last row shouldn't exceed the upper bound the caller specified.
nLastRow = nRow2;
@@ -1168,7 +1168,7 @@ void ScTable::CopyToTable(
for (SCROW i = nRow1; i <= nRow2; ++i)
{
SCROW nLastRow;
- bool bFiltered = RowFiltered(i, NULL, &nLastRow);
+ bool bFiltered = RowFiltered(i, nullptr, &nLastRow);
if (nLastRow >= nRow2)
// the last row shouldn't exceed the upper bound the caller specified.
nLastRow = nRow2;
@@ -1298,7 +1298,7 @@ bool ScTable::HasScenarioRange( const ScRange& rRange ) const
void ScTable::InvalidateScenarioRanges()
{
delete pScenarioRanges;
- pScenarioRanges = NULL;
+ pScenarioRanges = nullptr;
}
const ScRangeList* ScTable::GetScenarioRanges() const
@@ -1415,7 +1415,7 @@ ScFormulaCell* ScTable::SetFormulaCell( SCCOL nCol, SCROW nRow, ScFormulaCell* p
if (!ValidColRow(nCol, nRow))
{
delete pCell;
- return NULL;
+ return nullptr;
}
return aCol[nCol].SetFormulaCell(nRow, pCell, sc::ConvertToGroupListening);
@@ -1460,7 +1460,7 @@ void ScTable::GetString( SCCOL nCol, SCROW nRow, OUString& rString ) const
double* ScTable::GetValueCell( SCCOL nCol, SCROW nRow )
{
if (!ValidColRow(nCol,nRow))
- return NULL;
+ return nullptr;
return aCol[nCol].GetValueCell(nRow);
}
@@ -1483,7 +1483,7 @@ double ScTable::GetValue( SCCOL nCol, SCROW nRow ) const
const EditTextObject* ScTable::GetEditText( SCCOL nCol, SCROW nRow ) const
{
if (!ValidColRow(nCol, nRow))
- return NULL;
+ return nullptr;
return aCol[nCol].GetEditText(nRow);
}
@@ -1507,7 +1507,7 @@ void ScTable::GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const
const ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow ) const
{
if (!ValidColRow(nCol, nRow))
- return NULL;
+ return nullptr;
return aCol[nCol].GetFormulaCell(nRow);
}
@@ -1515,7 +1515,7 @@ const ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow ) const
ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow )
{
if (!ValidColRow(nCol, nRow))
- return NULL;
+ return nullptr;
return aCol[nCol].GetFormulaCell(nRow);
}
@@ -1523,7 +1523,7 @@ ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow )
ScPostIt* ScTable::ReleaseNote( SCCOL nCol, SCROW nRow )
{
if (!ValidCol(nCol))
- return NULL;
+ return nullptr;
return aCol[nCol].ReleaseNote(nRow);
}
@@ -1815,7 +1815,7 @@ const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich )
if (ValidColRow(nCol,nRow))
return &aCol[nCol].GetAttr( nRow, nWhich );
else
- return NULL;
+ return nullptr;
}
sal_uInt32 ScTable::GetNumberFormat( const ScAddress& rPos ) const
@@ -1865,7 +1865,7 @@ const ScPatternAttr* ScTable::GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, S
if ( ValidColRow( nCol, nStartRow ) && ValidRow( nEndRow ) && (nStartRow <= nEndRow) )
return aCol[nCol].GetMostUsedPattern( nStartRow, nEndRow );
else
- return NULL;
+ return nullptr;
}
bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nMask ) const
@@ -2065,7 +2065,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
nArrY = FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
nCol, nAttrRow1, nAttrRow2,
- nArrY, pPattern, NULL );
+ nArrY, pPattern, nullptr );
pPattern = aIter.GetNext( nAttrCol, nAttrRow1, nAttrRow2 );
}
@@ -2488,7 +2488,7 @@ const ScStyleSheet* ScTable::GetStyle( SCCOL nCol, SCROW nRow ) const
if (ValidColRow(nCol, nRow))
return aCol[nCol].GetStyle(nRow);
else
- return NULL;
+ return nullptr;
}
const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const
@@ -2498,7 +2498,7 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, bool& r
bool bEqual = true;
bool bColFound;
- const ScStyleSheet* pStyle = NULL;
+ const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
for (SCCOL i=0; i<=MAXCOL && bEqual; i++)
@@ -2514,7 +2514,7 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, bool& r
}
}
- return bEqual ? pStyle : NULL;
+ return bEqual ? pStyle : nullptr;
}
const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow1,
@@ -2525,7 +2525,7 @@ const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow
bool bEqual = true;
bool bColFound;
- const ScStyleSheet* pStyle = NULL;
+ const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
for (SCCOL i=nCol1; i<=nCol2 && bEqual; i++)
@@ -2540,7 +2540,7 @@ const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow
}
}
- return bEqual ? pStyle : NULL;
+ return bEqual ? pStyle : nullptr;
}
bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const
@@ -2845,7 +2845,7 @@ sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZe
for (SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol)
{
if (bHiddenAsZero && nCol > nLastHiddenCol)
- bHidden = ColHidden(nCol, NULL, &nLastHiddenCol);
+ bHidden = ColHidden(nCol, nullptr, &nLastHiddenCol);
if (bHidden)
continue;
@@ -2964,7 +2964,7 @@ sal_uLong ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZ
while (nRow <= nEndRow)
{
SCROW nLastRow = -1;
- if (!( ( RowHidden(nRow, NULL, &nLastRow) ) && bHiddenAsZero ) )
+ if (!( ( RowHidden(nRow, nullptr, &nLastRow) ) && bHiddenAsZero ) )
{
if (nLastRow > nEndRow)
nLastRow = nEndRow;
@@ -2989,7 +2989,7 @@ sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fS
while (nRow <= nEndRow)
{
SCROW nLastRow = -1;
- if (!RowHidden(nRow, NULL, &nLastRow))
+ if (!RowHidden(nRow, nullptr, &nLastRow))
{
if (nLastRow > nEndRow)
nLastRow = nEndRow;
@@ -3036,7 +3036,7 @@ SCROW ScTable::GetHiddenRowCount( SCROW nRow ) const
return 0;
SCROW nLastRow = -1;
- if (!RowHidden(nRow, NULL, &nLastRow) || !ValidRow(nLastRow))
+ if (!RowHidden(nRow, nullptr, &nLastRow) || !ValidRow(nLastRow))
return 0;
return nLastRow - nRow + 1;
@@ -3119,7 +3119,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
while (nStartRow <= nRow2)
{
SCROW nEndRow = -1;
- bool bWasVis = !RowHiddenLeaf(nStartRow, NULL, &nEndRow);
+ bool bWasVis = !RowHiddenLeaf(nStartRow, nullptr, &nEndRow);
if (nEndRow > nRow2)
nEndRow = nRow2;
@@ -3156,7 +3156,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
while (nStartRow <= nRow2)
{
SCROW nEndRow = -1;
- bool bWasVis = !RowHiddenLeaf(nStartRow, NULL, &nEndRow);
+ bool bWasVis = !RowHiddenLeaf(nStartRow, nullptr, &nEndRow);
if (nEndRow > nRow2)
nEndRow = nRow2;
@@ -3348,7 +3348,7 @@ void ScTable::ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
if (rY2 < MAXROW)
{
SCROW nEndRow = -1;
- if (RowHidden(rY2+1, NULL, &nEndRow) && ValidRow(nEndRow))
+ if (RowHidden(rY2+1, nullptr, &nEndRow) && ValidRow(nEndRow))
rY2 = nEndRow;
}
}
@@ -3374,7 +3374,7 @@ void ScTable::StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
if (rY1 < rY2)
{
SCROW nEndRow = -1;
- if (RowHidden(rY1, NULL, &nEndRow) && ValidRow(nEndRow) && nEndRow <= rY2)
+ if (RowHidden(rY1, nullptr, &nEndRow) && ValidRow(nEndRow) && nEndRow <= rY2)
rY1 = nEndRow;
}
}
@@ -3448,7 +3448,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
bool bUsed = false;
SCROW nLastRow = nRow;
- aUsed.search_tree(nRow, bUsed, NULL, &nLastRow);
+ aUsed.search_tree(nRow, bUsed, nullptr, &nLastRow);
if (!bUsed)
{
nRow = nLastRow;
@@ -3553,7 +3553,7 @@ bool ScTable::RefVisible(ScFormulaCell* pCell)
if (aRef.aStart.Col()==aRef.aEnd.Col() && aRef.aStart.Tab()==aRef.aEnd.Tab())
{
SCROW nEndRow;
- if (!RowFiltered(aRef.aStart.Row(), NULL, &nEndRow))
+ if (!RowFiltered(aRef.aStart.Row(), nullptr, &nEndRow))
// row not filtered.
nEndRow = ::std::numeric_limits<SCROW>::max();
@@ -3624,7 +3624,7 @@ sal_uLong ScTable::GetRowOffset( SCROW nRow, bool bHiddenAsZero ) const
if (nRow == 0)
return 0;
else if (nRow == 1)
- return GetRowHeight(0, NULL, NULL, bHiddenAsZero );
+ return GetRowHeight(0, nullptr, nullptr, bHiddenAsZero );
n = GetTotalRowHeight(0, nRow-1, bHiddenAsZero);
#if OSL_DEBUG_LEVEL > 0
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 2d5c581253ef..d01f2f2b67a4 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -235,7 +235,7 @@ public:
const ScPostIt* mpNote;
const ScPatternAttr* mpPattern;
- Cell() : mpAttr(NULL), mpBroadcaster(NULL), mpNote(NULL), mpPattern(NULL) {}
+ Cell() : mpAttr(nullptr), mpBroadcaster(nullptr), mpNote(nullptr), mpPattern(nullptr) {}
};
struct Row
@@ -265,7 +265,7 @@ private:
public:
ScSortInfoArray( sal_uInt16 nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
- pppInfo(NULL),
+ pppInfo(nullptr),
nCount( nInd2 - nInd1 + 1 ), nStart( nInd1 ),
mnLastIndex(nInd2),
nUsedSorts(nSorts),
@@ -464,7 +464,7 @@ void initDataRows(
ScSortInfoArray* ScTable::CreateSortInfoArray( const sc::ReorderParam& rParam )
{
- ScSortInfoArray* pArray = NULL;
+ ScSortInfoArray* pArray = nullptr;
if (rParam.mbByRow)
{
@@ -562,7 +562,7 @@ struct SortedColumn : boost::noncopyable
maCellTextAttrs(nTopEmptyRows),
maBroadcasters(nTopEmptyRows),
maCellNotes(nTopEmptyRows),
- maPatterns(0, MAXROWCOUNT, NULL),
+ maPatterns(0, MAXROWCOUNT, nullptr),
miPatternPos(maPatterns.begin()) {}
void setPattern( SCROW nRow, const ScPatternAttr* pPat )
@@ -648,7 +648,7 @@ void ScTable::DestroySortCollator()
{
if ( !IsSortCollatorGlobal() )
delete pSortCollator;
- pSortCollator = NULL;
+ pSortCollator = nullptr;
}
}
@@ -846,7 +846,7 @@ class FormulaCellCollectAction : public sc::ColumnSpanSet::ColumnAction
public:
explicit FormulaCellCollectAction( std::vector<ScFormulaCell*>& rCells ) :
- mrCells(rCells), mpCol(NULL) {}
+ mrCells(rCells), mpCol(nullptr) {}
virtual void startColumn( ScColumn* pCol ) override
{
@@ -874,7 +874,7 @@ class ListenerStartAction : public sc::ColumnSpanSet::ColumnAction
public:
explicit ListenerStartAction( ScDocument& rDoc ) :
- mpCol(0),
+ mpCol(nullptr),
mpPosSet(new sc::ColumnBlockPositionSet(rDoc)),
maStartCxt(rDoc, mpPosSet),
maEndCxt(rDoc, mpPosSet) {}
@@ -1523,7 +1523,7 @@ short ScTable::CompareCell(
if (!bUserDef)
{
if ( bNaturalSort )
- nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, NULL, pSortCollator );
+ nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, nullptr, pSortCollator );
else
nRes = static_cast<short>( pSortCollator->compareString( aStr1, aStr2 ) );
}
@@ -2497,10 +2497,10 @@ public:
OUString aQueryStr = rItem.maString.getString();
OUString aCell( mpTransliteration->transliterate(
aCellStr.getString(), ScGlobal::eLnge, 0, aCellStr.getLength(),
- NULL ) );
+ nullptr ) );
OUString aQuer( mpTransliteration->transliterate(
aQueryStr, ScGlobal::eLnge, 0, aQueryStr.getLength(),
- NULL ) );
+ nullptr ) );
sal_Int32 nIndex = (rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH) ?
(aCell.getLength() - aQuer.getLength()) : 0;
sal_Int32 nStrPos = ((nIndex < 0) ? -1 : aCell.indexOf( aQuer, nIndex ));
@@ -3077,7 +3077,7 @@ bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
if (nIndex < nNewEntries)
{
rQueryParam.GetEntry(nIndex).nField = pFields[nCol - nCol1];
- rQueryParam.FillInExcelSyntax(rPool, aCellStr, nIndex, NULL);
+ rQueryParam.FillInExcelSyntax(rPool, aCellStr, nIndex, nullptr);
nIndex++;
if (nIndex < nNewEntries)
rQueryParam.GetEntry(nIndex).eConnect = SC_AND;
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 1be25d44e2f3..532d47c0097b 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -74,7 +74,7 @@ extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
namespace {
-short lcl_DecompValueString( OUString& rValue, sal_Int32& nVal, sal_uInt16* pMinDigits = NULL )
+short lcl_DecompValueString( OUString& rValue, sal_Int32& nVal, sal_uInt16* pMinDigits = nullptr )
{
if ( rValue.isEmpty() )
{
@@ -197,7 +197,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInc = 0.0;
rMinDigits = 0;
- rListData = NULL;
+ rListData = nullptr;
rCmd = FILL_SIMPLE;
if ( (nScFillModeMouseModifier & KEY_MOD1) )
return ; // Ctrl-key: Copy
@@ -370,7 +370,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
(void)GetString(nCol, nRow, aStr);
if (!rListData->GetSubIndex(aStr, rListIndex, bMatchCase))
- rListData = NULL;
+ rListData = nullptr;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
@@ -564,10 +564,10 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// transfer attributes
- const ScPatternAttr* pSrcPattern = NULL;
- const ScStyleSheet* pStyleSheet = NULL;
+ const ScPatternAttr* pSrcPattern = nullptr;
+ const ScStyleSheet* pStyleSheet = nullptr;
SCCOLROW nAtSrc = nISrcStart;
- ScPatternAttr* pNewPattern = NULL;
+ ScPatternAttr* pNewPattern = nullptr;
bool bGetPattern = true;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
@@ -594,7 +594,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rNewSet.ClearItem(ATTR_MERGE_FLAG);
}
else
- pNewPattern = NULL;
+ pNewPattern = nullptr;
}
const ScCondFormatItem& rCondFormatItem = static_cast<const ScCondFormatItem&>(pSrcPattern->GetItem(ATTR_CONDITIONAL));
@@ -692,7 +692,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
FillDateCmd eDateCmd;
double nInc;
sal_uInt16 nMinDigits;
- ScUserListData* pListData = NULL;
+ ScUserListData* pListData = nullptr;
sal_uInt16 nListIndex;
if (bVertical)
FillAnalyse(static_cast<SCCOL>(nCol),nRow1,
@@ -816,7 +816,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
FillDateCmd eDateCmd;
double nInc;
sal_uInt16 nMinDigits;
- ScUserListData* pListData = NULL;
+ ScUserListData* pListData = nullptr;
sal_uInt16 nListIndex;
FillAnalyse(nCol1,nRow1, nCol2,nRow2, eFillCmd,eDateCmd, nInc,nMinDigits, pListData,nListIndex);
@@ -1117,13 +1117,13 @@ bool HiddenRowColumn(ScTable* pTable, SCCOLROW nRowColumn, bool bVertical, SCCOL
if(bVertical)
{
SCROW nLast;
- bHidden = pTable->RowHidden(nRowColumn, NULL, &nLast);
+ bHidden = pTable->RowHidden(nRowColumn, nullptr, &nLast);
rLastPos = nLast;
}
else
{
SCCOL nLast;
- bHidden = pTable->ColHidden(static_cast<SCCOL>(nRowColumn), NULL, &nLast);
+ bHidden = pTable->ColHidden(static_cast<SCCOL>(nRowColumn), nullptr, &nLast);
rLastPos = nLast;
}
return bHidden;
@@ -1177,7 +1177,7 @@ void ScTable::FillFormulaVertical(
return;
aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE, false);
- aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, NULL);
+ aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, nullptr);
std::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument));
sc::StartListeningContext aStartCxt(*pDocument, pSet);
@@ -1308,9 +1308,9 @@ void ScTable::FillAutoSimple(
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
if (rCol > nColHiddenLast)
- bColHidden = ColHidden(rCol, NULL, &nColHiddenLast);
+ bColHidden = ColHidden(rCol, nullptr, &nColHiddenLast);
if (rRow > nRowHiddenLast)
- bRowHidden = RowHidden(rRow, NULL, &nRowHiddenLast);
+ bRowHidden = RowHidden(rRow, nullptr, &nRowHiddenLast);
if (!bColHidden && !bRowHidden)
{
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index fe8db9143d8c..c277812bc274 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -559,7 +559,7 @@ bool ScTable::HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const
while (nRow <= nEndRow)
{
SCROW nLastRow = -1;
- bool bHidden = RowHidden(nRow, NULL, &nLastRow);
+ bool bHidden = RowHidden(nRow, nullptr, &nLastRow);
if (bHidden)
return true;
@@ -625,7 +625,7 @@ void ScTable::CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
while (nCol <= nEndCol)
{
SCCOL nLastCol;
- bool bHidden = rTable.ColHidden(nCol, NULL, &nLastCol);
+ bool bHidden = rTable.ColHidden(nCol, nullptr, &nLastCol);
if (nLastCol > nEndCol)
nLastCol = nEndCol;
@@ -640,7 +640,7 @@ void ScTable::CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
while (nRow <= nEndRow)
{
SCROW nLastRow = -1;
- bool bHidden = rTable.RowHidden(nRow, NULL, &nLastRow);
+ bool bHidden = rTable.RowHidden(nRow, nullptr, &nLastRow);
if (nLastRow > nEndRow)
nLastRow = nEndRow;
SetRowHidden(nRow, nLastRow, bHidden);
@@ -775,7 +775,7 @@ SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol) const
{
SCROW nRow = static_cast<SCROW>(nPos);
SCROW nLastRow;
- if (RowHidden(nRow, NULL, &nLastRow))
+ if (RowHidden(nRow, nullptr, &nLastRow))
return static_cast<SCCOLROW>(nLastRow);
}
return ::std::numeric_limits<SCCOLROW>::max();
@@ -823,7 +823,7 @@ bool ScTable::HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const
while (nRow <= nEndRow)
{
SCROW nLastRow = nRow;
- bool bFiltered = RowFiltered(nRow, NULL, &nLastRow);
+ bool bFiltered = RowFiltered(nRow, nullptr, &nLastRow);
if (bFiltered)
return true;
@@ -838,7 +838,7 @@ void ScTable::CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
while (nCol <= nEndCol)
{
SCCOL nLastCol = -1;
- bool bFiltered = rTable.ColFiltered(nCol, NULL, &nLastCol);
+ bool bFiltered = rTable.ColFiltered(nCol, nullptr, &nLastCol);
if (nLastCol > nEndCol)
nLastCol = nEndCol;
@@ -853,7 +853,7 @@ void ScTable::CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
while (nRow <= nEndRow)
{
SCROW nLastRow = -1;
- bool bFiltered = rTable.RowFiltered(nRow, NULL, &nLastRow);
+ bool bFiltered = rTable.RowFiltered(nRow, nullptr, &nLastRow);
if (nLastRow > nEndRow)
nLastRow = nEndRow;
SetRowFiltered(nRow, nLastRow, bFiltered);
@@ -1147,7 +1147,7 @@ void ScTable::SetPageStyle( const OUString& rName )
const sal_uInt16 nNewScaleToPages = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALETOPAGES);
if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
- InvalidateTextWidth(NULL, NULL, false, false);
+ InvalidateTextWidth(nullptr, nullptr, false, false);
}
if ( pNewStyle ) // also without the old one (for UpdateStdNames)
@@ -1162,7 +1162,7 @@ void ScTable::SetPageStyle( const OUString& rName )
void ScTable::PageStyleModified( const OUString& rNewName )
{
aPageStyle = rNewName;
- InvalidateTextWidth(NULL, NULL, false, false); // don't know what was in the style before
+ InvalidateTextWidth(nullptr, nullptr, false, false); // don't know what was in the style before
}
void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 4b06f9938258..c07363c4bdf4 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -256,7 +256,7 @@ void ScTable::SkipFilteredRows(SCROW& rRow, SCROW& rLastNonFilteredRow, bool bFo
return;
SCROW nLastRow = rRow;
- if (RowFiltered(rRow, NULL, &nLastRow))
+ if (RowFiltered(rRow, nullptr, &nLastRow))
// move to the first non-filtered row.
rRow = nLastRow + 1;
else
@@ -756,7 +756,7 @@ bool ScTable::SearchAndReplace(
bFound = ReplaceAll(rSearchItem, rMark, rMatchedRanges, rUndoStr, pUndoDoc);
delete pSearchText;
- pSearchText = NULL;
+ pSearchText = nullptr;
}
}
return bFound;
@@ -993,7 +993,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
for (SCROW nRow = rRange.aStart.Row(); nRow <= rRange.aEnd.Row(); ++nRow)
{
SCROW nLastRow;
- if (!RowFiltered(nRow, NULL, &nLastRow))
+ if (!RowFiltered(nRow, nullptr, &nLastRow))
{
rMatchedRanges.Join(ScRange(nCol, nRow, nTab, nCol, nLastRow, nTab));
if (bReplace)
diff --git a/sc/source/core/data/types.cxx b/sc/source/core/data/types.cxx
index b45a0b1467ae..199819ea7506 100644
--- a/sc/source/core/data/types.cxx
+++ b/sc/source/core/data/types.cxx
@@ -13,7 +13,7 @@
namespace sc {
RangeMatrix::RangeMatrix() :
- mpMat(NULL), mnCol1(-1), mnRow1(-1), mnTab1(-1), mnCol2(-1), mnRow2(-1), mnTab2(-1) {}
+ mpMat(nullptr), mnCol1(-1), mnRow1(-1), mnTab1(-1), mnCol2(-1), mnRow2(-1), mnTab2(-1) {}
bool RangeMatrix::isRangeValid() const
{
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 9c3d51ae44e8..37a1bc94f9b1 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -367,7 +367,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
void ScValidationData::DoCalcError( ScFormulaCell* pCell ) const
{
if ( eErrorStyle == SC_VALERR_MACRO )
- DoMacro( pCell->aPos, EMPTY_OUSTRING, pCell, NULL );
+ DoMacro( pCell->aPos, EMPTY_OUSTRING, pCell, nullptr );
}
// true -> abort
@@ -376,7 +376,7 @@ bool ScValidationData::DoError( vcl::Window* pParent, const OUString& rInput,
const ScAddress& rPos ) const
{
if ( eErrorStyle == SC_VALERR_MACRO )
- return DoMacro( rPos, rInput, NULL, pParent );
+ return DoMacro( rPos, rInput, nullptr, pParent );
// Output error message
@@ -583,7 +583,7 @@ rtl_uString* ScStringTokenIterator::First()
rtl_uString* ScStringTokenIterator::Next()
{
if( !mbOk )
- return NULL;
+ return nullptr;
// seek to next non-separator token
const FormulaToken* pToken = mrTokArr.NextNoSpaces();
@@ -624,7 +624,7 @@ bool ScValidationData::GetSelectionFromFormula(
// pDoc is private in condition, use an accessor and a long winded name.
ScDocument* pDocument = GetDocument();
- if( NULL == pDocument )
+ if( nullptr == pDocument )
return false;
ScFormulaCell aValidationSrc(
@@ -680,8 +680,8 @@ bool ScValidationData::GetSelectionFromFormula(
ScTokenArray* pArr = const_cast<ScTokenArray*>(&rTokArr);
pArr->Reset();
- formula::FormulaToken* t = NULL;
- if (pArr->GetLen() == 1 && (t = pArr->GetNextReferenceOrName()) != NULL)
+ formula::FormulaToken* t = nullptr;
+ if (pArr->GetLen() == 1 && (t = pArr->GetNextReferenceOrName()) != nullptr)
{
OpCode eOpCode = t->GetOpCode();
if (eOpCode == ocDBArea || eOpCode == ocTableRef)
@@ -723,7 +723,7 @@ bool ScValidationData::GetSelectionFromFormula(
for( nCol = 0; nCol < nCols ; nCol++ )
{
ScTokenArray aCondTokArr;
- ScTypedStrData* pEntry = NULL;
+ ScTypedStrData* pEntry = nullptr;
OUString aValStr;
ScMatrixValue nMatVal = pValues->Get( nCol, nRow);
@@ -742,7 +742,7 @@ bool ScValidationData::GetSelectionFromFormula(
bHaveEmpty = true;
}
- if( NULL != pStrings )
+ if( nullptr != pStrings )
pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard);
if (!rCell.isEmpty() && rMatch < 0)
@@ -779,7 +779,7 @@ bool ScValidationData::GetSelectionFromFormula(
// manually enter an error yet so the point is somewhat moot.
aCondTokArr.AddDouble( nMatVal.fVal );
}
- if( NULL != pStrings )
+ if( nullptr != pStrings )
pEntry = new ScTypedStrData( aValStr, nMatVal.fVal, ScTypedStrData::Value);
}
@@ -787,11 +787,11 @@ bool ScValidationData::GetSelectionFromFormula(
{
rMatch = n;
// short circuit on the first match if not filling the list
- if( NULL == pStrings )
+ if( nullptr == pStrings )
return true;
}
- if( NULL != pEntry )
+ if( nullptr != pEntry )
{
pStrings->push_back(*pEntry);
delete pEntry;
@@ -845,7 +845,7 @@ bool ScValidationData::FillSelectionList(std::vector<ScTypedStrData>& rStrColl,
bool ScValidationData::IsEqualToTokenArray( ScRefCellValue& rCell, const ScAddress& rPos, const ScTokenArray& rTokArr ) const
{
// create a condition entry that tests on equality and set the passed token array
- ScConditionEntry aCondEntry( SC_COND_EQUAL, &rTokArr, NULL, GetDocument(), rPos );
+ ScConditionEntry aCondEntry( SC_COND_EQUAL, &rTokArr, nullptr, GetDocument(), rPos );
return aCondEntry.IsCellValid(rCell, rPos);
}
@@ -899,7 +899,7 @@ bool ScValidationData::IsListValid( ScRefCellValue& rCell, const ScAddress& rPos
if (!bIsValid)
{
int nMatch;
- bIsValid = GetSelectionFromFormula(NULL, rCell, rPos, *pTokArr, nMatch);
+ bIsValid = GetSelectionFromFormula(nullptr, rCell, rPos, *pTokArr, nMatch);
bIsValid = bIsValid && nMatch >= 0;
}
@@ -940,7 +940,7 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
return *it;
OSL_FAIL("ScValidationDataList: Entry not found");
- return NULL;
+ return nullptr;
}
void ScValidationDataList::CompileXML()
diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx
index a9137c58210b..c86e09010208 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -63,7 +63,7 @@ typedef std::unordered_map< OUString, ::std::list<ScCellKeyword>, OUStringHash >
class ScCellKeywordTranslator
{
public:
- static void transKeyword(OUString& rName, const css::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
+ static void transKeyword(OUString& rName, const css::lang::Locale* pLocale = nullptr, OpCode eOpCode = ocNone);
~ScCellKeywordTranslator();
private:
diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx
index 5b68cbea6d04..9fbb62d067b1 100644
--- a/sc/source/core/inc/doubleref.hxx
+++ b/sc/source/core/inc/doubleref.hxx
@@ -69,7 +69,7 @@ public:
* @return 0-based column index
*/
virtual SCCOL findFieldColumn(SCCOL nIndex) const = 0;
- virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = NULL) const = 0;
+ virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = nullptr) const = 0;
virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const = 0;
virtual bool isRangeEqual(const ScRange& rRange) const = 0;
@@ -123,7 +123,7 @@ public:
* @return 0-based column index
*/
virtual SCCOL findFieldColumn(SCCOL nIndex) const override;
- virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = NULL) const override;
+ virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = nullptr) const override;
virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const override;
virtual bool isRangeEqual(const ScRange& rRange) const override;
@@ -163,7 +163,7 @@ public:
* @return 0-based column index
*/
virtual SCCOL findFieldColumn(SCCOL nIndex) const override;
- virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = NULL) const override;
+ virtual SCCOL findFieldColumn(const OUString& rStr, sal_uInt16* pErr = nullptr) const override;
virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const override;
virtual bool isRangeEqual(const ScRange& rRange) const override;
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 22f9d11582d7..1343e7543bf8 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -307,9 +307,9 @@ void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
bool bDontCheckForTableOp = false );
void PopExternalSingleRef(sal_uInt16& rFileId, OUString& rTabName, ScSingleRefData& rRef);
-void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = NULL);
+void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = nullptr);
void PopExternalSingleRef(sal_uInt16& rFileId, OUString& rTabName, ScSingleRefData& rRef,
- ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = NULL);
+ ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = nullptr);
void PopExternalDoubleRef(sal_uInt16& rFileId, OUString& rTabName, ScComplexRefData& rRef);
void PopExternalDoubleRef(ScExternalRefCache::TokenArrayRef& rArray);
void PopExternalDoubleRef(ScMatrixRef& rMat);
@@ -417,7 +417,7 @@ double Compare( ScQueryOp eOp );
/** @param pOptions
NULL means case sensitivity document option is to be used!
*/
-sc::RangeMatrix CompareMat( ScQueryOp eOp, sc::CompareOptions* pOptions = NULL );
+sc::RangeMatrix CompareMat( ScQueryOp eOp, sc::CompareOptions* pOptions = nullptr );
ScMatrixRef QueryMat( const ScMatrixRef& pMat, sc::CompareOptions& rOptions );
void ScEqual();
void ScNotEqual();
@@ -830,7 +830,7 @@ double GetPercentile( ::std::vector<double> & rArray, double fPercentile );
double GetPercentileExclusive( ::std::vector<double> & rArray, double fPercentile );
void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector<double>& rArray, bool bConvertTextInArray );
void GetSortArray( sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray );
-static void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
+static void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = nullptr);
void ScModalValue();
void ScModalValue_Multi();
void ScAveDev();
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index f754d2094551..1b2932b9b61d 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -182,7 +182,7 @@ bool AllStringsAreNull(const rtl_uString* const* pStringArray, size_t nLength)
size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
{
FormulaToken* ref = mFormulaTree->GetFormulaToken();
- double* pHostBuffer = NULL;
+ double* pHostBuffer = nullptr;
size_t szHostBuffer = 0;
if (ref->GetType() == formula::svSingleVectorRef)
{
@@ -230,21 +230,21 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
// Marshal as a buffer of NANs
mpClmem = clCreateBuffer(kEnv.mpkContext,
(cl_mem_flags)CL_MEM_READ_ONLY | CL_MEM_ALLOC_HOST_PTR,
- szHostBuffer, NULL, &err);
+ szHostBuffer, nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
double* pNanBuffer = static_cast<double*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err));
+ szHostBuffer, 0, nullptr, nullptr, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
for (size_t i = 0; i < szHostBuffer / sizeof(double); i++)
pNanBuffer[i] = NAN;
err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem,
- pNanBuffer, 0, NULL, NULL);
+ pNanBuffer, 0, nullptr, nullptr);
// FIXME: Is it intentional to not throw an OpenCLError even if the clEnqueueUnmapMemObject() fails?
if (CL_SUCCESS != err)
SAL_WARN("sc.opencl", "clEnqueueUnmapMemObject failed: " << ::opencl::errorString(err));
@@ -818,21 +818,21 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
vRef = pDVR->GetArrays()[mnIndex];
}
size_t szHostBuffer = nStrings * sizeof(cl_int);
- cl_uint* pHashBuffer = NULL;
+ cl_uint* pHashBuffer = nullptr;
- if (vRef.mpStringArray != NULL)
+ if (vRef.mpStringArray != nullptr)
{
// Marshal strings. Right now we pass hashes of these string
mpClmem = clCreateBuffer(kEnv.mpkContext,
(cl_mem_flags)CL_MEM_READ_ONLY | CL_MEM_ALLOC_HOST_PTR,
- szHostBuffer, NULL, &err);
+ szHostBuffer, nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
pHashBuffer = static_cast<cl_uint*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err));
+ szHostBuffer, 0, nullptr, nullptr, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -856,14 +856,14 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
// Marshal as a buffer of NANs
mpClmem = clCreateBuffer(kEnv.mpkContext,
(cl_mem_flags)CL_MEM_READ_ONLY | CL_MEM_ALLOC_HOST_PTR,
- szHostBuffer, NULL, &err);
+ szHostBuffer, nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
pHashBuffer = static_cast<cl_uint*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err));
+ szHostBuffer, 0, nullptr, nullptr, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -871,7 +871,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
pHashBuffer[i] = 0;
}
err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem,
- pHashBuffer, 0, NULL, NULL);
+ pHashBuffer, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueUnmapMemObject", err, __FILE__, __LINE__);
@@ -963,7 +963,7 @@ public:
DynamicKernelSlidingArgument( const ScCalcConfig& config, const std::string& s,
FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
int index = 0 ) :
- Base(config, s, ft, index), mpCodeGen(CodeGen), mpClmem2(NULL)
+ Base(config, s, ft, index), mpCodeGen(CodeGen), mpClmem2(nullptr)
{
FormulaToken* t = ft->GetFormulaToken();
if (t->GetType() != formula::svDoubleVectorRef)
@@ -1263,7 +1263,7 @@ public:
ParallelReductionVectorRef( const ScCalcConfig& config, const std::string& s,
FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
int index = 0 ) :
- Base(config, s, ft, index), mpCodeGen(CodeGen), mpClmem2(NULL)
+ Base(config, s, ft, index), mpCodeGen(CodeGen), mpClmem2(nullptr)
{
FormulaToken* t = ft->GetFormulaToken();
if (t->GetType() != formula::svDoubleVectorRef)
@@ -1509,7 +1509,7 @@ public:
mpClmem2 = clCreateBuffer(kEnv.mpkContext,
CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR,
- sizeof(double) * w, NULL, NULL);
+ sizeof(double) * w, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem2 << " size " << sizeof(double) << "*" << w << "=" << (sizeof(double)*w));
@@ -1553,8 +1553,8 @@ public:
size_t global_work_size[] = { 256, (size_t)w };
size_t local_work_size[] = { 256, 1 };
SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
- err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, NULL,
- global_work_size, local_work_size, 0, NULL, NULL);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size, local_work_size, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
err = clFinish(kEnv.mpkCmdQueue);
@@ -1611,8 +1611,8 @@ public:
size_t global_work_size1[] = { 256, (size_t)w };
size_t local_work_size1[] = { 256, 1 };
SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
- err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, NULL,
- global_work_size1, local_work_size1, 0, NULL, NULL);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size1, local_work_size1, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
err = clFinish(kEnv.mpkCmdQueue);
@@ -1837,8 +1837,8 @@ public:
const std::string& sSymName, SubArguments& vSubArguments ) override
{
size_t nCurWindowSize = 0;
- FormulaToken* tmpCur = NULL;
- const formula::DoubleVectorRefToken* pCurDVR = NULL;
+ FormulaToken* tmpCur = nullptr;
+ const formula::DoubleVectorRefToken* pCurDVR = nullptr;
ss << "\ndouble " << sSymName;
ss << "_" << BinFuncName() << "(";
for (size_t i = 0; i < vSubArguments.size(); i++)
@@ -2250,7 +2250,7 @@ namespace {
struct SumIfsArgs
{
explicit SumIfsArgs(cl_mem x) : mCLMem(x), mConst(0.0) { }
- explicit SumIfsArgs(double x) : mCLMem(NULL), mConst(x) { }
+ explicit SumIfsArgs(double x) : mCLMem(nullptr), mConst(x) { }
cl_mem mCLMem;
double mConst;
};
@@ -2292,10 +2292,10 @@ public:
if (VectorRef* VR = dynamic_cast<VectorRef*>(it->get()))
vclmem.push_back(VR->GetCLBuffer());
else
- vclmem.push_back(NULL);
+ vclmem.push_back(nullptr);
}
pClmem2 = clCreateBuffer(kEnv.mpkContext, CL_MEM_READ_WRITE,
- sizeof(double) * nVectorWidth, NULL, &err);
+ sizeof(double) * nVectorWidth, nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << pClmem2 << " size " << sizeof(double) << "*" << nVectorWidth << "=" << (sizeof(double)*nVectorWidth));
@@ -2325,8 +2325,8 @@ public:
size_t global_work_size[] = { 256, (size_t)nVectorWidth };
size_t local_work_size[] = { 256, 1 };
SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
- err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, NULL,
- global_work_size, local_work_size, 0, NULL, NULL);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size, local_work_size, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
err = clFinish(kEnv.mpkCmdQueue);
@@ -2349,7 +2349,7 @@ public:
DynamicKernelArgument* Arg = mvSubArguments[0].get();
DynamicKernelSlidingArgument<VectorRef>* slidingArgPtr =
static_cast<DynamicKernelSlidingArgument<VectorRef>*>(Arg);
- mpClmem2 = NULL;
+ mpClmem2 = nullptr;
if (OpSumCodeGen->NeedReductionKernel())
{
@@ -2368,7 +2368,7 @@ public:
vclmem.push_back(SumIfsArgs(nullptr));
}
mpClmem2 = clCreateBuffer(kEnv.mpkContext, CL_MEM_READ_WRITE,
- sizeof(double) * nVectorWidth, NULL, &err);
+ sizeof(double) * nVectorWidth, nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem2 << " size " << sizeof(double) << "*" << nVectorWidth << "=" << (sizeof(double)*nVectorWidth));
@@ -2411,8 +2411,8 @@ public:
size_t global_work_size[] = { 256, (size_t)nVectorWidth };
size_t local_work_size[] = { 256, 1 };
SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
- err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, NULL,
- global_work_size, local_work_size, 0, NULL, NULL);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size, local_work_size, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
@@ -2540,7 +2540,7 @@ public:
cl_int err;
err = clReleaseMemObject(mpClmem2);
SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << ::opencl::errorString(err));
- mpClmem2 = NULL;
+ mpClmem2 = nullptr;
}
}
@@ -2608,7 +2608,7 @@ DynamicKernelArgument* VectorRefFactory( const ScCalcConfig& config, const std::
DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
const std::string& s, const FormulaTreeNodeRef& ft, SlidingFunctionBase* pCodeGen, int nResultSize ) :
- DynamicKernelArgument(config, s, ft), mpCodeGen(pCodeGen), mpClmem2(NULL)
+ DynamicKernelArgument(config, s, ft), mpCodeGen(pCodeGen), mpClmem2(nullptr)
{
size_t nChildren = ft->Children.size();
@@ -2642,8 +2642,8 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
" takeString=" << (pCodeGen->takeString()?"YES":"NO"));
if (pDVR->GetArrays()[j].mpNumericArray ||
- (pDVR->GetArrays()[j].mpNumericArray == NULL &&
- pDVR->GetArrays()[j].mpStringArray == NULL))
+ (pDVR->GetArrays()[j].mpNumericArray == nullptr &&
+ pDVR->GetArrays()[j].mpStringArray == nullptr))
{
if (pDVR->GetArrays()[j].mpNumericArray &&
pCodeGen->takeNumeric() &&
@@ -2719,7 +2719,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
DynamicKernelArgumentRef(new VectorRef(mCalcConfig, ts,
ft->Children[i])));
}
- else if (pSVR->GetArray().mpNumericArray == NULL &&
+ else if (pSVR->GetArray().mpNumericArray == nullptr &&
pCodeGen->takeNumeric() &&
pSVR->GetArray().mpStringArray &&
mCalcConfig.meStringConversion == ScCalcConfig::StringConversion::ZERO)
@@ -2741,7 +2741,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
ts, ft->Children[i])));
}
else if (AllStringsAreNull(pSVR->GetArray().mpStringArray, pSVR->GetArrayLength()) &&
- pSVR->GetArray().mpNumericArray == NULL)
+ pSVR->GetArray().mpNumericArray == nullptr)
{
// There are only empty cells. Push as an
// array of NANs
@@ -3717,9 +3717,9 @@ private:
DynamicKernel::DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, int nResultSize ) :
mCalcConfig(config),
mpRoot(r),
- mpProgram(NULL),
- mpKernel(NULL),
- mpResClmem(NULL),
+ mpProgram(nullptr),
+ mpKernel(nullptr),
+ mpResClmem(nullptr),
mnResultSize(nResultSize) {}
DynamicKernel::~DynamicKernel()
@@ -3823,8 +3823,8 @@ void DynamicKernel::CreateKernel()
const char* src = mFullProgramSrc.c_str();
static std::string lastOneKernelHash = "";
static std::string lastSecondKernelHash = "";
- static cl_program lastOneProgram = NULL;
- static cl_program lastSecondProgram = NULL;
+ static cl_program lastOneProgram = nullptr;
+ static cl_program lastSecondProgram = nullptr;
std::string KernelHash = mKernelSignature + GetMD5();
if (lastOneKernelHash == KernelHash && lastOneProgram)
{
@@ -3842,24 +3842,24 @@ void DynamicKernel::CreateKernel()
SAL_INFO("sc.opencl", "Releasing program " << lastSecondProgram);
err = clReleaseProgram(lastSecondProgram);
SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseProgram failed: " << ::opencl::errorString(err));
- lastSecondProgram = NULL;
+ lastSecondProgram = nullptr;
}
if (::opencl::buildProgramFromBinary("",
&::opencl::gpuEnv, KernelHash.c_str(), 0))
{
mpProgram = ::opencl::gpuEnv.mpArryPrograms[0];
- ::opencl::gpuEnv.mpArryPrograms[0] = NULL;
+ ::opencl::gpuEnv.mpArryPrograms[0] = nullptr;
}
else
{
mpProgram = clCreateProgramWithSource(kEnv.mpkContext, 1,
- &src, NULL, &err);
+ &src, nullptr, &err);
if (err != CL_SUCCESS)
throw OpenCLError("clCreateProgramWithSource", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created program " << mpProgram);
err = clBuildProgram(mpProgram, 1,
- &::opencl::gpuEnv.mpDevID, "", NULL, NULL);
+ &::opencl::gpuEnv.mpDevID, "", nullptr, nullptr);
if (err != CL_SUCCESS)
{
#if OSL_DEBUG_LEVEL > 0
@@ -3869,7 +3869,7 @@ void DynamicKernel::CreateKernel()
cl_int e = clGetProgramBuildInfo(
mpProgram, ::opencl::gpuEnv.mpDevID,
CL_PROGRAM_BUILD_STATUS, sizeof(cl_build_status),
- &stat, 0);
+ &stat, nullptr);
SAL_WARN_IF(
e != CL_SUCCESS, "sc.opencl",
"after CL_BUILD_PROGRAM_FAILURE,"
@@ -3880,7 +3880,7 @@ void DynamicKernel::CreateKernel()
size_t n;
e = clGetProgramBuildInfo(
mpProgram, ::opencl::gpuEnv.mpDevID,
- CL_PROGRAM_BUILD_LOG, 0, 0, &n);
+ CL_PROGRAM_BUILD_LOG, 0, nullptr, &n);
SAL_WARN_IF(
e != CL_SUCCESS || n == 0, "sc.opencl",
"after CL_BUILD_PROGRAM_FAILURE,"
@@ -3891,7 +3891,7 @@ void DynamicKernel::CreateKernel()
std::vector<char> log(n);
e = clGetProgramBuildInfo(
mpProgram, ::opencl::gpuEnv.mpDevID,
- CL_PROGRAM_BUILD_LOG, n, &log[0], 0);
+ CL_PROGRAM_BUILD_LOG, n, &log[0], nullptr);
SAL_WARN_IF(
e != CL_SUCCESS || n == 0, "sc.opencl",
"after CL_BUILD_PROGRAM_FAILURE,"
@@ -3934,7 +3934,7 @@ void DynamicKernel::Launch( size_t nr )
// The results
mpResClmem = clCreateBuffer(kEnv.mpkContext,
(cl_mem_flags)CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR,
- nr * sizeof(double), NULL, &err);
+ nr * sizeof(double), nullptr, &err);
if (CL_SUCCESS != err)
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpResClmem << " size " << nr << "*" << sizeof(double) << "=" << (nr*sizeof(double)));
@@ -3947,8 +3947,8 @@ void DynamicKernel::Launch( size_t nr )
mSyms.Marshal(mpKernel, nr, mpProgram);
size_t global_work_size[] = { nr };
SAL_INFO("sc.opencl", "Enqueing kernel " << mpKernel);
- err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, mpKernel, 1, NULL,
- global_work_size, NULL, 0, NULL, NULL);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, mpKernel, 1, nullptr,
+ global_work_size, nullptr, 0, nullptr, nullptr);
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
err = clFlush(kEnv.mpkCmdQueue);
@@ -3988,7 +3988,7 @@ FormulaGroupInterpreterOpenCL::~FormulaGroupInterpreterOpenCL() {}
ScMatrixRef FormulaGroupInterpreterOpenCL::inverseMatrix( const ScMatrix& )
{
- return NULL;
+ return nullptr;
}
DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray& rCode, int nResultSize )
@@ -3998,7 +3998,7 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
std::list<FormulaToken*> aTokenList;
std::map<FormulaToken*, FormulaTreeNodeRef> aHashMap;
FormulaToken* pCur;
- while ((pCur = const_cast<FormulaToken*>(aCode.Next())) != NULL)
+ while ((pCur = const_cast<FormulaToken*>(aCode.Next())) != nullptr)
{
OpCode eOp = pCur->GetOpCode();
if (eOp != ocPush)
@@ -4012,7 +4012,7 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
if (pTempFormula->GetOpCode() != ocPush)
{
if (aHashMap.find(pTempFormula) == aHashMap.end())
- return NULL;
+ return nullptr;
pCurNode->Children.push_back(aHashMap[pTempFormula]);
}
else
@@ -4029,7 +4029,7 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
aTokenList.push_back(pCur);
}
- FormulaTreeNodeRef Root = FormulaTreeNodeRef(new FormulaTreeNode(NULL));
+ FormulaTreeNodeRef Root = FormulaTreeNodeRef(new FormulaTreeNode(nullptr));
Root->Children.push_back(aHashMap[aTokenList.back()]);
DynamicKernel* pDynamicKernel = new DynamicKernel(rConfig, Root, nResultSize);
@@ -4044,12 +4044,12 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
{
SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled token: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
delete pDynamicKernel;
- return NULL;
+ return nullptr;
}
catch (...)
{
SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled compiler error");
- return NULL;
+ return nullptr;
}
return pDynamicKernel;
}
@@ -4066,11 +4066,11 @@ class CLInterpreterResult
double* mpResBuf;
public:
- CLInterpreterResult() : mpKernel(NULL), mnGroupLength(0), mpCLResBuf(NULL), mpResBuf(NULL) {}
+ CLInterpreterResult() : mpKernel(nullptr), mnGroupLength(0), mpCLResBuf(nullptr), mpResBuf(nullptr) {}
CLInterpreterResult( DynamicKernel* pKernel, SCROW nGroupLength ) :
- mpKernel(pKernel), mnGroupLength(nGroupLength), mpCLResBuf(NULL), mpResBuf(NULL) {}
+ mpKernel(pKernel), mnGroupLength(nGroupLength), mpCLResBuf(nullptr), mpResBuf(nullptr) {}
- bool isValid() const { return mpKernel != NULL; }
+ bool isValid() const { return mpKernel != nullptr; }
void fetchResultFromKernel()
{
@@ -4088,13 +4088,13 @@ public:
mpResBuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
mpCLResBuf,
CL_TRUE, CL_MAP_READ, 0,
- mnGroupLength * sizeof(double), 0, NULL, NULL,
+ mnGroupLength * sizeof(double), 0, nullptr, nullptr,
&err));
if (err != CL_SUCCESS)
{
SAL_WARN("sc.opencl", "clEnqueueMapBuffer failed:: " << ::opencl::errorString(err));
- mpResBuf = NULL;
+ mpResBuf = nullptr;
return;
}
}
@@ -4111,7 +4111,7 @@ public:
::opencl::setKernelEnv(&kEnv);
cl_int err;
- err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpCLResBuf, mpResBuf, 0, NULL, NULL);
+ err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpCLResBuf, mpResBuf, 0, nullptr, nullptr);
if (err != CL_SUCCESS)
{
@@ -4132,12 +4132,12 @@ class CLInterpreterContext
public:
explicit CLInterpreterContext(SCROW nGroupLength)
- : mpKernel(NULL)
+ : mpKernel(nullptr)
, mnGroupLength(nGroupLength) {}
bool isValid() const
{
- return mpKernel != NULL;
+ return mpKernel != nullptr;
}
void setManagedKernel( DynamicKernel* pKernel )
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index a8f2f9985333..1b4e92c78a68 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -93,7 +93,7 @@ bool DynamicKernelArgument::NeedParallelReduction() const
}
VectorRef::VectorRef( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft, int idx ) :
- DynamicKernelArgument(config, s, ft), mpClmem(NULL), mnIndex(idx)
+ DynamicKernelArgument(config, s, ft), mpClmem(nullptr), mnIndex(idx)
{
if (mnIndex)
{
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 506b276d2a2d..2618a5104bce 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -85,7 +85,7 @@ ScUnoAddInFuncData::ScUnoAddInFuncData( const OUString& rNam, const OUString& rL
pArgDescs[i] = pAD[i];
}
else
- pArgDescs = NULL;
+ pArgDescs = nullptr;
aUpperName = ScGlobal::pCharClass->uppercase(aUpperName);
aUpperLocal = ScGlobal::pCharClass->uppercase(aUpperLocal);
@@ -214,7 +214,7 @@ void ScUnoAddInFuncData::SetArguments( long nNewCount, const ScAddInArgDesc* pNe
pArgDescs[i] = pNewDescs[i];
}
else
- pArgDescs = NULL;
+ pArgDescs = nullptr;
}
void ScUnoAddInFuncData::SetCallerPos( long nNewPos )
@@ -224,10 +224,10 @@ void ScUnoAddInFuncData::SetCallerPos( long nNewPos )
ScUnoAddInCollection::ScUnoAddInCollection() :
nFuncCount( 0 ),
- ppFuncData( NULL ),
- pExactHashMap( NULL ),
- pNameHashMap( NULL ),
- pLocalHashMap( NULL ),
+ ppFuncData( nullptr ),
+ pExactHashMap( nullptr ),
+ pNameHashMap( nullptr ),
+ pLocalHashMap( nullptr ),
bInitialized( false )
{
}
@@ -248,7 +248,7 @@ void ScUnoAddInCollection::Clear()
delete ppFuncData[i];
delete[] ppFuncData;
}
- ppFuncData = NULL;
+ ppFuncData = nullptr;
nFuncCount = 0;
bInitialized = false;
@@ -412,7 +412,7 @@ void ScUnoAddInCollection::ReadConfiguration()
const OUString* pFuncNameArray = aFunctionNames.getConstArray();
for ( sal_Int32 nFuncPos = 0; nFuncPos < nNewCount; nFuncPos++ )
{
- ppFuncData[nFuncPos+nOld] = NULL;
+ ppFuncData[nFuncPos+nOld] = nullptr;
// stored function name: (service name).(function)
OUStringBuffer aFuncNameBuffer( aServiceName.getLength()+1+pFuncNameArray[nFuncPos].getLength());
@@ -800,7 +800,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
const uno::Reference<reflection::XIdlMethod>* pArray = aMethods.getConstArray();
for (long nFuncPos=0; nFuncPos<nNewCount; nFuncPos++)
{
- ppFuncData[nFuncPos+nOld] = NULL;
+ ppFuncData[nFuncPos+nOld] = nullptr;
uno::Reference<reflection::XIdlMethod> xFunc = pArray[nFuncPos];
if (xFunc.is())
@@ -998,7 +998,7 @@ static const ScAddInArgDesc* lcl_FindArgDesc( const ScUnoAddInFuncData& rFuncDat
if ( pArguments[nPos].aInternalName == rArgIntName )
return &pArguments[nPos];
}
- return NULL;
+ return nullptr;
}
void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface>& xInterface,
@@ -1017,7 +1017,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
// if function list was already initialized, it must be updated
- ScFunctionList* pFunctionList = NULL;
+ ScFunctionList* pFunctionList = nullptr;
if ( ScGlobal::HasStarCalcFunctionList() )
pFunctionList = ScGlobal::GetStarCalcFunctionList();
@@ -1187,7 +1187,7 @@ const ScUnoAddInFuncData* ScUnoAddInCollection::GetFuncData( const OUString& rNa
return pFuncData;
}
- return NULL;
+ return nullptr;
}
const ScUnoAddInFuncData* ScUnoAddInCollection::GetFuncData( long nIndex )
@@ -1197,7 +1197,7 @@ const ScUnoAddInFuncData* ScUnoAddInCollection::GetFuncData( long nIndex )
if (nIndex < nFuncCount)
return ppFuncData[nIndex];
- return NULL;
+ return nullptr;
}
void ScUnoAddInCollection::LocalizeString( OUString& rName )
@@ -1305,7 +1305,7 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const OUString& rNa
nErrCode( errNoCode ), // before function was called
bHasString( true ),
fValue( 0.0 ),
- xMatrix( NULL )
+ xMatrix( nullptr )
{
pFuncData = rColl.GetFuncData( rName, true ); // need fully initialized data
OSL_ENSURE( pFuncData, "Function Data missing" );
@@ -1504,7 +1504,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs)
void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
{
nErrCode = 0;
- xVarRes = NULL;
+ xVarRes = nullptr;
// Reflection* pRefl = rNewRes.getReflection();
@@ -1556,7 +1556,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
default:
if ( aType.equals( cppu::UnoType<uno::Sequence< uno::Sequence<sal_Int32> >>::get() ) )
{
- const uno::Sequence< uno::Sequence<sal_Int32> >* pRowSeq = NULL;
+ const uno::Sequence< uno::Sequence<sal_Int32> >* pRowSeq = nullptr;
//TODO: use pointer from any!
uno::Sequence< uno::Sequence<sal_Int32> > aSequence;
@@ -1597,7 +1597,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
}
else if ( aType.equals( cppu::UnoType<uno::Sequence< uno::Sequence<double> >>::get() ) )
{
- const uno::Sequence< uno::Sequence<double> >* pRowSeq = NULL;
+ const uno::Sequence< uno::Sequence<double> >* pRowSeq = nullptr;
//TODO: use pointer from any!
uno::Sequence< uno::Sequence<double> > aSequence;
@@ -1638,7 +1638,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
}
else if ( aType.equals( cppu::UnoType<uno::Sequence< uno::Sequence<OUString> >>::get() ) )
{
- const uno::Sequence< uno::Sequence<OUString> >* pRowSeq = NULL;
+ const uno::Sequence< uno::Sequence<OUString> >* pRowSeq = nullptr;
//TODO: use pointer from any!
uno::Sequence< uno::Sequence<OUString> > aSequence;
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index f06962dca504..c1c6c1fe1730 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -152,7 +152,7 @@ ScUnoAddInHelpIdGenerator::ScUnoAddInHelpIdGenerator( const OUString& rServiceNa
void ScUnoAddInHelpIdGenerator::SetServiceName( const OUString& rServiceName )
{
- pCurrHelpIds = NULL;
+ pCurrHelpIds = nullptr;
sal_uInt32 nSize = 0;
if ( rServiceName == "com.sun.star.sheet.addin.Analysis" )
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 853177d5d121..8acd0a3d4d69 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -60,7 +60,7 @@ ScAddInListener::~ScAddInListener()
ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xVR )
{
- ScAddInListener* pLst = NULL;
+ ScAddInListener* pLst = nullptr;
sheet::XVolatileResult* pComp = xVR.get();
for(::std::list<ScAddInListener*>::iterator iter = aAllListeners.begin(); iter != aAllListeners.end(); ++iter)
@@ -135,7 +135,7 @@ void SAL_CALL ScAddInListener::disposing( const css::lang::EventObject& /* Sourc
if ( xVolRes.is() )
{
xVolRes->removeResultListener( this );
- xVolRes = NULL;
+ xVolRes = nullptr;
}
}
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index d2ef8d984261..f69a8221e3eb 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -147,7 +147,7 @@ static long int sal_Unicode_strtol ( const sal_Unicode* p, const sal_Unicode**
accum = accum * 10 + *p - '0';
if( accum < prev )
{
- *pEnd = NULL;
+ *pEnd = nullptr;
return 0;
}
prev = accum;
@@ -289,7 +289,7 @@ static const sal_Unicode * lcl_XL_ParseSheetRef( const sal_Unicode* start,
if (pCurrentStart < p)
aTabName += OUString( pCurrentStart, sal::static_int_cast<sal_Int32>( p - pCurrentStart));
if (aTabName.isEmpty())
- return NULL;
+ return nullptr;
if (p == pMsoxlQuoteStop)
++p; // position on ! of ...'!...
if( *p != '!' && ( !bAllow3D || *p != ':' ) )
@@ -299,7 +299,7 @@ static const sal_Unicode * lcl_XL_ParseSheetRef( const sal_Unicode* start,
{
p = parseQuotedName(p, aTabName);
if (aTabName.isEmpty())
- return NULL;
+ return nullptr;
}
else
{
@@ -402,7 +402,7 @@ static bool lcl_XL_getExternalDoc( const sal_Unicode** ppErrRet, OUString& rExte
"sc.core",
"Data type mismatch for ExternalLinkInfo "
<< i);
- *ppErrRet = NULL;
+ *ppErrRet = nullptr;
return false;
}
rExternDocName = aStr;
@@ -412,14 +412,14 @@ static bool lcl_XL_getExternalDoc( const sal_Unicode** ppErrRet, OUString& rExte
return false; // ???
case sheet::ExternalLinkType::SPECIAL :
// silently return nothing (do not assert), caller has to handle this
- *ppErrRet = NULL;
+ *ppErrRet = nullptr;
return false;
default:
SAL_INFO(
"sc.core",
"unhandled ExternalLinkType " << rInfo.Type
<< " for index " << i);
- *ppErrRet = NULL;
+ *ppErrRet = nullptr;
return false;
}
}
@@ -444,7 +444,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
rStartTabName.clear();
rEndTabName.clear();
rExternDocName.clear();
- const sal_Unicode* pMsoxlQuoteStop = NULL;
+ const sal_Unicode* pMsoxlQuoteStop = nullptr;
if (*p == '[')
{
++p;
@@ -463,7 +463,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
{
// non-quoted file name.
p = ScGlobal::UnicodeStrChr( start+1, ']' );
- if( p == NULL )
+ if( p == nullptr )
return start;
rExternDocName += OUString( start+1, sal::static_int_cast<sal_Int32>( p-(start+1) ) );
}
@@ -529,17 +529,17 @@ const sal_Unicode* ScRange::Parse_XL_Header(
startTabs = p;
p = lcl_XL_ParseSheetRef( p, rStartTabName, !bOnlyAcceptSingle, pMsoxlQuoteStop);
- if( NULL == p )
+ if( nullptr == p )
return start; // invalid tab
if (bOnlyAcceptSingle && *p == ':')
- return NULL; // 3D
+ return nullptr; // 3D
if( p != startTabs )
{
nFlags |= SCA_VALID_TAB | SCA_TAB_3D | SCA_TAB_ABSOLUTE;
if( *p == ':' ) // 3d ref
{
p = lcl_XL_ParseSheetRef( p+1, rEndTabName, false, pMsoxlQuoteStop);
- if( p == NULL )
+ if( p == nullptr )
{
nFlags = nSaveFlags;
return start; // invalid tab
@@ -617,25 +617,25 @@ static const sal_Unicode* lcl_r1c1_get_col( const sal_Unicode* p,
bool isRelative;
if( p[0] == '\0' )
- return NULL;
+ return nullptr;
p++;
if( ( isRelative = (*p == '[') ) )
p++;
n = sal_Unicode_strtol( p, &pEnd );
- if( NULL == pEnd )
- return NULL;
+ if( nullptr == pEnd )
+ return nullptr;
if( p == pEnd ) // C is a relative ref with offset 0
{
if( isRelative )
- return NULL;
+ return nullptr;
n = rDetails.nCol;
}
else if( isRelative )
{
if( *pEnd != ']' )
- return NULL;
+ return nullptr;
n += rDetails.nCol;
pEnd++;
}
@@ -646,7 +646,7 @@ static const sal_Unicode* lcl_r1c1_get_col( const sal_Unicode* p,
}
if( n < 0 || n >= MAXCOLCOUNT )
- return NULL;
+ return nullptr;
pAddr->SetCol( static_cast<SCCOL>( n ) );
*nFlags |= SCA_VALID_COL;
@@ -663,25 +663,25 @@ static inline const sal_Unicode* lcl_r1c1_get_row(
bool isRelative;
if( p[0] == '\0' )
- return NULL;
+ return nullptr;
p++;
if( ( isRelative = (*p == '[') ) )
p++;
n = sal_Unicode_strtol( p, &pEnd );
- if( NULL == pEnd )
- return NULL;
+ if( nullptr == pEnd )
+ return nullptr;
if( p == pEnd ) // R is a relative ref with offset 0
{
if( isRelative )
- return NULL;
+ return nullptr;
n = rDetails.nRow;
}
else if( isRelative )
{
if( *pEnd != ']' )
- return NULL;
+ return nullptr;
n += rDetails.nRow;
pEnd++;
}
@@ -692,7 +692,7 @@ static inline const sal_Unicode* lcl_r1c1_get_row(
}
if( n < 0 || n >= MAXROWCOUNT )
- return NULL;
+ return nullptr;
pAddr->SetRow( static_cast<SCROW>( n ) );
*nFlags |= SCA_VALID_ROW;
@@ -706,7 +706,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_R1C1( ScRange& r,
bool bOnlyAcceptSingle,
ScAddress::ExternalInfo* pExtInfo )
{
- const sal_Unicode* pTmp = NULL;
+ const sal_Unicode* pTmp = nullptr;
OUString aExternDocName, aStartTabName, aEndTabName;
sal_uInt16 nFlags = SCA_VALID | SCA_VALID_TAB;
// Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged.
@@ -719,18 +719,18 @@ static sal_uInt16 lcl_ScRange_Parse_XL_R1C1( ScRange& r,
lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName,
aStartTabName, aEndTabName, pDoc);
- if( NULL == p )
+ if( nullptr == p )
return 0;
if( *p == 'R' || *p == 'r' )
{
- if( NULL == (p = lcl_r1c1_get_row( p, rDetails, &r.aStart, &nFlags )) )
+ if( nullptr == (p = lcl_r1c1_get_row( p, rDetails, &r.aStart, &nFlags )) )
return 0;
if( *p != 'C' && *p != 'c' ) // full row R#
{
if( p[0] != ':' || (p[1] != 'R' && p[1] != 'r' ) ||
- NULL == (pTmp = lcl_r1c1_get_row( p+1, rDetails, &r.aEnd, &nFlags2 )))
+ nullptr == (pTmp = lcl_r1c1_get_row( p+1, rDetails, &r.aEnd, &nFlags2 )))
{
// Only the initial row number is given, or the second row
// number is invalid. Fallback to just the initial R
@@ -760,16 +760,16 @@ static sal_uInt16 lcl_ScRange_Parse_XL_R1C1( ScRange& r,
return bOnlyAcceptSingle ? 0 : nFlags;
}
- else if( NULL == (p = lcl_r1c1_get_col( p, rDetails, &r.aStart, &nFlags )))
+ else if( nullptr == (p = lcl_r1c1_get_col( p, rDetails, &r.aStart, &nFlags )))
{
return 0;
}
if( p[0] != ':' ||
(p[1] != 'R' && p[1] != 'r') ||
- NULL == (pTmp = lcl_r1c1_get_row( p+1, rDetails, &r.aEnd, &nFlags2 )) ||
+ nullptr == (pTmp = lcl_r1c1_get_row( p+1, rDetails, &r.aEnd, &nFlags2 )) ||
(*pTmp != 'C' && *pTmp != 'c') ||
- NULL == (pTmp = lcl_r1c1_get_col( pTmp, rDetails, &r.aEnd, &nFlags2 )))
+ nullptr == (pTmp = lcl_r1c1_get_col( pTmp, rDetails, &r.aEnd, &nFlags2 )))
{
// single cell reference
@@ -799,11 +799,11 @@ static sal_uInt16 lcl_ScRange_Parse_XL_R1C1( ScRange& r,
}
else if( *p == 'C' || *p == 'c' ) // full col C#
{
- if( NULL == (p = lcl_r1c1_get_col( p, rDetails, &r.aStart, &nFlags )))
+ if( nullptr == (p = lcl_r1c1_get_col( p, rDetails, &r.aStart, &nFlags )))
return 0;
if( p[0] != ':' || (p[1] != 'C' && p[1] != 'c') ||
- NULL == (pTmp = lcl_r1c1_get_col( p+1, rDetails, &r.aEnd, &nFlags2 )))
+ nullptr == (pTmp = lcl_r1c1_get_col( p+1, rDetails, &r.aEnd, &nFlags2 )))
{ // Fallback to just the initial C
nFlags |= (nFlags << 4);
r.aEnd.SetCol( r.aStart.Col() );
@@ -844,13 +844,13 @@ static inline const sal_Unicode* lcl_a1_get_col( const sal_Unicode* p,
*nFlags |= SCA_COL_ABSOLUTE, p++;
if( !rtl::isAsciiAlpha( *p ) )
- return NULL;
+ return nullptr;
nCol = sal::static_int_cast<SCCOL>( rtl::toAsciiUpperCase( *p++ ) - 'A' );
while (nCol <= MAXCOL && rtl::isAsciiAlpha(*p))
nCol = sal::static_int_cast<SCCOL>( ((nCol + 1) * 26) + rtl::toAsciiUpperCase( *p++ ) - 'A' );
if( nCol > MAXCOL || rtl::isAsciiAlpha( *p ) )
- return NULL;
+ return nullptr;
*nFlags |= SCA_VALID_COL;
pAddr->SetCol( nCol );
@@ -869,8 +869,8 @@ static inline const sal_Unicode* lcl_a1_get_row( const sal_Unicode* p,
*nFlags |= SCA_ROW_ABSOLUTE, p++;
n = sal_Unicode_strtol( p, &pEnd ) - 1;
- if( NULL == pEnd || p == pEnd || n < 0 || n > MAXROW )
- return NULL;
+ if( nullptr == pEnd || p == pEnd || n < 0 || n > MAXROW )
+ return nullptr;
*nFlags |= SCA_VALID_ROW;
pAddr->SetRow( static_cast<SCROW>(n) );
@@ -904,11 +904,11 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName,
aStartTabName, aEndTabName, pDoc);
- if( NULL == p )
+ if( nullptr == p )
return 0;
tmp1 = lcl_a1_get_col( p, &r.aStart, &nFlags );
- if( tmp1 == NULL ) // Is it a row only reference 3:5
+ if( tmp1 == nullptr ) // Is it a row only reference 3:5
{
if( bOnlyAcceptSingle ) // by definition full row refs are ranges
return 0;
@@ -933,7 +933,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
}
tmp2 = lcl_a1_get_row( tmp1, &r.aStart, &nFlags );
- if( tmp2 == NULL ) // check for col only reference F:H
+ if( tmp2 == nullptr ) // check for col only reference F:H
{
if( bOnlyAcceptSingle ) // by definition full col refs are ranges
return 0;
@@ -995,7 +995,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
tmp1 = lcl_a1_get_col( p, &r.aEnd, &nFlags2 );
if( !tmp1 && aEndTabName.isEmpty() ) // Probably the aEndTabName was specified after the first range
{
- p = lcl_XL_ParseSheetRef( p, aEndTabName, false, NULL );
+ p = lcl_XL_ParseSheetRef( p, aEndTabName, false, nullptr );
if( p )
{
SCTAB nTab = 0;
@@ -1041,7 +1041,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
*/
static sal_uInt16 lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
sal_uInt16& rRawRes,
- ScAddress::ExternalInfo* pExtInfo = NULL, ScRange* pRange = NULL )
+ ScAddress::ExternalInfo* pExtInfo = nullptr, ScRange* pRange = nullptr )
{
sal_uInt16 nRes = 0;
rRawRes = 0;
@@ -1237,7 +1237,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDo
pExtInfo->mnFileId = nFileId;
if (pRefMgr->getSingleRefToken(nFileId, aTab,
- ScAddress(nCol, nRow, 0), NULL,
+ ScAddress(nCol, nRow, 0), nullptr,
&nTab).get())
{
rAddr.SetTab( nTab);
@@ -1296,8 +1296,8 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDo
static sal_uInt16 lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
const ScAddress::Details& rDetails,
- ScAddress::ExternalInfo* pExtInfo = NULL,
- const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks = NULL )
+ ScAddress::ExternalInfo* pExtInfo = nullptr,
+ const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks = nullptr )
{
if( !*p )
return 0;
@@ -1310,7 +1310,7 @@ static sal_uInt16 lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc,
ScRange rRange = rAddr;
sal_uInt16 nFlags = lcl_ScRange_Parse_XL_A1(
rRange, p, pDoc, true, pExtInfo,
- (rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : NULL) );
+ (rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : nullptr) );
rAddr = rRange.aStart;
return nFlags;
}
@@ -1451,7 +1451,7 @@ void ScRange::ExtendTo( const ScRange& rRange )
static sal_uInt16 lcl_ScRange_Parse_OOo( ScRange& rRange,
const OUString& r,
ScDocument* pDoc,
- ScAddress::ExternalInfo* pExtInfo = NULL )
+ ScAddress::ExternalInfo* pExtInfo = nullptr )
{
sal_uInt16 nRes1 = 0, nRes2 = 0;
sal_Int32 nPos = ScGlobal::FindUnquoted( r, ':');
@@ -1577,7 +1577,7 @@ sal_uInt16 ScRange::Parse( const OUString& rString, ScDocument* pDoc,
case formula::FormulaGrammar::CONV_XL_OOX:
{
return lcl_ScRange_Parse_XL_A1( *this, rString.getStr(), pDoc, false, pExtInfo,
- (rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : NULL) );
+ (rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : nullptr) );
}
case formula::FormulaGrammar::CONV_XL_R1C1:
@@ -1628,11 +1628,11 @@ sal_uInt16 ScRange::ParseCols( const OUString& rStr, ScDocument* pDoc,
case formula::FormulaGrammar::CONV_OOO: // No full col refs in OOO yet, assume XL notation
case formula::FormulaGrammar::CONV_XL_A1:
case formula::FormulaGrammar::CONV_XL_OOX:
- if (NULL != (p = lcl_a1_get_col( p, &aStart, &ignored ) ) )
+ if (nullptr != (p = lcl_a1_get_col( p, &aStart, &ignored ) ) )
{
if( p[0] == ':')
{
- if( NULL != (p = lcl_a1_get_col( p+1, &aEnd, &ignored )))
+ if( nullptr != (p = lcl_a1_get_col( p+1, &aEnd, &ignored )))
{
nRes = SCA_VALID_COL;
}
@@ -1647,12 +1647,12 @@ sal_uInt16 ScRange::ParseCols( const OUString& rStr, ScDocument* pDoc,
case formula::FormulaGrammar::CONV_XL_R1C1:
if ((p[0] == 'C' || p[0] == 'c') &&
- NULL != (p = lcl_r1c1_get_col( p, rDetails, &aStart, &ignored )))
+ nullptr != (p = lcl_r1c1_get_col( p, rDetails, &aStart, &ignored )))
{
if( p[0] == ':')
{
if( (p[1] == 'C' || p[1] == 'c') &&
- NULL != (p = lcl_r1c1_get_col( p+1, rDetails, &aEnd, &ignored )))
+ nullptr != (p = lcl_r1c1_get_col( p+1, rDetails, &aEnd, &ignored )))
{
nRes = SCA_VALID_COL;
}
@@ -1666,7 +1666,7 @@ sal_uInt16 ScRange::ParseCols( const OUString& rStr, ScDocument* pDoc,
break;
}
- return (p != NULL && *p == '\0') ? nRes : 0;
+ return (p != nullptr && *p == '\0') ? nRes : 0;
}
// Parse only full row references
@@ -1687,11 +1687,11 @@ sal_uInt16 ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc,
case formula::FormulaGrammar::CONV_OOO: // No full row refs in OOO yet, assume XL notation
case formula::FormulaGrammar::CONV_XL_A1:
case formula::FormulaGrammar::CONV_XL_OOX:
- if (NULL != (p = lcl_a1_get_row( p, &aStart, &ignored ) ) )
+ if (nullptr != (p = lcl_a1_get_row( p, &aStart, &ignored ) ) )
{
if( p[0] == ':')
{
- if( NULL != (p = lcl_a1_get_row( p+1, &aEnd, &ignored )))
+ if( nullptr != (p = lcl_a1_get_row( p+1, &aEnd, &ignored )))
{
nRes = SCA_VALID_COL;
}
@@ -1706,12 +1706,12 @@ sal_uInt16 ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc,
case formula::FormulaGrammar::CONV_XL_R1C1:
if ((p[0] == 'R' || p[0] == 'r') &&
- NULL != (p = lcl_r1c1_get_row( p, rDetails, &aStart, &ignored )))
+ nullptr != (p = lcl_r1c1_get_row( p, rDetails, &aStart, &ignored )))
{
if( p[0] == ':')
{
if( (p[1] == 'R' || p[1] == 'r') &&
- NULL != (p = lcl_r1c1_get_row( p+1, rDetails, &aEnd, &ignored )))
+ nullptr != (p = lcl_r1c1_get_row( p+1, rDetails, &aEnd, &ignored )))
{
nRes = SCA_VALID_COL;
}
@@ -1725,7 +1725,7 @@ sal_uInt16 ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc,
break;
}
- return (p != NULL && *p == '\0') ? nRes : 0;
+ return (p != nullptr && *p == '\0') ? nRes : 0;
}
template<typename T > static inline void lcl_ScColToAlpha( T& rBuf, SCCOL nCol )
@@ -1814,8 +1814,8 @@ static OUString getFileNameFromDoc( const ScDocument* pDoc )
OUString sFileName;
SfxObjectShell* pShell;
- if( NULL != pDoc &&
- NULL != (pShell = pDoc->GetDocumentShell() ) )
+ if( nullptr != pDoc &&
+ nullptr != (pShell = pDoc->GetDocumentShell() ) )
{
uno::Reference< frame::XModel > xModel( pShell->GetModel(), uno::UNO_QUERY );
if( xModel.is() )
@@ -2020,7 +2020,7 @@ OUString ScRange::Format( sal_uInt16 nFlags, const ScDocument* pDoc,
{
nFlags = ( nFlags & SCA_VALID ) | ( ( nFlags >> 4 ) & 0x070F );
if ( bOneTab )
- pDoc = NULL;
+ pDoc = nullptr;
else
nFlags |= SCA_TAB_3D;
OUString aName(aEnd.Format(nFlags, pDoc, rDetails));
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 2609011bd2f4..19179dd2265a 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -39,8 +39,8 @@ void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData )
ScAddInAsync::ScAddInAsync() :
SvtBroadcaster(),
- pDocs( NULL ),
- mpFuncData( NULL ),
+ pDocs( nullptr ),
+ mpFuncData( nullptr ),
nHandle( 0 ),
meType( ParamType::NONE ),
bValid( false )
@@ -49,7 +49,7 @@ ScAddInAsync::ScAddInAsync() :
ScAddInAsync::ScAddInAsync(sal_uLong nHandleP, LegacyFuncData* pFuncData, ScDocument* pDoc) :
SvtBroadcaster(),
- pStr( NULL ),
+ pStr( nullptr ),
mpFuncData(pFuncData),
nHandle( nHandleP ),
meType(pFuncData->GetAsyncType()),
@@ -75,7 +75,7 @@ ScAddInAsync::~ScAddInAsync()
ScAddInAsync* ScAddInAsync::Get( sal_uLong nHandleP )
{
- ScAddInAsync* pRet = 0;
+ ScAddInAsync* pRet = nullptr;
aSeekObj.nHandle = nHandleP;
ScAddInAsyncs::iterator it = theAddInAsyncTbl.find( &aSeekObj );
if ( it != theAddInAsyncTbl.end() )
@@ -87,7 +87,7 @@ ScAddInAsync* ScAddInAsync::Get( sal_uLong nHandleP )
void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
{
ScAddInAsync* p;
- if ( (p = Get( nHandleP )) == NULL )
+ if ( (p = Get( nHandleP )) == nullptr )
return;
if ( !p->HasListeners() )
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 44218981f187..3bdf429dfa67 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -37,12 +37,12 @@ using namespace com::sun::star::uno;
// ScAppOptions - Applikations-Optionen
-ScAppOptions::ScAppOptions() : pLRUList( NULL )
+ScAppOptions::ScAppOptions() : pLRUList( nullptr )
{
SetDefaults();
}
-ScAppOptions::ScAppOptions( const ScAppOptions& rCpy ) : pLRUList( NULL )
+ScAppOptions::ScAppOptions( const ScAppOptions& rCpy ) : pLRUList( nullptr )
{
*this = rCpy;
}
@@ -125,7 +125,7 @@ void ScAppOptions::SetLRUFuncList( const sal_uInt16* pList, const sal_uInt16 nCo
pLRUList[i] = pList[i];
}
else
- pLRUList = NULL;
+ pLRUList = nullptr;
}
// Config Item containing app options
@@ -380,7 +380,7 @@ ScAppCfg::ScAppCfg() :
Sequence<OUString> aNames;
Sequence<Any> aValues;
- const Any* pValues = NULL;
+ const Any* pValues = nullptr;
aNames = GetLayoutPropertyNames();
aValues = aLayoutItem.GetProperties(aNames);
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 4fd195311367..2207f6b84adc 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -516,7 +516,7 @@ const SfxPoolItem* ScAutoFormatData::GetItem( sal_uInt16 nIndex, sal_uInt16 nWhi
case ATTR_ROTATE_VALUE: return &rField.GetRotateAngle();
case ATTR_ROTATE_MODE: return &rField.GetRotateMode();
}
- return NULL;
+ return nullptr;
}
void ScAutoFormatData::PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem )
@@ -927,7 +927,7 @@ void ScAutoFormat::SetSaveLater( bool bSet )
const ScAutoFormatData* ScAutoFormat::findByIndex(size_t nIndex) const
{
if (nIndex >= maData.size())
- return NULL;
+ return nullptr;
MapType::const_iterator it = maData.begin();
std::advance(it, nIndex);
@@ -937,7 +937,7 @@ const ScAutoFormatData* ScAutoFormat::findByIndex(size_t nIndex) const
ScAutoFormatData* ScAutoFormat::findByIndex(size_t nIndex)
{
if (nIndex >= maData.size())
- return NULL;
+ return nullptr;
MapType::iterator it = maData.begin();
std::advance(it, nIndex);
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 90d3afa436cf..a859c3ccada1 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -135,7 +135,7 @@ public:
const ModuleData* ModuleCollection::findByName(const OUString& rName) const
{
MapType::const_iterator it = maData.find(rName);
- return it == maData.end() ? NULL : it->second;
+ return it == maData.end() ? nullptr : it->second;
}
void ModuleCollection::insert(ModuleData* pNew)
@@ -176,7 +176,7 @@ bool InitExternalFunc(const OUString& rModuleName)
{
oslGenericFunction fpGetCount = pLib->getFunctionSymbol(GETFUNCTIONCOUNT);
oslGenericFunction fpGetData = pLib->getFunctionSymbol(GETFUNCTIONDATA);
- if ((fpGetCount != NULL) && (fpGetData != NULL))
+ if ((fpGetCount != nullptr) && (fpGetData != nullptr))
{
oslGenericFunction fpIsAsync = pLib->getFunctionSymbol(ISASYNC);
oslGenericFunction fpAdvice = pLib->getFunctionSymbol(ADVICE);
@@ -256,7 +256,7 @@ bool LegacyFuncData::Call(void** ppParam) const
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
oslGenericFunction fProc = pLib->getFunctionSymbol(aFuncName);
- if (fProc != NULL)
+ if (fProc != nullptr)
{
switch (nParamCount)
{
@@ -354,7 +354,7 @@ bool LegacyFuncData::Unadvice( double nHandle )
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
oslGenericFunction fProc = pLib->getFunctionSymbol(UNADVICE);
- if (fProc != NULL)
+ if (fProc != nullptr)
{
reinterpret_cast< ::Unadvice>(fProc)(nHandle);
bRet = true;
@@ -381,7 +381,7 @@ bool LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16
{
osl::Module* pLib = pModuleData->GetInstance();
oslGenericFunction fProc = pLib->getFunctionSymbol(GETPARAMDESC);
- if ( fProc != NULL )
+ if ( fProc != nullptr )
{
sal_Char pcName[256];
sal_Char pcDesc[256];
@@ -408,13 +408,13 @@ LegacyFuncCollection::LegacyFuncCollection(const LegacyFuncCollection& r) : maDa
const LegacyFuncData* LegacyFuncCollection::findByName(const OUString& rName) const
{
MapType::const_iterator it = maData.find(rName);
- return it == maData.end() ? NULL : it->second;
+ return it == maData.end() ? nullptr : it->second;
}
LegacyFuncData* LegacyFuncCollection::findByName(const OUString& rName)
{
MapType::iterator it = maData.find(rName);
- return it == maData.end() ? NULL : it->second;
+ return it == maData.end() ? nullptr : it->second;
}
void LegacyFuncCollection::insert(LegacyFuncData* pNew)
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index cb82e7fe8809..6d8015ba1f93 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -33,14 +33,14 @@
// STATIC DATA
// Err527 Workaround
-const ScFormulaCell* pLastFormulaTreeTop = 0;
+const ScFormulaCell* pLastFormulaTreeTop = nullptr;
void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString& rString,
Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc,
bool bNullVals, bool bFormula, ScForceTextFmt eForceTextFmt,
bool bUseStarFormat )
{
- *ppColor = NULL;
+ *ppColor = nullptr;
switch (rCell.meType)
{
@@ -133,7 +133,7 @@ OUString ScCellFormat::GetString(
bool bUseStarFormat )
{
OUString aString;
- *ppColor = NULL;
+ *ppColor = nullptr;
CellType eType = rDoc.GetCellType(rPos);
switch (eType)
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index cc21ebcfb183..16ce164d1315 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -75,7 +75,7 @@ ScCellKeyword::ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const lang::
::std::unique_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance;
static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap,
- OpCode eOpCode = ocNone, const lang::Locale* pLocale = NULL)
+ OpCode eOpCode = ocNone, const lang::Locale* pLocale = nullptr)
{
ScCellKeywordHashMap::const_iterator itrEnd = aMap.end();
ScCellKeywordHashMap::const_iterator itr = aMap.find(rName);
@@ -222,7 +222,7 @@ void ScCellKeywordTranslator::addToMap(const OUString& rKey, const sal_Char* pNa
void ScCellKeywordTranslator::addToMap(const TransItem* pItems, const lang::Locale& rLocale)
{
- for (sal_uInt16 i = 0; pItems[i].from != NULL; ++i)
+ for (sal_uInt16 i = 0; pItems[i].from != nullptr; ++i)
addToMap(OUString(pItems[i].from), pItems[i].to, rLocale, pItems[i].func);
}
diff --git a/sc/source/core/tool/cellkeywords.inl b/sc/source/core/tool/cellkeywords.inl
index 214005cd41e0..b56e3eeadfb5 100644
--- a/sc/source/core/tool/cellkeywords.inl
+++ b/sc/source/core/tool/cellkeywords.inl
@@ -68,7 +68,7 @@ static const TransItem pFr[] = {
{info_system_fr, "SYSTEM", ocInfo},
{info_release_fr, "RELEASE", ocInfo},
{info_osversion_fr, "OSVERSION", ocInfo},
- {NULL, NULL, ocNone}
+ {nullptr, nullptr, ocNone}
};
addToMap(pFr, aFr);
@@ -138,7 +138,7 @@ static const TransItem pHu[] = {
{info_system_hu, "SYSTEM", ocInfo},
{info_release_hu, "RELEASE", ocInfo},
{info_osversion_hu, "OSVERSION", ocInfo},
- {NULL, NULL, ocNone}
+ {nullptr, nullptr, ocNone}
};
addToMap(pHu, aHu);
@@ -193,7 +193,7 @@ static const TransItem pDe[] = {
{cell_prefix_de, "PREFIX", ocCell},
{cell_sheet_de, "SHEET", ocCell},
{cell_coord_de, "COORD", ocCell},
- {NULL, NULL, ocNone}
+ {nullptr, nullptr, ocNone}
};
addToMap(pDe, aDe);
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index edfa4ed55c32..69135abba5bf 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -166,12 +166,12 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
// Skip hidden columns.
// TODO: make use of last column value once implemented.
SCCOL nLastCol = -1;
- while (pDocument->ColHidden(nCol1, nTab1, NULL, &nLastCol))
+ while (pDocument->ColHidden(nCol1, nTab1, nullptr, &nLastCol))
++nCol1;
// Skip hidden rows.
SCROW nLastRow = -1;
- if (pDocument->RowHidden(nRow1, nTab1, NULL, &nLastRow))
+ if (pDocument->RowHidden(nRow1, nTab1, nullptr, &nLastRow))
nRow1 = nLastRow + 1;
// if everything is hidden then the label remains at the beginning
@@ -192,7 +192,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
for (SCSIZE i=0; i<nTotalCols; i++)
{
SCCOL nThisCol = sal::static_int_cast<SCCOL>(nCol1+i);
- if (!pDocument->ColHidden(nThisCol, nTab1, NULL, &nLastCol))
+ if (!pDocument->ColHidden(nThisCol, nTab1, nullptr, &nLastCol))
aCols.push_back(nThisCol);
}
SCSIZE nColCount = aCols.size();
@@ -206,7 +206,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
SCROW nThisRow = nRow1;
while (nThisRow <= nRow2)
{
- if (pDocument->RowHidden(nThisRow, nTab1, NULL, &nLastRow))
+ if (pDocument->RowHidden(nThisRow, nTab1, nullptr, &nLastRow))
nThisRow = nLastRow;
else
aRows.push_back(nThisRow);
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index 82b82400b7ae..98352fe96751 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -151,7 +151,7 @@ ScTemporaryChartLock::ScTemporaryChartLock( ScDocument* pDocP ) :
ScTemporaryChartLock::~ScTemporaryChartLock()
{
- mpDoc = 0;
+ mpDoc = nullptr;
StopLocking();
}
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 9fd30aa20f1e..c1f1c9859d9d 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -44,7 +44,7 @@ namespace
ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartColP, SCROW nStartRowP, SCCOL nEndColP, SCROW nEndRowP) :
pDocument( pDoc ),
- pPositionMap( NULL ),
+ pPositionMap( nullptr ),
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
@@ -59,7 +59,7 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
ScChartPositioner::ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rRangeList ) :
aRangeListRef( rRangeList ),
pDocument( pDoc ),
- pPositionMap( NULL ),
+ pPositionMap( nullptr ),
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
@@ -74,7 +74,7 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rR
ScChartPositioner::ScChartPositioner( const ScChartPositioner& rPositioner ) :
aRangeListRef( rPositioner.aRangeListRef ),
pDocument(rPositioner.pDocument),
- pPositionMap( NULL ),
+ pPositionMap( nullptr ),
eGlue(rPositioner.eGlue),
nStartCol(rPositioner.nStartCol),
nStartRow(rPositioner.nStartRow),
@@ -349,7 +349,7 @@ void ScChartPositioner::CreatePositionMap()
if ( eGlue == SC_CHARTGLUE_NA && pPositionMap )
{
delete pPositionMap;
- pPositionMap = NULL;
+ pPositionMap = nullptr;
}
if ( pPositionMap )
@@ -383,7 +383,7 @@ void ScChartPositioner::CreatePositionMap()
static_cast<sal_uLong>(nCol1));
for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol )
{
- RowMap* pCol = NULL;
+ RowMap* pCol = nullptr;
ColumnMap::const_iterator it = pCols->find( nInsCol );
if ( it == pCols->end() )
{
@@ -415,7 +415,7 @@ void ScChartPositioner::CreatePositionMap()
{
RowMap* pCol = pCols->begin()->second;
if ( bDummyUpperLeft )
- (*pCol)[ 0 ] = NULL; // Dummy for labeling
+ (*pCol)[ 0 ] = nullptr; // Dummy for labeling
nRowCount = static_cast< SCSIZE >( pCol->size());
}
else
@@ -443,11 +443,11 @@ void ScChartPositioner::CreatePositionMap()
{
sal_uLong nCurrentKey = pCol->begin()->first;
delete pPos;
- (*pCol)[ nCurrentKey ] = NULL;
+ (*pCol)[ nCurrentKey ] = nullptr;
}
}
else
- (*pCol)[ 0 ] = NULL;
+ (*pCol)[ 0 ] = nullptr;
nRowCount = 1;
nColAdd = 0;
nRowAdd = 0;
@@ -507,7 +507,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
++pPos1Iter;
}
for ( ; nRow < nRowCount; nRow++ )
- ppRowHeader[ nRow ] = NULL;
+ ppRowHeader[ nRow ] = nullptr;
}
else
{ // copy
@@ -515,11 +515,11 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
for ( ; nRow < nRowCount && pPos1Iter != pCol1->end(); nRow++ )
{
ppRowHeader[ nRow ] = pPos1Iter->second ?
- new ScAddress( *pPos1Iter->second ) : NULL;
+ new ScAddress( *pPos1Iter->second ) : nullptr;
++pPos1Iter;
}
for ( ; nRow < nRowCount; nRow++ )
- ppRowHeader[ nRow ] = NULL;
+ ppRowHeader[ nRow ] = nullptr;
}
if ( nColAdd )
{
@@ -543,7 +543,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
}
else
ppColHeader[ nCol ] = pPosIter->second ?
- new ScAddress( *pPosIter->second ) : NULL;
+ new ScAddress( *pPosIter->second ) : nullptr;
}
SCROW nRow = 0;
@@ -553,16 +553,16 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
++pPosIter;
}
for ( ; nRow < nRowCount; nRow++, nIndex++ )
- ppData[ nIndex ] = NULL;
+ ppData[ nIndex ] = nullptr;
++pColIter;
}
else
{
- ppColHeader[ nCol ] = NULL;
+ ppColHeader[ nCol ] = nullptr;
for ( SCROW nRow = 0; nRow < nRowCount; nRow++, nIndex++ )
{
- ppData[ nIndex ] = NULL;
+ ppData[ nIndex ] = nullptr;
}
}
}
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 531290116afb..b8fec5928e7c 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -52,12 +52,12 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange
:
aBigRange( rRange ),
aDateTime( DateTime::SYSTEM ),
- pNext( NULL ),
- pPrev( NULL ),
- pLinkAny( NULL ),
- pLinkDeletedIn( NULL ),
- pLinkDeleted( NULL ),
- pLinkDependent( NULL ),
+ pNext( nullptr ),
+ pPrev( nullptr ),
+ pLinkAny( nullptr ),
+ pLinkDeletedIn( nullptr ),
+ pLinkDeleted( nullptr ),
+ pLinkDependent( nullptr ),
nAction( 0 ),
nRejectAction( 0 ),
eType( eTypeP ),
@@ -75,12 +75,12 @@ ScChangeAction::ScChangeAction(
aDateTime( aTempDateTime ),
aUser( aTempUser ),
aComment( aTempComment ),
- pNext( NULL ),
- pPrev( NULL ),
- pLinkAny( NULL ),
- pLinkDeletedIn( NULL ),
- pLinkDeleted( NULL ),
- pLinkDependent( NULL ),
+ pNext( nullptr ),
+ pPrev( nullptr ),
+ pLinkAny( nullptr ),
+ pLinkDeletedIn( nullptr ),
+ pLinkDeleted( nullptr ),
+ pLinkDependent( nullptr ),
nAction( nTempAction ),
nRejectAction( nTempRejectAction ),
eType( eTypeP ),
@@ -93,12 +93,12 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRa
:
aBigRange( rRange ),
aDateTime( DateTime::SYSTEM ),
- pNext( NULL ),
- pPrev( NULL ),
- pLinkAny( NULL ),
- pLinkDeletedIn( NULL ),
- pLinkDeleted( NULL ),
- pLinkDependent( NULL ),
+ pNext( nullptr ),
+ pPrev( nullptr ),
+ pLinkAny( nullptr ),
+ pLinkDeletedIn( nullptr ),
+ pLinkDeleted( nullptr ),
+ pLinkDependent( nullptr ),
nAction( nTempAction ),
nRejectAction( 0 ),
eType( eTypeP ),
@@ -207,7 +207,7 @@ bool ScChangeAction::IsRejectable() const
return false;
ScChangeActionContent* pNextContent =
static_cast<const ScChangeActionContent*>(this)->GetNextContent();
- if ( pNextContent == NULL )
+ if ( pNextContent == nullptr )
return true; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
@@ -225,7 +225,7 @@ bool ScChangeAction::IsInternalRejectable() const
{
ScChangeActionContent* pNextContent =
static_cast<const ScChangeActionContent*>(this)->GetNextContent();
- if ( pNextContent == NULL )
+ if ( pNextContent == nullptr )
return true; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
@@ -314,7 +314,7 @@ bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
bool ScChangeAction::IsDeletedIn() const
{
- return GetDeletedIn() != NULL;
+ return GetDeletedIn() != nullptr;
}
bool ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const
@@ -360,7 +360,7 @@ bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
while ( pL )
{
ScChangeAction* p;
- if ( (p = pL->GetAction()) != NULL &&
+ if ( (p = pL->GetAction()) != nullptr &&
(p->GetType() == eDelType || p->GetType() == eInsType) )
return true;
pL = pL->GetNext();
@@ -371,12 +371,12 @@ bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
bool ScChangeAction::HasDependent() const
{
- return pLinkDependent != NULL;
+ return pLinkDependent != nullptr;
}
bool ScChangeAction::HasDeleted() const
{
- return pLinkDeleted != NULL;
+ return pLinkDeleted != nullptr;
}
void ScChangeAction::SetDeletedIn( ScChangeAction* p )
@@ -592,7 +592,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
SCsCOL nDx, SCsROW nDy )
{
// Construct list of Contents
- ScChangeActionCellListEntry* pListContents = NULL;
+ ScChangeActionCellListEntry* pListContents = nullptr;
for ( ScChangeActionLinkEntry* pL = pLinkDeleted; pL; pL = pL->GetNext() )
{
ScChangeAction* p = pL->GetAction();
@@ -772,10 +772,10 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange,
:
ScChangeAction( SC_CAT_NONE, rRange ),
pTrack( pTrackP ),
- pFirstCell( NULL ),
- pCutOff( NULL ),
+ pFirstCell( nullptr ),
+ pCutOff( nullptr ),
nCutOff( 0 ),
- pLinkMove( NULL ),
+ pLinkMove( nullptr ),
nDx( nDxP ),
nDy( nDyP )
{
@@ -811,10 +811,10 @@ ScChangeActionDel::ScChangeActionDel(
const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) : // which of nDx and nDy is set depends on the type
ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
pTrack( pTrackP ),
- pFirstCell( NULL ),
- pCutOff( NULL ),
+ pFirstCell( nullptr ),
+ pCutOff( nullptr ),
nCutOff( 0 ),
- pLinkMove( NULL ),
+ pLinkMove( nullptr ),
nDx( 0 ),
nDy( 0 )
{
@@ -1131,7 +1131,7 @@ void ScChangeActionDel::UndoCutOffInsert()
// added to avoid warnings
}
}
- SetCutOffInsert( NULL, 0 );
+ SetCutOffInsert( nullptr, 0 );
}
}
@@ -1145,7 +1145,7 @@ ScChangeActionMove::ScChangeActionMove(
ScChangeAction(SC_CAT_MOVE, aToBigRange, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
aFromRange(aFromBigRange),
pTrack( pTrackP ),
- pFirstCell( NULL ),
+ pFirstCell( nullptr ),
nStartLastCut(0),
nEndLastCut(0)
{
@@ -1294,10 +1294,10 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionContent )
ScChangeActionContent::ScChangeActionContent( const ScRange& rRange ) :
ScChangeAction(SC_CAT_CONTENT, rRange),
- pNextContent(NULL),
- pPrevContent(NULL),
- pNextInSlot(NULL),
- ppPrevInSlot(NULL)
+ pNextContent(nullptr),
+ pPrevContent(nullptr),
+ pNextInSlot(nullptr),
+ ppPrevInSlot(nullptr)
{}
ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
@@ -1308,10 +1308,10 @@ ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
maOldCell(rOldCell),
maOldValue(sOldValue),
- pNextContent(NULL),
- pPrevContent(NULL),
- pNextInSlot(NULL),
- ppPrevInSlot(NULL)
+ pNextContent(nullptr),
+ pPrevContent(nullptr),
+ pNextInSlot(nullptr),
+ ppPrevInSlot(nullptr)
{
if (!maOldCell.isEmpty())
SetCell(maOldValue, maOldCell, 0, pDoc);
@@ -1326,10 +1326,10 @@ ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber),
maNewCell(rNewCell),
maNewValue(sNewValue),
- pNextContent(NULL),
- pPrevContent(NULL),
- pNextInSlot(NULL),
- ppPrevInSlot(NULL)
+ pNextContent(nullptr),
+ pPrevContent(nullptr),
+ pNextInSlot(nullptr),
+ ppPrevInSlot(nullptr)
{
if (!maNewCell.isEmpty())
SetCell(maNewValue, maNewCell, 0, pDoc);
@@ -1552,14 +1552,14 @@ bool ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
ScChangeActionContent* pContent = this;
// accept previous contents
- while ( ( pContent = pContent->pPrevContent ) != NULL )
+ while ( ( pContent = pContent->pPrevContent ) != nullptr )
{
if ( pContent->IsVirgin() )
pContent->SetState( SC_CAS_ACCEPTED );
}
ScChangeActionContent* pEnd = pContent = this;
// reject subsequent contents
- while ( ( pContent = pContent->pNextContent ) != NULL )
+ while ( ( pContent = pContent->pNextContent ) != nullptr )
{
// MatrixOrigin may have dependents, no dependency recursion needed
const ScChangeActionLinkEntry* pL = pContent->GetFirstDependentEntry();
@@ -2014,10 +2014,10 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
formula::FormulaToken* t;
ScTokenArray* pArr = maOldCell.mpFormula->GetCode();
pArr->Reset();
- while ( ( t = pArr->GetNextReference() ) != NULL )
+ while ( ( t = pArr->GetNextReference() ) != nullptr )
lcl_InvalidateReference( *t, rPos );
pArr->Reset();
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
lcl_InvalidateReference( *t, rPos );
}
if ( bNewFormula )
@@ -2025,10 +2025,10 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
formula::FormulaToken* t;
ScTokenArray* pArr = maNewCell.mpFormula->GetCode();
pArr->Reset();
- while ( ( t = pArr->GetNextReference() ) != NULL )
+ while ( ( t = pArr->GetNextReference() ) != nullptr )
lcl_InvalidateReference( *t, rPos );
pArr->Reset();
- while ( ( t = pArr->GetNextReferenceRPN() ) != NULL )
+ while ( ( t = pArr->GetNextReferenceRPN() ) != nullptr )
lcl_InvalidateReference( *t, rPos );
}
}
@@ -2107,15 +2107,15 @@ ScChangeTrack::~ScChangeTrack()
void ScChangeTrack::Init()
{
- pFirst = NULL;
- pLast = NULL;
- pFirstGeneratedDelContent = NULL;
- pLastCutMove = NULL;
- pLinkInsertCol = NULL;
- pLinkInsertRow = NULL;
- pLinkInsertTab = NULL;
- pLinkMove = NULL;
- pBlockModifyMsg = NULL;
+ pFirst = nullptr;
+ pLast = nullptr;
+ pFirstGeneratedDelContent = nullptr;
+ pLastCutMove = nullptr;
+ pLinkInsertCol = nullptr;
+ pLinkInsertRow = nullptr;
+ pLinkInsertTab = nullptr;
+ pLinkMove = nullptr;
+ pBlockModifyMsg = nullptr;
nActionMax = 0;
nGeneratedMin = SC_CHGTRACK_GENERATED_START;
nMarkLastSaved = 0;
@@ -2168,7 +2168,7 @@ void ScChangeTrack::ClearMsgQueue()
if ( pBlockModifyMsg )
{
delete pBlockModifyMsg;
- pBlockModifyMsg = NULL;
+ pBlockModifyMsg = nullptr;
}
while ( !aMsgStackTmp.empty() )
{
@@ -2210,7 +2210,7 @@ ScChangeAction* ScChangeTrack::GetAction( sal_uLong nAction ) const
if( it != aMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
ScChangeAction* ScChangeTrack::GetGenerated( sal_uLong nGenerated ) const
@@ -2219,7 +2219,7 @@ ScChangeAction* ScChangeTrack::GetGenerated( sal_uLong nGenerated ) const
if( it != aGeneratedMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
ScChangeAction* ScChangeTrack::GetActionOrGenerated( sal_uLong nAction ) const
@@ -2244,7 +2244,7 @@ ScChangeAction* ScChangeTrack::GetLastSaved() const
if( it != aMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
@@ -2311,7 +2311,7 @@ void ScChangeTrack::EndBlockModify( sal_uLong nEndAction )
else
delete pBlockModifyMsg;
if (aMsgStackTmp.empty())
- pBlockModifyMsg = NULL;
+ pBlockModifyMsg = nullptr;
else
{
pBlockModifyMsg = aMsgStackTmp.top(); // Maybe Block in Block
@@ -2378,28 +2378,28 @@ void ScChangeTrack::MasterLinks( ScChangeAction* pAppend )
{
ScChangeActionLinkEntry* pLink = new ScChangeActionLinkEntry(
&pLinkInsertCol, pAppend );
- pAppend->AddLink( NULL, pLink );
+ pAppend->AddLink( nullptr, pLink );
}
break;
case SC_CAT_INSERT_ROWS :
{
ScChangeActionLinkEntry* pLink = new ScChangeActionLinkEntry(
&pLinkInsertRow, pAppend );
- pAppend->AddLink( NULL, pLink );
+ pAppend->AddLink( nullptr, pLink );
}
break;
case SC_CAT_INSERT_TABS :
{
ScChangeActionLinkEntry* pLink = new ScChangeActionLinkEntry(
&pLinkInsertTab, pAppend );
- pAppend->AddLink( NULL, pLink );
+ pAppend->AddLink( nullptr, pLink );
}
break;
case SC_CAT_MOVE :
{
ScChangeActionLinkEntry* pLink = new ScChangeActionLinkEntry(
&pLinkMove, pAppend );
- pAppend->AddLink( NULL, pLink );
+ pAppend->AddLink( nullptr, pLink );
}
break;
default:
@@ -2461,7 +2461,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, sal_uLong nAction )
if ( pAppend->GetType() == SC_CAT_CONTENT )
{
ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pAppend);
- if ( ( pContent = pContent->GetPrevContent() ) != NULL )
+ if ( ( pContent = pContent->GetPrevContent() ) != nullptr )
{
sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
@@ -2608,7 +2608,7 @@ void ScChangeTrack::LookUpContents( const ScRange& rOrgRange,
aBigPos.Set( aIter.GetPos().Col() + nDx, aIter.GetPos().Row() + nDy,
aIter.GetPos().Tab() + nDz );
- ScChangeActionContent* pContent = SearchContentAt( aBigPos, NULL );
+ ScChangeActionContent* pContent = SearchContentAt( aBigPos, nullptr );
if (pContent)
continue;
@@ -2778,7 +2778,7 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
pLastCutMove->SetStartLastCut( nStartLastCut );
pLastCutMove->SetEndLastCut( nEndLastCut );
Append( pLastCutMove );
- pLastCutMove = NULL;
+ pLastCutMove = nullptr;
ResetLastCut();
SetInPasteCut( false );
}
@@ -2870,7 +2870,7 @@ void ScChangeTrack::DeleteCellEntries( ScChangeActionCellListEntry*& pCellList,
delete pE;
pE = pNext;
}
- pCellList = NULL;
+ pCellList = nullptr;
}
ScChangeActionContent* ScChangeTrack::GenerateDelContent(
@@ -2925,7 +2925,7 @@ ScChangeActionContent* ScChangeTrack::SearchContentAt(
return pContent;
}
}
- return NULL;
+ return nullptr;
}
void ScChangeTrack::AddDependentWithNotify( ScChangeAction* pParent,
@@ -2968,7 +2968,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
{
ScAddress aOrg;
bool bOrgFound = rCell.mpFormula->GetMatrixOrigin(aOrg);
- ScChangeActionContent* pContent = (bOrgFound ? SearchContentAt( aOrg, pAct ) : NULL);
+ ScChangeActionContent* pContent = (bOrgFound ? SearchContentAt( aOrg, pAct ) : nullptr);
if ( pContent && pContent->IsMatrixOrigin() )
{
AddDependentWithNotify( pContent, pAct );
@@ -3114,7 +3114,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
if ( pRemove->GetType() == SC_CAT_CONTENT )
{
ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pRemove);
- if ( ( pContent = pContent->GetPrevContent() ) != NULL )
+ if ( ( pContent = pContent->GetPrevContent() ) != nullptr )
{
sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
@@ -3130,8 +3130,8 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pRemove);
pContent->RemoveAllLinks();
pContent->ClearTrack();
- pContent->pNext = pContent->pPrev = NULL;
- pContent->pNextContent = pContent->pPrevContent = NULL;
+ pContent->pNext = pContent->pPrev = nullptr;
+ pContent->pNextContent = pContent->pPrevContent = nullptr;
}
}
@@ -3264,7 +3264,7 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
SetInDeleteTop( false );
pAct->DeleteCellEntries(); // Else segfault in Track Clear()
}
- pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() );
+ pAct = ( pAct == pFirstMerge ? nullptr : pAct->GetPrev() );
}
}
SetMergeState( SC_CTMS_OTHER ); // Preceding by default MergeOther!
@@ -3712,18 +3712,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// Split up the ContentChain
ScChangeActionContent *pHere, *pTmp;
pHere = static_cast<ScChangeActionContent*>(p);
- while ( (pTmp = pHere->GetPrevContent()) != NULL &&
+ while ( (pTmp = pHere->GetPrevContent()) != nullptr &&
pTmp->GetActionNumber() > nEndLastCut )
pHere = pTmp;
if ( pTmp )
{ // Becomes TopContent of the Move
- pTmp->SetNextContent( NULL );
- pHere->SetPrevContent( NULL );
+ pTmp->SetNextContent( nullptr );
+ pHere->SetPrevContent( nullptr );
}
do
{ // Recover dependency from FromRange
AddDependentWithNotify( pActMove, pHere );
- } while ( ( pHere = pHere->GetNextContent() ) != NULL );
+ } while ( ( pHere = pHere->GetNextContent() ) != nullptr );
}
// #i87003# [Collaboration] Move range and insert content in FromRange is not merged correctly
else if ( ( GetMergeState() != SC_CTMS_PREPARE && GetMergeState() != SC_CTMS_OWN ) || p->GetActionNumber() <= pAct->GetActionNumber() )
@@ -3897,7 +3897,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
bool bIsDelete = pAct->IsDeleteType();
bool bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() );
- const ScChangeAction* pCur = NULL;
+ const ScChangeAction* pCur = nullptr;
::std::stack<ScChangeAction*> cStack;
cStack.push(pAct);
@@ -3946,7 +3946,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
// if this Delete is at the top of a Row
ScChangeActionType eType = pDel->GetType();
ScChangeAction* p = pDel;
- while ( (p = p->GetPrev()) != NULL && p->GetType() == eType &&
+ while ( (p = p->GetPrev()) != nullptr && p->GetType() == eType &&
!static_cast<ScChangeActionDel*>(p)->IsTopDelete() )
rMap.insert( ::std::make_pair( p->GetActionNumber(), p ) );
// delete this in the map too
@@ -4034,14 +4034,14 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{ // All changes at same position
ScChangeActionContent* pContent = const_cast<ScChangeActionContent*>(static_cast<const ScChangeActionContent*>(pCur));
// All preceding ones
- while ( ( pContent = pContent->GetPrevContent() ) != NULL )
+ while ( ( pContent = pContent->GetPrevContent() ) != nullptr )
{
if ( !pContent->IsRejected() )
rMap.insert( ::std::make_pair( pContent->GetActionNumber(), pContent ) );
}
pContent = const_cast<ScChangeActionContent*>(static_cast<const ScChangeActionContent*>(pCur));
// All succeeding ones
- while ( ( pContent = pContent->GetNextContent() ) != NULL )
+ while ( ( pContent = pContent->GetNextContent() ) != nullptr )
{
if ( !pContent->IsRejected() )
rMap.insert( ::std::make_pair( pContent->GetActionNumber(), pContent ) );
@@ -4089,7 +4089,7 @@ bool ScChangeTrack::SelectContent( ScChangeAction* pAct, bool bOldest )
{
pContent = pContent->GetTopContent();
ScChangeActionContent* pPrevContent;
- while ( (pPrevContent = pContent->GetPrevContent()) != NULL &&
+ while ( (pPrevContent = pContent->GetPrevContent()) != nullptr &&
pPrevContent->IsVirgin() )
pContent = pPrevContent;
}
@@ -4140,7 +4140,7 @@ bool ScChangeTrack::SelectContent( ScChangeAction* pAct, bool bOldest )
pL = pL->GetNext();
}
- bOk &= pContent->Select( pDoc, this, bOldest, NULL );
+ bOk &= pContent->Select( pDoc, this, bOldest, nullptr );
// now the matrix is inserted and new content values are ready
while ( !aRejectActions.empty() )
@@ -4156,7 +4156,7 @@ bool ScChangeTrack::SelectContent( ScChangeAction* pAct, bool bOldest )
return bOk;
}
else
- return pContent->Select( pDoc, this, bOldest, NULL );
+ return pContent->Select( pDoc, this, bOldest, nullptr );
}
void ScChangeTrack::AcceptAll()
@@ -4242,13 +4242,13 @@ bool ScChangeTrack::Reject(
else if ( itChangeAction->second->IsDeleteType() )
itChangeAction->second->Accept(); // Deleted to Nirvana
else
- bOk = Reject( itChangeAction->second, NULL, true ); // Recursion!
+ bOk = Reject( itChangeAction->second, nullptr, true ); // Recursion!
}
}
if ( bOk && (bRejected = pAct->Reject( pDoc )) )
{
// pRefDoc NULL := Do not save deleted Cells
- AppendDeleteRange( pAct->GetBigRange().MakeRange(), NULL, (short) 0,
+ AppendDeleteRange( pAct->GetBigRange().MakeRange(), nullptr, (short) 0,
pAct->GetActionNumber() );
}
}
@@ -4355,7 +4355,7 @@ bool ScChangeTrack::Reject(
for( itChangeAction = pMap->rbegin(); itChangeAction != pMap->rend() && bOk; ++itChangeAction )
{
- bOk = Reject( itChangeAction->second, NULL, true ); // Recursion!
+ bOk = Reject( itChangeAction->second, nullptr, true ); // Recursion!
}
}
if ( bOk && (bRejected = pAct->Reject( pDoc )) )
@@ -4373,7 +4373,7 @@ bool ScChangeTrack::Reject(
ScRange aRange;
ScChangeActionContent* pReject;
if ( bRecursion )
- pReject = NULL;
+ pReject = nullptr;
else
{
aRange = pAct->GetBigRange().aStart.MakeAddress();
@@ -4436,7 +4436,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
{
if ( !pDocument )
{
- return NULL;
+ return nullptr;
}
ScChangeTrack* pClonedTrack = new ScChangeTrack( pDocument );
@@ -4471,7 +4471,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
const ScChangeAction* pAction = GetFirst();
while ( pAction )
{
- ScChangeAction* pClonedAction = NULL;
+ ScChangeAction* pClonedAction = nullptr;
switch ( pAction->GetType() )
{
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 67851271f935..920927f16492 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -30,7 +30,7 @@ ScChangeViewSettings::~ScChangeViewSettings()
}
ScChangeViewSettings::ScChangeViewSettings( const ScChangeViewSettings& r ):
- pCommentSearcher(NULL),
+ pCommentSearcher(nullptr),
aFirstDateTime( DateTime::EMPTY ),
aLastDateTime( DateTime::EMPTY )
{
@@ -57,7 +57,7 @@ ScChangeViewSettings::ScChangeViewSettings( const ScChangeViewSettings& r ):
ScChangeViewSettings& ScChangeViewSettings::operator=( const ScChangeViewSettings& r )
{
- pCommentSearcher = NULL;
+ pCommentSearcher = nullptr;
SetTheComment(r.aComment);
aFirstDateTime =r.aFirstDateTime;
@@ -99,7 +99,7 @@ void ScChangeViewSettings::SetTheComment(const OUString& rString)
if(pCommentSearcher)
{
delete pCommentSearcher;
- pCommentSearcher=NULL;
+ pCommentSearcher=nullptr;
}
if(!rString.isEmpty())
@@ -123,7 +123,7 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
break;
case SvxRedlinDateMode::SAVE:
{
- const ScChangeAction* pLast = 0;
+ const ScChangeAction* pLast = nullptr;
ScChangeTrack* pTrack = rDoc.GetChangeTrack();
if ( pTrack )
{
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index b8836056a6aa..8ec9e0076f60 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -160,10 +160,10 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
{
OUString aCell( pTransliteration->transliterate(
rCell1.maStr.getString(), ScGlobal::eLnge, 0,
- rCell1.maStr.getLength(), NULL));
+ rCell1.maStr.getLength(), nullptr));
OUString aQuer( pTransliteration->transliterate(
rCell2.maStr.getString(), ScGlobal::eLnge, 0,
- rCell2.maStr.getLength(), NULL));
+ rCell2.maStr.getLength(), nullptr));
bMatch = (aCell.indexOf( aQuer ) != -1);
}
fRes = (bMatch ? 0 : 1);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 9c64cee3305c..59c259e5131f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -74,8 +74,8 @@ using namespace formula;
using namespace ::com::sun::star;
using ::std::vector;
-CharClass* ScCompiler::pCharClassEnglish = NULL;
-const ScCompiler::Convention* ScCompiler::pConventions[ ] = { NULL, NULL, NULL, NULL, NULL, NULL };
+CharClass* ScCompiler::pCharClassEnglish = nullptr;
+const ScCompiler::Convention* ScCompiler::pConventions[ ] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
enum ScanState
{
@@ -162,7 +162,7 @@ void ScCompiler::DeInit()
if (pCharClassEnglish)
{
delete pCharClassEnglish;
- pCharClassEnglish = NULL;
+ pCharClassEnglish = nullptr;
}
}
@@ -297,7 +297,7 @@ OUString ScCompiler::FindAddInFunction( const OUString& rUpperName, bool bLocalF
ScCompiler::Convention::~Convention()
{
delete [] mpCharTable;
- mpCharTable = NULL;
+ mpCharTable = nullptr;
}
ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
@@ -479,8 +479,8 @@ static bool lcl_parseExternalName(
OUString& rFile,
OUString& rName,
const sal_Unicode cSep,
- const ScDocument* pDoc = NULL,
- const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks = NULL )
+ const ScDocument* pDoc = nullptr,
+ const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks = nullptr )
{
/* TODO: future versions will have to support sheet-local names too, thus
* return a possible sheet name as well. */
@@ -1731,7 +1731,7 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos ) :
pDoc(rCxt.getDoc()),
aPos(rPos),
- mpFormatter(pDoc ? pDoc->GetFormatTable() : NULL),
+ mpFormatter(pDoc ? pDoc->GetFormatTable() : nullptr),
pCharClass(ScGlobal::pCharClass),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1749,7 +1749,7 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
:
pDoc( pDocument ),
aPos( rPos ),
- mpFormatter(pDoc ? pDoc->GetFormatTable() : NULL),
+ mpFormatter(pDoc ? pDoc->GetFormatTable() : nullptr),
nSrcPos(0),
pCharClass( ScGlobal::pCharClass ),
mnPredetectedReference(0),
@@ -1861,7 +1861,7 @@ const ScCompiler::Convention* ScCompiler::GetRefConvention( FormulaGrammar::Addr
;
}
- return NULL;
+ return nullptr;
}
void ScCompiler::SetRefConvention( const ScCompiler::Convention *pConvP )
@@ -3034,7 +3034,7 @@ bool ScCompiler::IsMacro( const OUString& rName )
}
OUString aName( rName);
- StarBASIC* pObj = 0;
+ StarBASIC* pObj = nullptr;
SfxObjectShell* pDocSh = pDoc->GetDocumentShell();
try
@@ -3081,7 +3081,7 @@ bool ScCompiler::IsNamedRange( const OUString& rUpperName )
// try local names first
bool bGlobal = false;
ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab());
- const ScRangeData* pData = NULL;
+ const ScRangeData* pData = nullptr;
if (pRangeName)
pData = pRangeName->findByUpperName(rUpperName);
if (!pData)
@@ -4369,7 +4369,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula, const OUStrin
ScRangeData* ScCompiler::GetRangeData( const FormulaToken& rToken ) const
{
- ScRangeData* pRangeData = NULL;
+ ScRangeData* pRangeData = nullptr;
bool bGlobal = rToken.IsGlobal();
if (bGlobal)
// global named range.
@@ -4469,7 +4469,7 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
ScTokenArray* pNew = xNew->Clone();
PushTokenArray( pNew, true);
- if (pNew->GetNextReference() != NULL)
+ if (pNew->GetNextReference() != nullptr)
{
SetRelNameReference();
MoveRelWrap(MAXCOL, MAXROW);
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index bb0777d56fd0..267e2f6e1c0b 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -85,13 +85,13 @@ ScConsData::ScConsData() :
bRowByName(false),
nColCount(0),
nRowCount(0),
- ppUsed(NULL),
- ppSum(NULL),
- ppCount(NULL),
- ppSumSqr(NULL),
- ppRefs(NULL),
+ ppUsed(nullptr),
+ ppSum(nullptr),
+ ppCount(nullptr),
+ ppSumSqr(nullptr),
+ ppRefs(nullptr),
nDataCount(0),
- ppTitlePos(NULL),
+ ppTitlePos(nullptr),
bCornerUsed(false)
{
}
@@ -108,7 +108,7 @@ ScConsData::~ScConsData()
for(i=0; i<nCount; i++) \
delete[] ppArray[i]; \
delete[] ppArray; \
- ppArray = NULL; \
+ ppArray = nullptr; \
}
void ScConsData::DeleteData()
@@ -123,7 +123,7 @@ void ScConsData::DeleteData()
delete[] ppRefs[i];
}
delete[] ppRefs;
- ppRefs = NULL;
+ ppRefs = nullptr;
}
DELETEARR( ppCount, nColCount );
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 5f145fa444d9..bb1ae5669c23 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -1291,7 +1291,7 @@ const ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab
// Do NOT check for the document global temporary anonymous db range here.
- return NULL;
+ return nullptr;
}
ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion)
@@ -1315,7 +1315,7 @@ ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDB
// Do NOT check for the document global temporary anonymous db range here.
- return NULL;
+ return nullptr;
}
const ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
@@ -1344,7 +1344,7 @@ const ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1
if (pNoNameData->IsDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2))
return pNoNameData;
- return NULL;
+ return nullptr;
}
ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
@@ -1373,7 +1373,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
if (pNoNameData->IsDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2))
return pNoNameData;
- return NULL;
+ return nullptr;
}
void ScDBCollection::RefreshDirtyTableColumnNames()
@@ -1446,7 +1446,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
ScDBData* ScDBCollection::GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- ScDBData* pNearData = NULL;
+ ScDBData* pNearData = nullptr;
NamedDBs::DBsType::iterator itr = maNamedDBs.begin(), itrEnd = maNamedDBs.end();
for (; itr != itrEnd; ++itr)
{
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 03591f1aeefb..783757ef79ee 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -49,7 +49,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const OUString& rA, const OUString& rT, co
aItem( rI ),
nMode( nM ),
bNeedUpdate( false ),
- pResult( NULL )
+ pResult( nullptr )
{
}
@@ -68,7 +68,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) :
aItem ( rOther.aItem ),
nMode ( rOther.nMode ),
bNeedUpdate( false ),
- pResult ( NULL )
+ pResult ( nullptr )
{
if (rOther.pResult)
pResult = rOther.pResult->Clone();
@@ -78,7 +78,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r
::sfx2::SvBaseLink(SfxLinkUpdateMode::ALWAYS,SotClipboardFormatId::STRING),
pDoc( pD ),
bNeedUpdate( false ),
- pResult( NULL )
+ pResult( nullptr )
{
rHdr.StartEntry();
@@ -109,7 +109,7 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const
rStream.WriteUniOrByteString( aTopic, eCharSet );
rStream.WriteUniOrByteString( aItem, eCharSet );
- bool bHasValue = ( pResult != 0 );
+ bool bHasValue = ( pResult != nullptr );
rStream.WriteBool( bHasValue );
if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // nicht bei 4.0 Export
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index f8ed50842a21..3aceb5ffbfee 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -240,7 +240,7 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
{
SfxWhichIter aWhichIter( rItemSet );
- const SfxPoolItem* pPoolItem = 0;
+ const SfxPoolItem* pPoolItem = nullptr;
for( sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
{
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 656be6e90b8f..d153640f2d4c 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -206,7 +206,7 @@ ScDocCfg::ScDocCfg() :
Sequence<OUString> aNames;
Sequence<Any> aValues;
- const Any* pValues = NULL;
+ const Any* pValues = nullptr;
sal_uInt16 nDateDay, nDateMonth, nDateYear;
GetDate( nDateDay, nDateMonth, nDateYear );
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index fa7a12e768b6..f60e8da195a2 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -192,7 +192,7 @@ bool lcl_createExcelQuery(
if (nIndex < nNewEntries)
{
pParam->GetEntry(nIndex).nField = aFields[nCol];
- pParam->FillInExcelSyntax(rPool, aCellStr, nIndex, NULL);
+ pParam->FillInExcelSyntax(rPool, aCellStr, nIndex, nullptr);
nIndex++;
if (nIndex < nNewEntries)
pParam->GetEntry(nIndex).eConnect = SC_AND;
@@ -373,7 +373,7 @@ std::unique_ptr<ScDBQueryParamBase> ScDBInternalRange::createQueryParam(const Sc
// Now construct the query entries from the query range.
if (!pQueryRef->fillQueryEntries(pParam.get(), this))
- return NULL;
+ return nullptr;
return std::unique_ptr<ScDBQueryParamBase>(std::move(pParam));
}
@@ -437,7 +437,7 @@ SCCOL ScDBExternalRange::findFieldColumn(SCCOL nIndex) const
SCCOL ScDBExternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) const
{
if (pErr)
- pErr = 0;
+ pErr = nullptr;
OUString aUpper = rStr;
lcl_uppercase(aUpper);
@@ -459,7 +459,7 @@ std::unique_ptr<ScDBQueryParamBase> ScDBExternalRange::createQueryParam(const Sc
// Now construct the query entries from the query range.
if (!pQueryRef->fillQueryEntries(pParam.get(), this))
- return NULL;
+ return nullptr;
return std::unique_ptr<ScDBQueryParamBase>(std::move(pParam));
}
diff --git a/sc/source/core/tool/editdataarray.cxx b/sc/source/core/tool/editdataarray.cxx
index 63b9b1d53ff9..fc3f9bbcf85f 100644
--- a/sc/source/core/tool/editdataarray.cxx
+++ b/sc/source/core/tool/editdataarray.cxx
@@ -37,14 +37,14 @@ const ScEditDataArray::Item* ScEditDataArray::First()
{
maIter = maArray.begin();
if (maIter == maArray.end())
- return NULL;
+ return nullptr;
return &(*maIter++);
}
const ScEditDataArray::Item* ScEditDataArray::Next()
{
if (maIter == maArray.end())
- return NULL;
+ return nullptr;
return &(*maIter++);
}
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 0576020c6c18..e370e4a2843d 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -167,7 +167,7 @@ void ScEditUtil::RemoveCharAttribs( EditTextObject& rEditText, const ScPatternAt
EditTextObject* ScEditUtil::Clone( const EditTextObject& rObj, ScDocument& rDestDoc )
{
- EditTextObject* pNew = NULL;
+ EditTextObject* pNew = nullptr;
EditEngine& rEngine = rDestDoc.GetEditEngine();
if (rObj.HasOnlineSpellErrors())
@@ -371,7 +371,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
pEngine( pEng ),
- pEditAttrs( NULL ),
+ pEditAttrs( nullptr ),
bNeedsObject( false ),
bNeedsCellAttr( false )
{
@@ -381,7 +381,7 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
}
else
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
pEditAttrs = new SfxItemSet( pEngine->GetAttribs(
ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs_OnlyHard ) );
const SfxItemSet& rEditDefaults = pEngine->GetDefaults();
@@ -435,7 +435,7 @@ ScEnginePoolHelper::ScEnginePoolHelper( SfxItemPool* pEnginePoolP,
bool bDeleteEnginePoolP )
:
pEnginePool( pEnginePoolP ),
- pDefaults( NULL ),
+ pDefaults( nullptr ),
bDeleteEnginePool( bDeleteEnginePoolP ),
bDeleteDefaults( false )
{
@@ -444,7 +444,7 @@ ScEnginePoolHelper::ScEnginePoolHelper( SfxItemPool* pEnginePoolP,
ScEnginePoolHelper::ScEnginePoolHelper( const ScEnginePoolHelper& rOrg )
:
pEnginePool( rOrg.bDeleteEnginePool ? rOrg.pEnginePool->Clone() : rOrg.pEnginePool ),
- pDefaults( NULL ),
+ pDefaults( nullptr ),
bDeleteEnginePool( rOrg.bDeleteEnginePool ),
bDeleteDefaults( false )
{
@@ -623,7 +623,7 @@ void ScEditEngineDefaulter::RepeatDefaults()
void ScEditEngineDefaulter::RemoveParaAttribs()
{
- SfxItemSet* pCharItems = NULL;
+ SfxItemSet* pCharItems = nullptr;
bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
SetUpdateMode( false );
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 8506fb7c033a..a436c895fd5d 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -74,12 +74,12 @@ FormulaGroupContext::ColArray* FormulaGroupContext::getCachedColArray( SCTAB nTa
ColArraysType::iterator itColArray = maColArrays.find(ColKey(nTab, nCol));
if (itColArray == maColArrays.end())
// Not cached for this column.
- return NULL;
+ return nullptr;
ColArray& rCached = itColArray->second;
if (nSize > rCached.mnSize)
// Cached data array is not long enough for the requested range.
- return NULL;
+ return nullptr;
return &rCached;
}
@@ -96,7 +96,7 @@ FormulaGroupContext::ColArray* FormulaGroupContext::setCachedColArray(
if (!r.second)
// Somehow the insertion failed.
- return NULL;
+ return nullptr;
return &r.first->second;
}
@@ -148,7 +148,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, size_t nLen )
{
const double* pNum = pNums;
const double* pNumEnd = pNum + nLen;
- const double* pNumHead = NULL;
+ const double* pNumHead = nullptr;
for (; pNum != pNumEnd; ++pNum)
{
if (!rtl::math::isNan(*pNum))
@@ -164,7 +164,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, size_t nLen )
{
// Flush this non-NaN segment to the matrix.
rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- pNumHead = NULL;
+ pNumHead = nullptr;
}
}
@@ -191,7 +191,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, rtl_uString** pStrs, size_t nLen )
{
rtl_uString** p = pStrs;
rtl_uString** pEnd = p + nLen;
- rtl_uString** pHead = NULL;
+ rtl_uString** pHead = nullptr;
for (; p != pEnd; ++p)
{
if (*p)
@@ -207,7 +207,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, rtl_uString** pStrs, size_t nLen )
{
// Flush this non-empty segment to the matrix.
flushStrSegment(rMat, nCol, pHead, p, pStrs);
- pHead = NULL;
+ pHead = nullptr;
}
}
@@ -227,10 +227,10 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString**
}
const double* pNum = pNums;
- const double* pNumHead = NULL;
+ const double* pNumHead = nullptr;
rtl_uString** pStr = pStrs;
rtl_uString** pStrEnd = pStr + nLen;
- rtl_uString** pStrHead = NULL;
+ rtl_uString** pStrHead = nullptr;
for (; pStr != pStrEnd; ++pStr, ++pNum)
{
@@ -242,7 +242,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString**
{
// Flush this numeric segment to the matrix.
rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- pNumHead = NULL;
+ pNumHead = nullptr;
}
if (!pStrHead)
@@ -258,7 +258,7 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString**
{
// Flush this non-empty string segment to the matrix.
flushStrSegment(rMat, nCol, pStrHead, pStr, pStrs);
- pStrHead = NULL;
+ pStrHead = nullptr;
}
if (!rtl::math::isNan(*pNum))
@@ -340,7 +340,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
const formula::SingleVectorRefToken* p2 = static_cast<const formula::SingleVectorRefToken*>(p);
const formula::VectorRefArray& rArray = p2->GetArray();
- rtl_uString* pStr = NULL;
+ rtl_uString* pStr = nullptr;
double fVal = fNan;
if (static_cast<size_t>(i) < p2->GetArrayLength())
{
@@ -457,7 +457,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
return true;
}
-FormulaGroupInterpreter *FormulaGroupInterpreter::msInstance = NULL;
+FormulaGroupInterpreter *FormulaGroupInterpreter::msInstance = nullptr;
void FormulaGroupInterpreter::MergeCalcConfig(const ScDocument& rDoc)
{
@@ -475,7 +475,7 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
if (ScCalcConfig::isOpenCLEnabled())
switchOpenCLDevice(rConfig.maOpenCLDevice, rConfig.mbOpenCLAutoSelect);
#endif
- static bool bAllowSoftwareInterpreter = (getenv("SC_ALLOW_BROKEN_SOFTWARE_INTERPRETER") != NULL);
+ static bool bAllowSoftwareInterpreter = (getenv("SC_ALLOW_BROKEN_SOFTWARE_INTERPRETER") != nullptr);
if ( !msInstance && bAllowSoftwareInterpreter ) // software fallback
{
@@ -499,7 +499,7 @@ void FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rP
bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool bAutoSelect, bool bForceEvaluation)
{
bool bOpenCLEnabled = ScCalcConfig::isOpenCLEnabled();
- static bool bAllowSoftwareInterpreter = (getenv("SC_ALLOW_BROKEN_SOFTWARE_INTERPRETER") != NULL);
+ static bool bAllowSoftwareInterpreter = (getenv("SC_ALLOW_BROKEN_SOFTWARE_INTERPRETER") != nullptr);
if (!bOpenCLEnabled || (bAllowSoftwareInterpreter && rDeviceId == OPENCL_SOFTWARE_DEVICE_CONFIG_NAME))
{
if(msInstance)
@@ -519,12 +519,12 @@ bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool
return false;
delete msInstance;
- msInstance = NULL;
+ msInstance = nullptr;
if (ScCalcConfig::isOpenCLEnabled())
{
msInstance = new sc::opencl::FormulaGroupInterpreterOpenCL();
- return msInstance != NULL;
+ return msInstance != nullptr;
}
return false;
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 61b56f5385cd..3d757e1ad601 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -20,7 +20,7 @@ FormulaResultValue::FormulaResultValue( sal_uInt16 nErr ) : meType(Error), mfVal
}
ScFormulaResult::ScFormulaResult() :
- mpToken(NULL), mnError(0), mbToken(true),
+ mpToken(nullptr), mnError(0), mbToken(true),
mbEmpty(false), mbEmptyDisplayedAsString(false),
meMultiline(MULTILINE_UNKNOWN) {}
@@ -162,7 +162,7 @@ void ScFormulaResult::SetToken( const formula::FormulaToken* p )
{
const ScMatrixCellResultToken* pMatResult =
(p && p->GetType() == formula::svMatrixCell ?
- dynamic_cast<const ScMatrixCellResultToken*>(p) : NULL);
+ dynamic_cast<const ScMatrixCellResultToken*>(p) : nullptr);
if (pMatResult)
{
const ScMatrixFormulaCellToken* pNewMatFormula =
@@ -408,7 +408,7 @@ formula::FormulaConstTokenRef ScFormulaResult::GetToken() const
{
if (mbToken)
return mpToken;
- return NULL;
+ return nullptr;
}
formula::FormulaConstTokenRef ScFormulaResult::GetCellResultToken() const
@@ -479,7 +479,7 @@ ScConstMatrixRef ScFormulaResult::GetMatrix() const
{
if (GetType() == formula::svMatrixCell)
return mpToken->GetMatrix();
- return NULL;
+ return nullptr;
}
const OUString& ScFormulaResult::GetHybridFormula() const
@@ -556,7 +556,7 @@ void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRe
const ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellToken() const
{
return (GetType() == formula::svMatrixCell ?
- dynamic_cast<const ScMatrixFormulaCellToken*>(mpToken) : NULL);
+ dynamic_cast<const ScMatrixFormulaCellToken*>(mpToken) : nullptr);
}
ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellTokenNonConst()
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index d0a89a8a0f54..a41578717acb 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -74,7 +74,7 @@ public:
FormulaGroupAreaListener::FormulaGroupAreaListener( const ScRange& rRange, const ScDocument& rDocument,
const ScAddress& rTopCellPos, SCROW nGroupLen, bool bStartFixed, bool bEndFixed ) :
maRange(rRange),
- mpColumn(NULL),
+ mpColumn(nullptr),
mnTopCellRow(rTopCellPos.Row()),
mnGroupLen(nGroupLen),
mbStartFixed(bStartFixed),
@@ -330,7 +330,7 @@ const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
size_t nBlockSize = 0;
const ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( mnTopCellRow, nBlockSize);
SAL_WARN_IF(!pp, "sc", "GetFormulaCellBlockAddress not found");
- return pp ? *pp : NULL;
+ return pp ? *pp : nullptr;
}
void FormulaGroupAreaListener::notifyCellChange( const SfxHint& rHint, const ScAddress& rPos )
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 1045196e7537..5517f48bb7a0 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -76,8 +76,8 @@ static const sal_uInt64 n2power48 = SAL_CONST_UINT64( 281474976710656); // 2^48
IMPL_FIXEDMEMPOOL_NEWDEL( ScTokenStack )
IMPL_FIXEDMEMPOOL_NEWDEL( ScInterpreter )
-ScCalcConfig *ScInterpreter::mpGlobalConfig = NULL;
-ScTokenStack* ScInterpreter::pGlobalStack = NULL;
+ScCalcConfig *ScInterpreter::mpGlobalConfig = nullptr;
+ScTokenStack* ScInterpreter::pGlobalStack = nullptr;
bool ScInterpreter::bGlobalStackInUse = false;
using namespace formula;
@@ -100,7 +100,7 @@ void ScInterpreter::ScIfJump()
FormulaTokenRef xNew;
ScTokenMatrixMap::const_iterator aMapIter;
// DoubleError handled by JumpMatrix
- pMat->SetErrorInterpreter( NULL);
+ pMat->SetErrorInterpreter( nullptr);
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows );
if ( nCols == 0 || nRows == 0 )
@@ -423,7 +423,7 @@ void ScInterpreter::ScChooseJump()
FormulaTokenRef xNew;
ScTokenMatrixMap::const_iterator aMapIter;
// DoubleError handled by JumpMatrix
- pMat->SetErrorInterpreter( NULL);
+ pMat->SetErrorInterpreter( nullptr);
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows );
if ( nCols == 0 || nRows == 0 )
@@ -783,7 +783,7 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
if ( !bCont )
{ // we're done with it, throw away jump matrix, keep result
ScMatrix* pResMat = pJumpMatrix->GetResultMatrix();
- pJumpMatrix = NULL;
+ pJumpMatrix = nullptr;
Pop();
PushMatrix( pResMat );
// Remove jump matrix from map and remember result matrix in case it
@@ -941,7 +941,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO
if (!aMat[i].mpMat)
SetError( errIllegalParameter);
else
- aMat[i].mpMat->SetErrorInterpreter(NULL);
+ aMat[i].mpMat->SetErrorInterpreter(nullptr);
// errors are transported as DoubleError inside matrix
break;
default:
@@ -2180,11 +2180,11 @@ void ScInterpreter::ScCell()
OUStringBuffer aFuncResult;
OUString aCellStr =
ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
- (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
+ (SCA_COL_ABSOLUTE|SCA_VALID_COL), nullptr, pDok->GetAddressConvention() );
aFuncResult.append(aCellStr);
aFuncResult.append(':');
aCellStr = aCellPos.Format((SCA_COL_ABSOLUTE|SCA_VALID_COL|SCA_ROW_ABSOLUTE|SCA_VALID_ROW),
- NULL, pDok->GetAddressConvention());
+ nullptr, pDok->GetAddressConvention());
aFuncResult.append(aCellStr);
PushString( aFuncResult.makeStringAndClear() );
}
@@ -3251,7 +3251,7 @@ static OUString lcl_convertIntoHalfWidth( const OUString & rStr )
bFirstASCCall = false;
}
- return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), nullptr );
}
static OUString lcl_convertIntoFullWidth( const OUString & rStr )
@@ -3265,7 +3265,7 @@ static OUString lcl_convertIntoFullWidth( const OUString & rStr )
bFirstJISCall = false;
}
- return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), nullptr );
}
/* ODFF:
@@ -4236,7 +4236,7 @@ void ScInterpreter::ScMatch()
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
- ScMatrixRef pMatSrc = NULL;
+ ScMatrixRef pMatSrc = nullptr;
switch (GetStackType())
{
@@ -5652,7 +5652,7 @@ void ScInterpreter::ScLookup()
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return ;
- ScMatrixRef pDataMat = NULL, pResMat = NULL;
+ ScMatrixRef pDataMat = nullptr, pResMat = nullptr;
SCCOL nCol1 = 0, nCol2 = 0, nResCol1 = 0, nResCol2 = 0;
SCROW nRow1 = 0, nRow2 = 0, nResRow1 = 0, nResRow2 = 0;
SCTAB nTab1 = 0, nResTab = 0;
@@ -5861,7 +5861,7 @@ void ScInterpreter::ScLookup()
aResAdr.Set( nResCol1, nResRow1, nResTab);
// fallthru
case svSingleRef:
- PushCellResultToken( true, aResAdr, NULL, NULL);
+ PushCellResultToken( true, aResAdr, nullptr, nullptr);
break;
default:
OSL_FAIL( "ScInterpreter::ScLookup: unhandled eResArrayType, single value data");
@@ -5878,7 +5878,7 @@ void ScInterpreter::ScLookup()
PushString( aDataStr );
break;
case svSingleRef:
- PushCellResultToken( true, aDataAdr, NULL, NULL);
+ PushCellResultToken( true, aDataAdr, nullptr, nullptr);
break;
default:
OSL_FAIL( "ScInterpreter::ScLookup: unhandled eDataArrayType, single value data");
@@ -6040,7 +6040,7 @@ void ScInterpreter::ScLookup()
aAdr.SetCol(nTempCol);
aAdr.SetRow(nResRow1);
}
- PushCellResultToken(true, aAdr, NULL, NULL);
+ PushCellResultToken(true, aAdr, nullptr, nullptr);
}
else
{
@@ -6136,7 +6136,7 @@ void ScInterpreter::ScLookup()
aAdr.SetCol(nTempCol);
aAdr.SetRow(nResRow1);
}
- PushCellResultToken( true, aAdr, NULL, NULL);
+ PushCellResultToken( true, aAdr, nullptr, nullptr);
}
break;
case svDouble:
@@ -6156,7 +6156,7 @@ void ScInterpreter::ScLookup()
PushString( aResStr );
break;
case svSingleRef:
- PushCellResultToken( true, aResAdr, NULL, NULL);
+ PushCellResultToken( true, aResAdr, nullptr, nullptr);
break;
default:
; // nothing
@@ -6197,7 +6197,7 @@ void ScInterpreter::ScLookup()
aAdr.SetCol(nTempCol);
aAdr.SetRow(nRow2);
}
- PushCellResultToken(true, aAdr, NULL, NULL);
+ PushCellResultToken(true, aAdr, nullptr, nullptr);
}
}
@@ -6220,7 +6220,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
// Index of column to search.
double fIndex = ::rtl::math::approxFloor( GetDouble() ) - 1.0;
- ScMatrixRef pMat = NULL;
+ ScMatrixRef pMat = nullptr;
SCSIZE nC = 0, nR = 0;
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
@@ -6451,7 +6451,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
if ( bFound )
{
ScAddress aAdr( nCol, nRow, nTab1 );
- PushCellResultToken( true, aAdr, NULL, NULL);
+ PushCellResultToken( true, aAdr, nullptr, nullptr);
}
else
PushNA();
@@ -6662,7 +6662,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
// First, get the query criteria range.
::std::unique_ptr<ScDBRangeBase> pQueryRef( PopDBDoubleRef() );
if (!pQueryRef.get())
- return NULL;
+ return nullptr;
bool bByVal = true;
double nVal = 0.0;
@@ -6719,12 +6719,12 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
}
if (nGlobalError)
- return NULL;
+ return nullptr;
unique_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
if (nGlobalError || !pDBRef.get())
- return NULL;
+ return nullptr;
if ( bRangeFake )
{
@@ -6736,7 +6736,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
}
if (nGlobalError)
- return NULL;
+ return nullptr;
SCCOL nField = pDBRef->getFirstFieldColumn();
if (rMissingField)
@@ -6751,7 +6751,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
}
if (!ValidCol(nField))
- return NULL;
+ return nullptr;
unique_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
@@ -6784,7 +6784,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
return pParam;
}
}
- return NULL;
+ return nullptr;
}
void ScInterpreter::DBIterator( ScIterFunc eFunc )
@@ -7725,7 +7725,7 @@ void ScInterpreter::ScCurrency()
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
if ( fDec < 0.0 )
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
@@ -7814,7 +7814,7 @@ void ScInterpreter::ScFixed()
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
if (fDec < 0.0)
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
@@ -8210,7 +8210,7 @@ void ScInterpreter::ScText()
else
{
OUString aResult;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
LanguageType eCellLang;
const ScPatternAttr* pPattern = pDok->GetPattern(
aPos.Col(), aPos.Row(), aPos.Tab() );
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 4d64021b9f0a..b7c503bd291b 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -314,7 +314,7 @@ sal_uInt16 ScInterpreter::GetWeekendAndHolidayMasks(
if ( nParamCount >= 3 )
{
- GetSortArray( 1, rSortArray, NULL, false, true );
+ GetSortArray( 1, rSortArray, nullptr, false, true );
size_t nMax = rSortArray.size();
for ( size_t i = 0; i < nMax; i++ )
rSortArray.at( i ) = ::rtl::math::approxFloor( rSortArray.at( i ) ) + nNullDate;
@@ -331,7 +331,7 @@ sal_uInt16 ScInterpreter::GetWeekendAndHolidayMasks_MS(
OUString aWeekendDays;
if ( nParamCount == 4 )
{
- GetSortArray( 1, rSortArray, NULL, true, true );
+ GetSortArray( 1, rSortArray, nullptr, true, true );
size_t nMax = rSortArray.size();
for ( size_t i = 0; i < nMax; i++ )
rSortArray.at( i ) = ::rtl::math::approxFloor( rSortArray.at( i ) ) + nNullDate;
@@ -2392,7 +2392,7 @@ static ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr,
}
}
- return NULL;
+ return nullptr;
}
void ScInterpreter::ScDde()
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 411a75233af2..e0ecf96568d2 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3451,7 +3451,7 @@ void ScInterpreter::ScModalValue()
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aSortArray;
- GetSortArray( nParamCount, aSortArray, NULL, false, false );
+ GetSortArray( nParamCount, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if (aSortArray.empty() || nSize == 0 || nGlobalError)
PushNoValue();
@@ -3537,7 +3537,7 @@ void ScInterpreter::ScPercentrank( bool bInclusive )
double fSignificance = ( nParamCount == 3 ? ::rtl::math::approxFloor( GetDouble() ) : 3.0 );
double fNum = GetDouble();
vector<double> aSortArray;
- GetSortArray( 1, aSortArray, NULL, false, false );
+ GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if ( aSortArray.empty() || nSize == 0 || nGlobalError )
PushNoValue();
@@ -3630,7 +3630,7 @@ void ScInterpreter::ScTrimMean()
return;
}
vector<double> aSortArray;
- GetSortArray( 1, aSortArray, NULL, false, false );
+ GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if (aSortArray.empty() || nSize == 0 || nGlobalError)
PushNoValue();
@@ -3874,7 +3874,7 @@ void ScInterpreter::ScRank( bool bAverage )
bAscending = false;
vector<double> aSortArray;
- GetSortArray( 1, aSortArray, NULL, false, false );
+ GetSortArray( 1, aSortArray, nullptr, false, false );
double fVal = GetDouble();
SCSIZE nSize = aSortArray.size();
if ( aSortArray.empty() || nSize == 0 || nGlobalError )
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index f4c29583be7d..0a8a74579e25 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -790,7 +790,7 @@ FormulaTokenRef ScInterpreter::PopToken()
}
else
SetError(errUnknownStackVariable);
- return NULL;
+ return nullptr;
}
double ScInterpreter::PopDouble()
@@ -1006,7 +1006,7 @@ ScDBRangeBase* ScInterpreter::PopDBDoubleRef()
SetError( errIllegalParameter);
}
- return NULL;
+ return nullptr;
}
void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
@@ -1181,7 +1181,7 @@ void ScInterpreter::PopExternalSingleRef(
ScAddress aAddr = rRef.toAbs(aPos);
ScExternalRefCache::CellFormat aFmt;
ScExternalRefCache::TokenRef xNew = pRefMgr->getSingleRefToken(
- rFileId, rTabName, aAddr, &aPos, NULL, &aFmt);
+ rFileId, rTabName, aAddr, &aPos, nullptr, &aFmt);
if (!xNew)
{
@@ -1535,7 +1535,7 @@ ScMatrixRef ScInterpreter::PopMatrix()
}
else
SetError( errUnknownStackVariable);
- return NULL;
+ return nullptr;
}
sc::RangeMatrix ScInterpreter::PopRangeMatrix()
@@ -1625,7 +1625,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
rRetTypeExpr = css::util::NumberFormat::NUMBER;
}
rRetIndexExpr = 0;
- xMat->SetErrorInterpreter( NULL);
+ xMat->SetErrorInterpreter( nullptr);
}
else
SetError( errUnknownStackVariable);
@@ -1739,14 +1739,14 @@ void ScInterpreter::PushMatrix( const sc::RangeMatrix& rMat )
return;
}
- rMat.mpMat->SetErrorInterpreter(NULL);
+ rMat.mpMat->SetErrorInterpreter(nullptr);
nGlobalError = 0;
PushTempTokenWithoutError(new ScMatrixRangeToken(rMat));
}
void ScInterpreter::PushMatrix(const ScMatrixRef& pMat)
{
- pMat->SetErrorInterpreter( NULL);
+ pMat->SetErrorInterpreter( nullptr);
// No if (!IfErrorPushError()) because ScMatrix stores errors itself,
// but with notifying ScInterpreter via nGlobalError, substituting it would
// mean to inherit the error on all array elements in all following
@@ -2254,10 +2254,10 @@ void ScInterpreter::ScExternal()
for (i = 0; i < MAXFUNCPARAM; i++)
{
eParamType[i] = pLegacyFuncData->GetParamType(i);
- ppParam[i] = NULL;
+ ppParam[i] = nullptr;
nVal[i] = 0.0;
- pStr[i] = NULL;
- pCellArr[i] = NULL;
+ pStr[i] = nullptr;
+ pCellArr[i] = nullptr;
}
for (i = nParamCount; (i > 0) && (nGlobalError == 0); i--)
@@ -2898,10 +2898,10 @@ void ScInterpreter::ScMacro()
}
catch (...)
{
- pRoot = NULL;
+ pRoot = nullptr;
}
- SbxVariable* pVar = pRoot ? pRoot->Find(aMacro, SbxCLASS_METHOD) : NULL;
+ SbxVariable* pVar = pRoot ? pRoot->Find(aMacro, SbxCLASS_METHOD) : nullptr;
if( !pVar || pVar->GetType() == SbxVOID || dynamic_cast<const SbMethod*>( pVar) == nullptr )
{
PushError( errNoMacro );
@@ -3446,11 +3446,11 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
, rArr(r)
, pDok(pDoc)
, mrStrPool(pDoc->GetSharedStringPool())
- , pJumpMatrix(NULL)
- , pTokenMatrixMap(NULL)
+ , pJumpMatrix(nullptr)
+ , pTokenMatrixMap(nullptr)
, pMyFormulaCell(pCell)
, pFormatter(pDoc->GetFormatTable())
- , pCur(NULL)
+ , pCur(nullptr)
, nGlobalError(0)
, sp(0)
, maxsp(0)
@@ -3564,8 +3564,8 @@ StackVar ScInterpreter::Interpret()
nRetFmtType = css::util::NumberFormat::UNDEFINED;
nFuncFmtType = css::util::NumberFormat::UNDEFINED;
nFuncFmtIndex = nCurFmtIndex = nRetFmtIndex = 0;
- xResult = NULL;
- pJumpMatrix = NULL;
+ xResult = nullptr;
+ pJumpMatrix = nullptr;
mnSubTotalFlags = 0x00;
ScTokenMatrixMap::const_iterator aTokenMatrixMapIter;
@@ -3577,7 +3577,7 @@ StackVar ScInterpreter::Interpret()
SAL_MATH_FPEXCEPTIONS_OFF();
aCode.Reset();
- while( ( pCur = aCode.Next() ) != NULL
+ while( ( pCur = aCode.Next() ) != nullptr
&& (!nGlobalError || nErrorFunction <= nErrorFunctionCount) )
{
OpCode eOp = pCur->GetOpCode();
@@ -4090,7 +4090,7 @@ StackVar ScInterpreter::Interpret()
if ( nLevel == 1 || (nLevel == 2 && aCode.IsEndOfPath()) )
bGotResult = JumpMatrix( nLevel );
else
- pJumpMatrix = NULL;
+ pJumpMatrix = nullptr;
} while ( bGotResult );
// Functions that evaluate an error code and directly set nGlobalError to 0,
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index e7107e809f08..eb9852e6261f 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -345,7 +345,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken
{
// Not a 2D matrix.
SetError(errIllegalParameter);
- return NULL;
+ return nullptr;
}
SCSIZE nMatCols = static_cast<SCSIZE>(nCol2 - nCol1 + 1);
@@ -354,7 +354,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken
if (nMatRows * nMatCols > ScMatrix::GetElementsMax())
{
SetError(errStackOverflow);
- return NULL;
+ return nullptr;
}
ScTokenMatrixMap::const_iterator aIter;
@@ -366,7 +366,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken
ScMatrixRef pMat = GetNewMat( nMatCols, nMatRows, true);
if (!pMat || nGlobalError)
- return NULL;
+ return nullptr;
pDok->FillMatrix(*pMat, nTab1, nCol1, nRow1, nCol2, nRow2);
@@ -379,7 +379,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken
ScMatrixRef ScInterpreter::GetMatrix()
{
- ScMatrixRef pMat = NULL;
+ ScMatrixRef pMat = nullptr;
switch (GetRawStackType())
{
case svSingleRef :
@@ -408,7 +408,7 @@ ScMatrixRef ScInterpreter::GetMatrix()
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
SCTAB nTab1, nTab2;
- const formula::FormulaToken* p = sp ? pStack[sp-1] : NULL;
+ const formula::FormulaToken* p = sp ? pStack[sp-1] : nullptr;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
pMat = CreateMatrixFromDoubleRef( p, nCol1, nRow1, nTab1,
nCol2, nRow2, nTab2);
@@ -834,7 +834,7 @@ void ScInterpreter::ScModalValue_Multi()
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aSortArray;
- GetSortArray( nParamCount, aSortArray, NULL, false, false );
+ GetSortArray( nParamCount, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if ( aSortArray.empty() || nSize == 0 || nGlobalError )
PushNoValue();
@@ -912,7 +912,7 @@ void ScInterpreter::ScMatInv()
if (ScCalcConfig::isOpenCLEnabled())
{
sc::FormulaGroupInterpreter *pInterpreter = sc::FormulaGroupInterpreter::getStatic();
- if (pInterpreter != NULL)
+ if (pInterpreter != nullptr)
{
ScMatrixRef xResMat = pInterpreter->inverseMatrix(*pMat);
if (xResMat)
@@ -1224,8 +1224,8 @@ namespace {
void ScInterpreter::CalculateAddSub(bool _bSub)
{
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmt1, nFmt2;
nFmt1 = nFmt2 = css::util::NumberFormat::UNDEFINED;
@@ -1344,8 +1344,8 @@ void ScInterpreter::CalculateAddSub(bool _bSub)
void ScInterpreter::ScAmpersand()
{
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
OUString sStr1, sStr2;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1442,8 +1442,8 @@ void ScInterpreter::ScSub()
void ScInterpreter::ScMul()
{
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
@@ -1514,8 +1514,8 @@ void ScInterpreter::ScMul()
void ScInterpreter::ScDiv()
{
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
@@ -1595,8 +1595,8 @@ void ScInterpreter::ScPower()
void ScInterpreter::ScPow()
{
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
double fVal1 = 0.0, fVal2 = 0.0;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1741,8 +1741,8 @@ void ScInterpreter::CalculateSumX2MY2SumX2DY2(bool _bSumX2DY2)
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
SCSIZE i, j;
pMat2 = GetMatrix();
pMat1 = GetMatrix();
@@ -1786,8 +1786,8 @@ void ScInterpreter::ScSumXMY2()
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
- ScMatrixRef pMat1 = NULL;
- ScMatrixRef pMat2 = NULL;
+ ScMatrixRef pMat1 = nullptr;
+ ScMatrixRef pMat2 = nullptr;
pMat2 = GetMatrix();
pMat1 = GetMatrix();
if (!pMat2 || !pMat1)
@@ -1834,7 +1834,7 @@ void ScInterpreter::ScFrequency()
}
vector<double> aDataArray;
- GetSortArray( 1, aDataArray, NULL, false, false );
+ GetSortArray( 1, aDataArray, nullptr, false, false );
SCSIZE nDataSize = aDataArray.size();
if (aDataArray.empty() || nGlobalError)
@@ -2375,7 +2375,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
if (IsMissing())
{ //In ODF1.2 empty second parameter (which is two ;; ) is allowed
Pop();
- pMatX = NULL;
+ pMatX = nullptr;
}
else
{
@@ -2383,7 +2383,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
}
}
else
- pMatX = NULL;
+ pMatX = nullptr;
ScMatrixRef pMatY;
pMatY = GetMatrix();
@@ -2885,13 +2885,13 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
if (IsMissing())
{
Pop();
- pMatNewX = NULL;
+ pMatNewX = nullptr;
}
else
pMatNewX = GetMatrix();
}
else
- pMatNewX = NULL;
+ pMatNewX = nullptr;
//In ODF1.2 empty second parameter (which is two ;; ) is allowed
//Defaults will be set in CheckMatrix
@@ -2901,7 +2901,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
if (IsMissing())
{
Pop();
- pMatX = NULL;
+ pMatX = nullptr;
}
else
{
@@ -2909,7 +2909,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
}
}
else
- pMatX = NULL;
+ pMatX = nullptr;
ScMatrixRef pMatY;
pMatY = GetMatrix();
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index cd8346ebe9ca..a4a75f2d6e7d 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -332,7 +332,7 @@ class FuncCount : public sc::ColumnSpanSet::ColumnAction
sal_uInt32 mnNumFmt;
public:
- FuncCount() : mpCol(0), mnCount(0), mnNumFmt(0) {}
+ FuncCount() : mpCol(nullptr), mnCount(0), mnNumFmt(0) {}
virtual void startColumn(ScColumn* pCol) override
{
@@ -364,7 +364,7 @@ class FuncSum : public sc::ColumnSpanSet::ColumnAction
sal_uInt32 mnNumFmt;
public:
- FuncSum() : mpCol(0), mfSum(0.0), mnError(0), mnNumFmt(0) {}
+ FuncSum() : mpCol(nullptr), mfSum(0.0), mnError(0), mnNumFmt(0) {}
virtual void startColumn(ScColumn* pCol) override
{
diff --git a/sc/source/core/tool/jumpmatrix.cxx b/sc/source/core/tool/jumpmatrix.cxx
index dc90c8686c36..ea27b972afdf 100644
--- a/sc/source/core/tool/jumpmatrix.cxx
+++ b/sc/source/core/tool/jumpmatrix.cxx
@@ -30,7 +30,7 @@ const SCSIZE kBufferThreshhold = 128;
ScJumpMatrix::ScJumpMatrix(SCSIZE nColsP, SCSIZE nRowsP)
: pJump(new ScJumpMatrixEntry[nColsP * nRowsP])
, pMat(new ScMatrix(nColsP, nRowsP))
- , pParams(NULL)
+ , pParams(nullptr)
, nCols(nColsP)
, nRows(nRowsP)
, nCurCol(0)
@@ -174,7 +174,7 @@ void ScJumpMatrix::SetNewResMat(SCSIZE nNewCols, SCSIZE nNewRows)
bool ScJumpMatrix::HasResultMatrix() const
{
// We now always have a matrix but caller logic may still want to check it.
- return pMat.get() != NULL;
+ return pMat.get() != nullptr;
}
void ScJumpMatrix::FlushBufferOtherThan( ScJumpMatrix::BufferType eType, SCSIZE nC, SCSIZE nR )
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 2f7dc0a7e884..b676bdff28cd 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -225,7 +225,7 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{ ocNone, {{ Bounds }, 0 } }
};
-ScParameterClassification::RunData * ScParameterClassification::pData = NULL;
+ScParameterClassification::RunData * ScParameterClassification::pData = nullptr;
void ScParameterClassification::Init()
{
@@ -306,7 +306,7 @@ void ScParameterClassification::Init()
void ScParameterClassification::Exit()
{
delete [] pData;
- pData = NULL;
+ pData = nullptr;
}
ScParameterClassification::Type ScParameterClassification::GetParameterType(
diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index 9b2ccfdc1ddf..478f37eae76e 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -28,8 +28,8 @@
// Daten pro Tabelle
ScPrintSaverTab::ScPrintSaverTab() :
- mpRepeatCol(NULL),
- mpRepeatRow(NULL),
+ mpRepeatCol(nullptr),
+ mpRepeatRow(nullptr),
mbEntireSheet(false)
{
}
@@ -49,9 +49,9 @@ void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, bool bEntireSheet )
void ScPrintSaverTab::SetRepeat( const ScRange* pCol, const ScRange* pRow )
{
delete mpRepeatCol;
- mpRepeatCol = pCol ? new ScRange(*pCol) : NULL;
+ mpRepeatCol = pCol ? new ScRange(*pCol) : nullptr;
delete mpRepeatRow;
- mpRepeatRow = pRow ? new ScRange(*pRow) : NULL;
+ mpRepeatRow = pRow ? new ScRange(*pRow) : nullptr;
}
inline bool PtrEqual( const ScRange* p1, const ScRange* p2 )
@@ -76,7 +76,7 @@ ScPrintRangeSaver::ScPrintRangeSaver( SCTAB nCount ) :
if (nCount > 0)
pData = new ScPrintSaverTab[nCount];
else
- pData = NULL;
+ pData = nullptr;
}
ScPrintRangeSaver::~ScPrintRangeSaver()
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 72c2fbae7d81..26af709686f3 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -34,12 +34,12 @@
using namespace com::sun::star;
static ScProgress theDummyInterpretProgress;
-SfxProgress* ScProgress::pGlobalProgress = NULL;
+SfxProgress* ScProgress::pGlobalProgress = nullptr;
sal_uLong ScProgress::nGlobalRange = 0;
sal_uLong ScProgress::nGlobalPercent = 0;
bool ScProgress::bGlobalNoUserBreak = true;
ScProgress* ScProgress::pInterpretProgress = &theDummyInterpretProgress;
-ScProgress* ScProgress::pOldInterpretProgress = NULL;
+ScProgress* ScProgress::pOldInterpretProgress = nullptr;
sal_uLong ScProgress::nInterpretProgress = 0;
bool ScProgress::bAllowInterpretProgress = true;
ScDocument* ScProgress::pInterpretDoc;
@@ -80,12 +80,12 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
if ( lcl_IsHiddenDocument(pObjSh) )
{
// loading a hidden document while a progress is active is possible - no error
- pProgress = NULL;
+ pProgress = nullptr;
}
else
{
OSL_FAIL( "ScProgress: there can be only one!" );
- pProgress = NULL;
+ pProgress = nullptr;
}
}
else if ( SfxGetpApp()->IsDowning() )
@@ -94,7 +94,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
// In this case a SfxProgress would produce dirt in memory.
//TODO: Should that be this way ???
- pProgress = NULL;
+ pProgress = nullptr;
}
else if ( pObjSh && ( pObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ||
pObjSh->GetProgress() ||
@@ -103,7 +103,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
// no own progress for embedded objects,
// no second progress if the document already has one
- pProgress = NULL;
+ pProgress = nullptr;
}
else
{
@@ -117,7 +117,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
ScProgress::ScProgress()
: bEnabled(true)
- , pProgress(NULL)
+ , pProgress(nullptr)
{
// DummyInterpret
}
@@ -127,7 +127,7 @@ ScProgress::~ScProgress()
if ( pProgress )
{
delete pProgress;
- pGlobalProgress = NULL;
+ pGlobalProgress = nullptr;
nGlobalRange = 0;
nGlobalPercent = 0;
bGlobalNoUserBreak = true;
diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index dd8fa5463f34..fb35163f1664 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -40,8 +40,8 @@ ScQueryEntry::ScQueryEntry() :
nField(0),
eOp(SC_EQUAL),
eConnect(SC_AND),
- pSearchParam(NULL),
- pSearchText(NULL),
+ pSearchParam(nullptr),
+ pSearchText(nullptr),
maQueryItems(1)
{
}
@@ -51,8 +51,8 @@ ScQueryEntry::ScQueryEntry(const ScQueryEntry& r) :
nField(r.nField),
eOp(r.eOp),
eConnect(r.eConnect),
- pSearchParam(NULL),
- pSearchText(NULL),
+ pSearchParam(nullptr),
+ pSearchText(nullptr),
maQueryItems(r.maQueryItems)
{
}
@@ -73,8 +73,8 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r )
delete pSearchParam;
delete pSearchText;
- pSearchParam = NULL;
- pSearchText = NULL;
+ pSearchParam = nullptr;
+ pSearchText = nullptr;
return *this;
}
@@ -150,8 +150,8 @@ void ScQueryEntry::Clear()
delete pSearchParam;
delete pSearchText;
- pSearchParam = NULL;
- pSearchText = NULL;
+ pSearchParam = nullptr;
+ pSearchText = nullptr;
}
bool ScQueryEntry::operator==( const ScQueryEntry& r ) const
diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx
index 59001c9c0827..c4e416fbd515 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -132,7 +132,7 @@ ScQueryEntry* ScQueryParamBase::FindEntryByField(SCCOLROW nField, bool bNew)
if (!bNew)
// no existing entry found, and we are not creating a new one.
- return NULL;
+ return nullptr;
return &AppendEntry();
}
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index ac6855084bcf..10e7952397ec 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -332,7 +332,7 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList )
Remove(nOldPos);
i--;
delete pOver;
- pOver = NULL;
+ pOver = nullptr;
if ( nOldPos )
nOldPos--; // Seek richtig aufsetzen
}
@@ -1005,14 +1005,14 @@ const ScRange* ScRangeList::Find( const ScAddress& rAdr ) const
{
const_iterator itr = find_if(
maRanges.begin(), maRanges.end(), FindEnclosingRange<ScAddress>(rAdr));
- return itr == maRanges.end() ? NULL : *itr;
+ return itr == maRanges.end() ? nullptr : *itr;
}
ScRange* ScRangeList::Find( const ScAddress& rAdr )
{
iterator itr = find_if(
maRanges.begin(), maRanges.end(), FindEnclosingRange<ScAddress>(rAdr));
- return itr == maRanges.end() ? NULL : *itr;
+ return itr == maRanges.end() ? nullptr : *itr;
}
ScRangeList::ScRangeList() : mnMaxRowUsed(-1) {}
@@ -1068,7 +1068,7 @@ ScRange* ScRangeList::Remove(size_t nPos)
{
if (maRanges.size() <= nPos)
// Out-of-bound condition. Bail out.
- return NULL;
+ return nullptr;
iterator itr = maRanges.begin();
advance(itr, nPos);
@@ -1218,7 +1218,7 @@ ScRangePair* ScRangePairList::Remove(size_t nPos)
{
if (maPairs.size() <= nPos)
// Out-of-bound condition. Bail out.
- return NULL;
+ return nullptr;
vector<ScRangePair*>::iterator itr = maPairs.begin();
advance(itr, nPos);
@@ -1229,9 +1229,9 @@ ScRangePair* ScRangePairList::Remove(size_t nPos)
ScRangePair* ScRangePairList::Remove( ScRangePair* Adr)
{
- ScRangePair* p = NULL;
+ ScRangePair* p = nullptr;
- if (Adr == NULL) return NULL;
+ if (Adr == nullptr) return nullptr;
for ( vector<ScRangePair*>::iterator itr = maPairs.begin(); itr < maPairs.end(); ++itr )
{
@@ -1344,7 +1344,7 @@ ScRangePair* ScRangePairList::Find( const ScAddress& rAdr ) const
if ( pR->GetRange(0).In( rAdr ) )
return pR;
}
- return NULL;
+ return nullptr;
}
ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const
@@ -1355,7 +1355,7 @@ ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const
if ( pR->GetRange(0) == rRange )
return pR;
}
- return NULL;
+ return nullptr;
}
ScRangePairList* ScRangePairList::Clone() const
@@ -1561,7 +1561,7 @@ void ScRangePairList::Join( const ScRangePair& r, bool bIsInList )
Remove( nOldPos );
i--;
delete pOver;
- pOver = NULL;
+ pOver = nullptr;
if ( nOldPos )
nOldPos--; // Seek richtig aufsetzen
}
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 40cadcae0f74..a1e25ee115a8 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -53,7 +53,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
const FormulaGrammar::Grammar eGrammar ) :
aName ( rName ),
aUpperName ( ScGlobal::pCharClass->uppercase( rName ) ),
- pCode ( NULL ),
+ pCode ( nullptr ),
aPos ( rAddress ),
eType ( nType ),
pDoc ( pDok ),
@@ -227,7 +227,7 @@ void ScRangeData::GuessPosition()
formula::FormulaToken* t;
pCode->Reset();
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
ScSingleRefData& rRef1 = *t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.Col() < nMinCol )
@@ -293,7 +293,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
formula::FormulaToken* t;
pCode->Reset();
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
if( t->GetType() != svIndex )
{
@@ -325,7 +325,7 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
formula::FormulaToken* t;
pCode->Reset();
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
if( t->GetType() != svIndex )
{
@@ -464,7 +464,7 @@ void ScRangeData::MakeValidName( OUString& rName )
ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) );
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
- while (aRange.Parse( rName, NULL, details) || aAddr.Parse( rName, NULL, details))
+ while (aRange.Parse( rName, nullptr, details) || aAddr.Parse( rName, nullptr, details))
{
// Range Parse is partially valid also with invalid sheet name,
// Address Parse dito, during compile name would generate a #REF!
@@ -549,7 +549,7 @@ void ScRangeData::ValidateTabRefs()
SCTAB nMaxTab = nMinTab;
formula::FormulaToken* t;
pCode->Reset();
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
ScSingleRefData& rRef1 = *t->GetSingleRef();
ScAddress aAbs = rRef1.toAbs(aPos);
@@ -585,7 +585,7 @@ void ScRangeData::ValidateTabRefs()
aPos.SetTab( aPos.Tab() - nMove );
pCode->Reset();
- while ( ( t = pCode->GetNextReference() ) != NULL )
+ while ( ( t = pCode->GetNextReference() ) != nullptr )
{
switch (t->GetType())
{
@@ -685,14 +685,14 @@ ScRangeName::ScRangeName(const ScRangeName& r)
m_Data.insert(std::make_pair(it.first, o3tl::make_unique<ScRangeData>(*it.second)));
}
// std::map was cloned, so each collection needs its own index to data.
- maIndexToData.resize( r.maIndexToData.size(), NULL);
+ maIndexToData.resize( r.maIndexToData.size(), nullptr);
for (auto const& itr : m_Data)
{
size_t nPos = itr.second->GetIndex() - 1;
if (nPos >= maIndexToData.size())
{
OSL_FAIL( "ScRangeName copy-ctor: maIndexToData size doesn't fit");
- maIndexToData.resize(nPos+1, NULL);
+ maIndexToData.resize(nPos+1, nullptr);
}
maIndexToData[nPos] = itr.second.get();
}
@@ -721,10 +721,10 @@ ScRangeData* ScRangeName::findByIndex(sal_uInt16 i) const
{
if (!i)
// index should never be zero.
- return NULL;
+ return nullptr;
size_t nPos = i - 1;
- return nPos < maIndexToData.size() ? maIndexToData[nPos] : NULL;
+ return nPos < maIndexToData.size() ? maIndexToData[nPos] : nullptr;
}
void ScRangeName::UpdateReference(sc::RefUpdateContext& rCxt, SCTAB nLocalTab )
@@ -822,7 +822,7 @@ bool ScRangeName::insert(ScRangeData* p)
{
// Assign a new index. An index must be unique and is never 0.
IndexDataType::iterator itr = std::find(
- maIndexToData.begin(), maIndexToData.end(), static_cast<ScRangeData*>(NULL));
+ maIndexToData.begin(), maIndexToData.end(), static_cast<ScRangeData*>(nullptr));
if (itr != maIndexToData.end())
{
// Empty slot exists. Re-use it.
@@ -843,7 +843,7 @@ bool ScRangeName::insert(ScRangeData* p)
// Data inserted. Store its index for mapping.
size_t nPos = p->GetIndex() - 1;
if (nPos >= maIndexToData.size())
- maIndexToData.resize(nPos+1, NULL);
+ maIndexToData.resize(nPos+1, nullptr);
maIndexToData[nPos] = p;
}
return r.second;
@@ -867,7 +867,7 @@ void ScRangeName::erase(const iterator& itr)
m_Data.erase(itr);
OSL_ENSURE( 0 < nIndex && nIndex <= maIndexToData.size(), "ScRangeName::erase: bad index");
if (0 < nIndex && nIndex <= maIndexToData.size())
- maIndexToData[nIndex-1] = NULL;
+ maIndexToData[nIndex-1] = nullptr;
}
void ScRangeName::clear()
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index e0470830038c..6ec7e71c3686 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -380,7 +380,7 @@ ScMatrixRef ScSequenceToMatrix::CreateMixedMatrix( const css::uno::Any & rAny )
if (nCols != static_cast<SCSIZE>(nMaxColCount) || nRows != static_cast<SCSIZE>(nRowCount))
{
OSL_FAIL( "ScSequenceToMatrix::CreateMixedMatrix: matrix exceeded max size, returning NULL matrix");
- return NULL;
+ return nullptr;
}
for (nRow=0; nRow<nRowCount; nRow++)
{
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index c7e9d0c464e4..688b74f24f02 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -268,7 +268,7 @@ bool ScRangeUtil::MakeRangeFromName (
}
//then check for local range names
ScRangeName* pRangeNames = pDoc->GetRangeName( nTable );
- ScRangeData* pData = NULL;
+ ScRangeData* pData = nullptr;
if ( pRangeNames )
pData = pRangeNames->findByUpperName(ScGlobal::pCharClass->uppercase(aName));
if (!pData)
@@ -282,7 +282,7 @@ bool ScRangeUtil::MakeRangeFromName (
pData->GetSymbol( aStrArea );
if ( IsAbsArea( aStrArea, pDoc, nTable,
- NULL, &aStartPos, &aEndPos, rDetails ) )
+ nullptr, &aStartPos, &aEndPos, rDetails ) )
{
nTab = aStartPos.Tab();
nColStart = aStartPos.Col();
@@ -296,7 +296,7 @@ bool ScRangeUtil::MakeRangeFromName (
CutPosString( aStrArea, aStrArea );
if ( IsAbsPos( aStrArea, pDoc, nTable,
- NULL, &aStartPos, rDetails ) )
+ nullptr, &aStartPos, rDetails ) )
{
nTab = aStartPos.Tab();
nColStart = nColEnd = aStartPos.Col();
@@ -542,7 +542,7 @@ bool ScRangeStringConverter::GetRangeListFromString(
)
{
rRangeList.push_back( pRange );
- pRange = NULL;
+ pRange = nullptr;
}
else if (nOffset > -1)
bRet = false;
@@ -749,7 +749,7 @@ static void lcl_appendCellAddress(
ScRangeStringConverter::AppendTableName(rBuf, rExtInfo.maTabName);
rBuf.append('.');
- OUString aAddr(rCell.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()));
+ OUString aAddr(rCell.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention()));
rBuf.append(aAddr);
}
else
@@ -782,7 +782,7 @@ static void lcl_appendCellRangeAddress(
ScRangeStringConverter::AppendTableName(rBuf, rExtInfo1.maTabName);
rBuf.append('.');
- OUString aAddr(rCell1.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()));
+ OUString aAddr(rCell1.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention()));
rBuf.append(aAddr);
rBuf.append(":");
@@ -794,7 +794,7 @@ static void lcl_appendCellRangeAddress(
rBuf.append('.');
}
- aAddr = rCell2.Format(SCA_ABS, NULL, pDoc->GetAddressConvention());
+ aAddr = rCell2.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention());
rBuf.append(aAddr);
}
else
@@ -927,7 +927,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
ScRangeData* ScRangeStringConverter::GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument* pDoc)
{
ScRangeName* pLocalRangeName = pDoc->GetRangeName(nTab);
- ScRangeData* pData = NULL;
+ ScRangeData* pData = nullptr;
OUString aUpperName = ScGlobal::pCharClass->uppercase(rString);
if(pLocalRangeName)
{
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 86cbfe6288cf..965413106f82 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -43,7 +43,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
// everything to 0, so BytesLeft() aborts at least
- pBuf = NULL; pMemStream = NULL;
+ pBuf = nullptr; pMemStream = nullptr;
nEntryEnd = nDataPos;
}
else
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index ce73a0edbe72..cb83c4c3f840 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -46,18 +46,18 @@ ScRefreshTimerProtector::~ScRefreshTimerProtector()
m_rpControl->SetAllowRefresh( true );
}
-ScRefreshTimer::ScRefreshTimer() : ppControl(0)
+ScRefreshTimer::ScRefreshTimer() : ppControl(nullptr)
{
SetTimeout( 0 );
}
-ScRefreshTimer::ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0)
+ScRefreshTimer::ScRefreshTimer( sal_uLong nSeconds ) : ppControl(nullptr)
{
SetTimeout( nSeconds * 1000 );
Launch();
}
-ScRefreshTimer::ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(0)
+ScRefreshTimer::ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(nullptr)
{
}
@@ -69,7 +69,7 @@ ScRefreshTimer::~ScRefreshTimer()
ScRefreshTimer& ScRefreshTimer::operator=( const ScRefreshTimer& r )
{
- SetRefreshControl(0);
+ SetRefreshControl(nullptr);
AutoTimer::operator=( r );
return *this;
}
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 16dd4ee71576..e6bb3b80f919 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -313,13 +313,13 @@ private:
};
ScMatrixImpl::ScMatrixImpl(SCSIZE nC, SCSIZE nR) :
- maMat(nR, nC), maMatFlag(nR, nC, SC_MATFLAG_EMPTYCELL), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
+ maMat(nR, nC), maMatFlag(nR, nC, SC_MATFLAG_EMPTYCELL), pErrorInterpreter(nullptr), mbCloneIfConst(true) {}
ScMatrixImpl::ScMatrixImpl(SCSIZE nC, SCSIZE nR, double fInitVal) :
- maMat(nR, nC, fInitVal), maMatFlag(nR, nC), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
+ maMat(nR, nC, fInitVal), maMatFlag(nR, nC), pErrorInterpreter(nullptr), mbCloneIfConst(true) {}
ScMatrixImpl::ScMatrixImpl( size_t nC, size_t nR, const std::vector<double>& rInitVals ) :
- maMat(nR, nC, rInitVals.begin(), rInitVals.end()), maMatFlag(nR, nC), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
+ maMat(nR, nC, rInitVals.begin(), rInitVals.end()), maMatFlag(nR, nC), pErrorInterpreter(nullptr), mbCloneIfConst(true) {}
ScMatrixImpl::~ScMatrixImpl()
{
@@ -603,7 +603,7 @@ svl::SharedString ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE
sal_uLong nKey = rFormatter.GetStandardFormat( css::util::NumberFormat::LOGICAL,
ScGlobal::eLnge);
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
rFormatter.GetOutputString( 0.0, nKey, aStr, &pColor);
return aStr;
}
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index debfb035fb39..43b98725da68 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -68,7 +68,7 @@ void SharedFormulaUtil::splitFormulaCellGroup(const CellStoreType::position_type
if (pCxt)
rPrevTop.EndListeningTo(*pCxt);
else
- rPrevTop.EndListeningTo( rPrevTop.GetDocument(), NULL, ScAddress( ScAddress::UNINITIALIZED));
+ rPrevTop.EndListeningTo( rPrevTop.GetDocument(), nullptr, ScAddress( ScAddress::UNINITIALIZED));
rPrevTop.SetNeedsListening(true);
}
#endif
diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx
index 4b454809d1c2..7b9e0aa20ad6 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -26,7 +26,7 @@
#include <rtl/math.hxx>
ScSetStringParam::ScSetStringParam() :
- mpNumFormatter(NULL),
+ mpNumFormatter(nullptr),
mbDetectNumberFormat(true),
meSetTextNumFormat(Never),
mbHandleApostrophe(true),
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index 364c070c3fde..d1eccbdd9bdd 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -90,7 +90,7 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
return aPageMap;
}
OSL_FAIL("invalid family");
- return NULL;
+ return nullptr;
}
// programmatic name suffix for display names that match other programmatic names
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 4c88ebe3560d..cfdd5a39a5bf 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -119,7 +119,7 @@ namespace
FormulaToken** mpStart;
FormulaToken** mpStop;
- TokenPointerRange() : mpStart(NULL), mpStop(NULL) {}
+ TokenPointerRange() : mpStart(nullptr), mpStop(nullptr) {}
TokenPointerRange( FormulaToken** p, sal_uInt16 n ) :
mpStart(p), mpStop( p + static_cast<size_t>(n)) {}
};
@@ -431,7 +431,7 @@ FormulaToken* ScRawToken::CreateToken() const
case svExternal :
return new FormulaExternalToken( eOp, sbyte.cByte, OUString( cStr+1 ) );
case svFAP :
- return new FormulaFAPToken( eOp, sbyte.cByte, NULL );
+ return new FormulaFAPToken( eOp, sbyte.cByte, nullptr );
case svMissing :
IF_NOT_OPCODE_ERROR( ocMissing, FormulaMissingToken);
return new FormulaMissingToken;
@@ -533,7 +533,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
if (((sv1 = rTok1.GetType()) != svSingleRef && sv1 != svDoubleRef && sv1 != svRefList &&
sv1 != svExternalSingleRef && sv1 != svExternalDoubleRef ) ||
((sv2 = rTok2.GetType()) != svSingleRef && sv2 != svDoubleRef && sv2 != svRefList))
- return NULL;
+ return nullptr;
ScTokenRef xRes;
bool bExternal = (sv1 == svExternalSingleRef);
@@ -562,7 +562,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
const ScSingleRefData& rRef2 = *rTok2.GetSingleRef();
if (bExternal && rRef2.IsFlag3D())
- return NULL;
+ return nullptr;
ScComplexRefData aRef;
aRef.Ref1 = aRef.Ref2 = *rTok1.GetSingleRef();
@@ -576,7 +576,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
else
{
bExternal |= (sv1 == svExternalDoubleRef);
- const ScRefList* pRefList = NULL;
+ const ScRefList* pRefList = nullptr;
if (sv1 == svDoubleRef)
{
xRes = (bReuseDoubleRef && rTok1.GetRef() == 1 ? &rTok1 : rTok1.Clone());
@@ -594,13 +594,13 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
if (pRefList)
{
if (pRefList->empty())
- return NULL;
+ return nullptr;
if (bExternal)
- return NULL; // external reference list not possible
+ return nullptr; // external reference list not possible
xRes = new ScDoubleRefToken( (*pRefList)[0] );
}
if (!xRes)
- return NULL; // shouldn't happen..
+ return nullptr; // shouldn't happen..
StackVar sv[2] = { sv1, sv2 };
formula::FormulaToken* pt[2] = { &rTok1, &rTok2 };
ScComplexRefData& rRef = *xRes->GetDoubleRef();
@@ -618,7 +618,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
{
const ScRefList* p = pt[i]->GetRefList();
if (p->empty())
- return NULL;
+ return nullptr;
ScRefList::const_iterator it( p->begin());
ScRefList::const_iterator end( p->end());
for ( ; it != end; ++it)
@@ -629,13 +629,13 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
break;
case svExternalSingleRef:
if (rRef.Ref1.IsFlag3D() || rRef.Ref2.IsFlag3D())
- return NULL; // no other sheets with external refs
+ return nullptr; // no other sheets with external refs
else
rRef.Extend( *pt[i]->GetSingleRef(), rPos);
break;
case svExternalDoubleRef:
if (rRef.Ref1.IsFlag3D() || rRef.Ref2.IsFlag3D())
- return NULL; // no other sheets with external refs
+ return nullptr; // no other sheets with external refs
else
rRef.Extend( *pt[i]->GetDoubleRef(), rPos);
break;
@@ -1061,7 +1061,7 @@ ScMatrixFormulaCellToken::ScMatrixFormulaCellToken(
}
ScMatrixFormulaCellToken::ScMatrixFormulaCellToken( SCCOL nC, SCROW nR ) :
- ScMatrixCellResultToken(NULL, NULL), nRows(nR), nCols(nC) {}
+ ScMatrixCellResultToken(nullptr, nullptr), nRows(nR), nCols(nC) {}
ScMatrixFormulaCellToken::ScMatrixFormulaCellToken( const ScMatrixFormulaCellToken& r ) :
ScMatrixCellResultToken(r), nRows(r.nRows), nCols(r.nCols)
@@ -1103,13 +1103,13 @@ void ScMatrixFormulaCellToken::Assign( const formula::FormulaToken& r )
OSL_ENSURE( r.GetType() != svMatrix, "ScMatrixFormulaCellToken::operator=: assigning ScMatrixToken to ScMatrixFormulaCellToken is not proper, use ScMatrixCellResultToken instead");
if (r.GetType() == svMatrix)
{
- xUpperLeft = NULL;
+ xUpperLeft = nullptr;
xMatrix = r.GetMatrix();
}
else
{
xUpperLeft = &r;
- xMatrix = NULL;
+ xMatrix = nullptr;
CloneUpperLeftIfNecessary();
}
}
@@ -1141,8 +1141,8 @@ void ScMatrixFormulaCellToken::SetUpperLeftDouble( double f )
void ScMatrixFormulaCellToken::ResetResult()
{
- xMatrix = NULL;
- xUpperLeft = NULL;
+ xMatrix = nullptr;
+ xUpperLeft = nullptr;
}
ScHybridCellToken::ScHybridCellToken(
@@ -1840,13 +1840,13 @@ FormulaToken* ScTokenArray::MergeArray( )
case ocPush :
if( checkArraySep( bPrevWasSep, false ) )
{
- return NULL;
+ return nullptr;
}
// no references or nested arrays
if ( t->GetType() != svDouble && t->GetType() != svString )
{
- return NULL;
+ return nullptr;
}
bNumeric = (t->GetType() == svDouble);
break;
@@ -1856,7 +1856,7 @@ FormulaToken* ScTokenArray::MergeArray( )
case ocFalse :
if( checkArraySep( bPrevWasSep, false ) )
{
- return NULL;
+ return nullptr;
}
bNumeric = false;
break;
@@ -1865,7 +1865,7 @@ FormulaToken* ScTokenArray::MergeArray( )
case ocSep :
if( checkArraySep( bPrevWasSep, true ) )
{
- return NULL;
+ return nullptr;
}
bNumeric = false;
break;
@@ -1875,12 +1875,12 @@ FormulaToken* ScTokenArray::MergeArray( )
// something changes in the future
if( i != (nLen-1))
{
- return NULL;
+ return nullptr;
}
if( checkArraySep( bPrevWasSep, true ) )
{
- return NULL;
+ return nullptr;
}
nPrevRowSep = i;
@@ -1894,13 +1894,13 @@ FormulaToken* ScTokenArray::MergeArray( )
case ocArrayRowSep :
if( checkArraySep( bPrevWasSep, true ) )
{
- return NULL;
+ return nullptr;
}
if( nPrevRowSep < 0 || // missing ocArrayClose
((nPrevRowSep - i) % 2) == 1) // no complex elements
{
- return NULL;
+ return nullptr;
}
if( nCol < 0 )
@@ -1909,7 +1909,7 @@ FormulaToken* ScTokenArray::MergeArray( )
}
else if( (nPrevRowSep - i)/2 != nCol) // irregular array
{
- return NULL;
+ return nullptr;
}
nPrevRowSep = i;
@@ -1922,7 +1922,7 @@ FormulaToken* ScTokenArray::MergeArray( )
// negation or unary plus must precede numeric value
if( !bNumeric )
{
- return NULL;
+ return nullptr;
}
--nPrevRowSep; // shorten this row by 1
bNumeric = false; // one level only, no --42
@@ -1935,11 +1935,11 @@ FormulaToken* ScTokenArray::MergeArray( )
default :
// no functions or operators
- return NULL;
+ return nullptr;
}
}
if( nCol <= 0 || nRow <= 0 )
- return NULL;
+ return nullptr;
int nSign = 1;
ScMatrix* pArray = new ScMatrix(nCol, nRow, 0.0);
@@ -1989,7 +1989,7 @@ FormulaToken* ScTokenArray::MergeArray( )
default :
break;
}
- pCode[i] = NULL;
+ pCode[i] = nullptr;
t->DecRef();
}
nLen = sal_uInt16( nStart );
@@ -1999,13 +1999,13 @@ FormulaToken* ScTokenArray::MergeArray( )
FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos )
{
if (!pCode || !nLen)
- return NULL;
+ return nullptr;
sal_uInt16 nIdx = nLen;
FormulaToken *p1, *p2, *p3; // ref, ocRange, ref
// The actual types are checked in extendRangeReference().
- if (((p3 = PeekPrev(nIdx)) != 0) &&
- (((p2 = PeekPrev(nIdx)) != 0) && p2->GetOpCode() == ocRange) &&
- ((p1 = PeekPrev(nIdx)) != 0))
+ if (((p3 = PeekPrev(nIdx)) != nullptr) &&
+ (((p2 = PeekPrev(nIdx)) != nullptr) && p2->GetOpCode() == ocRange) &&
+ ((p1 = PeekPrev(nIdx)) != nullptr))
{
FormulaTokenRef p = extendRangeReference( *p1, *p3, rPos, true);
if (p)
diff --git a/sc/source/core/tool/tokenstringcontext.cxx b/sc/source/core/tool/tokenstringcontext.cxx
index 856830c28ff6..46f6a8eda695 100644
--- a/sc/source/core/tool/tokenstringcontext.cxx
+++ b/sc/source/core/tool/tokenstringcontext.cxx
@@ -35,7 +35,7 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
meGram(eGram),
mpRefConv(ScCompiler::GetRefConvention(formula::FormulaGrammar::extractRefConvention(eGram)))
{
- ScCompiler aComp(NULL, ScAddress());
+ ScCompiler aComp(nullptr, ScAddress());
mxOpCodeMap = aComp.GetOpCodeMap(formula::FormulaGrammar::extractFormulaLanguage(eGram));
if (mxOpCodeMap)
maErrRef = mxOpCodeMap->getSymbol(ocErrRef);
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 4bf44983add4..e9775a8e7a40 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -248,7 +248,7 @@ DifParser::DifParser( SvStream& rNewIn, const sal_uInt32 nOption, ScDocument& rD
bPlain = ( nOption == SC_DIFOPT_PLAIN );
if( bPlain )
- pNumFormatter = NULL;
+ pNumFormatter = nullptr;
else
pNumFormatter = rDoc.GetFormatTable();
}
@@ -612,7 +612,7 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, sal_uInt32&
if( IsNumber( cAkt ) )
rRet = ( sal_uInt32 ) ( cAkt - '0' );
else
- return NULL;
+ return nullptr;
pStart++;
cAkt = *pStart;
@@ -807,7 +807,7 @@ bool DifParser::ScanFloatVal( const sal_Unicode* pStart )
}
DifColumn::DifColumn ()
- : pAkt(NULL)
+ : pAkt(nullptr)
{
}
@@ -824,7 +824,7 @@ void DifColumn::SetLogical( SCROW nRow )
if( pAkt->nEnd == nRow )
pAkt->nEnd++;
else
- pAkt = NULL;
+ pAkt = nullptr;
}
else
{
@@ -857,7 +857,7 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
NewEntry(nRow,nNumFormat );
}
else
- pAkt = NULL;
+ pAkt = nullptr;
}
void DifColumn::NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat )
@@ -898,7 +898,7 @@ DifAttrCache::DifAttrCache( const bool bNewPlain )
bPlain = bNewPlain;
ppCols = new DifColumn *[ MAXCOL + 1 ];
for( SCCOL nCnt = 0 ; nCnt <= MAXCOL ; nCnt++ )
- ppCols[ nCnt ] = NULL;
+ ppCols[ nCnt ] = nullptr;
}
DifAttrCache::~DifAttrCache()
diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx
index 9f334c0c7d28..59694f5f43aa 100644
--- a/sc/source/filter/excel/colrowst.cxx
+++ b/sc/source/filter/excel/colrowst.cxx
@@ -249,7 +249,7 @@ void XclImpColRowSettings::Convert( SCTAB nScTab )
for (SCROW i = nPrevRow; i <= nRow - 1; ++i)
{
SCROW nLast;
- if (!maRowHeights.search_tree(i, nHeight, NULL, &nLast).second)
+ if (!maRowHeights.search_tree(i, nHeight, nullptr, &nLast).second)
{
// search failed for some reason
return;
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index ee4c4cce8846..f5d539307767 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -136,7 +136,7 @@ ExcTable::ExcTable( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
mnScTab( SCTAB_GLOBAL ),
nExcTab( EXC_NOTAB ),
- pTabNames( new NameBuffer( 0, 16 ) ),
+ pTabNames( new NameBuffer( nullptr, 16 ) ),
mxNoteList( new XclExpNoteList )
{
}
@@ -145,7 +145,7 @@ ExcTable::ExcTable( const XclExpRoot& rRoot, SCTAB nScTab ) :
XclExpRoot( rRoot ),
mnScTab( nScTab ),
nExcTab( rRoot.GetTabInfo().GetXclTab( nScTab ) ),
- pTabNames( new NameBuffer( 0, 16 ) ),
+ pTabNames( new NameBuffer( nullptr, 16 ) ),
mxNoteList( new XclExpNoteList )
{
}
@@ -641,7 +641,7 @@ void ExcTable::FillAsTableXml()
// list of NOTE records, generated by the cell table
// not in the worksheet file
- if( mxNoteList != 0 && !mxNoteList->IsEmpty() )
+ if( mxNoteList != nullptr && !mxNoteList->IsEmpty() )
aRecList.AppendNewRecord( new XclExpComments( mnScTab, *mxNoteList ) );
const ScTableProtection* pTabProtect = rDoc.GetTabProtection(mnScTab);
@@ -662,7 +662,7 @@ void ExcTable::FillAsTableXml()
// list of HLINK records, generated by the cell table
XclExpRecordRef xHyperlinks = mxCellTable->CreateRecord( EXC_ID_HLINK );
XclExpHyperlinkList* xHyperlinkList = dynamic_cast<XclExpHyperlinkList*>(xHyperlinks.get());
- if( xHyperlinkList != NULL && !xHyperlinkList->IsEmpty() )
+ if( xHyperlinkList != nullptr && !xHyperlinkList->IsEmpty() )
{
aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_hyperlinks ) );
aRecList.AppendRecord( xHyperlinks );
@@ -755,7 +755,7 @@ void ExcTable::WriteXml( XclExpXmlStream& rStrm )
ExcDocument::ExcDocument( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
aHeader( rRoot ),
- pExpChangeTrack( NULL )
+ pExpChangeTrack( nullptr )
{
}
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index d52069ec1e4b..59e0daf446f3 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -63,7 +63,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
OSL_ENSURE( pMedStrm, "::ScImportExcel - medium without input stream" );
if( !pMedStrm ) return eERR_OPEN; // should not happen
- SvStream* pBookStrm = 0; // The "Book"/"Workbook" stream containing main data.
+ SvStream* pBookStrm = nullptr; // The "Book"/"Workbook" stream containing main data.
XclBiff eBiff = EXC_BIFF_UNKNOWN; // The BIFF version of the main stream.
// try to open an OLE storage
@@ -73,7 +73,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
{
xRootStrg = new SotStorage( pMedStrm, false );
if( xRootStrg->GetError() )
- xRootStrg = 0;
+ xRootStrg = nullptr;
}
// try to open "Book" or "Workbook" stream in OLE storage
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 268dcfcacee2..47d7a85204a4 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -105,7 +105,7 @@ void ImportExcel::Formula(
return;
// Formula will be read next, length in nFormLen
- const ScTokenArray* pResult = NULL;
+ const ScTokenArray* pResult = nullptr;
pFormConv->Reset( aScPos );
ScDocumentImport& rDoc = GetDocImport();
@@ -143,7 +143,7 @@ void ImportExcel::Formula(
// Shared formula not found even though it's clearly a shared formula.
// The cell will be created in the following shared formula
// record.
- SetLastFormula(aScPos.Col(), aScPos.Row(), fCurVal, nXF, NULL);
+ SetLastFormula(aScPos.Col(), aScPos.Row(), fCurVal, nXF, nullptr);
}
return;
}
@@ -151,7 +151,7 @@ void ImportExcel::Formula(
ConvErr eErr = pFormConv->Convert( pResult, maStrm, nFormLen, true );
- ScFormulaCell* pCell = NULL;
+ ScFormulaCell* pCell = nullptr;
if (pResult)
{
@@ -905,7 +905,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
}
else if( bArrayFormula )
{
- pErgebnis = NULL;
+ pErgebnis = nullptr;
eRet = ConvOK;
}
else
@@ -1833,14 +1833,14 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
pMatrix = aPool.GetMatrix( n );
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->Resize(nCols, nRows);
pMatrix->GetDimensions( nC, nR);
if( nC != nCols || nR != nRows )
{
OSL_FAIL( "ExcelToSc::ReadExtensionArray - matrix size mismatch" );
- pMatrix = NULL;
+ pMatrix = nullptr;
}
}
else
@@ -1868,7 +1868,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
{
case EXC_CACHEDVAL_EMPTY:
aIn.Ignore( 8 );
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->PutEmpty( nC, nR );
}
@@ -1877,7 +1877,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
case EXC_CACHEDVAL_DOUBLE:
{
double fDouble = aIn.ReadDouble();
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->PutDouble( fDouble, nC, nR );
}
@@ -1896,7 +1896,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
nByte = aIn.ReaduInt8();
aString = aIn.ReadRawByteString( nByte );
}
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->PutString(rPool.intern(aString), nC, nR);
}
@@ -1905,7 +1905,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
case EXC_CACHEDVAL_BOOL:
nByte = aIn.ReaduInt8();
aIn.Ignore( 7 );
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->PutBoolean( nByte != 0, nC, nR );
}
@@ -1914,7 +1914,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn )
case EXC_CACHEDVAL_ERROR:
nByte = aIn.ReaduInt8();
aIn.Ignore( 7 );
- if( NULL != pMatrix )
+ if( nullptr != pMatrix )
{
pMatrix->PutError( XclTools::GetScErrorCode( nByte ), nC, nR );
}
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index ebe3b6445e57..32e1932c6c22 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -934,7 +934,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
}
else if( bArrayFormula )
{
- rpTokArray = NULL;
+ rpTokArray = nullptr;
eRet = ConvOK;
}
else
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index de6359692573..171e07625114 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -500,7 +500,7 @@ void ImportExcel8::AutoFilterInfo()
XclImpAutoFilterData* pData = pExcRoot->pAutoFilterBuffer->GetByTab( GetCurrScTab() );
if( pData )
{
- pData->SetAdvancedRange( NULL );
+ pData->SetAdvancedRange( nullptr );
pData->Activate();
}
}
@@ -516,7 +516,7 @@ void ImportExcel8::AutoFilter()
XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRange ) :
ExcRoot( pRoot ),
- pCurrDBData(NULL),
+ pCurrDBData(nullptr),
bActive( false ),
bCriteria( false ),
bAutoOrAdvanced(false)
@@ -822,7 +822,7 @@ void XclImpAutoFilterData::CreateScDBData()
pCurrDBData->SetAdvancedQuerySource(&aCriteriaRange);
}
else
- pCurrDBData->SetAdvancedQuerySource(NULL);
+ pCurrDBData->SetAdvancedQuerySource(nullptr);
rDoc.SetAnonymousDBData(Tab(), pCurrDBData);
}
@@ -875,7 +875,7 @@ XclImpAutoFilterData* XclImpAutoFilterBuffer::GetByTab( SCTAB nTab )
if( rFilterPtr->Tab() == nTab )
return rFilterPtr.get();
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index aa6c06208266..fc296752aac3 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -416,7 +416,7 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_transitionEntry,
// OOXTODO: XML_published,
// OOXTODO: XML_codeName,
- XML_filterMode, mpManager ? XclXmlUtils::ToPsz( mpManager->HasFilterMode( mnScTab ) ) : NULL,
+ XML_filterMode, mpManager ? XclXmlUtils::ToPsz( mpManager->HasFilterMode( mnScTab ) ) : nullptr,
// OOXTODO: XML_enableFormatConditionsCalculation,
FSEND );
@@ -480,22 +480,22 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->singleElement( XML_sheetProtection,
XML_sheet, XclXmlUtils::ToPsz( true ),
- XML_password, sHash.isEmpty()? NULL : sHash.getStr(),
- XML_objects, pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS ) ? NULL : XclXmlUtils::ToPsz( true ),
- XML_scenarios, pTabProtect->isOptionEnabled( ScTableProtection::SCENARIOS ) ? NULL : XclXmlUtils::ToPsz( true ),
- XML_formatCells, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_CELLS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_formatColumns, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_formatRows, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_ROWS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_insertColumns, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_insertRows, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_ROWS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_insertHyperlinks, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_HYPERLINKS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_deleteColumns, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_deleteRows, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_ROWS ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_selectLockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_LOCKED_CELLS ) ? NULL : XclXmlUtils::ToPsz( true ),
- XML_sort, pTabProtect->isOptionEnabled( ScTableProtection::SORT ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_autoFilter, pTabProtect->isOptionEnabled( ScTableProtection::AUTOFILTER ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_pivotTables, pTabProtect->isOptionEnabled( ScTableProtection::PIVOT_TABLES ) ? XclXmlUtils::ToPsz( false ) : NULL,
- XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? NULL : XclXmlUtils::ToPsz( true ),
+ XML_password, sHash.isEmpty()? nullptr : sHash.getStr(),
+ XML_objects, pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS ) ? nullptr : XclXmlUtils::ToPsz( true ),
+ XML_scenarios, pTabProtect->isOptionEnabled( ScTableProtection::SCENARIOS ) ? nullptr : XclXmlUtils::ToPsz( true ),
+ XML_formatCells, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_CELLS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_formatColumns, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_formatRows, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_insertColumns, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_insertRows, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_insertHyperlinks, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_HYPERLINKS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_deleteColumns, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_deleteRows, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_selectLockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_LOCKED_CELLS ) ? nullptr : XclXmlUtils::ToPsz( true ),
+ XML_sort, pTabProtect->isOptionEnabled( ScTableProtection::SORT ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_autoFilter, pTabProtect->isOptionEnabled( ScTableProtection::AUTOFILTER ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_pivotTables, pTabProtect->isOptionEnabled( ScTableProtection::PIVOT_TABLES ) ? XclXmlUtils::ToPsz( false ) : nullptr,
+ XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? nullptr : XclXmlUtils::ToPsz( true ),
FSEND );
const ::std::vector<ScEnhancedProtection>& rProts( pTabProtect->getEnhancedProtection());
@@ -508,18 +508,18 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
SAL_WARN_IF( (*it).maSecurityDescriptorXML.isEmpty() && !(*it).maSecurityDescriptor.empty(),
"sc.filter", "XclExpSheetProtection::SaveXml: losing BIFF security descriptor");
rWorksheet->singleElement( XML_protectedRange,
- XML_name, (*it).maTitle.isEmpty() ? NULL : XclXmlUtils::ToOString( (*it).maTitle).getStr(),
- XML_securityDescriptor, (*it).maSecurityDescriptorXML.isEmpty() ? NULL : XclXmlUtils::ToOString( (*it).maSecurityDescriptorXML).getStr(),
+ XML_name, (*it).maTitle.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maTitle).getStr(),
+ XML_securityDescriptor, (*it).maSecurityDescriptorXML.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maSecurityDescriptorXML).getStr(),
/* XXX 'password' is not part of OOXML, but Excel2013
* writes it if loaded from BIFF, in which case
* 'algorithmName', 'hashValue', 'saltValue' and
* 'spinCount' are absent; so do we if it was present. */
- XML_password, (*it).mnPasswordVerifier ? OString::number( (*it).mnPasswordVerifier, 16).getStr() : NULL,
- XML_algorithmName, (*it).maAlgorithmName.isEmpty() ? NULL : XclXmlUtils::ToOString( (*it).maAlgorithmName).getStr(),
- XML_hashValue, (*it).maHashValue.isEmpty() ? NULL : XclXmlUtils::ToOString( (*it).maHashValue).getStr(),
- XML_saltValue, (*it).maSaltValue.isEmpty() ? NULL : XclXmlUtils::ToOString( (*it).maSaltValue).getStr(),
- XML_spinCount, (*it).mnSpinCount ? OString::number( (*it).mnSpinCount).getStr() : NULL,
- XML_sqref, (*it).maRangeList.Is() ? XclXmlUtils::ToOString( *(*it).maRangeList).getStr() : NULL,
+ XML_password, (*it).mnPasswordVerifier ? OString::number( (*it).mnPasswordVerifier, 16).getStr() : nullptr,
+ XML_algorithmName, (*it).maAlgorithmName.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maAlgorithmName).getStr(),
+ XML_hashValue, (*it).maHashValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maHashValue).getStr(),
+ XML_saltValue, (*it).maSaltValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maSaltValue).getStr(),
+ XML_spinCount, (*it).mnSpinCount ? OString::number( (*it).mnSpinCount).getStr() : nullptr,
+ XML_sqref, (*it).maRangeList.Is() ? XclXmlUtils::ToOString( *(*it).maRangeList).getStr() : nullptr,
FSEND);
}
rWorksheet->endElement( XML_protectedRanges);
@@ -562,7 +562,7 @@ ExcFilterCondition::ExcFilterCondition() :
nType( EXC_AFTYPE_NOTUSED ),
nOper( EXC_AFOPER_EQUAL ),
fVal( 0.0 ),
- pText( NULL )
+ pText( nullptr )
{
}
@@ -583,7 +583,7 @@ void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV,
fVal = fV;
delete pText;
- (pT) ? pText = new XclExpString( *pT, EXC_STR_8BITLENGTH ) : pText = NULL;
+ (pT) ? pText = new XclExpString( *pT, EXC_STR_8BITLENGTH ) : pText = nullptr;
}
void ExcFilterCondition::Save( XclExpStream& rStrm )
@@ -729,9 +729,9 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
// empty/nonempty fields
if (rEntry.IsQueryByEmpty())
- bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_EMPTY, EXC_AFOPER_NONE, 0.0, NULL, true );
+ bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_EMPTY, EXC_AFOPER_NONE, 0.0, nullptr, true );
else if(rEntry.IsQueryByNonEmpty())
- bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_NOTEMPTY, EXC_AFOPER_NONE, 0.0, NULL, true );
+ bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_NOTEMPTY, EXC_AFOPER_NONE, 0.0, nullptr, true );
// other conditions
else
{
@@ -739,7 +739,7 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
sal_uInt32 nIndex = 0;
bool bIsNum = !bLen || GetFormatter().IsNumberFormat( sText, nIndex, fVal );
OUString* pText;
- (bIsNum) ? pText = NULL : pText = &sText;
+ (bIsNum) ? pText = nullptr : pText = &sText;
// top10 flags
sal_uInt16 nNewFlags = 0x0000;
@@ -877,8 +877,8 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
XclExpRoot( rRoot ),
- pFilterMode( NULL ),
- pFilterInfo( NULL )
+ pFilterMode( nullptr ),
+ pFilterInfo( nullptr )
, mbAutoFilter (false)
{
XclExpNameManager& rNameMgr = GetNameManager();
@@ -1042,7 +1042,7 @@ void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm )
bool ExcAutoFilterRecs::HasFilterMode() const
{
- return pFilterMode != NULL;
+ return pFilterMode != nullptr;
}
XclExpFilterManager::XclExpFilterManager( const XclExpRoot& rRoot ) :
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 6f85f28c3044..bc9d62b7a169 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -49,21 +49,21 @@
RootData::RootData()
{
eDateiTyp = BiffX;
- pExtSheetBuff = NULL;
- pShrfmlaBuff = NULL;
- pExtNameBuff = NULL;
- pFmlaConverter = NULL;
+ pExtSheetBuff = nullptr;
+ pShrfmlaBuff = nullptr;
+ pExtNameBuff = nullptr;
+ pFmlaConverter = nullptr;
- pAutoFilterBuffer = NULL;
+ pAutoFilterBuffer = nullptr;
pPrintRanges = new _ScRangeListTabs;
pPrintTitles = new _ScRangeListTabs;
- pTabId = NULL;
- pUserBViewList = NULL;
+ pTabId = nullptr;
+ pUserBViewList = nullptr;
- pIR = NULL;
- pER = NULL;
- pColRowBuff = NULL;
+ pIR = nullptr;
+ pER = nullptr;
+ pColRowBuff = nullptr;
}
RootData::~RootData()
@@ -78,7 +78,7 @@ RootData::~RootData()
XclImpOutlineBuffer::XclImpOutlineBuffer( SCSIZE nNewSize ) :
maLevels(0, nNewSize, 0),
- mpOutlineArray(NULL),
+ mpOutlineArray(nullptr),
mnEndPos(nNewSize),
mnMaxLevel(0),
mbButtonAfter(true)
diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx
index 580a5132c987..7e2d0477314b 100644
--- a/sc/source/filter/excel/fontbuff.cxx
+++ b/sc/source/filter/excel/fontbuff.cxx
@@ -139,7 +139,7 @@ void LotusFontBuffer::MakeFont( ENTRY* pEntry )
pEntry->pFont = new SvxFontItem( eFamily, *pEntry->pTmpName, EMPTY_OUSTRING, ePitch, eCharSet, ATTR_FONT );
delete pEntry->pTmpName;
- pEntry->pTmpName = NULL;
+ pEntry->pTmpName = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index 08b0b4e16847..2284502dbe87 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -148,19 +148,19 @@ const ScRange* _ScRangeListTabs::First( SCTAB n )
TabRangeType::iterator itr = maTabRanges.find(n);
if (itr == maTabRanges.end())
// No range list exists for this table.
- return NULL;
+ return nullptr;
const RangeListType& rList = *itr->second;
maItrCur = rList.begin();
maItrCurEnd = rList.end();
- return rList.empty() ? NULL : &(*maItrCur);
+ return rList.empty() ? nullptr : &(*maItrCur);
}
const ScRange* _ScRangeListTabs::Next ()
{
++maItrCur;
if (maItrCur == maItrCurEnd)
- return NULL;
+ return nullptr;
return &(*maItrCur);
}
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 17bf74111ae7..8e34342cf017 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -109,10 +109,10 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
maStrm( rStrm, GetRoot() ),
aIn( maStrm ),
maScOleSize( ScAddress::INITIALIZE_INVALID ),
- pColOutlineBuff(NULL),
- pRowOutlineBuff(NULL),
- pColRowBuff(NULL),
- mpLastFormula(NULL),
+ pColOutlineBuff(nullptr),
+ pRowOutlineBuff(nullptr),
+ pColRowBuff(nullptr),
+ mpLastFormula(nullptr),
mnLastRefIdx( 0 ),
mnIxfeIndex( 0 ),
mnLastRecId(0),
@@ -216,7 +216,7 @@ sal_uInt16 ImportExcel::ReadXFIndex( const ScAddress& rScPos, bool bBiff2 )
if( !mbBiff2HasXfsValid )
{
mbBiff2HasXfsValid = true;
- mbBiff2HasXfs = GetXFBuffer().GetXF( 0 ) != 0;
+ mbBiff2HasXfs = GetXFBuffer().GetXF( 0 ) != nullptr;
}
// read formatting information (includes the XF identifier)
sal_uInt8 nFlags1, nFlags2, nFlags3;
@@ -1223,7 +1223,7 @@ void ImportExcel::NewTable()
pExcRoot->pShrfmlaBuff->Clear();
maLastFormulaCells.clear();
- mpLastFormula = NULL;
+ mpLastFormula = nullptr;
InitializeTable( nTab );
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index 098c32eef658..821a8fcf0158 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -90,7 +90,7 @@ const ScTokenArray* SharedFormulaBuffer::Find( const ScAddress& rRefPos ) const
{
TokenArraysType::const_iterator it = maTokenArrays.find(rRefPos);
if (it == maTokenArrays.end())
- return NULL;
+ return nullptr;
return it->second;
}
@@ -225,7 +225,7 @@ const ExtName* ExtNameBuff::GetNameByIndex( sal_Int16 nRefIdx, sal_uInt16 nNameI
{
OSL_ENSURE( nNameIdx > 0, "ExtNameBuff::GetNameByIndex() - invalid name index" );
ExtNameMap::const_iterator aIt = maExtNames.find( nRefIdx );
- return ((aIt != maExtNames.end()) && (0 < nNameIdx) && (nNameIdx <= aIt->second.size())) ? &aIt->second[ nNameIdx - 1 ] : 0;
+ return ((aIt != maExtNames.end()) && (0 < nNameIdx) && (nNameIdx <= aIt->second.size())) ? &aIt->second[ nNameIdx - 1 ] : nullptr;
}
void ExtNameBuff::Reset()
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 933b2d42d535..9a6f13ff3a5b 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -65,7 +65,7 @@ TokenPool::TokenPool( svl::SharedStringPool& rSPool ) :
nP_Str = 4;
ppP_Str = new OUString *[ nP_Str ];
for( nLauf = 0 ; nLauf < nP_Str ; nLauf++ )
- ppP_Str[ nLauf ] = NULL;
+ ppP_Str[ nLauf ] = nullptr;
// pool for double
nP_Dbl = 8;
@@ -79,7 +79,7 @@ TokenPool::TokenPool( svl::SharedStringPool& rSPool ) :
nP_RefTr = 32;
ppP_RefTr = new ScSingleRefData *[ nP_RefTr ];
for( nLauf = 0 ; nLauf < nP_RefTr ; nLauf++ )
- ppP_RefTr[ nLauf ] = NULL;
+ ppP_RefTr[ nLauf ] = nullptr;
nP_Ext = 32;
ppP_Ext = new EXTCONT*[ nP_Ext ];
@@ -166,7 +166,7 @@ bool TokenPool::GrowString()
for( nL = 0 ; nL < nP_Str ; nL++ )
ppP_StrNew[ nL ] = ppP_Str[ nL ];
for( nL = nP_Str ; nL < nP_StrNew ; nL++ )
- ppP_StrNew[ nL ] = NULL;
+ ppP_StrNew[ nL ] = nullptr;
nP_Str = nP_StrNew;
@@ -233,7 +233,7 @@ bool TokenPool::GrowTripel( sal_uInt16 nByMin )
for( nL = 0 ; nL < nP_RefTr ; nL++ )
ppP_RefTrNew[ nL ] = ppP_RefTr[ nL ];
for( nL = nP_RefTr ; nL < nP_RefTrNew ; nL++ )
- ppP_RefTrNew[ nL ] = NULL;
+ ppP_RefTrNew[ nL ] = nullptr;
nP_RefTr = nP_RefTrNew;
@@ -370,7 +370,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId )
case T_Str:
{
sal_uInt16 n = pElement[ nId ];
- OUString* p = ( n < nP_Str )? ppP_Str[ n ] : NULL;
+ OUString* p = ( n < nP_Str )? ppP_Str[ n ] : nullptr;
if (p)
pScToken->AddString(mrStringPool.intern(*p));
else
@@ -401,7 +401,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId )
case T_RefC:
{
sal_uInt16 n = pElement[ nId ];
- ScSingleRefData* p = ( n < nP_RefTr )? ppP_RefTr[ n ] : NULL;
+ ScSingleRefData* p = ( n < nP_RefTr )? ppP_RefTr[ n ] : nullptr;
if (p)
pScToken->AddSingleReference( *p );
else
@@ -435,7 +435,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId )
case T_Ext:
{
sal_uInt16 n = pElement[ nId ];
- EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : NULL;
+ EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : nullptr;
if( p )
{
@@ -451,7 +451,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId )
case T_Nlf:
{
sal_uInt16 n = pElement[ nId ];
- NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : NULL;
+ NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : nullptr;
if( p )
pScToken->AddColRowName( p->aRef );
@@ -462,7 +462,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId )
case T_Matrix:
{
sal_uInt16 n = pElement[ nId ];
- ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : NULL;
+ ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : nullptr;
if( p )
pScToken->AddMatrix( p );
@@ -550,7 +550,7 @@ bool TokenPool::GetElementRek( const sal_uInt16 nId )
nAnz = 0;
bRet = false;
}
- sal_uInt16* pAkt = nAnz ? &pP_Id[ nFirstId ] : NULL;
+ sal_uInt16* pAkt = nAnz ? &pP_Id[ nFirstId ] : nullptr;
if (nAnz > nP_Id - nFirstId)
{
SAL_WARN("sc.filter", "TokenPool::GetElementRek: nAnz > nP_Id - nFirstId");
@@ -910,7 +910,7 @@ bool TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const
const OUString* TokenPool::GetExternal( const TokenId& rId ) const
{
- const OUString* p = NULL;
+ const OUString* p = nullptr;
sal_uInt16 n = (sal_uInt16) rId;
if( n && n <= nElementAkt )
{
@@ -932,7 +932,7 @@ ScMatrix* TokenPool::GetMatrix( unsigned int n ) const
return ppP_Matrix[ n ];
else
SAL_WARN("sc.filter", "GetMatrix: " << n << " >= " << nP_MatrixAkt << "\n");
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 1792c046cf68..83f2aa3e41d4 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1412,7 +1412,7 @@ namespace {
/** Creates and returns an Excel text object from the passed title. */
XclExpChTextRef lclCreateTitle( const XclExpChRoot& rRoot, Reference< XTitled > xTitled, sal_uInt16 nTarget,
- const OUString* pSubTitle = NULL )
+ const OUString* pSubTitle = nullptr )
{
Reference< XTitle > xTitle;
if( xTitled.is() )
@@ -3344,7 +3344,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
OUString aSubTitle;
lcl_getChartSubTitle(xChartDoc, aSubTitle);
mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE,
- !aSubTitle.isEmpty() ? &aSubTitle : NULL );
+ !aSubTitle.isEmpty() ? &aSubTitle : nullptr );
// diagrams (axes sets)
sal_uInt16 nFreeGroupIdx = mxPrimAxesSet->Convert( xDiagram, 0 );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index d94bf88db4e3..1f5418d4552c 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -66,7 +66,7 @@ struct XclExpHashEntry
{
const XclExpString* mpString; /// Pointer to the string (no ownership).
sal_uInt32 mnSstIndex; /// The SST index of this string.
- inline explicit XclExpHashEntry( const XclExpString* pString = 0, sal_uInt32 nSstIndex = 0 ) :
+ inline explicit XclExpHashEntry( const XclExpString* pString = nullptr, sal_uInt32 nSstIndex = 0 ) :
mpString( pString ), mnSstIndex( nSstIndex ) {}
};
@@ -514,14 +514,14 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
FSNS( XML_r, XML_id ), !sId.isEmpty()
? XclXmlUtils::ToOString( sId ).getStr()
- : NULL,
- XML_location, mxTextMark.get() != NULL
+ : nullptr,
+ XML_location, mxTextMark.get() != nullptr
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
- : NULL,
+ : nullptr,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
XML_display, mbSetDisplay
? XclXmlUtils::ToOString(m_Repr).getStr()
- : NULL,
+ : nullptr,
FSEND );
}
@@ -784,7 +784,7 @@ namespace {
const char* GetOperatorString(ScConditionMode eMode, bool& bFrmla2)
{
- const char *pRet = NULL;
+ const char *pRet = nullptr;
switch(eMode)
{
case SC_COND_EQUAL:
@@ -814,10 +814,10 @@ const char* GetOperatorString(ScConditionMode eMode, bool& bFrmla2)
pRet = "notBetween";
break;
case SC_COND_DUPLICATE:
- pRet = NULL;
+ pRet = nullptr;
break;
case SC_COND_NOTDUPLICATE:
- pRet = NULL;
+ pRet = nullptr;
break;
case SC_COND_DIRECT:
break;
@@ -1022,7 +1022,7 @@ const char* getTimePeriodString( condformat::ScCondFormatDateType eType )
default:
break;
}
- return NULL;
+ return nullptr;
}
}
@@ -1157,7 +1157,7 @@ OString createGuidStringFromInt(sal_uInt8 nGuid[16])
OString generateGUIDString()
{
sal_uInt8 nGuid[16];
- rtl_createUuid(nGuid, NULL, true);
+ rtl_createUuid(nGuid, nullptr, true);
return createGuidStringFromInt(nGuid);
}
@@ -1226,7 +1226,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat
else if(pFormatEntry->GetType() == condformat::DATE)
maCFList.AppendNewRecord( new XclExpDateFormat( GetRoot(), static_cast<const ScCondDateFormatEntry&>(*pFormatEntry), ++rIndex ) );
}
- aScRanges.Format( msSeqRef, SCA_VALID, NULL, formula::FormulaGrammar::CONV_XL_A1 );
+ aScRanges.Format( msSeqRef, SCA_VALID, nullptr, formula::FormulaGrammar::CONV_XL_A1 );
if(!aExtEntries.empty() && xExtLst.get())
{
@@ -1424,8 +1424,8 @@ void XclExpIconSet::SaveXml( XclExpXmlStream& rStrm )
const char* pIconSetName = getIconSetName(mrFormat.GetIconSetData()->eIconSetType);
rWorksheet->startElement( XML_iconSet,
XML_iconSet, pIconSetName,
- XML_showValue, mrFormat.GetIconSetData()->mbShowValue ? NULL : "0",
- XML_reverse, mrFormat.GetIconSetData()->mbReverse ? "1" : NULL,
+ XML_showValue, mrFormat.GetIconSetData()->mbShowValue ? nullptr : "0",
+ XML_reverse, mrFormat.GetIconSetData()->mbReverse ? "1" : nullptr,
FSEND );
maCfvoList.SaveXml( rStrm );
@@ -1496,7 +1496,7 @@ const char* lcl_GetValidationType( sal_uInt32 nFlags )
case EXC_DV_MODE_TEXTLEN: return "textLength";
case EXC_DV_MODE_CUSTOM: return "custom";
}
- return NULL;
+ return nullptr;
}
const char* lcl_GetOperatorType( sal_uInt32 nFlags )
@@ -1512,7 +1512,7 @@ const char* lcl_GetOperatorType( sal_uInt32 nFlags )
case EXC_DV_COND_EQGREATER: return "greaterThanOrEqual";
case EXC_DV_COND_EQLESS: return "lessThanOrEqual";
}
- return NULL;
+ return nullptr;
}
} // namespace
diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index ff487e6963b9..640e306d347a 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -155,7 +155,7 @@ void XclExpTablesManager::Initialize()
XclExpTables* XclExpTablesManager::GetTablesBySheet( SCTAB nTab )
{
TablesMapType::iterator it = maTablesMap.find(nTab);
- return it == maTablesMap.end() ? NULL : it->second;
+ return it == maTablesMap.end() ? nullptr : it->second;
}
XclExpTables::Entry::Entry( const ScDBData* pData, sal_Int32 nTableId ) :
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index ec6e8dfe8182..16f0cc4148d4 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -241,7 +241,7 @@ void XclExpExtIconSet::SaveXml(XclExpXmlStream& rStrm)
rWorksheet->startElementNS(XML_x14, XML_iconSet,
XML_iconSet, mpIconSetName,
- XML_custom, mbCustom ? XclXmlUtils::ToPsz10(mbCustom) : NULL,
+ XML_custom, mbCustom ? XclXmlUtils::ToPsz10(mbCustom) : nullptr,
XML_reverse, XclXmlUtils::ToPsz10(mbReverse),
XML_showValue, XclXmlUtils::ToPsz10(mbShowValue),
FSEND);
@@ -259,7 +259,7 @@ void XclExpExtIconSet::SaveXml(XclExpXmlStream& rStrm)
XclExpExtCfRule::XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority ):
XclExpRoot(rRoot),
maId(rId),
- pType(NULL),
+ pType(nullptr),
mnPriority(nPriority)
{
switch (rFormat.GetType())
@@ -290,7 +290,7 @@ void XclExpExtCfRule::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElementNS( XML_x14, XML_cfRule,
XML_type, pType,
- XML_priority, mnPriority == -1 ? NULL : OString::number(mnPriority).getStr(),
+ XML_priority, mnPriority == -1 ? nullptr : OString::number(mnPriority).getStr(),
XML_id, maId.getStr(),
FSEND );
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 90c1a1452bfd..7ef64cc074bf 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -38,9 +38,9 @@ using namespace ::formula;
// External reference log =====================================================
XclExpRefLogEntry::XclExpRefLogEntry() :
- mpUrl( 0 ),
- mpFirstTab( 0 ),
- mpLastTab( 0 ),
+ mpUrl( nullptr ),
+ mpFirstTab( nullptr ),
+ mpLastTab( nullptr ),
mnFirstXclTab( EXC_TAB_DELETED ),
mnLastXclTab( EXC_TAB_DELETED )
{
@@ -57,8 +57,8 @@ struct XclExpScToken
const FormulaToken* mpScToken; /// Currently processed Calc token.
sal_uInt8 mnSpaces; /// Number of spaces before the Calc token.
- inline explicit XclExpScToken() : mpScToken( 0 ), mnSpaces( 0 ) {}
- inline bool Is() const { return mpScToken != 0; }
+ inline explicit XclExpScToken() : mpScToken( nullptr ), mnSpaces( 0 ) {}
+ inline bool Is() const { return mpScToken != nullptr; }
inline StackVar GetType() const { return mpScToken ? mpScToken->GetType() : static_cast< StackVar >( svUnknown ); }
inline OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : static_cast< OpCode >( ocNone ); }
};
@@ -199,7 +199,7 @@ void XclExpFuncData::IncParamInfoIdx()
++mpParamInfo;
// if last parameter type is 'Excel-only' or 'Calc-only', do not repeat it
else if( IsExcelOnlyParam() || IsCalcOnlyParam() )
- mpParamInfo = 0;
+ mpParamInfo = nullptr;
// points to last info, but parameter pairs expected, move to previous info
else if( mrFuncInfo.IsParamPairs() )
--mpParamInfo;
@@ -278,12 +278,12 @@ struct XclExpCompData
XclExpCompData::XclExpCompData( const XclExpCompConfig* pCfg ) :
mrCfg( pCfg ? *pCfg : spConfigTable[ 0 ] ),
- mpLinkMgr( 0 ),
- mpRefLog( 0 ),
- mpScBasePos( 0 ),
+ mpLinkMgr( nullptr ),
+ mpRefLog( nullptr ),
+ mpScBasePos( nullptr ),
mbStopAtSep( false ),
mbVolatile( false ),
- mbOk( pCfg != 0 )
+ mbOk( pCfg != nullptr )
{
OSL_ENSURE( pCfg, "XclExpFmlaCompImpl::Init - unknown formula type" );
}
@@ -299,7 +299,7 @@ public:
/** Creates an Excel token array from the passed Calc token array. */
XclTokenArrayRef CreateFormula(
XclFormulaType eType, const ScTokenArray& rScTokArr,
- const ScAddress* pScBasePos = 0, XclExpRefLog* pRefLog = 0 );
+ const ScAddress* pScBasePos = nullptr, XclExpRefLog* pRefLog = nullptr );
/** Creates a single error token containing the passed error code. */
XclTokenArrayRef CreateErrorFormula( sal_uInt8 nErrCode );
/** Creates a single token for a special cell reference. */
@@ -559,7 +559,7 @@ const XclExpCompConfig* XclExpFmlaCompImpl::GetConfigForType( XclFormulaType eTy
{
XclExpCompConfigMap::const_iterator aIt = maCfgMap.find( eType );
OSL_ENSURE( aIt != maCfgMap.end(), "XclExpFmlaCompImpl::GetConfigForType - unknown formula type" );
- return (aIt == maCfgMap.end()) ? 0 : &aIt->second;
+ return (aIt == maCfgMap.end()) ? nullptr : &aIt->second;
}
void XclExpFmlaCompImpl::Init( XclFormulaType eType )
@@ -583,12 +583,12 @@ void XclExpFmlaCompImpl::Init( XclFormulaType eType, const ScTokenArray& rScTokA
case EXC_FMLATYPE_CELL:
case EXC_FMLATYPE_MATRIX:
case EXC_FMLATYPE_CHART:
- mxData->mbOk = pScBasePos != 0;
+ mxData->mbOk = pScBasePos != nullptr;
OSL_ENSURE( mxData->mbOk, "XclExpFmlaCompImpl::Init - missing cell address" );
mxData->mpScBasePos = pScBasePos;
break;
case EXC_FMLATYPE_SHARED:
- mxData->mbOk = pScBasePos != 0;
+ mxData->mbOk = pScBasePos != nullptr;
assert(mxData->mbOk && "XclExpFmlaCompImpl::Init - missing cell address");
if (mxData->mbOk)
{
@@ -1346,7 +1346,7 @@ void XclExpFmlaCompImpl::ProcessFunction( const XclExpScToken& rTokData )
}
}
- mxData->mbOk = pFuncInfo != 0;
+ mxData->mbOk = pFuncInfo != nullptr;
if( !mxData->mbOk ) return;
// internal functions equivalent to an existing add-in
@@ -1897,7 +1897,7 @@ XclExpRefLogEntry* XclExpFmlaCompImpl::GetNewRefLogEntry()
mxData->mpRefLog->resize( mxData->mpRefLog->size() + 1 );
return &mxData->mpRefLog->back();
}
- return 0;
+ return nullptr;
}
void XclExpFmlaCompImpl::ProcessCellRef( const XclExpScToken& rTokData )
@@ -1925,7 +1925,7 @@ void XclExpFmlaCompImpl::ProcessCellRef( const XclExpScToken& rTokData )
mxData->mpLinkMgr->StoreCell(aRefData, *mxData->mpScBasePos);
// create the tRef, tRefErr, tRefN, tRef3d, or tRefErr3d token
- if (!mxData->mrCfg.mb3DRefOnly && IsRef2D(aRefData, mxData->mpLinkMgr != 0))
+ if (!mxData->mrCfg.mb3DRefOnly && IsRef2D(aRefData, mxData->mpLinkMgr != nullptr))
{
// 2D reference (not in defined names, but allowed in range lists)
sal_uInt8 nBaseId = (!mxData->mpScBasePos && lclIsRefRel2D( aRefData )) ? EXC_TOKID_REFN :
@@ -1970,7 +1970,7 @@ void XclExpFmlaCompImpl::ProcessRangeRef( const XclExpScToken& rTokData )
mxData->mpLinkMgr->StoreCellRange(aRefData, *mxData->mpScBasePos);
// create the tArea, tAreaErr, tAreaN, tArea3d, or tAreaErr3d token
- if (!mxData->mrCfg.mb3DRefOnly && IsRef2D(aRefData, mxData->mpLinkMgr != 0))
+ if (!mxData->mrCfg.mb3DRefOnly && IsRef2D(aRefData, mxData->mpLinkMgr != nullptr))
{
// 2D reference (not in name formulas, but allowed in range lists)
sal_uInt8 nBaseId = (!mxData->mpScBasePos && lclIsRefRel2D( aRefData )) ? EXC_TOKID_AREAN :
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index e67cba02f623..dba973ba0602 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -56,9 +56,9 @@ using ::com::sun::star::i18n::XBreakIterator;
XclExpProgressBar::XclExpProgressBar( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
mxProgress( new ScfProgressBar( rRoot.GetDocShell(), STR_SAVE_DOC ) ),
- mpSubProgress( 0 ),
- mpSubRowCreate( 0 ),
- mpSubRowFinal( 0 ),
+ mpSubProgress( nullptr ),
+ mpSubRowCreate( nullptr ),
+ mpSubRowFinal( nullptr ),
mnSegRowFinal( SCF_INV_SEGMENT ),
mnRowCount( 0 )
{
@@ -115,7 +115,7 @@ void XclExpProgressBar::ActivateCreateRowsSegment()
mpSubProgress->ActivateSegment( nSeg );
}
else
- mpSubProgress = 0;
+ mpSubProgress = nullptr;
}
void XclExpProgressBar::ActivateFinalRowsSegment()
@@ -599,7 +599,7 @@ XclExpStringRef XclExpStringHelper::CreateString(
rEE.SetUpdateMode( true );
// create the string
rEE.SetText( pParaObj->GetTextObject() );
- xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen );
+ xString = lclCreateFormattedString( rRoot, rEE, nullptr, nFlags, nMaxLen );
rEE.SetUpdateMode( bOldUpdateMode );
// limit formats - TODO: BIFF dependent
if( !xString->IsEmpty() )
@@ -626,7 +626,7 @@ XclExpStringRef XclExpStringHelper::CreateString(
bool bOldUpdateMode = rEE.GetUpdateMode();
rEE.SetUpdateMode( true );
rEE.SetText( rEditObj );
- xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen );
+ xString = lclCreateFormattedString( rRoot, rEE, nullptr, nFlags, nMaxLen );
rEE.SetUpdateMode( bOldUpdateMode );
// limit formats - TODO: BIFF dependent
if( !xString->IsEmpty() )
@@ -697,7 +697,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
else
aFontData.mnHeight = 10;
- const FontList* pFontList = 0;
+ const FontList* pFontList = nullptr;
if( SfxObjectShell* pDocShell = GetDocShell() )
{
if( const SvxFontListItem* pInfoItem = static_cast< const SvxFontListItem* >(
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 023afdbef584..254484de73e6 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -84,7 +84,7 @@ class XclExpExtNameDde : public XclExpExtNameBase
{
public:
explicit XclExpExtNameDde( const XclExpRoot& rRoot, const OUString& rName,
- sal_uInt16 nFlags, const ScMatrix* pResults = 0 );
+ sal_uInt16 nFlags, const ScMatrix* pResults = nullptr );
private:
/** Writes additional record contents. */
@@ -398,7 +398,7 @@ public:
/** Finds SUPBOOK index and SUPBOOK sheet range from given Excel sheet range.
@return An XTI structure containing SUPBOOK and sheet indexes. */
XclExpXti GetXti( sal_uInt16 nFirstXclTab, sal_uInt16 nLastXclTab,
- XclExpRefLogEntry* pRefLogEntry = 0 ) const;
+ XclExpRefLogEntry* pRefLogEntry = nullptr ) const;
/** Stores all cells in the given range in a CRN record list. */
void StoreCellRange( const ScRange& rRange );
@@ -428,7 +428,7 @@ public:
const OUString& rName, const ScExternalRefCache::TokenArrayRef& rArray );
XclExpXti GetXti( sal_uInt16 nFileId, const OUString& rTabName, sal_uInt16 nXclTabSpan,
- XclExpRefLogEntry* pRefLogEntry = NULL );
+ XclExpRefLogEntry* pRefLogEntry = nullptr );
/** Writes all SUPBOOK records with their sub records. */
virtual void Save( XclExpStream& rStrm ) override;
@@ -1054,8 +1054,8 @@ void XclExpExtName::SaveXml(XclExpXmlStream& rStrm)
pExternalLink->startElement(XML_definedName,
XML_name, XclXmlUtils::ToOString(maName).getStr(),
- XML_refersTo, NULL,
- XML_sheetId, NULL,
+ XML_refersTo, nullptr,
+ XML_sheetId, nullptr,
FSEND);
pExternalLink->endElement(XML_definedName);
@@ -1572,7 +1572,7 @@ bool XclExpSupbook::IsDdeLink( const OUString& rApplic, const OUString& rTopic )
void XclExpSupbook::FillRefLogEntry( XclExpRefLogEntry& rRefLogEntry,
sal_uInt16 nFirstSBTab, sal_uInt16 nLastSBTab ) const
{
- rRefLogEntry.mpUrl = maUrlEncoded.IsEmpty() ? 0 : &maUrlEncoded;
+ rRefLogEntry.mpUrl = maUrlEncoded.IsEmpty() ? nullptr : &maUrlEncoded;
rRefLogEntry.mpFirstTab = GetTabName( nFirstSBTab );
rRefLogEntry.mpLastTab = GetTabName( nLastSBTab );
}
@@ -1729,7 +1729,7 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
const XclExpString* XclExpSupbook::GetTabName( sal_uInt16 nSBTab ) const
{
XclExpXctRef xXct = maXctList.GetRecord( nSBTab );
- return xXct ? &xXct->GetTabName() : 0;
+ return xXct ? &xXct->GetTabName() : nullptr;
}
void XclExpSupbook::WriteBody( XclExpStream& rStrm )
@@ -1873,7 +1873,7 @@ void XclExpSupbookBuffer::StoreCell( sal_uInt16 nFileId, const OUString& rTabNam
nSupbookId = Append(xSupbook);
}
- ScExternalRefCache::TokenRef pToken = pRefMgr->getSingleRefToken(nFileId, rTabName, rCell, NULL, NULL);
+ ScExternalRefCache::TokenRef pToken = pRefMgr->getSingleRefToken(nFileId, rTabName, rCell, nullptr, nullptr);
if (!pToken.get())
return;
@@ -1917,7 +1917,7 @@ void XclExpSupbookBuffer::StoreCellRange( sal_uInt16 nFileId, const OUString& rT
aMatrixList.reserve(nTabCount);
// This is a new'ed instance, so we must manage its life cycle here.
- ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(nFileId, rTabName, rRange, NULL);
+ ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(nFileId, rTabName, rRange, nullptr);
if (!pArray.get())
return;
@@ -2103,7 +2103,7 @@ void XclExpSupbookBuffer::SaveXml( XclExpXmlStream& rStrm )
OUString sId;
sax_fastparser::FSHelperPtr pExternalLink = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName( "xl/", "externalLinks/externalLink", nId),
- XclXmlUtils::GetStreamName( NULL, "externalLinks/externalLink", nId),
+ XclXmlUtils::GetStreamName( nullptr, "externalLinks/externalLink", nId),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml",
CREATE_OFFICEDOC_RELATION_TYPE("externalLink"),
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index c4b07996954f..f4ed5eb51dcb 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -304,7 +304,7 @@ void XclExpName::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_functionGroupId, "",
// OOXTODO: XML_help, "",
XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_HIDDEN ) ),
- XML_localSheetId, mnScTab == SCTAB_GLOBAL ? NULL : OString::number( mnScTab ).getStr(),
+ XML_localSheetId, mnScTab == SCTAB_GLOBAL ? nullptr : OString::number( mnScTab ).getStr(),
XML_name, XclXmlUtils::ToOString( maOrigName ).getStr(),
// OOXTODO: XML_publishToServer, "",
// OOXTODO: XML_shortcutKey, "",
@@ -353,7 +353,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertName( SCTAB nTab, sal_uInt16 nScNameIdx
if (nNameIdx)
return nNameIdx;
- const ScRangeData* pData = NULL;
+ const ScRangeData* pData = nullptr;
ScRangeName* pRN = (nTab == SCTAB_GLOBAL) ? GetDoc().GetRangeName() : GetDoc().GetRangeName(nTab);
if (pRN)
pData = pRN->findByIndex(nScNameIdx);
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 19986afdc109..5fb1951236ba 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -412,7 +412,7 @@ XclExpImgData* XclExpPageSettings::getGraphicExport()
if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
return new XclExpImgData( *pGraphic, EXC_ID8_IMGDATA );
- return NULL;
+ return nullptr;
}
XclExpChartPageSettings::XclExpChartPageSettings( const XclExpRoot& rRoot ) :
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index a0ca2ba81c30..5b3fe07bf7b4 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -510,7 +510,7 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
{
// get the string collection with original source elements
const ScDPSaveData* pSaveData = rDPObj.GetSaveData();
- const ScDPDimensionSaveData* pDimData = NULL;
+ const ScDPDimensionSaveData* pDimData = nullptr;
if (pSaveData)
pDimData = pSaveData->GetExistingDimensionData();
@@ -900,12 +900,12 @@ XclExpPTItem::XclExpPTItem( const XclExpPCField& rCacheField, sal_uInt16 nCacheI
{
maItemInfo.mnType = EXC_SXVI_TYPE_DATA;
maItemInfo.mnCacheIdx = nCacheIdx;
- maItemInfo.maVisName.mbUseCache = mpCacheItem != 0;
+ maItemInfo.maVisName.mbUseCache = mpCacheItem != nullptr;
}
XclExpPTItem::XclExpPTItem( sal_uInt16 nItemType, sal_uInt16 nCacheIdx, bool bUseCache ) :
XclExpRecord( EXC_ID_SXVI, 8 ),
- mpCacheItem( 0 )
+ mpCacheItem( nullptr )
{
maItemInfo.mnType = nItemType;
maItemInfo.mnCacheIdx = nCacheIdx;
@@ -1147,7 +1147,7 @@ void XclExpPTField::Save( XclExpStream& rStrm )
XclExpPTItem* XclExpPTField::GetItemAcc( const OUString& rName )
{
- XclExpPTItem* pItem = 0;
+ XclExpPTItem* pItem = nullptr;
for( size_t nPos = 0, nSize = maItemList.GetSize(); !pItem && (nPos < nSize); ++nPos )
if( maItemList.GetRecord( nPos )->GetItemName() == rName )
pItem = maItemList.GetRecord( nPos ).get();
@@ -1283,7 +1283,7 @@ void XclExpPivotTable::Save( XclExpStream& rStrm )
XclExpPTField* XclExpPivotTable::GetFieldAcc( const OUString& rName )
{
- XclExpPTField* pField = 0;
+ XclExpPTField* pField = nullptr;
for( size_t nPos = 0, nSize = maFieldList.GetSize(); !pField && (nPos < nSize); ++nPos )
if( maFieldList.GetRecord( nPos )->GetFieldName() == rName )
pField = maFieldList.GetRecord( nPos ).get();
@@ -1298,7 +1298,7 @@ XclExpPTField* XclExpPivotTable::GetFieldAcc( const ScDPSaveDimension& rSaveDim
// a real dimension
OUString aFieldName = ScDPUtil::getSourceDimensionName(rSaveDim.GetName());
- return aFieldName.isEmpty() ? NULL : GetFieldAcc(aFieldName);
+ return aFieldName.isEmpty() ? nullptr : GetFieldAcc(aFieldName);
}
// fill data --------------------------------------------------------------
@@ -1386,7 +1386,7 @@ void XclExpPivotTable::Finalize()
// find data field orientation field
maPTInfo.mnDataPos = EXC_SXVIEW_DATALAST;
- const ScfUInt16Vec* pFieldVec = 0;
+ const ScfUInt16Vec* pFieldVec = nullptr;
switch( maPTInfo.mnDataAxis )
{
case EXC_SXVD_AXIS_ROW: pFieldVec = &maRowFields; break;
@@ -1701,7 +1701,7 @@ const XclExpPivotCache* XclExpPivotTableManager::CreatePivotCache( const ScDPObj
return xNewPCache.get();
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 1fd6f7dcc8bc..b03e89150652 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -106,7 +106,7 @@ const char* toOOXMLSubtotalType( sheet::GeneralFunction eFunc )
default:
;
}
- return NULL;
+ return nullptr;
}
}
@@ -127,7 +127,7 @@ void XclExpXmlPivotCaches::SaveXml( XclExpXmlStream& rStrm )
OUString aRelId;
sax_fastparser::FSHelperPtr pPCStrm = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName("xl/pivotCache/", "pivotCacheDefinition", nCacheId),
- XclXmlUtils::GetStreamName(NULL, "pivotCache/pivotCacheDefinition", nCacheId),
+ XclXmlUtils::GetStreamName(nullptr, "pivotCache/pivotCacheDefinition", nCacheId),
rStrm.GetCurrentStream()->getOutputStream(),
CREATE_XL_CONTENT_TYPE("pivotCacheDefinition"),
CREATE_OFFICEDOC_RELATION_TYPE("pivotCacheDefinition"),
@@ -160,11 +160,11 @@ const XclExpXmlPivotCaches::Entry* XclExpXmlPivotCaches::GetCache( sal_Int32 nCa
{
if (nCacheId <= 0)
// cache ID is 1-based.
- return NULL;
+ return nullptr;
size_t nPos = nCacheId - 1;
if (nPos >= maCaches.size())
- return NULL;
+ return nullptr;
return &maCaches[nPos];
}
@@ -179,7 +179,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
OUString aRelId;
sax_fastparser::FSHelperPtr pRecStrm = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName("xl/pivotCache/", "pivotCacheRecords", nCounter),
- XclXmlUtils::GetStreamName(NULL, "pivotCacheRecords", nCounter),
+ XclXmlUtils::GetStreamName(nullptr, "pivotCacheRecords", nCounter),
pDefStrm->getOutputStream(),
CREATE_XL_CONTENT_TYPE("pivotCacheRecords"),
CREATE_OFFICEDOC_RELATION_TYPE("pivotCacheRecords"),
@@ -367,7 +367,7 @@ XclExpXmlPivotCaches& XclExpXmlPivotTableManager::GetCaches()
XclExpXmlPivotTables* XclExpXmlPivotTableManager::GetTablesBySheet( SCTAB nTab )
{
TablesType::iterator it = maTables.find(nTab);
- return it == maTables.end() ? NULL : it->second;
+ return it == maTables.end() ? nullptr : it->second;
}
XclExpXmlPivotTables::Entry::Entry( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId ) :
@@ -390,7 +390,7 @@ void XclExpXmlPivotTables::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr pPivotStrm = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName("xl/pivotTables/", "pivotTable", nPivotId),
- XclXmlUtils::GetStreamName(NULL, "../pivotTables/pivotTable", nPivotId),
+ XclXmlUtils::GetStreamName(nullptr, "../pivotTables/pivotTable", nPivotId),
pWSStrm->getOutputStream(),
CREATE_XL_CONTENT_TYPE("pivotTable"),
CREATE_OFFICEDOC_RELATION_TYPE("pivotTable"));
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 716b360226f7..26f8bbb1b49c 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -720,7 +720,7 @@ OString XclXmlUtils::ToOString( const OUString& s )
OStringBuffer& XclXmlUtils::ToOString( OStringBuffer& s, const ScAddress& rAddress )
{
- rAddress.Format(s, SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1));
+ rAddress.Format(s, SCA_VALID, nullptr, ScAddress::Details( FormulaGrammar::CONV_XL_A1));
return s;
}
@@ -735,14 +735,14 @@ OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer )
OString XclXmlUtils::ToOString( const ScRange& rRange )
{
- OUString sRange(rRange.Format(SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1)));
+ OUString sRange(rRange.Format(SCA_VALID, nullptr, ScAddress::Details( FormulaGrammar::CONV_XL_A1)));
return ToOString( sRange );
}
OString XclXmlUtils::ToOString( const ScRangeList& rRangeList )
{
OUString s;
- rRangeList.Format(s, SCA_VALID, NULL, FormulaGrammar::CONV_XL_A1, ' ');
+ rRangeList.Format(s, SCA_VALID, nullptr, FormulaGrammar::CONV_XL_A1, ' ');
return ToOString( s );
}
@@ -903,15 +903,15 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
const char* pUnderline = lcl_GetUnderlineStyle( rFontData.GetScUnderline(), bHaveUnderline );
const char* pVertAlign = lcl_ToVerticalAlignmentRun( rFontData.GetScEscapement(), bHaveVertAlign );
- lcl_WriteValue( pStream, XML_b, rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : NULL );
- lcl_WriteValue( pStream, XML_i, rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : NULL );
- lcl_WriteValue( pStream, XML_strike, rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : NULL );
+ lcl_WriteValue( pStream, XML_b, rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : nullptr );
+ lcl_WriteValue( pStream, XML_i, rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : nullptr );
+ lcl_WriteValue( pStream, XML_strike, rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : nullptr );
// OOXTODO: lcl_WriteValue( rStream, XML_condense, ); // mac compatibility setting
// OOXTODO: lcl_WriteValue( rStream, XML_extend, ); // compatibility setting
- lcl_WriteValue( pStream, XML_outline, rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : NULL );
- lcl_WriteValue( pStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : NULL );
- lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : NULL );
- lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : NULL );
+ lcl_WriteValue( pStream, XML_outline, rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : nullptr );
+ lcl_WriteValue( pStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : nullptr );
+ lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : nullptr );
+ lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : nullptr );
lcl_WriteValue( pStream, XML_sz, OString::number( (double) (rFontData.mnHeight / 20.0) ).getStr() ); // Twips->Pt
if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) )
pStream->singleElement( XML_color,
@@ -923,14 +923,14 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
FSEND );
lcl_WriteValue( pStream, nFontId, XclXmlUtils::ToOString( rFontData.maName ).getStr() );
lcl_WriteValue( pStream, XML_family, OString::number( rFontData.mnFamily ).getStr() );
- lcl_WriteValue( pStream, XML_charset, rFontData.mnCharSet != 0 ? OString::number( rFontData.mnCharSet ).getStr() : NULL );
+ lcl_WriteValue( pStream, XML_charset, rFontData.mnCharSet != 0 ? OString::number( rFontData.mnCharSet ).getStr() : nullptr );
return pStream;
}
XclExpXmlStream::XclExpXmlStream( const Reference< XComponentContext >& rCC, bool bExportVBA )
: XmlFilterBase( rCC ),
- mpRoot( NULL ),
+ mpRoot( nullptr ),
mbExportVBA(bExportVBA)
{
}
@@ -1020,12 +1020,12 @@ bool XclExpXmlStream::importDocument() throw()
oox::vml::Drawing* XclExpXmlStream::getVmlDrawing()
{
- return 0;
+ return nullptr;
}
const oox::drawingml::Theme* XclExpXmlStream::getCurrentTheme() const
{
- return 0;
+ return nullptr;
}
const oox::drawingml::table::TableStyleListPtr XclExpXmlStream::getTableStyles()
@@ -1036,7 +1036,7 @@ const oox::drawingml::table::TableStyleListPtr XclExpXmlStream::getTableStyles()
oox::drawingml::chart::ChartConverter* XclExpXmlStream::getChartConverter()
{
// DO NOT CALL
- return NULL;
+ return nullptr;
}
ScDocShell* XclExpXmlStream::getDocShell()
@@ -1048,7 +1048,7 @@ ScDocShell* XclExpXmlStream::getDocShell()
if ( pObj )
return static_cast < ScDocShell* >( pObj->GetEmbeddedObject() );
- return 0;
+ return nullptr;
}
bool XclExpXmlStream::exportDocument()
@@ -1068,7 +1068,7 @@ bool XclExpXmlStream::exportDocument()
// NOTE: Don't use SotStorage or SvStream any more, and never call
// SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
// Instead, write via XOutputStream instance.
- tools::SvRef<SotStorage> rStorage = static_cast<SotStorage*>(NULL);
+ tools::SvRef<SotStorage> rStorage = static_cast<SotStorage*>(nullptr);
XclExpObjList::ResetCounters();
XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, rDoc, RTL_TEXTENCODING_DONTKNOW );
@@ -1138,7 +1138,7 @@ bool XclExpXmlStream::exportDocument()
if (xStatusIndicator.is())
xStatusIndicator->end();
- mpRoot = NULL;
+ mpRoot = nullptr;
return true;
}
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index 8c3bbd0895dd..58d1acef6731 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -425,7 +425,7 @@ void XclExpString::WriteXml( XclExpXmlStream& rStrm ) const
XclFormatRunVec::const_iterator aIt = maFormats.begin(), aEnd = maFormats.end();
sal_uInt16 nStart = 0;
- const XclExpFont* pFont = NULL;
+ const XclExpFont* pFont = nullptr;
for ( ; aIt != aEnd; ++aIt )
{
nStart = lcl_WriteRun( rStrm, GetUnicodeBuffer(),
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 8b2dfb61e4ad..68067cfe9ce0 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -513,9 +513,9 @@ XclListColor* XclExpPaletteImpl::SearchListEntry( const Color& rColor, sal_uInt3
rnIndex = 0;
if (mxColorList->empty())
- return NULL;
+ return nullptr;
- XclListColor* pEntry = NULL;
+ XclListColor* pEntry = nullptr;
// search optimization for equal-colored objects occurring repeatedly
if (mnLastIdx < mxColorList->size())
@@ -897,7 +897,7 @@ vcl::Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const S
// fill the font object
vcl::Font aFont;
- ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW, 0, 0, 0, nScScript );
+ ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW, nullptr, nullptr, nullptr, nScScript );
return aFont;
}
@@ -1454,7 +1454,7 @@ OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumbe
if( pEntry->GetType() == css::util::NumberFormat::LOGICAL )
{
// build Boolean number format
- Color* pColor = 0;
+ Color* pColor = nullptr;
OUString aTemp;
const_cast< SvNumberformat* >( pEntry )->GetOutputString( 1.0, aTemp, &pColor );
aFormatStr += "\"" + aTemp + "\";\"" + aTemp + "\";\"";
@@ -2129,7 +2129,7 @@ bool XclExpXF::Equals( const XclExpXF& rCmpXF ) const
void XclExpXF::InitDefault()
{
SetRecHeader( EXC_ID5_XF, (GetBiff() == EXC_BIFF8) ? 20 : 16 );
- mpItemSet = 0;
+ mpItemSet = nullptr;
mnScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND;
mnXclFont = mnXclNumFmt = 0;
SetXmlIds(0, 0);
@@ -2247,7 +2247,7 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
sal_Int32 nXfId = 0;
- const XclExpXF* pStyleXF = NULL;
+ const XclExpXF* pStyleXF = nullptr;
if( IsCellXF() )
{
sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( mnParentXFId );
@@ -2260,7 +2260,7 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
XML_fontId, OString::number( mnXclFont ).getStr(),
XML_fillId, OString::number( mnFillId ).getStr(),
XML_borderId, OString::number( mnBorderId ).getStr(),
- XML_xfId, IsStyleXF() ? NULL : OString::number( nXfId ).getStr(),
+ XML_xfId, IsStyleXF() ? nullptr : OString::number( nXfId ).getStr(),
// OOXTODO: XML_quotePrefix,
// OOXTODO: XML_pivotButton,
// OOXTODO: XML_applyNumberFormat, ;
@@ -2971,7 +2971,7 @@ void XclExpXFBuffer::InsertDefaultRecords()
/* Insert the real default hard cell format -> 0 is document default pattern.
Do it here (and not already above) to really have all built-in styles. */
- Insert( 0, GetDefApiScript() );
+ Insert( nullptr, GetDefApiScript() );
}
void XclExpXFBuffer::AppendXFIndex( sal_uInt32 nXFId )
@@ -3055,34 +3055,34 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
if (!pBorder->FillFromItemSet( rSet, GetPalette(), GetBiff()) )
{
delete pBorder;
- pBorder = NULL;
+ pBorder = nullptr;
}
XclExpCellAlign* pAlign = new XclExpCellAlign;
if (!pAlign->FillFromItemSet( rSet, false, GetBiff()))
{
delete pAlign;
- pAlign = NULL;
+ pAlign = nullptr;
}
XclExpCellProt* pCellProt = new XclExpCellProt;
if (!pCellProt->FillFromItemSet( rSet ))
{
delete pCellProt;
- pCellProt = NULL;
+ pCellProt = nullptr;
}
XclExpColor* pColor = new XclExpColor();
if(!pColor->FillFromItemSet( rSet ))
{
delete pColor;
- pColor = NULL;
+ pColor = nullptr;
}
XclExpDxfFont* pFont = new XclExpDxfFont(rRoot, rSet);
- XclExpNumFmt* pNumFormat = NULL;
- const SfxPoolItem *pPoolItem = NULL;
+ XclExpNumFmt* pNumFormat = nullptr;
+ const SfxPoolItem *pPoolItem = nullptr;
if( rSet.GetItemState( ATTR_VALUE_FORMAT, true, &pPoolItem ) == SfxItemState::SET )
{
sal_uLong nScNumFmt = static_cast< const SfxUInt32Item* >(pPoolItem)->GetValue();
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index e8e4d0000269..3c85323a24d7 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -926,7 +926,7 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm )
void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
{
- const char* sType = NULL;
+ const char* sType = nullptr;
OUString sValue;
XclXmlUtils::GetFormulaTypeAndValue( mrScFmlaCell, sType, sValue );
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
@@ -980,8 +980,8 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_f,
XML_aca, XclXmlUtils::ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
(mxAddRec && mxAddRec->IsVolatile())),
- XML_t, mxAddRec ? "array" : NULL,
- XML_ref, !sFmlaCellRange.isEmpty()? sFmlaCellRange.getStr() : NULL,
+ XML_t, mxAddRec ? "array" : nullptr,
+ XML_ref, !sFmlaCellRange.isEmpty()? sFmlaCellRange.getStr() : nullptr,
// OOXTODO: XML_dt2D, bool
// OOXTODO: XML_dtr, bool
// OOXTODO: XML_del1, bool
@@ -1391,7 +1391,7 @@ void XclExpRkCell::WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol )
// Rows and Columns
XclExpOutlineBuffer::XclExpOutlineBuffer( const XclExpRoot& rRoot, bool bRows ) :
- mpScOLArray( 0 ),
+ mpScOLArray( nullptr ),
maLevelInfos( SC_OL_MAXDEPTH ),
mnCurrLevel( 0 ),
mbCurrCollapse( false )
@@ -2066,7 +2066,7 @@ void XclExpRow::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_row,
XML_r, OString::number( (mnCurrentRow++) ).getStr(),
// OOXTODO: XML_spans, optional
- XML_s, haveFormat ? lcl_GetStyleId( rStrm, mnXFIndex ).getStr() : NULL,
+ XML_s, haveFormat ? lcl_GetStyleId( rStrm, mnXFIndex ).getStr() : nullptr,
XML_customFormat, XclXmlUtils::ToPsz( haveFormat ),
XML_ht, OString::number( (double) mnHeight / 20.0 ).getStr(),
XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_HIDDEN ) ),
@@ -2144,7 +2144,7 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
else
{
comphelper::ThreadPool &rPool = comphelper::ThreadPool::getSharedOptimalPool();
- std::vector<RowFinalizeTask*> pTasks(nThreads, NULL);
+ std::vector<RowFinalizeTask*> pTasks(nThreads, nullptr);
for ( size_t i = 0; i < nThreads; i++ )
pTasks[ i ] = new RowFinalizeTask( rColXFIndexes, i == 0 );
@@ -2170,7 +2170,7 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
XclExpDefaultRowData aMaxDefData;
size_t nMaxDefCount = 0;
// only look for default format in existing rows, if there are more than unused
- XclExpRow* pPrev = NULL;
+ XclExpRow* pPrev = nullptr;
typedef std::vector< XclExpRow* > XclRepeatedRows;
XclRepeatedRows aRepeated;
RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = maRowMap.end();
@@ -2516,7 +2516,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
maRowBfr.AppendCell( xCell, bIsMergedBase );
if ( !aAddNoteText.isEmpty() )
- mxNoteList->AppendNewRecord( new XclExpNote( GetRoot(), aScPos, NULL, aAddNoteText ) );
+ mxNoteList->AppendNewRecord( new XclExpNote( GetRoot(), aScPos, nullptr, aAddNoteText ) );
// other sheet contents
if( pPattern )
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 7d955df20f03..75af048ad80d 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -554,7 +554,7 @@ void XclImpChEscherFormat::Convert( const XclImpChRoot& rRoot,
ScfPropertySet& rPropSet, XclChObjectType eObjType, bool bUsePicFmt ) const
{
const XclChFormatInfo& rFmtInfo = rRoot.GetFormatInfo( eObjType );
- rRoot.ConvertEscherFormat( rPropSet, maData, bUsePicFmt ? &maPicFmt : 0, mnDffFillType, rFmtInfo.mePropMode );
+ rRoot.ConvertEscherFormat( rPropSet, maData, bUsePicFmt ? &maPicFmt : nullptr, mnDffFillType, rFmtInfo.mePropMode );
}
XclImpChFrameBase::XclImpChFrameBase( const XclChFormatInfo& rFmtInfo )
@@ -703,7 +703,7 @@ namespace {
/** Creates a labeled data sequence object, adds link for series title if present. */
Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
const XclImpChSourceLinkRef& xValueLink, const OUString& rValueRole,
- const XclImpChSourceLink* pTitleLink = 0 )
+ const XclImpChSourceLink* pTitleLink = nullptr )
{
// create data sequence for values and title
Reference< XDataSequence > xValueSeq;
@@ -1512,7 +1512,7 @@ void XclImpChDataFormat::UpdateTrendLineFormat()
mx3dDataFmt.reset();
mxAttLabel.reset();
// update data label
- UpdateDataLabel( 0 );
+ UpdateDataLabel( nullptr );
}
void XclImpChDataFormat::Convert( ScfPropertySet& rPropSet, const XclChExtTypeInfo& rTypeInfo ) const
@@ -1580,7 +1580,7 @@ void XclImpChDataFormat::UpdateDataLabel( const XclImpChDataFormat* pParentFmt )
group, the contents of the CHATTACHEDLABEL record are used. In this
case a new CHTEXT group is created and filled with the settings from
the CHATTACHEDLABEL record. */
- const XclImpChText* pDefText = NULL;
+ const XclImpChText* pDefText = nullptr;
if (pParentFmt)
pDefText = pParentFmt->GetDataLabel();
if (!pDefText)
@@ -1713,8 +1713,8 @@ Reference< XPropertySet > XclImpChSerErrorBar::CreateErrorBar( const XclImpChSer
ScfPropertySet aBarProp( xErrorBar );
// plus/minus bars visible?
- aBarProp.SetBoolProperty( EXC_CHPROP_SHOWPOSITIVEERROR, pPosBar != 0 );
- aBarProp.SetBoolProperty( EXC_CHPROP_SHOWNEGATIVEERROR, pNegBar != 0 );
+ aBarProp.SetBoolProperty( EXC_CHPROP_SHOWPOSITIVEERROR, pPosBar != nullptr );
+ aBarProp.SetBoolProperty( EXC_CHPROP_SHOWNEGATIVEERROR, pNegBar != nullptr );
// type of displayed error
switch( pPrimaryBar->maData.mnSourceType )
@@ -2576,7 +2576,7 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const
// no automatic position/size: try to find the correct position and size
if( eApiPos == cssc2::LegendPosition_CUSTOM )
{
- const XclChFramePos* pFramePos = mxFramePos ? &mxFramePos->GetFramePosData() : 0;
+ const XclChFramePos* pFramePos = mxFramePos ? &mxFramePos->GetFramePosData() : nullptr;
/* Legend position. Only the settings from the CHFRAMEPOS record
are used by Excel, the position in the CHLEGEND record will be
@@ -3430,7 +3430,7 @@ void XclImpChAxis::ConvertAxisPosition( ScfPropertySet& rPropSet, const XclImpCh
void XclImpChAxis::ReadChAxisLine( XclImpStream& rStrm )
{
- XclImpChLineFormatRef* pxLineFmt = 0;
+ XclImpChLineFormatRef* pxLineFmt = nullptr;
bool bWallFrame = false;
switch( rStrm.ReaduInt16() )
{
@@ -3616,7 +3616,7 @@ void XclImpChAxesSet::Convert( Reference< XDiagram > xDiagram ) const
// create the axes with grids and axis titles and insert them into the diagram
ConvertAxis( mxXAxis, mxXAxisTitle, xCoordSystem, mxYAxis.get() );
ConvertAxis( mxYAxis, mxYAxisTitle, xCoordSystem, mxXAxis.get() );
- ConvertAxis( mxZAxis, mxZAxisTitle, xCoordSystem, 0 );
+ ConvertAxis( mxZAxis, mxZAxisTitle, xCoordSystem, nullptr );
}
}
}
@@ -3909,7 +3909,7 @@ const XclImpChText* XclImpChChart::GetDefaultText( XclChTextType eTextType ) con
}
XclImpChTextMap::const_iterator itr = maDefTexts.find(nDefTextId);
- return itr == maDefTexts.end() ? NULL : itr->second;
+ return itr == maDefTexts.end() ? nullptr : itr->second;
}
bool XclImpChChart::IsManualPlotArea() const
@@ -4186,8 +4186,8 @@ void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv,
{
maChartRect = rChartRect; // needed in CalcAnchorRect() callback
- SdrModel* pSdrModel = 0;
- SdrPage* pSdrPage = 0;
+ SdrModel* pSdrModel = nullptr;
+ SdrPage* pSdrPage = nullptr;
if( mbOwnTab )
{
// chart sheet: insert all shapes into the sheet, not into the chart object
@@ -4202,7 +4202,7 @@ void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv,
Reference< XDrawPageSupplier > xDrawPageSupp( rxModel, UNO_QUERY_THROW );
Reference< XDrawPage > xDrawPage( xDrawPageSupp->getDrawPage(), UNO_SET_THROW );
pSdrPage = ::GetSdrPageFromXDrawPage( xDrawPage );
- pSdrModel = pSdrPage ? pSdrPage->GetModel() : 0;
+ pSdrModel = pSdrPage ? pSdrPage->GetModel() : nullptr;
}
catch( Exception& )
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 1e009ba91271..5b63352c4738 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -95,7 +95,7 @@ void XclImpSst::ReadSst( XclImpStream& rStrm )
const XclImpString* XclImpSst::GetString( sal_uInt32 nSstIndex ) const
{
- return (nSstIndex < maStrings.size()) ? &maStrings[ nSstIndex ] : 0;
+ return (nSstIndex < maStrings.size()) ? &maStrings[ nSstIndex ] : nullptr;
}
// Hyperlinks =================================================================
@@ -441,7 +441,7 @@ void XclImpLabelranges::ReadLabelranges( XclImpStream& rStrm )
SCTAB nScTab = rRoot.GetCurrScTab();
XclImpAddressConverter& rAddrConv = rRoot.GetAddressConverter();
ScRangePairListRef xLabelRangesRef;
- const ScRange* pScRange = 0;
+ const ScRange* pScRange = nullptr;
XclRangeList aRowXclRanges, aColXclRanges;
rStrm >> aRowXclRanges >> aColXclRanges;
@@ -601,7 +601,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
nAlign = rStrm.ReaduInt16();
nAlignMisc = rStrm.ReaduInt16();
aAlign.FillFromCF( nAlign, nAlignMisc );
- aAlign.FillToItemSet( rStyleItemSet, NULL );
+ aAlign.FillToItemSet( rStyleItemSet, nullptr );
rStrm.Ignore(4);
}
@@ -650,7 +650,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
::std::unique_ptr< ScTokenArray > xTokArr1;
if( nFmlaSize1 > 0 )
{
- const ScTokenArray* pTokArr = 0;
+ const ScTokenArray* pTokArr = nullptr;
rFmlaConv.Reset( rPos );
rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize1, false, FT_CondFormat );
// formula converter owns pTokArr -> create a copy of the token array
@@ -661,7 +661,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
::std::unique_ptr< ScTokenArray > pTokArr2;
if( nFmlaSize2 > 0 )
{
- const ScTokenArray* pTokArr = 0;
+ const ScTokenArray* pTokArr = nullptr;
rFmlaConv.Reset( rPos );
rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize2, false, FT_CondFormat );
// formula converter owns pTokArr -> create a copy of the token array
@@ -787,7 +787,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
rStrm.Ignore( 2 );
if( nLen > 0 )
{
- const ScTokenArray* pTokArr = 0;
+ const ScTokenArray* pTokArr = nullptr;
rFmlaConv.Reset();
rFmlaConv.Convert( pTokArr, rStrm, nLen, false, FT_CondFormat );
// formula converter owns pTokArr -> create a copy of the token array
@@ -803,7 +803,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
rStrm.Ignore( 2 );
if( nLen > 0 )
{
- const ScTokenArray* pTokArr = 0;
+ const ScTokenArray* pTokArr = nullptr;
rFmlaConv.Reset();
rFmlaConv.Convert( pTokArr, rStrm, nLen, false, FT_CondFormat );
// formula converter owns pTokArr -> create a copy of the token array
@@ -1348,7 +1348,7 @@ XclImpSheetProtectBuffer::Sheet* XclImpSheetProtectBuffer::GetSheetItem( SCTAB n
{
// new sheet
if ( !maProtectedSheets.insert( ProtectedSheetMap::value_type(nTab, Sheet()) ).second )
- return NULL;
+ return nullptr;
itr = maProtectedSheets.find(nTab);
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b0d265599a07..9a7264378b44 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -386,7 +386,7 @@ OUString XclImpDrawObjBase::GetObjName() const
const XclObjAnchor* XclImpDrawObjBase::GetAnchor() const
{
- return mbHasAnchor ? &maAnchor : 0;
+ return mbHasAnchor ? &maAnchor : nullptr;
}
bool XclImpDrawObjBase::IsValidSize( const Rectangle& rAnchorRect ) const
@@ -451,7 +451,7 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
( (mnObjType < 25 && mnObjType > 10) || mnObjType == 7 || mnObjType == 8 ) )
{
SdrUnoObj* pSdrUnoObj = dynamic_cast< SdrUnoObj* >( xSdrObj.get() );
- if( pSdrUnoObj != NULL )
+ if( pSdrUnoObj != nullptr )
{
Reference< XControlModel > xCtrlModel = pSdrUnoObj->GetUnoControlModel();
Reference< XPropertySet > xPropSet(xCtrlModel,UNO_QUERY);
@@ -479,7 +479,7 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
//Need summary type for export
const static rtl::OUString sObjIdPropertyName("ObjIDinMSO");
const XclImpPictureObj* const pObj = dynamic_cast< const XclImpPictureObj* const >(this);
- if( pObj != NULL && pObj->IsOcxControl() )
+ if( pObj != nullptr && pObj->IsOcxControl() )
{
const sal_Int16 nOCXControlType = eCreateFromMSOCXControl;
Any aAny;
@@ -805,7 +805,7 @@ sal_Size XclImpDrawObjBase::DoGetProgressSize() const
SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& ) const
{
rDffConv.Progress( GetProgressSize() );
- return 0;
+ return nullptr;
}
void XclImpDrawObjBase::DoPreProcessSdrObj( XclImpDffConverter&, SdrObject& ) const
@@ -2307,7 +2307,7 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const
pTbxObj = dynamic_cast< XclImpOptionButtonObj* >( GetObjectManager().GetSheetDrawing( GetTab() ).FindDrawObj( pTbxObj->mnNextInGroup ).get() );
}
else
- pTbxObj = NULL;
+ pTbxObj = nullptr;
} while ( pTbxObj && !( pTbxObj->mnFirstInGroup == 1 ) );
}
else
@@ -3216,7 +3216,7 @@ void XclImpSolverContainer::UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*
}
XclImpSimpleDffConverter::XclImpSimpleDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) :
- SvxMSDffManager( rDffStrm, rRoot.GetBasePath(), 0, 0, rRoot.GetDoc().GetDrawLayer(), 1440, COL_DEFAULT, 0 ),
+ SvxMSDffManager( rDffStrm, rRoot.GetBasePath(), 0, nullptr, rRoot.GetDoc().GetDrawLayer(), 1440, COL_DEFAULT, nullptr ),
XclImpRoot( rRoot )
{
SetSvxMSDffSettings( SVXMSDFF_SETTINGS_CROP_BITMAPS | SVXMSDFF_SETTINGS_IMPORT_EXCEL );
@@ -3454,7 +3454,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicOb
sal_Int64 nAspects = rPicObj.IsSymbol() ? cssea::MSOLE_ICON : cssea::MSOLE_CONTENT;
xSdrObj.reset( CreateSdrOLEFromStorage(
aStrgName, xSrcStrg, pDocShell->GetStorage(), aGraphic,
- rAnchorRect, aVisArea, 0, nError, mnOleImpFlags, nAspects ) );
+ rAnchorRect, aVisArea, nullptr, nError, mnOleImpFlags, nAspects ) );
}
}
}
@@ -3511,7 +3511,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO
// Do not process the global page group shape (flag SP_FPATRIARCH)
bool bGlobalPageGroup = ::get_flag< sal_uInt32 >( rDffObjData.nSpFlags, SP_FPATRIARCH );
if( !xDrawObj || !xDrawObj->IsProcessSdrObj() || bGlobalPageGroup )
- return 0; // simply return, xSdrObj will be destroyed
+ return nullptr; // simply return, xSdrObj will be destroyed
/* Pass pointer to top-level object back to caller. If the processed
object is embedded in a group, the pointer is already set to the
@@ -3531,7 +3531,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO
#i58780# Ignore group shapes, size is not initialized. */
bool bEmbeddedGroup = !bIsTopLevel && dynamic_cast< SdrObjGroup* >( xSdrObj.get() );
if( !bEmbeddedGroup && !xDrawObj->IsValidSize( rAnchorRect ) )
- return 0; // simply return, xSdrObj will be destroyed
+ return nullptr; // simply return, xSdrObj will be destroyed
// set shape information from DFF stream
OUString aObjName = GetPropertyString( DFF_Prop_wzName, rDffStrm );
@@ -3740,7 +3740,7 @@ void XclImpDffConverter::ProcessShContainer( SvStream& rDffStrm, const DffRecord
{
rShHeader.SeekToBegOfRecord( rDffStrm );
Rectangle aDummy;
- const XclImpDrawObjBase* pDrawObj = 0;
+ const XclImpDrawObjBase* pDrawObj = nullptr;
/* The call to ImportObj() creates and returns a new SdrObject for the
processed shape. We take ownership of the returned object here. If the
shape is a group object, all embedded objects are created recursively,
@@ -3932,7 +3932,7 @@ const XclImpObjTextData* XclImpDrawing::FindTextData( const DffRecordHeader& rHe
XclImpObjTextMap::const_iterator aIt = maTextMap.upper_bound( rHeader.GetRecBegFilePos() );
if( (aIt != maTextMap.end()) && (aIt->first <= rHeader.GetRecEndFilePos()) )
return aIt->second.get();
- return 0;
+ return nullptr;
}
void XclImpDrawing::SetSkipObj( sal_uInt16 nObjId )
@@ -4293,7 +4293,7 @@ void XclImpDffPropSet::Read( XclImpStream& rStrm )
mxMemStrm.reset( new SvMemoryStream );
rStrm.CopyToStream( *mxMemStrm, 8 + nPropSetSize );
mxMemStrm->Seek( STREAM_SEEK_TO_BEGIN );
- maDffConv.ReadPropSet( *mxMemStrm, 0 );
+ maDffConv.ReadPropSet( *mxMemStrm, nullptr );
}
sal_uInt32 XclImpDffPropSet::GetPropertyValue( sal_uInt16 nPropId, sal_uInt32 nDefault ) const
diff --git a/sc/source/filter/excel/xiformula.cxx b/sc/source/filter/excel/xiformula.cxx
index 9eacf36e4028..346621455788 100644
--- a/sc/source/filter/excel/xiformula.cxx
+++ b/sc/source/filter/excel/xiformula.cxx
@@ -70,7 +70,7 @@ const ScTokenArray* XclImpFmlaCompImpl::CreateFormula(
XclFormulaType /*eType*/, const XclTokenArray& rXclTokArr )
{
if (rXclTokArr.Empty())
- return NULL;
+ return nullptr;
// evil hack! are we trying to phase out the old style formula converter ?
SvMemoryStream aMemStrm;
@@ -78,7 +78,7 @@ const ScTokenArray* XclImpFmlaCompImpl::CreateFormula(
aMemStrm.Write( rXclTokArr.GetData(), rXclTokArr.GetSize() );
XclImpStream aFmlaStrm( aMemStrm, GetRoot() );
aFmlaStrm.StartNextRecord();
- const ScTokenArray* pArray = NULL;
+ const ScTokenArray* pArray = nullptr;
GetOldFmlaConverter().Reset();
GetOldFmlaConverter().Convert(pArray, aFmlaStrm, aFmlaStrm.GetRecSize(), true);
return pArray;
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 1f7446df8a7e..462e89d7cdaa 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -140,7 +140,7 @@ namespace {
EditTextObject* lclCreateTextObject( const XclImpRoot& rRoot,
const XclImpString& rString, XclFontItemType eType, sal_uInt16 nXFIndex )
{
- EditTextObject* pTextObj = 0;
+ EditTextObject* pTextObj = nullptr;
const XclImpXFBuffer& rXFBuffer = rRoot.GetXFBuffer();
const XclImpFont* pFirstFont = rXFBuffer.GetFont( nXFIndex );
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 77647f50fc5a..ac2311305e46 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -97,7 +97,7 @@ public:
/** Reads a CRN record (external referenced cell). */
void ReadCrn( XclImpStream& rStrm );
/** Reads an EXTERNNAME record. */
- void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = NULL );
+ void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = nullptr );
/** Returns the SUPBOOK record type. */
inline XclSupbookType GetType() const { return meType; }
@@ -170,7 +170,7 @@ public:
/** Reads a CRN record and appends it to the current SUPBOOK. */
void ReadCrn( XclImpStream& rStrm );
/** Reads an EXTERNNAME record and appends it to the current SUPBOOK. */
- void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = NULL );
+ void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = nullptr );
/** Returns true, if the specified XTI entry contains an internal reference. */
bool IsSelfRef( sal_uInt16 nXtiIndex ) const;
@@ -335,7 +335,7 @@ const ScMatrix& XclImpExtName::MOper::GetCache() const
}
XclImpExtName::XclImpExtName( XclImpSupbook& rSupbook, XclImpStream& rStrm, XclSupbookType eSubType, ExcelToSc* pFormulaConv )
- : mpMOper(NULL)
+ : mpMOper(nullptr)
, mnStorageId(0)
{
sal_uInt16 nFlags(0);
@@ -379,7 +379,7 @@ XclImpExtName::XclImpExtName( XclImpSupbook& rSupbook, XclImpStream& rStrm, XclS
{
if (pFormulaConv)
{
- const ScTokenArray* pArray = NULL;
+ const ScTokenArray* pArray = nullptr;
sal_uInt16 nFmlaLen;
nFmlaLen = rStrm.ReaduInt16();
vector<OUString> aTabNames;
@@ -544,7 +544,7 @@ bool XclImpExtName::CreateOleData(ScDocument& rDoc, const OUString& rUrl,
bool XclImpExtName::HasFormulaTokens() const
{
- return (mxArray.get() != NULL);
+ return (mxArray.get() != nullptr);
}
// Cached external cells ======================================================
@@ -706,10 +706,10 @@ const XclImpExtName* XclImpSupbook::GetExternName( sal_uInt16 nXclIndex ) const
if (nXclIndex == 0)
{
SAL_WARN("sc", "XclImpSupbook::GetExternName - index must be >0");
- return NULL;
+ return nullptr;
}
if (meType == EXC_SBTYPE_SELF || nXclIndex > maExtNameList.size())
- return NULL;
+ return nullptr;
return &maExtNameList[nXclIndex-1];
}
@@ -721,7 +721,7 @@ bool XclImpSupbook::GetLinkData( OUString& rApplic, OUString& rTopic ) const
const OUString& XclImpSupbook::GetMacroName( sal_uInt16 nXclNameIdx ) const
{
OSL_ENSURE( nXclNameIdx > 0, "XclImpSupbook::GetMacroName - index must be >0" );
- const XclImpName* pName = (meType == EXC_SBTYPE_SELF) ? GetNameManager().GetName( nXclNameIdx ) : 0;
+ const XclImpName* pName = (meType == EXC_SBTYPE_SELF) ? GetNameManager().GetName( nXclNameIdx ) : nullptr;
return (pName && pName->IsVBName()) ? pName->GetScName() : EMPTY_OUSTRING;
}
@@ -834,14 +834,14 @@ bool XclImpLinkManagerImpl::GetScTabRange(
const XclImpExtName* XclImpLinkManagerImpl::GetExternName( sal_uInt16 nXtiIndex, sal_uInt16 nExtName ) const
{
const XclImpSupbook* pSupbook = GetSupbook( nXtiIndex );
- return pSupbook ? pSupbook->GetExternName( nExtName ) : 0;
+ return pSupbook ? pSupbook->GetExternName( nExtName ) : nullptr;
}
const OUString* XclImpLinkManagerImpl::GetSupbookUrl( sal_uInt16 nXtiIndex ) const
{
const XclImpSupbook* p = GetSupbook( nXtiIndex );
if (!p)
- return NULL;
+ return nullptr;
return &p->GetXclUrl();
}
@@ -865,16 +865,16 @@ const OUString& XclImpLinkManagerImpl::GetMacroName( sal_uInt16 nExtSheet, sal_u
const XclImpXti* XclImpLinkManagerImpl::GetXti( sal_uInt16 nXtiIndex ) const
{
- return (nXtiIndex < maXtiList.size()) ? &maXtiList[ nXtiIndex ] : 0;
+ return (nXtiIndex < maXtiList.size()) ? &maXtiList[ nXtiIndex ] : nullptr;
}
const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( sal_uInt16 nXtiIndex ) const
{
if ( maSupbookList.empty() )
- return NULL;
+ return nullptr;
const XclImpXti* pXti = GetXti( nXtiIndex );
if (!pXti || pXti->mnSupbook >= maSupbookList.size())
- return NULL;
+ return nullptr;
return &(maSupbookList.at( pXti->mnSupbook ));
}
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index c5340bc8092f..c120693f0672 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -32,7 +32,7 @@ XclImpName::TokenStrmData::TokenStrmData( XclImpStream& rStrm ) :
XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
XclImpRoot( rStrm.GetRoot() ),
- mpScData( 0 ),
+ mpScData( nullptr ),
mcBuiltIn( EXC_BUILTIN_UNKNOWN ),
mnScTab( SCTAB_MAX ),
meNameType( RT_NAME ),
@@ -143,7 +143,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
// 3) *** convert the name definition formula *** -------------------------
rFmlaConv.Reset();
- const ScTokenArray* pTokArr = 0; // pointer to token array, owned by rFmlaConv
+ const ScTokenArray* pTokArr = nullptr; // pointer to token array, owned by rFmlaConv
if( ::get_flag( nFlags, EXC_NAME_BIG ) )
{
@@ -281,8 +281,8 @@ void XclImpNameManager::ReadName( XclImpStream& rStrm )
const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB nScTab ) const
{
- const XclImpName* pGlobalName = 0; // a found global name
- const XclImpName* pLocalName = 0; // a found local name
+ const XclImpName* pGlobalName = nullptr; // a found global name
+ const XclImpName* pLocalName = nullptr; // a found local name
for( XclImpNameList::const_iterator itName = maNameList.begin(); itName != maNameList.end() && !pLocalName; ++itName )
{
if( itName->GetXclName() == rXclName )
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 2d22f531533b..379493f6c411 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -125,7 +125,7 @@ void XclImpPageSettings::ReadHeaderFooter( XclImpStream& rStrm )
void XclImpPageSettings::ReadPageBreaks( XclImpStream& rStrm )
{
- ScfUInt16Vec* pVec = 0;
+ ScfUInt16Vec* pVec = nullptr;
switch( rStrm.GetRecId() )
{
case EXC_ID_HORPAGEBREAKS: pVec = &maData.maHorPageBreaks; break;
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 53afce640560..ef2a209c3bb9 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -204,19 +204,19 @@ const OUString& XclImpPCField::GetFieldName( const ScfStringVec& rVisNames ) con
const XclImpPCField* XclImpPCField::GetGroupBaseField() const
{
OSL_ENSURE( IsGroupChildField(), "XclImpPCField::GetGroupBaseField - this field type does not have a base field" );
- return IsGroupChildField() ? mrPCache.GetField( maFieldInfo.mnGroupBase ) : 0;
+ return IsGroupChildField() ? mrPCache.GetField( maFieldInfo.mnGroupBase ) : nullptr;
}
const XclImpPCItem* XclImpPCField::GetItem( sal_uInt16 nItemIdx ) const
{
- return (nItemIdx < maItems.size()) ? maItems[ nItemIdx ].get() : 0;
+ return (nItemIdx < maItems.size()) ? maItems[ nItemIdx ].get() : nullptr;
}
const XclImpPCItem* XclImpPCField::GetLimitItem( sal_uInt16 nItemIdx ) const
{
OSL_ENSURE( nItemIdx < 3, "XclImpPCField::GetLimitItem - invalid item index" );
OSL_ENSURE( nItemIdx < maNumGroupItems.size(), "XclImpPCField::GetLimitItem - no item found" );
- return (nItemIdx < maNumGroupItems.size()) ? maNumGroupItems[ nItemIdx ].get() : 0;
+ return (nItemIdx < maNumGroupItems.size()) ? maNumGroupItems[ nItemIdx ].get() : nullptr;
}
void XclImpPCField::WriteFieldNameToSource( SCCOL nScCol, SCTAB nScTab )
@@ -545,7 +545,7 @@ const double* XclImpPCField::GetNumGroupLimit( sal_uInt16 nLimitIdx ) const
OSL_ENSURE( pItem->GetDouble(), "XclImpPCField::GetNumGroupLimit - SXDOUBLE item expected" );
return pItem->GetDouble();
}
- return 0;
+ return nullptr;
}
const DateTime* XclImpPCField::GetDateGroupLimit( sal_uInt16 nLimitIdx ) const
@@ -556,7 +556,7 @@ const DateTime* XclImpPCField::GetDateGroupLimit( sal_uInt16 nLimitIdx ) const
OSL_ENSURE( pItem->GetDateTime(), "XclImpPCField::GetDateGroupLimit - SXDATETIME item expected" );
return pItem->GetDateTime();
}
- return 0;
+ return nullptr;
}
const sal_Int16* XclImpPCField::GetDateGroupStep() const
@@ -574,12 +574,12 @@ const sal_Int16* XclImpPCField::GetDateGroupStep() const
{
OSL_ENSURE( *pnStep > 0, "XclImpPCField::GetDateGroupStep - invalid step count" );
// return nothing for step count 1 - this is also a standard date group in Excel
- return (*pnStep > 1) ? pnStep : 0;
+ return (*pnStep > 1) ? pnStep : nullptr;
}
}
}
}
- return 0;
+ return nullptr;
}
XclImpPivotCache::XclImpPivotCache( const XclImpRoot& rRoot ) :
@@ -604,7 +604,7 @@ sal_uInt16 XclImpPivotCache::GetFieldCount() const
const XclImpPCField* XclImpPivotCache::GetField( sal_uInt16 nFieldIdx ) const
{
- return (nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : 0;
+ return (nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : nullptr;
}
// records --------------------------------------------------------------------
@@ -890,8 +890,8 @@ const OUString* XclImpPTItem::GetItemName() const
if( mpCacheField )
if( const XclImpPCItem* pCacheItem = mpCacheField->GetItem( maItemInfo.mnCacheIdx ) )
//TODO: use XclImpPCItem::ConvertToText(), if all conversions are available
- return pCacheItem->IsEmpty() ? NULL : pCacheItem->GetText();
- return 0;
+ return pCacheItem->IsEmpty() ? nullptr : pCacheItem->GetText();
+ return nullptr;
}
void XclImpPTItem::ReadSxvi( XclImpStream& rStrm )
@@ -922,7 +922,7 @@ XclImpPTField::XclImpPTField( const XclImpPivotTable& rPTable, sal_uInt16 nCache
const XclImpPCField* XclImpPTField::GetCacheField() const
{
XclImpPivotCacheRef xPCache = mrPTable.GetPivotCache();
- return xPCache ? xPCache->GetField( maFieldInfo.mnCacheIdx ) : 0;
+ return xPCache ? xPCache->GetField( maFieldInfo.mnCacheIdx ) : nullptr;
}
OUString XclImpPTField::GetFieldName() const
@@ -939,13 +939,13 @@ OUString XclImpPTField::GetVisFieldName() const
const XclImpPTItem* XclImpPTField::GetItem( sal_uInt16 nItemIdx ) const
{
- return (nItemIdx < maItems.size()) ? maItems[ nItemIdx ].get() : 0;
+ return (nItemIdx < maItems.size()) ? maItems[ nItemIdx ].get() : nullptr;
}
const OUString* XclImpPTField::GetItemName( sal_uInt16 nItemIdx ) const
{
const XclImpPTItem* pItem = GetItem( nItemIdx );
- return pItem ? pItem->GetItemName() : 0;
+ return pItem ? pItem->GetItemName() : nullptr;
}
// records --------------------------------------------------------------------
@@ -1076,15 +1076,15 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) con
{
const OUString& rFieldName = GetFieldName();
if( rFieldName.isEmpty() )
- return 0;
+ return nullptr;
const XclImpPCField* pCacheField = GetCacheField();
if( !pCacheField || !pCacheField->IsSupportedField() )
- return 0;
+ return nullptr;
ScDPSaveDimension* pTest = rSaveData.GetNewDimensionByName(rFieldName);
if (!pTest)
- return NULL;
+ return nullptr;
ScDPSaveDimension& rSaveDim = *pTest;
@@ -1194,7 +1194,7 @@ void XclImpPTField::ConvertItems( ScDPSaveDimension& rSaveDim ) const
XclImpPivotTable::XclImpPivotTable( const XclImpRoot& rRoot ) :
XclImpRoot( rRoot ),
maDataOrientField( *this, EXC_SXIVD_DATA ),
- mpDPObj(NULL)
+ mpDPObj(nullptr)
{
}
@@ -1212,20 +1212,20 @@ sal_uInt16 XclImpPivotTable::GetFieldCount() const
const XclImpPTField* XclImpPivotTable::GetField( sal_uInt16 nFieldIdx ) const
{
return (nFieldIdx == EXC_SXIVD_DATA) ? &maDataOrientField :
- ((nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : 0);
+ ((nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : nullptr);
}
XclImpPTField* XclImpPivotTable::GetFieldAcc( sal_uInt16 nFieldIdx )
{
// do not return maDataOrientField
- return (nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : 0;
+ return (nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : nullptr;
}
const XclImpPTField* XclImpPivotTable::GetDataField( sal_uInt16 nDataFieldIdx ) const
{
if( nDataFieldIdx < maOrigDataFields.size() )
return GetField( maOrigDataFields[ nDataFieldIdx ] );
- return 0;
+ return nullptr;
}
OUString XclImpPivotTable::GetDataFieldName( sal_uInt16 nDataFieldIdx ) const
@@ -1283,7 +1283,7 @@ void XclImpPivotTable::ReadSxivd( XclImpStream& rStrm )
mxCurrField.reset();
// find the index vector to fill (row SXIVD doesn't exist without row fields)
- ScfUInt16Vec* pFieldVec = 0;
+ ScfUInt16Vec* pFieldVec = nullptr;
if( maRowFields.empty() && (maPTInfo.mnRowFields > 0) )
pFieldVec = &maRowFields;
else if( maColFields.empty() && (maPTInfo.mnColFields > 0) )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index c95245ed4daa..4dc07db02668 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -494,7 +494,7 @@ void XclImpFont::GuessScriptType()
mbHasWstrn = (!mbHasAsian && !mbHasCmplx) || pCharMap->HasChar( 'A' );
}
- pCharMap = 0;
+ pCharMap = nullptr;
}
}
@@ -552,11 +552,11 @@ const XclImpFont* XclImpFontBuffer::GetFont( sal_uInt16 nFontIndex ) const
if (nFontIndex < 4)
{
// Font ID is zero-based when it's less than 4.
- return nFontIndex >= maFontList.size() ? NULL : &maFontList[nFontIndex];
+ return nFontIndex >= maFontList.size() ? nullptr : &maFontList[nFontIndex];
}
// Font ID is greater than 4. It is now 1-based.
- return nFontIndex > maFontList.size() ? NULL : &maFontList[nFontIndex-1];
+ return nFontIndex > maFontList.size() ? nullptr : &maFontList[nFontIndex-1];
}
void XclImpFontBuffer::ReadFont( XclImpStream& rStrm )
@@ -1087,7 +1087,7 @@ void XclImpCellArea::FillToItemSet( SfxItemSet& rItemSet, const XclImpPalette& r
XclImpXF::XclImpXF( const XclImpRoot& rRoot ) :
XclXFBase( true ), // default is cell XF
XclImpRoot( rRoot ),
- mpStyleSheet( 0 ),
+ mpStyleSheet( nullptr ),
mnXclNumFmt( 0 ),
mnXclFont( 0 )
{
@@ -1238,7 +1238,7 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
// create new pattern attribute set
mpPattern.reset( new ScPatternAttr( GetDoc().GetPool() ) );
SfxItemSet& rItemSet = mpPattern->GetItemSet();
- XclImpXF* pParentXF = IsCellXF() ? GetXFBuffer().GetXF( mnParent ) : 0;
+ XclImpXF* pParentXF = IsCellXF() ? GetXFBuffer().GetXF( mnParent ) : nullptr;
// parent cell style
if( IsCellXF() && !mpStyleSheet )
@@ -1310,8 +1310,8 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
if( mbAlignUsed || mbBorderUsed )
{
SvxRotateMode eRotateMode = SVX_ROTATE_MODE_STANDARD;
- const XclImpCellAlign* pAlign = mbAlignUsed ? &maAlignment : (pParentXF ? &pParentXF->maAlignment : 0);
- const XclImpCellBorder* pBorder = mbBorderUsed ? &maBorder : (pParentXF ? &pParentXF->maBorder : 0);
+ const XclImpCellAlign* pAlign = mbAlignUsed ? &maAlignment : (pParentXF ? &pParentXF->maAlignment : nullptr);
+ const XclImpCellBorder* pBorder = mbBorderUsed ? &maBorder : (pParentXF ? &pParentXF->maBorder : nullptr);
if( pAlign && pBorder && (0 < pAlign->mnRotation) && (pAlign->mnRotation <= 180) && pBorder->HasAnyOuterBorder() )
eRotateMode = SVX_ROTATE_MODE_BOTTOM;
ScfTools::PutItem( rItemSet, SvxRotateModeItem( eRotateMode, ATTR_ROTATE_MODE ), bSkipPoolDefs );
@@ -1466,7 +1466,7 @@ XclImpStyle::XclImpStyle( const XclImpRoot& rRoot ) :
mbBuiltin( false ),
mbCustom( false ),
mbHidden( false ),
- mpStyleSheet( 0 )
+ mpStyleSheet( nullptr )
{
}
@@ -1626,7 +1626,7 @@ void XclImpXFBuffer::CreateUserStyles()
for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) )
if( aCellStyles.count( pStyleSheet->GetName() ) == 0 )
- aCellStyles[ pStyleSheet->GetName() ] = 0;
+ aCellStyles[ pStyleSheet->GetName() ] = nullptr;
/* Calculate names of built-in styles. Store styles with reserved names
in the aConflictNameStyles list. */
@@ -1678,7 +1678,7 @@ void XclImpXFBuffer::CreateUserStyles()
ScStyleSheet* XclImpXFBuffer::CreateStyleSheet( sal_uInt16 nXFIndex )
{
XclImpStyleMap::iterator aIt = maStylesByXf.find( nXFIndex );
- return (aIt == maStylesByXf.end()) ? 0 : aIt->second->CreateStyleSheet();
+ return (aIt == maStylesByXf.end()) ? nullptr : aIt->second->CreateStyleSheet();
}
// Buffer for XF indexes in cells =============================================
@@ -1746,7 +1746,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
SCROW nLastScRow = pPrevRange->mnScRow2;
sal_uLong nIndex = nNextIndex - 1;
XclImpXFRange* pThisRange = pPrevRange;
- pPrevRange = (nIndex > 0 && nIndex <= maIndexList.size()) ? &(maIndexList[ nIndex - 1 ]) : 0;
+ pPrevRange = (nIndex > 0 && nIndex <= maIndexList.size()) ? &(maIndexList[ nIndex - 1 ]) : nullptr;
if( nFirstScRow == nLastScRow ) // replace solely XF
{
@@ -1804,7 +1804,7 @@ void XclImpXFRangeColumn::Find(
// test whether list is empty
if( maIndexList.empty() )
{
- rpPrevRange = rpNextRange = 0;
+ rpPrevRange = rpNextRange = nullptr;
rnNextIndex = 0;
return;
}
@@ -1817,7 +1817,7 @@ void XclImpXFRangeColumn::Find(
if( rpNextRange->mnScRow1 <= nScRow )
{
rpPrevRange = rpNextRange;
- rpNextRange = 0;
+ rpNextRange = nullptr;
rnNextIndex = maIndexList.size();
return;
}
@@ -1826,7 +1826,7 @@ void XclImpXFRangeColumn::Find(
if( nScRow < rpPrevRange->mnScRow1 )
{
rpNextRange = rpPrevRange;
- rpPrevRange = 0;
+ rpPrevRange = nullptr;
rnNextIndex = 0;
return;
}
@@ -1913,7 +1913,7 @@ void XclImpXFRangeBuffer::SetXF( const ScAddress& rScPos, sal_uInt16 nXFIndex, X
if( pXF && ((pXF->GetHorAlign() == EXC_XF_HOR_CENTER_AS) || (pXF->GetHorAlign() == EXC_XF_HOR_FILL)) )
{
// expand last merged range if this attribute is set repeatedly
- ScRange* pRange = maMergeList.empty() ? NULL : maMergeList.back();
+ ScRange* pRange = maMergeList.empty() ? nullptr : maMergeList.back();
if (pRange && (pRange->aEnd.Row() == nScRow) && (pRange->aEnd.Col() + 1 == nScCol) && (eMode == xlXFModeBlank))
pRange->aEnd.IncCol();
else if( eMode != xlXFModeBlank ) // do not merge empty cells
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 73cf2595675d..bf395ac20425 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -619,28 +619,28 @@ namespace {
/** Property names for line style in common objects. */
const sal_Char* const sppcLineNamesCommon[] =
- { "LineStyle", "LineWidth", "LineColor", "LineTransparence", "LineDashName", 0 };
+ { "LineStyle", "LineWidth", "LineColor", "LineTransparence", "LineDashName", nullptr };
/** Property names for line style in linear series objects. */
const sal_Char* const sppcLineNamesLinear[] =
- { "LineStyle", "LineWidth", "Color", "Transparency", "LineDashName", 0 };
+ { "LineStyle", "LineWidth", "Color", "Transparency", "LineDashName", nullptr };
/** Property names for line style in filled series objects. */
const sal_Char* const sppcLineNamesFilled[] =
- { "BorderStyle", "BorderWidth", "BorderColor", "BorderTransparency", "BorderDashName", 0 };
+ { "BorderStyle", "BorderWidth", "BorderColor", "BorderTransparency", "BorderDashName", nullptr };
/** Property names for solid area style in common objects. */
-const sal_Char* const sppcAreaNamesCommon[] = { "FillStyle", "FillColor", "FillTransparence", 0 };
+const sal_Char* const sppcAreaNamesCommon[] = { "FillStyle", "FillColor", "FillTransparence", nullptr };
/** Property names for solid area style in filled series objects. */
-const sal_Char* const sppcAreaNamesFilled[] = { "FillStyle", "Color", "Transparency", 0 };
+const sal_Char* const sppcAreaNamesFilled[] = { "FillStyle", "Color", "Transparency", nullptr };
/** Property names for gradient area style in common objects. */
-const sal_Char* const sppcGradNamesCommon[] = { "FillStyle", "FillGradientName", 0 };
+const sal_Char* const sppcGradNamesCommon[] = { "FillStyle", "FillGradientName", nullptr };
/** Property names for gradient area style in filled series objects. */
-const sal_Char* const sppcGradNamesFilled[] = { "FillStyle", "GradientName", 0 };
+const sal_Char* const sppcGradNamesFilled[] = { "FillStyle", "GradientName", nullptr };
/** Property names for hatch area style in common objects. */
-const sal_Char* const sppcHatchNamesCommon[] = { "FillStyle", "FillHatchName", "FillColor", "FillBackground", 0 };
+const sal_Char* const sppcHatchNamesCommon[] = { "FillStyle", "FillHatchName", "FillColor", "FillBackground", nullptr };
/** Property names for hatch area style in filled series objects. */
-const sal_Char* const sppcHatchNamesFilled[] = { "FillStyle", "HatchName", "Color", "FillBackground", 0 };
+const sal_Char* const sppcHatchNamesFilled[] = { "FillStyle", "HatchName", "Color", "FillBackground", nullptr };
/** Property names for bitmap area style. */
-const sal_Char* const sppcBitmapNames[] = { "FillStyle", "FillBitmapName", "FillBitmapMode", 0 };
+const sal_Char* const sppcBitmapNames[] = { "FillStyle", "FillBitmapName", "FillBitmapMode", nullptr };
} // namespace
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 2248725a031a..b1cd82caf52d 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -77,252 +77,252 @@ const sal_uInt8 MX = 30; /// Maximum parameter count.
/** Functions new in BIFF2. */
static const XclFunctionInfo saFuncTable_2[] =
{
- { ocCount, 0, 0, MX, V, { RX }, 0, 0 },
- { ocIf, 1, 2, 3, R, { VO, RO }, 0, 0 },
- { ocIsNA, 2, 1, 1, V, { VR }, 0, 0 },
- { ocIsError, 3, 1, 1, V, { VR }, 0, 0 },
- { ocSum, 4, 0, MX, V, { RX }, 0, 0 },
- { ocAverage, 5, 1, MX, V, { RX }, 0, 0 },
- { ocMin, 6, 1, MX, V, { RX }, 0, 0 },
- { ocMax, 7, 1, MX, V, { RX }, 0, 0 },
- { ocRow, 8, 0, 1, V, { RO }, 0, 0 },
- { ocColumn, 9, 0, 1, V, { RO }, 0, 0 },
- { ocNotAvail, 10, 0, 0, V, {}, 0, 0 },
- { ocNPV, 11, 2, MX, V, { VR, RX }, 0, 0 },
- { ocStDev, 12, 1, MX, V, { RX }, 0, 0 },
- { ocCurrency, 13, 1, 2, V, { VR }, 0, 0 },
- { ocFixed, 14, 1, 2, V, { VR, VR, C }, 0, 0 },
- { ocSin, 15, 1, 1, V, { VR }, 0, 0 },
- { ocCosecant, 15, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocCos, 16, 1, 1, V, { VR }, 0, 0 },
- { ocSecant, 16, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocTan, 17, 1, 1, V, { VR }, 0, 0 },
- { ocCot, 17, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocArcTan, 18, 1, 1, V, { VR }, 0, 0 },
- { ocArcCot, 18, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocPi, 19, 0, 0, V, {}, 0, 0 },
- { ocSqrt, 20, 1, 1, V, { VR }, 0, 0 },
- { ocExp, 21, 1, 1, V, { VR }, 0, 0 },
- { ocLn, 22, 1, 1, V, { VR }, 0, 0 },
- { ocLog10, 23, 1, 1, V, { VR }, 0, 0 },
- { ocAbs, 24, 1, 1, V, { VR }, 0, 0 },
- { ocInt, 25, 1, 1, V, { VR }, 0, 0 },
- { ocPlusMinus, 26, 1, 1, V, { VR }, 0, 0 },
- { ocRound, 27, 2, 2, V, { VR }, 0, 0 },
- { ocLookup, 28, 2, 3, V, { VR, RA }, 0, 0 },
- { ocIndex, 29, 2, 4, R, { RA, VV }, 0, 0 },
- { ocRept, 30, 2, 2, V, { VR }, 0, 0 },
- { ocMid, 31, 3, 3, V, { VR }, 0, 0 },
- { ocLen, 32, 1, 1, V, { VR }, 0, 0 },
- { ocValue, 33, 1, 1, V, { VR }, 0, 0 },
- { ocTrue, 34, 0, 0, V, {}, 0, 0 },
- { ocFalse, 35, 0, 0, V, {}, 0, 0 },
- { ocAnd, 36, 1, MX, V, { RX }, 0, 0 },
- { ocOr, 37, 1, MX, V, { RX }, 0, 0 },
- { ocNot, 38, 1, 1, V, { VR }, 0, 0 },
- { ocMod, 39, 2, 2, V, { VR }, 0, 0 },
- { ocDBCount, 40, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBSum, 41, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBAverage, 42, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBMin, 43, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBMax, 44, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBStdDev, 45, 3, 3, V, { RO, RR }, 0, 0 },
- { ocVar, 46, 1, MX, V, { RX }, 0, 0 },
- { ocDBVar, 47, 3, 3, V, { RO, RR }, 0, 0 },
- { ocText, 48, 2, 2, V, { VR }, 0, 0 },
- { ocLinest, 49, 1, 2, A, { RA, RA, C, C }, 0, 0 },
- { ocTrend, 50, 1, 3, A, { RA, RA, RA, C }, 0, 0 },
- { ocLogest, 51, 1, 2, A, { RA, RA, C, C }, 0, 0 },
- { ocGrowth, 52, 1, 3, A, { RA, RA, RA, C }, 0, 0 },
- { ocPV, 56, 3, 5, V, { VR }, 0, 0 },
- { ocFV, 57, 3, 5, V, { VR }, 0, 0 },
- { ocNper, 58, 3, 5, V, { VR }, 0, 0 },
- { ocPMT, 59, 3, 5, V, { VR }, 0, 0 },
- { ocRate, 60, 3, 6, V, { VR }, 0, 0 },
- { ocMIRR, 61, 3, 3, V, { RA, VR }, 0, 0 },
- { ocIRR, 62, 1, 2, V, { RA, VR }, 0, 0 },
- { ocRandom, 63, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocMatch, 64, 2, 3, V, { VR, RX, RR }, 0, 0 },
- { ocGetDate, 65, 3, 3, V, { VR }, 0, 0 },
- { ocGetTime, 66, 3, 3, V, { VR }, 0, 0 },
- { ocGetDay, 67, 1, 1, V, { VR }, 0, 0 },
- { ocGetMonth, 68, 1, 1, V, { VR }, 0, 0 },
- { ocGetYear, 69, 1, 1, V, { VR }, 0, 0 },
- { ocGetDayOfWeek, 70, 1, 1, V, { VR, C }, 0, 0 },
- { ocGetHour, 71, 1, 1, V, { VR }, 0, 0 },
- { ocGetMin, 72, 1, 1, V, { VR }, 0, 0 },
- { ocGetSec, 73, 1, 1, V, { VR }, 0, 0 },
- { ocGetActTime, 74, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocAreas, 75, 1, 1, V, { RO }, 0, 0 },
- { ocRows, 76, 1, 1, V, { RO }, 0, 0 },
- { ocColumns, 77, 1, 1, V, { RO }, 0, 0 },
- { ocOffset, 78, 3, 5, R, { RO, VR }, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocSearch, 82, 2, 3, V, { VR }, 0, 0 },
- { ocMatTrans, 83, 1, 1, A, { VO }, 0, 0 },
- { ocType, 86, 1, 1, V, { VX }, 0, 0 },
- { ocArcTan2, 97, 2, 2, V, { VR }, 0, 0 },
- { ocArcSin, 98, 1, 1, V, { VR }, 0, 0 },
- { ocArcCos, 99, 1, 1, V, { VR }, 0, 0 },
- { ocChoose, 100, 2, MX, R, { VO, RO }, 0, 0 },
- { ocHLookup, 101, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
- { ocVLookup, 102, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
- { ocIsRef, 105, 1, 1, V, { RX }, 0, 0 },
- { ocLog, 109, 1, 2, V, { VR }, 0, 0 },
- { ocChar, 111, 1, 1, V, { VR }, 0, 0 },
- { ocLower, 112, 1, 1, V, { VR }, 0, 0 },
- { ocUpper, 113, 1, 1, V, { VR }, 0, 0 },
- { ocProper, 114, 1, 1, V, { VR }, 0, 0 },
- { ocLeft, 115, 1, 2, V, { VR }, 0, 0 },
- { ocRight, 116, 1, 2, V, { VR }, 0, 0 },
- { ocExact, 117, 2, 2, V, { VR }, 0, 0 },
- { ocTrim, 118, 1, 1, V, { VR }, 0, 0 },
- { ocReplace, 119, 4, 4, V, { VR }, 0, 0 },
- { ocSubstitute, 120, 3, 4, V, { VR }, 0, 0 },
- { ocCode, 121, 1, 1, V, { VR }, 0, 0 },
- { ocFind, 124, 2, 3, V, { VR }, 0, 0 },
- { ocCell, 125, 1, 2, V, { VV, RO }, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocIsErr, 126, 1, 1, V, { VR }, 0, 0 },
- { ocIsString, 127, 1, 1, V, { VR }, 0, 0 },
- { ocIsValue, 128, 1, 1, V, { VR }, 0, 0 },
- { ocIsEmpty, 129, 1, 1, V, { VR }, 0, 0 },
- { ocT, 130, 1, 1, V, { RO }, 0, 0 },
- { ocN, 131, 1, 1, V, { RO }, 0, 0 },
- { ocGetDateValue, 140, 1, 1, V, { VR }, 0, 0 },
- { ocGetTimeValue, 141, 1, 1, V, { VR }, 0, 0 },
- { ocSLN, 142, 3, 3, V, { VR }, 0, 0 },
- { ocSYD, 143, 4, 4, V, { VR }, 0, 0 },
- { ocDDB, 144, 4, 5, V, { VR }, 0, 0 },
- { ocIndirect, 148, 1, 2, R, { VR }, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocClean, 162, 1, 1, V, { VR }, 0, 0 },
- { ocMatDet, 163, 1, 1, V, { VA }, 0, 0 },
- { ocMatInv, 164, 1, 1, A, { VA }, 0, 0 },
- { ocMatMult, 165, 2, 2, A, { VA }, 0, 0 },
- { ocIpmt, 167, 4, 6, V, { VR }, 0, 0 },
- { ocPpmt, 168, 4, 6, V, { VR }, 0, 0 },
- { ocCount2, 169, 0, MX, V, { RX }, 0, 0 },
- { ocProduct, 183, 0, MX, V, { RX }, 0, 0 },
- { ocFact, 184, 1, 1, V, { VR }, 0, 0 },
- { ocDBProduct, 189, 3, 3, V, { RO, RR }, 0, 0 },
- { ocIsNonString, 190, 1, 1, V, { VR }, 0, 0 },
- { ocStDevP, 193, 1, MX, V, { RX }, 0, 0 },
- { ocVarP, 194, 1, MX, V, { RX }, 0, 0 },
- { ocDBStdDevP, 195, 3, 3, V, { RO, RR }, 0, 0 },
- { ocDBVarP, 196, 3, 3, V, { RO, RR }, 0, 0 },
- { ocTrunc, 197, 1, 1, V, { VR, C }, 0, 0 },
- { ocIsLogical, 198, 1, 1, V, { VR }, 0, 0 },
- { ocDBCount2, 199, 3, 3, V, { RO, RR }, 0, 0 },
- { ocCurrency, 204, 1, 2, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, 0 },
- { ocLeftB, 208, 1, 2, V, { VR }, 0, 0 },
- { ocRightB, 209, 1, 2, V, { VR }, 0, 0 },
- { ocMidB, 210, 3, 3, V, { VR }, 0, 0 },
- { ocLenB, 211, 1, 1, V, { VR }, 0, 0 },
- { ocRoundUp, 212, 2, 2, V, { VR }, 0, 0 },
- { ocRoundDown, 213, 2, 2, V, { VR }, 0, 0 },
- { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_IMPORTONLY, 0 }
+ { ocCount, 0, 0, MX, V, { RX }, 0, nullptr },
+ { ocIf, 1, 2, 3, R, { VO, RO }, 0, nullptr },
+ { ocIsNA, 2, 1, 1, V, { VR }, 0, nullptr },
+ { ocIsError, 3, 1, 1, V, { VR }, 0, nullptr },
+ { ocSum, 4, 0, MX, V, { RX }, 0, nullptr },
+ { ocAverage, 5, 1, MX, V, { RX }, 0, nullptr },
+ { ocMin, 6, 1, MX, V, { RX }, 0, nullptr },
+ { ocMax, 7, 1, MX, V, { RX }, 0, nullptr },
+ { ocRow, 8, 0, 1, V, { RO }, 0, nullptr },
+ { ocColumn, 9, 0, 1, V, { RO }, 0, nullptr },
+ { ocNotAvail, 10, 0, 0, V, {}, 0, nullptr },
+ { ocNPV, 11, 2, MX, V, { VR, RX }, 0, nullptr },
+ { ocStDev, 12, 1, MX, V, { RX }, 0, nullptr },
+ { ocCurrency, 13, 1, 2, V, { VR }, 0, nullptr },
+ { ocFixed, 14, 1, 2, V, { VR, VR, C }, 0, nullptr },
+ { ocSin, 15, 1, 1, V, { VR }, 0, nullptr },
+ { ocCosecant, 15, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocCos, 16, 1, 1, V, { VR }, 0, nullptr },
+ { ocSecant, 16, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocTan, 17, 1, 1, V, { VR }, 0, nullptr },
+ { ocCot, 17, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocArcTan, 18, 1, 1, V, { VR }, 0, nullptr },
+ { ocArcCot, 18, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocPi, 19, 0, 0, V, {}, 0, nullptr },
+ { ocSqrt, 20, 1, 1, V, { VR }, 0, nullptr },
+ { ocExp, 21, 1, 1, V, { VR }, 0, nullptr },
+ { ocLn, 22, 1, 1, V, { VR }, 0, nullptr },
+ { ocLog10, 23, 1, 1, V, { VR }, 0, nullptr },
+ { ocAbs, 24, 1, 1, V, { VR }, 0, nullptr },
+ { ocInt, 25, 1, 1, V, { VR }, 0, nullptr },
+ { ocPlusMinus, 26, 1, 1, V, { VR }, 0, nullptr },
+ { ocRound, 27, 2, 2, V, { VR }, 0, nullptr },
+ { ocLookup, 28, 2, 3, V, { VR, RA }, 0, nullptr },
+ { ocIndex, 29, 2, 4, R, { RA, VV }, 0, nullptr },
+ { ocRept, 30, 2, 2, V, { VR }, 0, nullptr },
+ { ocMid, 31, 3, 3, V, { VR }, 0, nullptr },
+ { ocLen, 32, 1, 1, V, { VR }, 0, nullptr },
+ { ocValue, 33, 1, 1, V, { VR }, 0, nullptr },
+ { ocTrue, 34, 0, 0, V, {}, 0, nullptr },
+ { ocFalse, 35, 0, 0, V, {}, 0, nullptr },
+ { ocAnd, 36, 1, MX, V, { RX }, 0, nullptr },
+ { ocOr, 37, 1, MX, V, { RX }, 0, nullptr },
+ { ocNot, 38, 1, 1, V, { VR }, 0, nullptr },
+ { ocMod, 39, 2, 2, V, { VR }, 0, nullptr },
+ { ocDBCount, 40, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBSum, 41, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBAverage, 42, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBMin, 43, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBMax, 44, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBStdDev, 45, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocVar, 46, 1, MX, V, { RX }, 0, nullptr },
+ { ocDBVar, 47, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocText, 48, 2, 2, V, { VR }, 0, nullptr },
+ { ocLinest, 49, 1, 2, A, { RA, RA, C, C }, 0, nullptr },
+ { ocTrend, 50, 1, 3, A, { RA, RA, RA, C }, 0, nullptr },
+ { ocLogest, 51, 1, 2, A, { RA, RA, C, C }, 0, nullptr },
+ { ocGrowth, 52, 1, 3, A, { RA, RA, RA, C }, 0, nullptr },
+ { ocPV, 56, 3, 5, V, { VR }, 0, nullptr },
+ { ocFV, 57, 3, 5, V, { VR }, 0, nullptr },
+ { ocNper, 58, 3, 5, V, { VR }, 0, nullptr },
+ { ocPMT, 59, 3, 5, V, { VR }, 0, nullptr },
+ { ocRate, 60, 3, 6, V, { VR }, 0, nullptr },
+ { ocMIRR, 61, 3, 3, V, { RA, VR }, 0, nullptr },
+ { ocIRR, 62, 1, 2, V, { RA, VR }, 0, nullptr },
+ { ocRandom, 63, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocMatch, 64, 2, 3, V, { VR, RX, RR }, 0, nullptr },
+ { ocGetDate, 65, 3, 3, V, { VR }, 0, nullptr },
+ { ocGetTime, 66, 3, 3, V, { VR }, 0, nullptr },
+ { ocGetDay, 67, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetMonth, 68, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetYear, 69, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetDayOfWeek, 70, 1, 1, V, { VR, C }, 0, nullptr },
+ { ocGetHour, 71, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetMin, 72, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetSec, 73, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetActTime, 74, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocAreas, 75, 1, 1, V, { RO }, 0, nullptr },
+ { ocRows, 76, 1, 1, V, { RO }, 0, nullptr },
+ { ocColumns, 77, 1, 1, V, { RO }, 0, nullptr },
+ { ocOffset, 78, 3, 5, R, { RO, VR }, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocSearch, 82, 2, 3, V, { VR }, 0, nullptr },
+ { ocMatTrans, 83, 1, 1, A, { VO }, 0, nullptr },
+ { ocType, 86, 1, 1, V, { VX }, 0, nullptr },
+ { ocArcTan2, 97, 2, 2, V, { VR }, 0, nullptr },
+ { ocArcSin, 98, 1, 1, V, { VR }, 0, nullptr },
+ { ocArcCos, 99, 1, 1, V, { VR }, 0, nullptr },
+ { ocChoose, 100, 2, MX, R, { VO, RO }, 0, nullptr },
+ { ocHLookup, 101, 3, 3, V, { VV, RO, RO, C }, 0, nullptr },
+ { ocVLookup, 102, 3, 3, V, { VV, RO, RO, C }, 0, nullptr },
+ { ocIsRef, 105, 1, 1, V, { RX }, 0, nullptr },
+ { ocLog, 109, 1, 2, V, { VR }, 0, nullptr },
+ { ocChar, 111, 1, 1, V, { VR }, 0, nullptr },
+ { ocLower, 112, 1, 1, V, { VR }, 0, nullptr },
+ { ocUpper, 113, 1, 1, V, { VR }, 0, nullptr },
+ { ocProper, 114, 1, 1, V, { VR }, 0, nullptr },
+ { ocLeft, 115, 1, 2, V, { VR }, 0, nullptr },
+ { ocRight, 116, 1, 2, V, { VR }, 0, nullptr },
+ { ocExact, 117, 2, 2, V, { VR }, 0, nullptr },
+ { ocTrim, 118, 1, 1, V, { VR }, 0, nullptr },
+ { ocReplace, 119, 4, 4, V, { VR }, 0, nullptr },
+ { ocSubstitute, 120, 3, 4, V, { VR }, 0, nullptr },
+ { ocCode, 121, 1, 1, V, { VR }, 0, nullptr },
+ { ocFind, 124, 2, 3, V, { VR }, 0, nullptr },
+ { ocCell, 125, 1, 2, V, { VV, RO }, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocIsErr, 126, 1, 1, V, { VR }, 0, nullptr },
+ { ocIsString, 127, 1, 1, V, { VR }, 0, nullptr },
+ { ocIsValue, 128, 1, 1, V, { VR }, 0, nullptr },
+ { ocIsEmpty, 129, 1, 1, V, { VR }, 0, nullptr },
+ { ocT, 130, 1, 1, V, { RO }, 0, nullptr },
+ { ocN, 131, 1, 1, V, { RO }, 0, nullptr },
+ { ocGetDateValue, 140, 1, 1, V, { VR }, 0, nullptr },
+ { ocGetTimeValue, 141, 1, 1, V, { VR }, 0, nullptr },
+ { ocSLN, 142, 3, 3, V, { VR }, 0, nullptr },
+ { ocSYD, 143, 4, 4, V, { VR }, 0, nullptr },
+ { ocDDB, 144, 4, 5, V, { VR }, 0, nullptr },
+ { ocIndirect, 148, 1, 2, R, { VR }, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocClean, 162, 1, 1, V, { VR }, 0, nullptr },
+ { ocMatDet, 163, 1, 1, V, { VA }, 0, nullptr },
+ { ocMatInv, 164, 1, 1, A, { VA }, 0, nullptr },
+ { ocMatMult, 165, 2, 2, A, { VA }, 0, nullptr },
+ { ocIpmt, 167, 4, 6, V, { VR }, 0, nullptr },
+ { ocPpmt, 168, 4, 6, V, { VR }, 0, nullptr },
+ { ocCount2, 169, 0, MX, V, { RX }, 0, nullptr },
+ { ocProduct, 183, 0, MX, V, { RX }, 0, nullptr },
+ { ocFact, 184, 1, 1, V, { VR }, 0, nullptr },
+ { ocDBProduct, 189, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocIsNonString, 190, 1, 1, V, { VR }, 0, nullptr },
+ { ocStDevP, 193, 1, MX, V, { RX }, 0, nullptr },
+ { ocVarP, 194, 1, MX, V, { RX }, 0, nullptr },
+ { ocDBStdDevP, 195, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocDBVarP, 196, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocTrunc, 197, 1, 1, V, { VR, C }, 0, nullptr },
+ { ocIsLogical, 198, 1, 1, V, { VR }, 0, nullptr },
+ { ocDBCount2, 199, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocCurrency, 204, 1, 2, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, nullptr },
+ { ocLeftB, 208, 1, 2, V, { VR }, 0, nullptr },
+ { ocRightB, 209, 1, 2, V, { VR }, 0, nullptr },
+ { ocMidB, 210, 3, 3, V, { VR }, 0, nullptr },
+ { ocLenB, 211, 1, 1, V, { VR }, 0, nullptr },
+ { ocRoundUp, 212, 2, 2, V, { VR }, 0, nullptr },
+ { ocRoundDown, 213, 2, 2, V, { VR }, 0, nullptr },
+ { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_IMPORTONLY, nullptr }
};
/** Functions new in BIFF3. */
static const XclFunctionInfo saFuncTable_3[] =
{
- { ocLinest, 49, 1, 4, A, { RA, RA, VV }, 0, 0 }, // BIFF2: 1-2, BIFF3: 1-4
- { ocTrend, 50, 1, 4, A, { RA, RA, RA, VV }, 0, 0 }, // BIFF2: 1-3, BIFF3: 1-4
- { ocLogest, 51, 1, 4, A, { RA, RA, VV }, 0, 0 }, // BIFF2: 1-2, BIFF3: 1-4
- { ocGrowth, 52, 1, 4, A, { RA, RA, RA, VV }, 0, 0 }, // BIFF2: 1-3, BIFF3: 1-4
- { ocTrunc, 197, 1, 2, V, { VR }, 0, 0 }, // BIFF2: 1, BIFF3: 1-2
- { ocAddress, 219, 2, 5, V, { VR }, 0, 0 },
- { ocGetDiffDate360, 220, 2, 2, V, { VR, VR, C }, 0, 0 },
- { ocGetActDate, 221, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, 0 },
- { ocVBD, 222, 5, 7, V, { VR }, 0, 0 },
- { ocMedian, 227, 1, MX, V, { RX }, 0, 0 },
- { ocSumProduct, 228, 1, MX, V, { VA }, 0, 0 },
- { ocSinHyp, 229, 1, 1, V, { VR }, 0, 0 },
- { ocCosecantHyp, 229, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocCosHyp, 230, 1, 1, V, { VR }, 0, 0 },
- { ocSecantHyp, 230, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocTanHyp, 231, 1, 1, V, { VR }, 0, 0 },
- { ocCotHyp, 231, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocArcSinHyp, 232, 1, 1, V, { VR }, 0, 0 },
- { ocArcCosHyp, 233, 1, 1, V, { VR }, 0, 0 },
- { ocArcTanHyp, 234, 1, 1, V, { VR }, 0, 0 },
- { ocArcCotHyp, 234, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocDBGet, 235, 3, 3, V, { RO, RR }, 0, 0 },
- { ocInfo, 244, 1, 1, V, { VR }, EXC_FUNCFLAG_VOLATILE, 0 }
+ { ocLinest, 49, 1, 4, A, { RA, RA, VV }, 0, nullptr }, // BIFF2: 1-2, BIFF3: 1-4
+ { ocTrend, 50, 1, 4, A, { RA, RA, RA, VV }, 0, nullptr }, // BIFF2: 1-3, BIFF3: 1-4
+ { ocLogest, 51, 1, 4, A, { RA, RA, VV }, 0, nullptr }, // BIFF2: 1-2, BIFF3: 1-4
+ { ocGrowth, 52, 1, 4, A, { RA, RA, RA, VV }, 0, nullptr }, // BIFF2: 1-3, BIFF3: 1-4
+ { ocTrunc, 197, 1, 2, V, { VR }, 0, nullptr }, // BIFF2: 1, BIFF3: 1-2
+ { ocAddress, 219, 2, 5, V, { VR }, 0, nullptr },
+ { ocGetDiffDate360, 220, 2, 2, V, { VR, VR, C }, 0, nullptr },
+ { ocGetActDate, 221, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, nullptr },
+ { ocVBD, 222, 5, 7, V, { VR }, 0, nullptr },
+ { ocMedian, 227, 1, MX, V, { RX }, 0, nullptr },
+ { ocSumProduct, 228, 1, MX, V, { VA }, 0, nullptr },
+ { ocSinHyp, 229, 1, 1, V, { VR }, 0, nullptr },
+ { ocCosecantHyp, 229, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocCosHyp, 230, 1, 1, V, { VR }, 0, nullptr },
+ { ocSecantHyp, 230, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocTanHyp, 231, 1, 1, V, { VR }, 0, nullptr },
+ { ocCotHyp, 231, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocArcSinHyp, 232, 1, 1, V, { VR }, 0, nullptr },
+ { ocArcCosHyp, 233, 1, 1, V, { VR }, 0, nullptr },
+ { ocArcTanHyp, 234, 1, 1, V, { VR }, 0, nullptr },
+ { ocArcCotHyp, 234, 1, 1, V, { VR }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocDBGet, 235, 3, 3, V, { RO, RR }, 0, nullptr },
+ { ocInfo, 244, 1, 1, V, { VR }, EXC_FUNCFLAG_VOLATILE, nullptr }
};
/** Functions new in BIFF4. */
static const XclFunctionInfo saFuncTable_4[] =
{
- { ocFixed, 14, 1, 3, V, { VR }, 0, 0 }, // BIFF2-3: 1-2, BIFF4: 1-3
- { ocAsc, 214, 1, 1, V, { VR }, 0, 0 },
- { ocJis, 215, 1, 1, V, { VR }, 0, 0 },
- { ocRank, 216, 2, 3, V, { VR, RO, VR }, 0, 0 },
- { ocDB, 247, 4, 5, V, { VR }, 0, 0 },
- { ocFrequency, 252, 2, 2, A, { RA }, 0, 0 },
- { ocErrorType, 261, 1, 1, V, { VR }, 0, 0 },
- { ocAveDev, 269, 1, MX, V, { RX }, 0, 0 },
- { ocBetaDist, 270, 3, 5, V, { VR }, 0, 0 },
- { ocGammaLn, 271, 1, 1, V, { VR }, 0, 0 },
- { ocBetaInv, 272, 3, 5, V, { VR }, 0, 0 },
- { ocBinomDist, 273, 4, 4, V, { VR }, 0, 0 },
- { ocChiDist, 274, 2, 2, V, { VR }, 0, 0 },
- { ocChiInv, 275, 2, 2, V, { VR }, 0, 0 },
- { ocCombin, 276, 2, 2, V, { VR }, 0, 0 },
- { ocConfidence, 277, 3, 3, V, { VR }, 0, 0 },
- { ocCritBinom, 278, 3, 3, V, { VR }, 0, 0 },
- { ocEven, 279, 1, 1, V, { VR }, 0, 0 },
- { ocExpDist, 280, 3, 3, V, { VR }, 0, 0 },
- { ocFDist, 281, 3, 3, V, { VR }, 0, 0 },
- { ocFInv, 282, 3, 3, V, { VR }, 0, 0 },
- { ocFisher, 283, 1, 1, V, { VR }, 0, 0 },
- { ocFisherInv, 284, 1, 1, V, { VR }, 0, 0 },
- { ocFloor_MS, 285, 2, 2, V, { VR }, 0, 0 },
- { ocGammaDist, 286, 4, 4, V, { VR }, 0, 0 },
- { ocGammaInv, 287, 3, 3, V, { VR }, 0, 0 },
- { ocCeil_MS, 288, 2, 2, V, { VR }, 0, 0 },
- { ocHypGeomDist, 289, 4, 4, V, { VR }, 0, 0 },
- { ocLogNormDist, 290, 3, 3, V, { VR }, 0, 0 },
- { ocLogInv, 291, 3, 3, V, { VR }, 0, 0 },
- { ocNegBinomVert, 292, 3, 3, V, { VR }, 0, 0 },
- { ocNormDist, 293, 4, 4, V, { VR }, 0, 0 },
- { ocStdNormDist, 294, 1, 1, V, { VR }, 0, 0 },
- { ocNormInv, 295, 3, 3, V, { VR }, 0, 0 },
- { ocSNormInv, 296, 1, 1, V, { VR }, 0, 0 },
- { ocStandard, 297, 3, 3, V, { VR }, 0, 0 },
- { ocOdd, 298, 1, 1, V, { VR }, 0, 0 },
- { ocPermut, 299, 2, 2, V, { VR }, 0, 0 },
- { ocPoissonDist, 300, 3, 3, V, { VR }, 0, 0 },
- { ocTDist, 301, 3, 3, V, { VR }, 0, 0 },
- { ocWeibull, 302, 4, 4, V, { VR }, 0, 0 },
- { ocSumXMY2, 303, 2, 2, V, { VA }, 0, 0 },
- { ocSumX2MY2, 304, 2, 2, V, { VA }, 0, 0 },
- { ocSumX2DY2, 305, 2, 2, V, { VA }, 0, 0 },
- { ocChiTest, 306, 2, 2, V, { VA }, 0, 0 },
- { ocCorrel, 307, 2, 2, V, { VA }, 0, 0 },
- { ocCovar, 308, 2, 2, V, { VA }, 0, 0 },
- { ocForecast, 309, 3, 3, V, { VR, VA }, 0, 0 },
- { ocFTest, 310, 2, 2, V, { VA }, 0, 0 },
- { ocIntercept, 311, 2, 2, V, { VA }, 0, 0 },
- { ocPearson, 312, 2, 2, V, { VA }, 0, 0 },
- { ocRSQ, 313, 2, 2, V, { VA }, 0, 0 },
- { ocSTEYX, 314, 2, 2, V, { VA }, 0, 0 },
- { ocSlope, 315, 2, 2, V, { VA }, 0, 0 },
- { ocTTest, 316, 4, 4, V, { VA, VA, VR }, 0, 0 },
- { ocProb, 317, 3, 4, V, { VA, VA, VR }, 0, 0 },
- { ocDevSq, 318, 1, MX, V, { RX }, 0, 0 },
- { ocGeoMean, 319, 1, MX, V, { RX }, 0, 0 },
- { ocHarMean, 320, 1, MX, V, { RX }, 0, 0 },
- { ocSumSQ, 321, 0, MX, V, { RX }, 0, 0 },
- { ocKurt, 322, 1, MX, V, { RX }, 0, 0 },
- { ocSkew, 323, 1, MX, V, { RX }, 0, 0 },
- { ocZTest, 324, 2, 3, V, { RX, VR }, 0, 0 },
- { ocLarge, 325, 2, 2, V, { RX, VR }, 0, 0 },
- { ocSmall, 326, 2, 2, V, { RX, VR }, 0, 0 },
- { ocQuartile, 327, 2, 2, V, { RX, VR }, 0, 0 },
- { ocPercentile, 328, 2, 2, V, { RX, VR }, 0, 0 },
- { ocPercentrank, 329, 2, 3, V, { RX, VR, VR_E }, 0, 0 },
- { ocModalValue, 330, 1, MX, V, { VA }, 0, 0 },
- { ocTrimMean, 331, 2, 2, V, { RX, VR }, 0, 0 },
- { ocTInv, 332, 2, 2, V, { VR }, 0, 0 },
+ { ocFixed, 14, 1, 3, V, { VR }, 0, nullptr }, // BIFF2-3: 1-2, BIFF4: 1-3
+ { ocAsc, 214, 1, 1, V, { VR }, 0, nullptr },
+ { ocJis, 215, 1, 1, V, { VR }, 0, nullptr },
+ { ocRank, 216, 2, 3, V, { VR, RO, VR }, 0, nullptr },
+ { ocDB, 247, 4, 5, V, { VR }, 0, nullptr },
+ { ocFrequency, 252, 2, 2, A, { RA }, 0, nullptr },
+ { ocErrorType, 261, 1, 1, V, { VR }, 0, nullptr },
+ { ocAveDev, 269, 1, MX, V, { RX }, 0, nullptr },
+ { ocBetaDist, 270, 3, 5, V, { VR }, 0, nullptr },
+ { ocGammaLn, 271, 1, 1, V, { VR }, 0, nullptr },
+ { ocBetaInv, 272, 3, 5, V, { VR }, 0, nullptr },
+ { ocBinomDist, 273, 4, 4, V, { VR }, 0, nullptr },
+ { ocChiDist, 274, 2, 2, V, { VR }, 0, nullptr },
+ { ocChiInv, 275, 2, 2, V, { VR }, 0, nullptr },
+ { ocCombin, 276, 2, 2, V, { VR }, 0, nullptr },
+ { ocConfidence, 277, 3, 3, V, { VR }, 0, nullptr },
+ { ocCritBinom, 278, 3, 3, V, { VR }, 0, nullptr },
+ { ocEven, 279, 1, 1, V, { VR }, 0, nullptr },
+ { ocExpDist, 280, 3, 3, V, { VR }, 0, nullptr },
+ { ocFDist, 281, 3, 3, V, { VR }, 0, nullptr },
+ { ocFInv, 282, 3, 3, V, { VR }, 0, nullptr },
+ { ocFisher, 283, 1, 1, V, { VR }, 0, nullptr },
+ { ocFisherInv, 284, 1, 1, V, { VR }, 0, nullptr },
+ { ocFloor_MS, 285, 2, 2, V, { VR }, 0, nullptr },
+ { ocGammaDist, 286, 4, 4, V, { VR }, 0, nullptr },
+ { ocGammaInv, 287, 3, 3, V, { VR }, 0, nullptr },
+ { ocCeil_MS, 288, 2, 2, V, { VR }, 0, nullptr },
+ { ocHypGeomDist, 289, 4, 4, V, { VR }, 0, nullptr },
+ { ocLogNormDist, 290, 3, 3, V, { VR }, 0, nullptr },
+ { ocLogInv, 291, 3, 3, V, { VR }, 0, nullptr },
+ { ocNegBinomVert, 292, 3, 3, V, { VR }, 0, nullptr },
+ { ocNormDist, 293, 4, 4, V, { VR }, 0, nullptr },
+ { ocStdNormDist, 294, 1, 1, V, { VR }, 0, nullptr },
+ { ocNormInv, 295, 3, 3, V, { VR }, 0, nullptr },
+ { ocSNormInv, 296, 1, 1, V, { VR }, 0, nullptr },
+ { ocStandard, 297, 3, 3, V, { VR }, 0, nullptr },
+ { ocOdd, 298, 1, 1, V, { VR }, 0, nullptr },
+ { ocPermut, 299, 2, 2, V, { VR }, 0, nullptr },
+ { ocPoissonDist, 300, 3, 3, V, { VR }, 0, nullptr },
+ { ocTDist, 301, 3, 3, V, { VR }, 0, nullptr },
+ { ocWeibull, 302, 4, 4, V, { VR }, 0, nullptr },
+ { ocSumXMY2, 303, 2, 2, V, { VA }, 0, nullptr },
+ { ocSumX2MY2, 304, 2, 2, V, { VA }, 0, nullptr },
+ { ocSumX2DY2, 305, 2, 2, V, { VA }, 0, nullptr },
+ { ocChiTest, 306, 2, 2, V, { VA }, 0, nullptr },
+ { ocCorrel, 307, 2, 2, V, { VA }, 0, nullptr },
+ { ocCovar, 308, 2, 2, V, { VA }, 0, nullptr },
+ { ocForecast, 309, 3, 3, V, { VR, VA }, 0, nullptr },
+ { ocFTest, 310, 2, 2, V, { VA }, 0, nullptr },
+ { ocIntercept, 311, 2, 2, V, { VA }, 0, nullptr },
+ { ocPearson, 312, 2, 2, V, { VA }, 0, nullptr },
+ { ocRSQ, 313, 2, 2, V, { VA }, 0, nullptr },
+ { ocSTEYX, 314, 2, 2, V, { VA }, 0, nullptr },
+ { ocSlope, 315, 2, 2, V, { VA }, 0, nullptr },
+ { ocTTest, 316, 4, 4, V, { VA, VA, VR }, 0, nullptr },
+ { ocProb, 317, 3, 4, V, { VA, VA, VR }, 0, nullptr },
+ { ocDevSq, 318, 1, MX, V, { RX }, 0, nullptr },
+ { ocGeoMean, 319, 1, MX, V, { RX }, 0, nullptr },
+ { ocHarMean, 320, 1, MX, V, { RX }, 0, nullptr },
+ { ocSumSQ, 321, 0, MX, V, { RX }, 0, nullptr },
+ { ocKurt, 322, 1, MX, V, { RX }, 0, nullptr },
+ { ocSkew, 323, 1, MX, V, { RX }, 0, nullptr },
+ { ocZTest, 324, 2, 3, V, { RX, VR }, 0, nullptr },
+ { ocLarge, 325, 2, 2, V, { RX, VR }, 0, nullptr },
+ { ocSmall, 326, 2, 2, V, { RX, VR }, 0, nullptr },
+ { ocQuartile, 327, 2, 2, V, { RX, VR }, 0, nullptr },
+ { ocPercentile, 328, 2, 2, V, { RX, VR }, 0, nullptr },
+ { ocPercentrank, 329, 2, 3, V, { RX, VR, VR_E }, 0, nullptr },
+ { ocModalValue, 330, 1, MX, V, { VA }, 0, nullptr },
+ { ocTrimMean, 331, 2, 2, V, { RX, VR }, 0, nullptr },
+ { ocTInv, 332, 2, 2, V, { VR }, 0, nullptr },
// Functions equivalent to add-in functions, use same parameters as
// ocExternal but add programmatical function name (here without
// "com.sun.star.sheet.addin.") so it can be looked up and stored as
@@ -341,40 +341,40 @@ static const XclFunctionInfo saFuncTable_4[] =
/** Functions new in BIFF5/BIFF7. Unsupported functions: DATESTRING, NUMBERSTRING. */
static const XclFunctionInfo saFuncTable_5[] =
{
- { ocGetDayOfWeek, 70, 1, 2, V, { VR }, 0, 0 }, // BIFF2-4: 1, BIFF5: 1-2
- { ocHLookup, 101, 3, 4, V, { VV, RO, RO, VV }, 0, 0 }, // BIFF2-4: 3, BIFF5: 3-4
- { ocVLookup, 102, 3, 4, V, { VV, RO, RO, VV }, 0, 0 }, // BIFF2-4: 3, BIFF5: 3-4
- { ocGetDiffDate360, 220, 2, 3, V, { VR }, 0, 0 }, // BIFF3-4: 2, BIFF5: 2-3
- { ocMacro, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocConcat, 336, 0, MX, V, { VR }, 0, 0 },
- { ocPower, 337, 2, 2, V, { VR }, 0, 0 },
- { ocRad, 342, 1, 1, V, { VR }, 0, 0 },
- { ocDeg, 343, 1, 1, V, { VR }, 0, 0 },
- { ocSubTotal, 344, 2, MX, V, { VR, RO }, 0, 0 },
- { ocSumIf, 345, 2, 3, V, { RO, VR, RO }, 0, 0 },
- { ocCountIf, 346, 2, 2, V, { RO, VR }, 0, 0 },
- { ocCountEmptyCells, 347, 1, 1, V, { RO }, 0, 0 },
- { ocISPMT, 350, 4, 4, V, { VR }, 0, 0 },
- { ocGetDateDif, 351, 3, 3, V, { VR }, 0, 0 },
- { ocNoName, 352, 1, 1, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, 0 }, // DATESTRING
- { ocNoName, 353, 2, 2, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, 0 }, // NUMBERSTRING
- { ocRoman, 354, 1, 2, V, { VR }, 0, 0 }
+ { ocGetDayOfWeek, 70, 1, 2, V, { VR }, 0, nullptr }, // BIFF2-4: 1, BIFF5: 1-2
+ { ocHLookup, 101, 3, 4, V, { VV, RO, RO, VV }, 0, nullptr }, // BIFF2-4: 3, BIFF5: 3-4
+ { ocVLookup, 102, 3, 4, V, { VV, RO, RO, VV }, 0, nullptr }, // BIFF2-4: 3, BIFF5: 3-4
+ { ocGetDiffDate360, 220, 2, 3, V, { VR }, 0, nullptr }, // BIFF3-4: 2, BIFF5: 2-3
+ { ocMacro, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, nullptr },
+ { ocConcat, 336, 0, MX, V, { VR }, 0, nullptr },
+ { ocPower, 337, 2, 2, V, { VR }, 0, nullptr },
+ { ocRad, 342, 1, 1, V, { VR }, 0, nullptr },
+ { ocDeg, 343, 1, 1, V, { VR }, 0, nullptr },
+ { ocSubTotal, 344, 2, MX, V, { VR, RO }, 0, nullptr },
+ { ocSumIf, 345, 2, 3, V, { RO, VR, RO }, 0, nullptr },
+ { ocCountIf, 346, 2, 2, V, { RO, VR }, 0, nullptr },
+ { ocCountEmptyCells, 347, 1, 1, V, { RO }, 0, nullptr },
+ { ocISPMT, 350, 4, 4, V, { VR }, 0, nullptr },
+ { ocGetDateDif, 351, 3, 3, V, { VR }, 0, nullptr },
+ { ocNoName, 352, 1, 1, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, nullptr }, // DATESTRING
+ { ocNoName, 353, 2, 2, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, nullptr }, // NUMBERSTRING
+ { ocRoman, 354, 1, 2, V, { VR }, 0, nullptr }
};
/** Functions new in BIFF8. Unsupported functions: PHONETIC. */
static const XclFunctionInfo saFuncTable_8[] =
{
- { ocGetPivotData, 358, 2, MX, V, { RR, RR, VR }, 0, 0 },
- { ocHyperLink, 359, 1, 2, V, { VV, VO }, 0, 0 },
- { ocNoName, 360, 1, 1, V, { RO }, EXC_FUNCFLAG_IMPORTONLY, 0 }, // PHONETIC
- { ocAverageA, 361, 1, MX, V, { RX }, 0, 0 },
- { ocMaxA, 362, 1, MX, V, { RX }, 0, 0 },
- { ocMinA, 363, 1, MX, V, { RX }, 0, 0 },
- { ocStDevPA, 364, 1, MX, V, { RX }, 0, 0 },
- { ocVarPA, 365, 1, MX, V, { RX }, 0, 0 },
- { ocStDevA, 366, 1, MX, V, { RX }, 0, 0 },
- { ocVarA, 367, 1, MX, V, { RX }, 0, 0 },
+ { ocGetPivotData, 358, 2, MX, V, { RR, RR, VR }, 0, nullptr },
+ { ocHyperLink, 359, 1, 2, V, { VV, VO }, 0, nullptr },
+ { ocNoName, 360, 1, 1, V, { RO }, EXC_FUNCFLAG_IMPORTONLY, nullptr }, // PHONETIC
+ { ocAverageA, 361, 1, MX, V, { RX }, 0, nullptr },
+ { ocMaxA, 362, 1, MX, V, { RX }, 0, nullptr },
+ { ocMinA, 363, 1, MX, V, { RX }, 0, nullptr },
+ { ocStDevPA, 364, 1, MX, V, { RX }, 0, nullptr },
+ { ocVarPA, 365, 1, MX, V, { RX }, 0, nullptr },
+ { ocStDevA, 366, 1, MX, V, { RX }, 0, nullptr },
+ { ocVarA, 367, 1, MX, V, { RX }, 0, nullptr },
{ ocBahtText, 368, 1, 1, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, EXC_FUNCNAME( "BAHTTEXT" ) },
{ ocBahtText, 255, 2, 2, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, EXC_FUNCNAME( "BAHTTEXT" ) },
{ ocEuroConvert, 255, 4, 6, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, "EUROCONVERT" }
@@ -622,7 +622,7 @@ const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclFunc( sal_uInt16 n
// only in import filter allowed
OSL_ENSURE( !maXclFuncMap.empty(), "XclFunctionProvider::GetFuncInfoFromXclFunc - wrong filter" );
XclFuncMap::const_iterator aIt = maXclFuncMap.find( nXclFunc );
- return (aIt == maXclFuncMap.end()) ? 0 : aIt->second;
+ return (aIt == maXclFuncMap.end()) ? nullptr : aIt->second;
}
const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclMacroName( const OUString& rXclMacroName ) const
@@ -630,7 +630,7 @@ const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclMacroName( const O
// only in import filter allowed, but do not test maXclMacroNameMap, it may be empty for old BIFF versions
OSL_ENSURE( !maXclFuncMap.empty(), "XclFunctionProvider::GetFuncInfoFromXclMacroName - wrong filter" );
XclMacroNameMap::const_iterator aIt = maXclMacroNameMap.find( rXclMacroName );
- return (aIt == maXclMacroNameMap.end()) ? 0 : aIt->second;
+ return (aIt == maXclMacroNameMap.end()) ? nullptr : aIt->second;
}
const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromOpCode( OpCode eOpCode ) const
@@ -638,7 +638,7 @@ const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromOpCode( OpCode eOpCod
// only in export filter allowed
OSL_ENSURE( !maScFuncMap.empty(), "XclFunctionProvider::GetFuncInfoFromOpCode - wrong filter" );
ScFuncMap::const_iterator aIt = maScFuncMap.find( eOpCode );
- return (aIt == maScFuncMap.end()) ? 0 : aIt->second;
+ return (aIt == maScFuncMap.end()) ? nullptr : aIt->second;
}
void XclFunctionProvider::FillXclFuncMap( const XclFunctionInfo* pBeg, const XclFunctionInfo* pEnd )
@@ -747,9 +747,9 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclTokenArrayRef& rxTokArr
}
XclTokenArrayIterator::XclTokenArrayIterator() :
- mppScTokenBeg( 0 ),
- mppScTokenEnd( 0 ),
- mppScToken( 0 ),
+ mppScTokenBeg( nullptr ),
+ mppScTokenEnd( nullptr ),
+ mppScToken( nullptr ),
mbSkipSpaces( false )
{
}
@@ -771,9 +771,9 @@ XclTokenArrayIterator::XclTokenArrayIterator( const XclTokenArrayIterator& rTokA
void XclTokenArrayIterator::Init( const ScTokenArray& rScTokArr, bool bSkipSpaces )
{
sal_uInt16 nTokArrLen = rScTokArr.GetLen();
- mppScTokenBeg = static_cast< const FormulaToken* const* >( nTokArrLen ? rScTokArr.GetArray() : 0 );
- mppScTokenEnd = mppScTokenBeg ? (mppScTokenBeg + nTokArrLen) : 0;
- mppScToken = (mppScTokenBeg != mppScTokenEnd) ? mppScTokenBeg : 0;
+ mppScTokenBeg = static_cast< const FormulaToken* const* >( nTokArrLen ? rScTokArr.GetArray() : nullptr );
+ mppScTokenEnd = mppScTokenBeg ? (mppScTokenBeg + nTokArrLen) : nullptr;
+ mppScToken = (mppScTokenBeg != mppScTokenEnd) ? mppScTokenBeg : nullptr;
mbSkipSpaces = bSkipSpaces;
SkipSpaces();
}
@@ -789,7 +789,7 @@ void XclTokenArrayIterator::NextRawToken()
{
if( mppScToken )
if( (++mppScToken == mppScTokenEnd) || !*mppScToken )
- mppScToken = 0;
+ mppScToken = nullptr;
}
void XclTokenArrayIterator::SkipSpaces()
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index cb2116af615e..a70308a1eb68 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -137,27 +137,27 @@ const OUString* XclPCItem::GetText() const
const double* XclPCItem::GetDouble() const
{
- return (meType == EXC_PCITEM_DOUBLE) ? &mfValue : 0;
+ return (meType == EXC_PCITEM_DOUBLE) ? &mfValue : nullptr;
}
const DateTime* XclPCItem::GetDateTime() const
{
- return (meType == EXC_PCITEM_DATETIME) ? &maDateTime : 0;
+ return (meType == EXC_PCITEM_DATETIME) ? &maDateTime : nullptr;
}
const sal_Int16* XclPCItem::GetInteger() const
{
- return (meType == EXC_PCITEM_INTEGER) ? &mnValue : 0;
+ return (meType == EXC_PCITEM_INTEGER) ? &mnValue : nullptr;
}
const sal_uInt16* XclPCItem::GetError() const
{
- return (meType == EXC_PCITEM_ERROR) ? &mnError : 0;
+ return (meType == EXC_PCITEM_ERROR) ? &mnError : nullptr;
}
const bool* XclPCItem::GetBool() const
{
- return (meType == EXC_PCITEM_BOOL) ? &mbValue : 0;
+ return (meType == EXC_PCITEM_BOOL) ? &mbValue : nullptr;
}
// Field settings =============================================================
@@ -412,7 +412,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTCachedName& rCachedNam
const OUString* XclPTVisNameInfo::GetVisName() const
{
- return HasVisName() ? &maVisName.maName : 0;
+ return HasVisName() ? &maVisName.maName : nullptr;
}
void XclPTVisNameInfo::SetVisName( const OUString& rName )
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 551e035d80c8..874b7971131c 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -284,7 +284,7 @@ SfxObjectShell* XclRoot::GetDocShell() const
ScModelObj* XclRoot::GetDocModelObj() const
{
SfxObjectShell* pDocShell = GetDocShell();
- return pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : 0;
+ return pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr;
}
OutputDevice* XclRoot::GetPrinter() const
@@ -305,7 +305,7 @@ ScRangeName& XclRoot::GetNamedRanges() const
SdrPage* XclRoot::GetSdrPage( SCTAB nScTab ) const
{
return ((nScTab >= 0) && GetDoc().GetDrawLayer()) ?
- GetDoc().GetDrawLayer()->GetPage( static_cast< sal_uInt16 >( nScTab ) ) : 0;
+ GetDoc().GetDrawLayer()->GetPage( static_cast< sal_uInt16 >( nScTab ) ) : nullptr;
}
SvNumberFormatter& XclRoot::GetFormatter() const
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 3a65bf6d2db3..9005282156d9 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -85,7 +85,7 @@ static const ColorData spnDefColorTable8[] =
#undef EXC_PALETTE_EGA_COLORS_DARK
XclDefaultPalette::XclDefaultPalette( const XclRoot& rRoot ) :
- mpnColorTable( 0 ),
+ mpnColorTable( nullptr ),
mnTableSize( 0 )
{
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
@@ -533,27 +533,27 @@ namespace {
/** Property names for common font settings. */
const sal_Char *const sppcPropNamesChCommon[] =
{
- "CharUnderline", "CharStrikeout", "CharColor", "CharContoured", "CharShadowed", 0
+ "CharUnderline", "CharStrikeout", "CharColor", "CharContoured", "CharShadowed", nullptr
};
/** Property names for Western font settings. */
const sal_Char *const sppcPropNamesChWstrn[] =
{
- "CharFontName", "CharHeight", "CharPosture", "CharWeight", 0
+ "CharFontName", "CharHeight", "CharPosture", "CharWeight", nullptr
};
/** Property names for Asian font settings. */
const sal_Char *const sppcPropNamesChAsian[] =
{
- "CharFontNameAsian", "CharHeightAsian", "CharPostureAsian", "CharWeightAsian", 0
+ "CharFontNameAsian", "CharHeightAsian", "CharPostureAsian", "CharWeightAsian", nullptr
};
/** Property names for Complex font settings. */
const sal_Char *const sppcPropNamesChCmplx[] =
{
- "CharFontNameComplex", "CharHeightComplex", "CharPostureComplex", "CharWeightComplex", 0
+ "CharFontNameComplex", "CharHeightComplex", "CharPostureComplex", "CharWeightComplex", nullptr
};
/** Property names for escapement. */
const sal_Char *const sppcPropNamesChEscapement[] =
{
- "CharEscapement", "CharEscapementHeight", 0
+ "CharEscapement", "CharEscapementHeight", nullptr
};
const sal_Int8 EXC_API_ESC_HEIGHT = 58; /// Default escapement font height.
@@ -568,7 +568,7 @@ const sal_Char *const *const sppcPropNamesChCmplxNoName = sppcPropNamesChCmplx +
const sal_Char *const sppcPropNamesControl[] =
{
"FontName", "FontFamily", "FontCharset", "FontHeight", "FontSlant",
- "FontWeight", "FontUnderline", "FontStrikeout", "TextColor", 0
+ "FontWeight", "FontUnderline", "FontStrikeout", "TextColor", nullptr
};
/** Inserts all passed API font settings into the font data object. */
@@ -779,15 +779,15 @@ struct XclBuiltInFormat
/** Defines an Excel built-in number format that maps to an own built-in format. */
#define EXC_NUMFMT_OFFSET( nXclNumFmt, eOffset ) \
- { nXclNumFmt, 0, eOffset, 0 }
+ { nXclNumFmt, nullptr, eOffset, 0 }
/** Defines an Excel built-in number format that is the same as the specified. */
#define EXC_NUMFMT_REUSE( nXclNumFmt, nXclReuse ) \
- { nXclNumFmt, 0, PRV_NF_INDEX_REUSE, nXclReuse }
+ { nXclNumFmt, nullptr, PRV_NF_INDEX_REUSE, nXclReuse }
/** Terminates an Excel built-in number format table. */
#define EXC_NUMFMT_ENDTABLE() \
- { EXC_FORMAT_NOTFOUND, 0, NF_NUMBER_STANDARD, 0 }
+ { EXC_FORMAT_NOTFOUND, nullptr, NF_NUMBER_STANDARD, 0 }
// Currency unit characters
#define UTF8_BAHT "\340\270\277"
@@ -1412,15 +1412,15 @@ static const XclBuiltInFormatTable spBuiltInFormatTables[] =
{ LANGUAGE_ENGLISH_CAN, LANGUAGE_ENGLISH, spBuiltInFormats_ENGLISH_CAN },
{ LANGUAGE_ENGLISH_AUS, LANGUAGE_ENGLISH, spBuiltInFormats_ENGLISH_AUS },
{ LANGUAGE_ENGLISH_SAFRICA, LANGUAGE_ENGLISH, spBuiltInFormats_ENGLISH_SAFRICA },
- { LANGUAGE_ENGLISH_NZ, LANGUAGE_ENGLISH_AUS, 0 },
+ { LANGUAGE_ENGLISH_NZ, LANGUAGE_ENGLISH_AUS, nullptr },
{ PRV_LANGUAGE_FRENCH_PRIM, LANGUAGE_DONTKNOW, spBuiltInFormats_FRENCH },
{ LANGUAGE_FRENCH, PRV_LANGUAGE_FRENCH_PRIM, spBuiltInFormats_FRENCH_FRANCE },
{ LANGUAGE_FRENCH_CANADIAN, PRV_LANGUAGE_FRENCH_PRIM, spBuiltInFormats_FRENCH_CANADIAN },
{ LANGUAGE_FRENCH_SWISS, PRV_LANGUAGE_FRENCH_PRIM, spBuiltInFormats_FRENCH_SWISS },
{ LANGUAGE_FRENCH_BELGIAN, LANGUAGE_FRENCH, spBuiltInFormats_FRENCH_BELGIAN },
- { LANGUAGE_FRENCH_LUXEMBOURG, LANGUAGE_FRENCH, 0 },
- { LANGUAGE_FRENCH_MONACO, LANGUAGE_FRENCH, 0 },
+ { LANGUAGE_FRENCH_LUXEMBOURG, LANGUAGE_FRENCH, nullptr },
+ { LANGUAGE_FRENCH_MONACO, LANGUAGE_FRENCH, nullptr },
{ PRV_LANGUAGE_GERMAN_PRIM, LANGUAGE_DONTKNOW, spBuiltInFormats_GERMAN },
{ LANGUAGE_GERMAN, PRV_LANGUAGE_GERMAN_PRIM, spBuiltInFormats_GERMAN_GERMANY },
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index df10559ad5a0..5e26d7c4428b 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -394,7 +394,7 @@ ScCTBWrapper::Print( FILE* fp )
ScCTB* ScCTBWrapper::GetCustomizationData( const OUString& sTBName )
{
- ScCTB* pCTB = NULL;
+ ScCTB* pCTB = nullptr;
for ( std::vector< ScCTB >::iterator it = rCTB.begin(); it != rCTB.end(); ++it )
{
if ( it->GetName().equals( sTBName ) )
diff --git a/sc/source/filter/excel/xlview.cxx b/sc/source/filter/excel/xlview.cxx
index dca88f213692..7d227b73fc18 100644
--- a/sc/source/filter/excel/xlview.cxx
+++ b/sc/source/filter/excel/xlview.cxx
@@ -90,7 +90,7 @@ bool XclTabViewData::HasPane( sal_uInt8 nPaneId ) const
const XclSelectionData* XclTabViewData::GetSelectionData( sal_uInt8 nPane ) const
{
XclSelectionMap::const_iterator aIt = maSelMap.find( nPane );
- return (aIt == maSelMap.end()) ? 0 : aIt->second.get();
+ return (aIt == maSelMap.end()) ? nullptr : aIt->second.get();
}
XclSelectionData& XclTabViewData::CreateSelectionData( sal_uInt8 nPane )
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index e2d0a2a0a3dd..0f17a3e2c541 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -320,7 +320,7 @@ bool ScfPropSetHelper::ReadValue( Any& rAny )
Any* pAny = GetNextAny();
if( pAny )
rAny = *pAny;
- return pAny != 0;
+ return pAny != nullptr;
}
bool ScfPropSetHelper::ReadValue( Color& rColor )
@@ -371,7 +371,7 @@ void ScfPropSetHelper::WriteToPropertySet( ScfPropertySet& rPropSet ) const
Any* ScfPropSetHelper::GetNextAny()
{
OSL_ENSURE( mnNextIdx < maNameOrder.size(), "ScfPropSetHelper::GetNextAny - sequence overflow" );
- Any* pAny = 0;
+ Any* pAny = nullptr;
if( mnNextIdx < maNameOrder.size() )
pAny = &maValueSeq[ maNameOrder[ mnNextIdx++ ] ];
return pAny;
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 645323b9cf1c..84deda9ec4a2 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -58,8 +58,8 @@ ScfProgressBar::~ScfProgressBar()
void ScfProgressBar::Init( SfxObjectShell* pDocShell )
{
mpDocShell = pDocShell;
- mpParentProgress = 0;
- mpParentSegment = mpCurrSegment = 0;
+ mpParentProgress = nullptr;
+ mpParentSegment = mpCurrSegment = nullptr;
mnTotalSize = mnTotalPos = mnUnitSize = mnNextUnitPos = 0;
mnSysProgressScale = 1; // used to workaround the ULONG_MAX/100 limit
mbInProgress = false;
@@ -68,7 +68,7 @@ void ScfProgressBar::Init( SfxObjectShell* pDocShell )
ScfProgressBar::ScfProgressSegment* ScfProgressBar::GetSegment( sal_Int32 nSegment )
{
if( nSegment < 0 )
- return 0;
+ return nullptr;
return &(maSegments.at( nSegment ));
}
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 324c0e34c9fd..fb80b938c3b7 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -234,7 +234,7 @@ ScStyleSheet& lclMakeStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyle
// find an unused name
OUString aNewName( rStyleName );
sal_Int32 nIndex = 0;
- SfxStyleSheetBase* pOldStyleSheet = 0;
+ SfxStyleSheetBase* pOldStyleSheet = nullptr;
while( SfxStyleSheetBase* pStyleSheet = rPool.Find( aNewName, eFamily ) )
{
if( !pOldStyleSheet )
diff --git a/sc/source/filter/ftools/sharedformulagroups.cxx b/sc/source/filter/ftools/sharedformulagroups.cxx
index 9a00ade2f0a8..46ccb31d03c6 100644
--- a/sc/source/filter/ftools/sharedformulagroups.cxx
+++ b/sc/source/filter/ftools/sharedformulagroups.cxx
@@ -19,7 +19,7 @@ void SharedFormulaGroups::set( size_t nSharedId, ScTokenArray* pArray )
const ScTokenArray* SharedFormulaGroups::get( size_t nSharedId ) const
{
StoreType::const_iterator it = maStore.find(nSharedId);
- return it == maStore.end() ? NULL : it->second;
+ return it == maStore.end() ? nullptr : it->second;
}
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index a3d36ea435de..3e2e8c81e318 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -341,7 +341,7 @@ void ScHTMLExport::WriteHeader()
if ( pDoc->IsClipOrUndo() )
{ // no real DocInfo available, but some META information like charset needed
- SfxFrameHTMLWriter::Out_DocInfo( rStrm, aBaseURL, NULL, sIndent, eDestEnc, &aNonConvertibleChars );
+ SfxFrameHTMLWriter::Out_DocInfo( rStrm, aBaseURL, nullptr, sIndent, eDestEnc, &aNonConvertibleChars );
}
else
{
@@ -471,7 +471,7 @@ void ScHTMLExport::WriteOverview()
const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
{
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = NULL;
+ SfxStyleSheetBase* pStyleSheet = nullptr;
OSL_ENSURE( pStylePool, "StylePool not found! :-(" );
// remember defaults for compare in WriteCell
@@ -879,7 +879,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
return ;
ScAddress aPos( nCol, nRow, nTab );
- ScHTMLGraphEntry* pGraphEntry = NULL;
+ ScHTMLGraphEntry* pGraphEntry = nullptr;
if ( bTabHasGraphics && !mbSkipImages )
{
size_t ListSize = aGraphList.size();
@@ -1060,7 +1060,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
case SVX_VER_JUSTIFY_CENTER: pChar = OOO_STRING_SVTOOLS_HTML_VA_middle; break;
case SVX_VER_JUSTIFY_BOTTOM: pChar = OOO_STRING_SVTOOLS_HTML_VA_bottom; break;
case SVX_VER_JUSTIFY_STANDARD:
- default: pChar = NULL;
+ default: pChar = nullptr;
}
if ( pChar )
{
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 6e4cc376f49b..8e82e3072f2c 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -176,9 +176,9 @@ void ScHTMLImport::WriteToDocument(
SCsROW nRowDiff = (SCsROW)maRange.aStart.Row();
SCsTAB nTabDiff = (SCsTAB)maRange.aStart.Tab();
- ScHTMLTable* pTable = NULL;
+ ScHTMLTable* pTable = nullptr;
ScHTMLTableId nTableId = SC_HTML_GLOBAL_TABLE;
- while( (pTable = pGlobTable->FindNestedTable( ++nTableId )) != 0 )
+ while( (pTable = pGlobTable->FindNestedTable( ++nTableId )) != nullptr )
{
pTable->GetDocRange( aNewRange );
aNewRange.Move( nColDiff, nRowDiff, nTabDiff );
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index b7b01db301ab..c5dad934a2eb 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -205,7 +205,7 @@ ScHTMLLayoutParser::ScHTMLLayoutParser(
aPageSize( aPageSizeP ),
aBaseURL( rBaseURL ),
xLockedList( new ScRangeList ),
- pTables( NULL ),
+ pTables( nullptr ),
pColOffset( new ScHTMLColOffset ),
pLocalColOffset( new ScHTMLColOffset ),
nFirstTableCell(0),
@@ -268,7 +268,7 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const OUString& rBaseURL
bool bLoading = pObjSh && pObjSh->IsLoading();
SvKeyValueIteratorRef xValues;
- SvKeyValueIterator* pAttributes = NULL;
+ SvKeyValueIterator* pAttributes = nullptr;
if ( bLoading )
pAttributes = pObjSh->GetHeaderAttributes();
else
@@ -308,7 +308,7 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const OUString& rBaseURL
const ScHTMLTable* ScHTMLLayoutParser::GetGlobalTable() const
{
- return 0;
+ return nullptr;
}
void ScHTMLLayoutParser::NewActEntry( ScEEParseEntry* pE )
@@ -489,13 +489,13 @@ void ScHTMLLayoutParser::Adjust()
xLockedList->RemoveAll();
std::stack< ScHTMLAdjustStackEntry* > aStack;
- ScHTMLAdjustStackEntry* pS = NULL;
+ ScHTMLAdjustStackEntry* pS = nullptr;
sal_uInt16 nTab = 0;
SCCOL nLastCol = SCCOL_MAX;
SCROW nNextRow = 0;
SCROW nCurRow = 0;
sal_uInt16 nPageWidth = (sal_uInt16) aPageSize.Width();
- InnerMap* pTab = NULL;
+ InnerMap* pTab = nullptr;
for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i )
{
ScEEParseEntry* pE = maList[ i ];
@@ -511,7 +511,7 @@ void ScHTMLLayoutParser::Adjust()
nCurRow = pS->nCurRow;
}
delete pS;
- pS = NULL;
+ pS = nullptr;
nTab = pE->nTab;
if (pTables)
{
@@ -1115,7 +1115,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
nColOffsetStart = nColOffset;
}
- ScEEParseEntry* pE = NULL;
+ ScEEParseEntry* pE = nullptr;
if (maList.size())
pE = maList.back();
NewActEntry( pE ); // New free flying pActEntry
@@ -1221,7 +1221,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
nRowKGV = nRowsPerRow1 = nRows;
nRowsPerRow2 = 1;
}
- InnerMap* pTab2 = NULL;
+ InnerMap* pTab2 = nullptr;
if ( nRowsPerRow2 > 1 )
{ // Height of the inner table
pTab2 = new InnerMap;
@@ -1815,7 +1815,7 @@ private:
ScHTMLTableMap::ScHTMLTableMap( ScHTMLTable& rParentTable ) :
mrParentTable(rParentTable),
- mpCurrTable(NULL)
+ mpCurrTable(nullptr)
{
}
@@ -1825,7 +1825,7 @@ ScHTMLTableMap::~ScHTMLTableMap()
ScHTMLTable* ScHTMLTableMap::FindTable( ScHTMLTableId nTableId, bool bDeep ) const
{
- ScHTMLTable* pResult = 0;
+ ScHTMLTable* pResult = nullptr;
if( mpCurrTable && (nTableId == mpCurrTable->GetTableId()) )
pResult = mpCurrTable; // cached table
else
@@ -1898,7 +1898,7 @@ ScHTMLTable::ScHTMLTable( ScHTMLTable& rParentTable, const ImportInfo& rInfo, bo
maTableItemSet( rParentTable.GetCurrItemSet() ),
mrEditEngine( rParentTable.mrEditEngine ),
mrEEParseList( rParentTable.mrEEParseList ),
- mpCurrEntryList( 0 ),
+ mpCurrEntryList( nullptr ),
maSize( 1, 1 ),
mpParser(rParentTable.mpParser),
mbBorderOn( false ),
@@ -1940,12 +1940,12 @@ ScHTMLTable::ScHTMLTable(
std::vector< ScEEParseEntry* >& rEEParseList,
ScHTMLTableId& rnUnusedId, ScHTMLParser* pParser
) :
- mpParentTable( 0 ),
+ mpParentTable( nullptr ),
maTableId( rnUnusedId ),
maTableItemSet( rPool ),
mrEditEngine( rEditEngine ),
mrEEParseList( rEEParseList ),
- mpCurrEntryList( 0 ),
+ mpCurrEntryList( nullptr ),
maSize( 1, 1 ),
mpParser(pParser),
mbBorderOn( false ),
@@ -1973,9 +1973,9 @@ const SfxItemSet& ScHTMLTable::GetCurrItemSet() const
ScHTMLSize ScHTMLTable::GetSpan( const ScHTMLPos& rCellPos ) const
{
ScHTMLSize aSpan( 1, 1 );
- const ScRange* pRange = NULL;
- if( ( (pRange = maVMergedCells.Find( rCellPos.MakeAddr() ) ) != 0)
- || ( (pRange = maHMergedCells.Find( rCellPos.MakeAddr() ) ) != 0)
+ const ScRange* pRange = nullptr;
+ if( ( (pRange = maVMergedCells.Find( rCellPos.MakeAddr() ) ) != nullptr)
+ || ( (pRange = maHMergedCells.Find( rCellPos.MakeAddr() ) ) != nullptr)
)
aSpan.Set( pRange->aEnd.Col() - pRange->aStart.Col() + 1, pRange->aEnd.Row() - pRange->aStart.Row() + 1 );
return aSpan;
@@ -1983,7 +1983,7 @@ ScHTMLSize ScHTMLTable::GetSpan( const ScHTMLPos& rCellPos ) const
ScHTMLTable* ScHTMLTable::FindNestedTable( ScHTMLTableId nTableId ) const
{
- return mxNestedTables.get() ? mxNestedTables->FindTable( nTableId ) : 0;
+ return mxNestedTables.get() ? mxNestedTables->FindTable( nTableId ) : nullptr;
}
void ScHTMLTable::PutItem( const SfxPoolItem& rItem )
@@ -2307,8 +2307,8 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
const SCROW nLastRow = maSize.mnRows - 1;
const long nOuterLine = DEF_LINE_WIDTH_2;
const long nInnerLine = DEF_LINE_WIDTH_0;
- SvxBorderLine aOuterLine(0, nOuterLine, table::BorderLineStyle::SOLID);
- SvxBorderLine aInnerLine(0, nInnerLine, table::BorderLineStyle::SOLID);
+ SvxBorderLine aOuterLine(nullptr, nOuterLine, table::BorderLineStyle::SOLID);
+ SvxBorderLine aInnerLine(nullptr, nInnerLine, table::BorderLineStyle::SOLID);
SvxBoxItem aBorderItem( ATTR_BORDER );
for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol )
@@ -2325,12 +2325,12 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
SCROW nCellRow2 = nCellRow1 + GetDocSize( tdRow, nRow ) - 1;
for( SCCOL nCellCol = nCellCol1; nCellCol <= nCellCol2; ++nCellCol )
{
- aBorderItem.SetLine( (nCellCol == nCellCol1) ? pLeftLine : 0, SvxBoxItemLine::LEFT );
- aBorderItem.SetLine( (nCellCol == nCellCol2) ? pRightLine : 0, SvxBoxItemLine::RIGHT );
+ aBorderItem.SetLine( (nCellCol == nCellCol1) ? pLeftLine : nullptr, SvxBoxItemLine::LEFT );
+ aBorderItem.SetLine( (nCellCol == nCellCol2) ? pRightLine : nullptr, SvxBoxItemLine::RIGHT );
for( SCROW nCellRow = nCellRow1; nCellRow <= nCellRow2; ++nCellRow )
{
- aBorderItem.SetLine( (nCellRow == nCellRow1) ? pTopLine : 0, SvxBoxItemLine::TOP );
- aBorderItem.SetLine( (nCellRow == nCellRow2) ? pBottomLine : 0, SvxBoxItemLine::BOTTOM );
+ aBorderItem.SetLine( (nCellRow == nCellRow1) ? pTopLine : nullptr, SvxBoxItemLine::TOP );
+ aBorderItem.SetLine( (nCellRow == nCellRow2) ? pBottomLine : nullptr, SvxBoxItemLine::BOTTOM );
pDoc->ApplyAttr( nCellCol, nCellRow, rFirstPos.Tab(), aBorderItem );
}
}
@@ -2444,7 +2444,7 @@ bool ScHTMLTable::PushTableEntry( ScHTMLTableId nTableId )
ScHTMLTable* ScHTMLTable::GetExistingTable( ScHTMLTableId nTableId ) const
{
ScHTMLTable* pTable = ((nTableId != SC_HTML_GLOBAL_TABLE) && mxNestedTables.get()) ?
- mxNestedTables->FindTable( nTableId, false ) : 0;
+ mxNestedTables->FindTable( nTableId, false ) : nullptr;
OSL_ENSURE( pTable || (nTableId == SC_HTML_GLOBAL_TABLE), "ScHTMLTable::GetExistingTable - table not found" );
return pTable;
}
@@ -2464,7 +2464,7 @@ void ScHTMLTable::InsertNewCell( const ScHTMLSize& rSpanSize )
/* Find an unused cell by skipping all merged ranges that cover the
current cell position stored in maCurrCell. */
- while( ((pRange = maVMergedCells.Find( maCurrCell.MakeAddr() )) != 0) || ((pRange = maHMergedCells.Find( maCurrCell.MakeAddr() )) != 0) )
+ while( ((pRange = maVMergedCells.Find( maCurrCell.MakeAddr() )) != nullptr) || ((pRange = maHMergedCells.Find( maCurrCell.MakeAddr() )) != nullptr) )
maCurrCell.mnCol = pRange->aEnd.Col() + 1;
mpCurrEntryList = &maEntryMap[ maCurrCell ];
@@ -2473,7 +2473,7 @@ void ScHTMLTable::InsertNewCell( const ScHTMLSize& rSpanSize )
vertically merged ranges (do not shrink the new cell). */
SCCOL nColEnd = maCurrCell.mnCol + rSpanSize.mnCols;
for( ScAddress aAddr( maCurrCell.MakeAddr() ); aAddr.Col() < nColEnd; aAddr.IncCol() )
- if( (pRange = maVMergedCells.Find( aAddr )) != 0 )
+ if( (pRange = maVMergedCells.Find( aAddr )) != nullptr )
pRange->aEnd.SetRow( maCurrCell.mnRow - 1 );
// insert the new range into the cell lists
@@ -2540,7 +2540,7 @@ void ScHTMLTable::ImplDataOff()
{
mxDataItemSet.reset();
++maCurrCell.mnCol;
- mpCurrEntryList = 0;
+ mpCurrEntryList = nullptr;
mbDataOn = false;
}
}
@@ -2742,7 +2742,7 @@ void ScHTMLTable::RecalcDocPos( const ScHTMLPos& rBasePos )
ScHTMLPos aEntryDocPos( aCellDocPos );
ScHTMLEntryList& rEntryList = aMapIter->second;
- ScHTMLEntry* pEntry = 0;
+ ScHTMLEntry* pEntry = nullptr;
ScHTMLEntryList::iterator aListIterEnd = rEntryList.end();
for( ScHTMLEntryList::iterator aListIter = rEntryList.begin(); aListIter != aListIterEnd; ++aListIter )
{
@@ -2847,7 +2847,7 @@ ScHTMLQueryParser::~ScHTMLQueryParser()
sal_uLong ScHTMLQueryParser::Read( SvStream& rStrm, const OUString& rBaseURL )
{
SvKeyValueIteratorRef xValues;
- SvKeyValueIterator* pAttributes = 0;
+ SvKeyValueIterator* pAttributes = nullptr;
SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
if( pObjSh && pObjSh->IsLoading() )
@@ -3094,7 +3094,7 @@ class CSSHandler
const char* mp;
size_t mn;
- MemStr() : mp(NULL), mn(0) {}
+ MemStr() : mp(nullptr), mn(0) {}
MemStr(const char* p, size_t n) : mp(p), mn(n) {}
MemStr& operator=(const MemStr& r)
{
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index c88284d56d03..875906e08ee3 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -319,13 +319,13 @@ private:
sal_uInt16* pBuffer;
sal_uInt16 nTabCount;
- inline void Clear() { if( pBuffer ) delete[] pBuffer; pBuffer = NULL; }
+ inline void Clear() { if( pBuffer ) delete[] pBuffer; pBuffer = nullptr; }
virtual void SaveCont( XclExpStream& rStrm ) override;
public:
inline XclExpChTrTabId( sal_uInt16 nCount ) :
- pBuffer( NULL ), nTabCount( nCount ) {}
+ pBuffer( nullptr ), nTabCount( nCount ) {}
XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer );
virtual ~XclExpChTrTabId();
diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx
index 3bb393cff0ef..09115c12c0c5 100644
--- a/sc/source/filter/inc/drawingfragment.hxx
+++ b/sc/source/filter/inc/drawingfragment.hxx
@@ -61,7 +61,7 @@ public:
explicit Shape(
const WorksheetHelper& rHelper,
const AttributeList& rAttribs,
- const sal_Char* pcServiceName = 0 );
+ const sal_Char* pcServiceName = nullptr );
protected:
virtual void finalizeXShape(
@@ -89,7 +89,7 @@ public:
sal_Int32 nElement,
const AttributeList& rAttribs,
const ::oox::drawingml::ShapePtr& rxParentShape,
- ::oox::drawingml::ShapePtr* pxShape = 0 );
+ ::oox::drawingml::ShapePtr* pxShape = nullptr );
protected:
virtual ::oox::core::ContextHandlerRef
diff --git a/sc/source/filter/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx
index 3b1217dbf808..ed86794005bf 100644
--- a/sc/source/filter/inc/eeimport.hxx
+++ b/sc/source/filter/inc/eeimport.hxx
@@ -55,7 +55,7 @@ public:
virtual ScRange GetRange() override { return maRange; }
virtual void WriteToDocument( bool bSizeColsRows = false,
double nOutputFactor = 1.0,
- SvNumberFormatter* pFormatter = NULL,
+ SvNumberFormatter* pFormatter = nullptr,
bool bConvertDate = true ) override;
};
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index ccd5e685d545..ec2b45b6fce2 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -42,7 +42,7 @@ struct ScHTMLImage
sal_Char nDir; // 1==hori, 2==verti, 3==beides
ScHTMLImage() :
- aSize( 0, 0 ), aSpace( 0, 0 ), pGraphic( NULL ),
+ aSize( 0, 0 ), aSpace( 0, 0 ), pGraphic( nullptr ),
nDir( nHorizontal )
{}
@@ -70,16 +70,16 @@ struct ScEEParseEntry
bool bEntirePara:1; // true = use entire paragraph, false = use selection
ScEEParseEntry( SfxItemPool* pPool ) :
- aItemSet( *pPool ), pValStr( NULL ),
- pNumStr( NULL ), pName( NULL ),
+ aItemSet( *pPool ), pValStr( nullptr ),
+ pNumStr( nullptr ), pName( nullptr ),
nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
nTwips(0), nColOverlap(1), nRowOverlap(1),
nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
{}
ScEEParseEntry( const SfxItemSet& rItemSet ) :
- aItemSet( rItemSet ), pValStr( NULL ),
- pNumStr( NULL ), pName( NULL ),
+ aItemSet( rItemSet ), pValStr( nullptr ),
+ pNumStr( nullptr ), pName( nullptr ),
nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
nTwips(0), nColOverlap(1), nRowOverlap(1),
nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index fa3b152c0564..547fdb144b57 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -82,7 +82,7 @@ public:
@return The encryption data or an empty sequence on 'Cancel' or any error. */
static css::uno::Sequence< css::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium,
::comphelper::IDocPasswordVerifier& rVerifier,
- const ::std::vector< OUString >* pDefaultPasswords = 0 );
+ const ::std::vector< OUString >* pDefaultPasswords = nullptr );
};
template< typename Type >
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 5a920c870620..0a9667a36769 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -280,7 +280,7 @@ public:
virtual FltError ScImportRTF( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange ) override;
virtual FltError ScImportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, ScRange& rRange,
double nOutputFactor = 1.0, bool bCalcWidthHeight = true,
- SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) override;
+ SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) override;
virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) override;
virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight ) override;
diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx
index 858e5beeb25c..562a64b45afd 100644
--- a/sc/source/filter/inc/htmlimp.hxx
+++ b/sc/source/filter/inc/htmlimp.hxx
@@ -34,7 +34,7 @@ public:
const ScHTMLParser* GetParser() const { return static_cast<ScHTMLParser*>(mpParser); }
virtual void WriteToDocument( bool bSizeColsRows = false, double nOutputFactor = 1.0,
- SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) override;
+ SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) override;
static OUString GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName );
};
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 3529d6e3565d..230a9a77530e 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -39,10 +39,10 @@ private:
sal_Int32 nType; // < 0 -> undefiniert
inline ENTRY()
{
- pTmpName = NULL;
- pFont = NULL;
- pHeight = NULL;
- pColor = NULL;
+ pTmpName = nullptr;
+ pFont = nullptr;
+ pHeight = nullptr;
+ pColor = nullptr;
nType = -1;
}
inline ~ENTRY()
diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx
index 766193710810..7312d26d4ef4 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -63,7 +63,7 @@ public:
/** Returns the text data of this portion. */
inline const OUString& getText() const { return maText; }
/** Returns true, if the portion contains font formatting. */
- inline bool hasFont() const { return mxFont.get() != 0; }
+ inline bool hasFont() const { return mxFont.get() != nullptr; }
/** Converts the portion and replaces or appends to the passed XText. */
void convert(
@@ -248,7 +248,7 @@ public:
if there is only one unformatted portion. */
bool extractPlainString(
OUString& orString,
- const oox::xls::Font* pFirstPortionFont = 0 ) const;
+ const oox::xls::Font* pFirstPortionFont = nullptr ) const;
/** Converts the string and writes it into the passed XText.
@param rxText The XText interface of the target object.
@@ -258,7 +258,7 @@ public:
void convert(
const css::uno::Reference< css::text::XText >& rxText,
bool bReplaceOld,
- const oox::xls::Font* pFirstPortionFont = 0 ) const;
+ const oox::xls::Font* pFirstPortionFont = nullptr ) const;
::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const;
private:
diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index 9e0457fd6b58..216dc4f41e52 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -467,7 +467,7 @@ struct Sc10ColAttr
Sc10ColAttr()
: Count(0)
- , pData(NULL)
+ , pData(nullptr)
{
}
~Sc10ColAttr() { delete [] pData; }
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index a1d2aea4e9d6..b14007958c23 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -824,25 +824,25 @@ public:
/** Creates a new empty font object.
@param opnFontId (out-param) The identifier of the new font object. */
- FontRef createFont( sal_Int32* opnFontId = 0 );
+ FontRef createFont( sal_Int32* opnFontId = nullptr );
/** Creates a number format. */
NumberFormatRef createNumFmt( sal_Int32 nNumFmtId, const OUString& rFmtCode );
sal_Int32 nextFreeNumFmtId();
/** Creates a new empty border object.
@param opnBorderId (out-param) The identifier of the new border object. */
- BorderRef createBorder( sal_Int32* opnBorderId = 0 );
+ BorderRef createBorder( sal_Int32* opnBorderId = nullptr );
/** Creates a new empty fill object.
@param opnFillId (out-param) The identifier of the new fill object. */
- FillRef createFill( sal_Int32* opnFillId = 0 );
+ FillRef createFill( sal_Int32* opnFillId = nullptr );
/** Creates a new empty cell formatting object.
@param opnXfId (out-param) The identifier of the new XF object. */
- XfRef createCellXf( sal_Int32* opnXfId = 0 );
+ XfRef createCellXf( sal_Int32* opnXfId = nullptr );
/** Creates a new empty style formatting object.
@param opnXfId (out-param) The identifier of the new XF object. */
- XfRef createStyleXf( sal_Int32* opnXfId = 0 );
+ XfRef createStyleXf( sal_Int32* opnXfId = nullptr );
/** Creates a new empty differential formatting object.
@param opnDxfId (out-param) The identifier of the new DXF object. */
- DxfRef createDxf( sal_Int32* opnDxfId = 0 );
+ DxfRef createDxf( sal_Int32* opnDxfId = nullptr );
/** Appends a new color to the color palette. */
void importPaletteColor( const AttributeList& rAttribs );
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index 3c02a9500ad0..a3895c7c5efc 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -69,7 +69,7 @@ public:
const XclExpRoot& rRoot,
XclExpObjectManager& rObjMgr,
SvStream& rStrm,
- const XclEscherEx* pParent = 0 );
+ const XclEscherEx* pParent = nullptr );
virtual ~XclEscherEx();
/** Called by MSODRAWING record constructors to initialize the DFF stream
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 6d34a3410aa5..9f23f9cfc627 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -42,7 +42,7 @@ public:
///! count>=0xFFFF: Obj will be deleted, return 0
sal_uInt16 Add( XclObj* );
- XclObj* back () { return maObjs.empty() ? NULL : maObjs.back(); }
+ XclObj* back () { return maObjs.empty() ? nullptr : maObjs.back(); }
/**
*
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 001666a9c63a..3292a24097a7 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -496,7 +496,7 @@ public:
virtual void SetRotation( sal_uInt16 nRotation ) override;
/** Converts all text settings of the passed title text object. */
- void ConvertTitle( css::uno::Reference< css::chart2::XTitle > xTitle, sal_uInt16 nTarget, const OUString* pSubTitle = NULL );
+ void ConvertTitle( css::uno::Reference< css::chart2::XTitle > xTitle, sal_uInt16 nTarget, const OUString* pSubTitle = nullptr );
/** Converts all text settings of the passed legend. */
void ConvertLegend( const ScfPropertySet& rPropSet );
/** Converts all settings of the passed data point caption text object. */
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index e735b0fe6d80..ba1ff9500e77 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -104,7 +104,7 @@ public:
virtual ~XclExpHyperlink();
/** Returns the cell representation text or 0, if not available. */
- inline const OUString* GetRepr() const { return m_Repr.isEmpty() ? 0 : &m_Repr; }
+ inline const OUString* GetRepr() const { return m_Repr.isEmpty() ? nullptr : &m_Repr; }
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
diff --git a/sc/source/filter/inc/xeformula.hxx b/sc/source/filter/inc/xeformula.hxx
index f42d2b4c6397..4c3839fb3371 100644
--- a/sc/source/filter/inc/xeformula.hxx
+++ b/sc/source/filter/inc/xeformula.hxx
@@ -56,7 +56,7 @@ public:
/** Creates and returns the token array of a formula. */
XclTokenArrayRef CreateFormula(
XclFormulaType eType, const ScTokenArray& rScTokArr,
- const ScAddress* pScBasePos = 0, XclExpRefLog* pRefLog = 0 );
+ const ScAddress* pScBasePos = nullptr, XclExpRefLog* pRefLog = nullptr );
/** Creates and returns a token array containing a single cell address. */
XclTokenArrayRef CreateFormula( XclFormulaType eType, const ScAddress& rScPos );
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index a55cae54da2f..af40492984d7 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -398,7 +398,7 @@ class XclExpUrlHelper : boost::noncopyable
public:
/** Encodes and returns the URL passed in rAbsUrl to an Excel like URL.
@param pTableName Optional pointer to a table name to be encoded in this URL. */
- static OUString EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName = 0 );
+ static OUString EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName = nullptr );
/** Encodes and returns the passed DDE link to an Excel like DDE link. */
static OUString EncodeDde( const OUString& rApplic, const OUString& rTopic );
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index 9112a9c7192a..b269e29e43a5 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -145,7 +145,7 @@ public:
param pRefLogEntry If not 0, data about the external link is stored here. */
void FindExtSheet( sal_uInt16& rnExtSheet,
sal_uInt16& rnXclTab, SCTAB nScTab,
- XclExpRefLogEntry* pRefLogEntry = 0 );
+ XclExpRefLogEntry* pRefLogEntry = nullptr );
/** Searches for an EXTERNSHEET index for the given Calc sheet range.
@descr See above for the meaning of EXTERNSHEET indexes.
@param rnExtSheet (out-param) Returns the EXTERNSHEET index.
@@ -157,13 +157,13 @@ public:
void FindExtSheet( sal_uInt16& rnExtSheet,
sal_uInt16& rnFirstXclTab, sal_uInt16& rnLastXclTab,
SCTAB nFirstScTab, SCTAB nLastScTab,
- XclExpRefLogEntry* pRefLogEntry = 0 );
+ XclExpRefLogEntry* pRefLogEntry = nullptr );
/** Searches for a special EXTERNSHEET index for the own document. */
sal_uInt16 FindExtSheet( sal_Unicode cCode );
void FindExtSheet( sal_uInt16 nFileId, const OUString& rTabName, sal_uInt16 nXclTabSpan,
sal_uInt16& rnExtSheet, sal_uInt16& rnFirstSBTab, sal_uInt16& rnLastSBTab,
- XclExpRefLogEntry* pRefLogEntry = NULL );
+ XclExpRefLogEntry* pRefLogEntry = nullptr );
/** Stores the cell with the given address in a CRN record list. */
void StoreCell( const ScSingleRefData& rRef, const ScAddress& rPos );
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index a13a39650f75..dd10a6fa1533 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -233,7 +233,7 @@ private:
// `s.GetChar(0) != 0` needed because some strings on export only contain NULL.
#define XESTRING_TO_PSZ(s) \
- (s.Len() && s.GetChar( 0 ) != 0 ? XclXmlUtils::ToOString( s ).getStr() : NULL)
+ (s.Len() && s.GetChar( 0 ) != 0 ? XclXmlUtils::ToOString( s ).getStr() : nullptr)
class ScAddress;
class ScDocShell;
@@ -317,7 +317,7 @@ public:
const css::uno::Reference< css::io::XOutputStream >& xParentRelation,
const char* sContentType,
const char* sRelationshipType,
- OUString* pRelationshipId = NULL );
+ OUString* pRelationshipId = nullptr );
// ignore
virtual bool exportDocument()
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index dd012cf090f4..f06f6f80bb92 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -158,7 +158,7 @@ public:
void ConvertFont(
ScfPropertySet& rPropSet,
sal_uInt16 nFontIdx,
- const Color* pFontColor = 0 ) const;
+ const Color* pFontColor = nullptr ) const;
/** Writes the pie rotation property for the passed angle. */
static void ConvertPieRotation(
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 85536e6a6a3a..eb27f388ea7d 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -466,7 +466,7 @@ public:
virtual ~XclImpControlHelper();
/** Returns true, if a linked cell address is present. */
- inline bool HasCellLink() const { return mxCellLink != 0; }
+ inline bool HasCellLink() const { return mxCellLink != nullptr; }
/** Returns the SdrObject from the passed control shape and sets the bounding rectangle. */
SdrObjectPtr CreateSdrObjectFromShape(
@@ -891,7 +891,7 @@ public:
private:
/** Updates the data of a connected shape in a connector rule. */
- void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags = 0 );
+ void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags = nullptr );
private:
/** Stores data about an SdrObject processed during import. */
@@ -899,7 +899,7 @@ private:
{
SdrObject* mpSdrObj; /// Pointer to an SdrObject.
sal_uInt32 mnDffFlags; /// Shape flags from DFF stream.
- inline explicit XclImpSdrInfo() : mpSdrObj( 0 ), mnDffFlags( 0 ) {}
+ inline explicit XclImpSdrInfo() : mpSdrObj( nullptr ), mnDffFlags( 0 ) {}
inline void Set( SdrObject* pSdrObj, sal_uInt32 nDffFlags )
{ mpSdrObj = pSdrObj; mnDffFlags = nDffFlags; }
};
@@ -978,7 +978,7 @@ private:
DffObjData& rDffObjData,
void* pClientData,
Rectangle& rTextRect,
- SdrObject* pOldSdrObj = 0 ) override;
+ SdrObject* pOldSdrObj = nullptr ) override;
// virtual functions of SvxMSConvertOCXControls
diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx
index 4da2a7025063..6bdbbfc163a9 100644
--- a/sc/source/filter/inc/xilink.hxx
+++ b/sc/source/filter/inc/xilink.hxx
@@ -194,7 +194,7 @@ public:
/** Reads a CRN record and appends it to the current SUPBOOK. */
void ReadCrn( XclImpStream& rStrm );
/** Reads an EXTERNNAME record and appends it to the current SUPBOOK. */
- void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = NULL );
+ void ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv = nullptr );
/** Returns true, if the specified XTI entry contains an internal reference. */
bool IsSelfRef( sal_uInt16 nXtiIndex ) const;
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index f4dc557c9c32..d0e8771f8204 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -117,7 +117,7 @@ public:
/** Writes all font properties to the passed property set.
@param pFontColor If set, overrides internal stored font color. */
void WriteFontProperties( ScfPropertySet& rPropSet,
- XclFontPropSetType eType, const Color* pFontColor = 0 ) const;
+ XclFontPropSetType eType, const Color* pFontColor = nullptr ) const;
private:
/** Reads and sets height and flags. */
@@ -185,7 +185,7 @@ public:
@param pFontColor If set, overrides internal stored font color. */
void WriteFontProperties(
ScfPropertySet& rPropSet, XclFontPropSetType eType,
- sal_uInt16 nFontIdx, const Color* pFontColor = 0 ) const;
+ sal_uInt16 nFontIdx, const Color* pFontColor = nullptr ) const;
/** Writes default font properties for form controls to the passed property set. */
void WriteDefaultCtrlFontProperties( ScfPropertySet& rPropSet ) const;
@@ -488,10 +488,10 @@ public:
/** Returns the object that stores all contents of an XF record. */
inline XclImpXF* GetXF( sal_uInt16 nXFIndex )
- { return (nXFIndex >= maXFList.size()) ? NULL : &maXFList.at(nXFIndex); }
+ { return (nXFIndex >= maXFList.size()) ? nullptr : &maXFList.at(nXFIndex); }
inline const XclImpXF* GetXF( sal_uInt16 nXFIndex ) const
- { return (nXFIndex >= maXFList.size()) ? NULL : &maXFList.at(nXFIndex); }
+ { return (nXFIndex >= maXFList.size()) ? nullptr : &maXFList.at(nXFIndex); }
/** Returns the index to the Excel font used in the specified XF record. */
sal_uInt16 GetFontIndex( sal_uInt16 nXFIndex ) const;
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx
index 9efb0697cc95..f235cf9fa7fd 100644
--- a/sc/source/filter/inc/xlescher.hxx
+++ b/sc/source/filter/inc/xlescher.hxx
@@ -428,11 +428,11 @@ public:
css::script::ScriptEventDescriptor& rDescriptor,
XclTbxEventType eEventType,
const OUString& rXclMacroName,
- SfxObjectShell* pDocShell = 0 );
+ SfxObjectShell* pDocShell = nullptr );
/** Tries to extract an Excel macro name from the passed macro descriptor. */
static OUString ExtractFromMacroDescriptor(
const css::script::ScriptEventDescriptor& rDescriptor,
- XclTbxEventType eEventType, SfxObjectShell* pShell = NULL );
+ XclTbxEventType eEventType, SfxObjectShell* pShell = nullptr );
};
#endif
diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx
index 4283ad16b17d..a5e9f9516b57 100644
--- a/sc/source/filter/inc/xlformula.hxx
+++ b/sc/source/filter/inc/xlformula.hxx
@@ -330,9 +330,9 @@ struct XclFunctionInfo
/** Returns true, if the function parameter count is fixed. */
inline bool IsFixedParamCount() const { return (mnXclFunc != EXC_FUNCID_EXTERNCALL) && (mnMinParamCount == mnMaxParamCount); }
/** Returns true, if the function is simulated by a macro call. */
- inline bool IsMacroFunc() const { return mpcMacroName != 0 && !(mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
+ inline bool IsMacroFunc() const { return mpcMacroName != nullptr && !(mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
/** Returns true, if the function is stored as an add-in call. */
- inline bool IsAddInEquivalent() const { return mpcMacroName != 0 && (mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
+ inline bool IsAddInEquivalent() const { return mpcMacroName != nullptr && (mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
/** Returns the name of the external function as string. */
OUString GetMacroFuncName() const;
/** Returns the programmatical name of the Add-In function as string. */
@@ -387,7 +387,7 @@ public:
/** Returns the size of the token array in bytes. */
sal_uInt16 GetSize() const;
/** Returns read-only access to the byte vector storing token data. */
- inline const sal_uInt8* GetData() const { return maTokVec.empty() ? 0 : &maTokVec.front(); }
+ inline const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : &maTokVec.front(); }
/** Returns true, if the formula contains a volatile function. */
inline bool IsVolatile() const { return mbVolatile; }
@@ -446,9 +446,9 @@ public:
void Init( const ScTokenArray& rScTokArr, bool bSkipSpaces );
- inline bool Is() const { return mppScToken != 0; }
+ inline bool Is() const { return mppScToken != nullptr; }
inline bool operator!() const { return !Is(); }
- inline const ::formula::FormulaToken* Get() const { return mppScToken ? *mppScToken : 0; }
+ inline const ::formula::FormulaToken* Get() const { return mppScToken ? *mppScToken : nullptr; }
inline const ::formula::FormulaToken* operator->() const { return Get(); }
inline const ::formula::FormulaToken& operator*() const { return *Get(); }
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index f861cecd9bb7..73e332837b98 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -421,7 +421,7 @@ public:
ScfPropertySet& rPropSet, XclFontPropSetType eType,
const XclFontData& rFontData,
bool bHasWstrn, bool bHasAsian, bool bHasCmplx,
- const Color* pFontColor = 0 );
+ const Color* pFontColor = nullptr );
private:
/** Returns a chart property set helper according to the passed script type. */
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index 4a067cfad69a..67c8f3ca4966 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -195,7 +195,7 @@ public:
/** Returns true, if the passed string is a name of an Excel built-in style.
@param pnStyleId If not 0, the found style identifier will be returned here.
@param pnNextChar If not 0, the index of the char after the evaluated substring will be returned here. */
- static bool IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId = 0, sal_Int32* pnNextChar = 0 );
+ static bool IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId = nullptr, sal_Int32* pnNextChar = nullptr );
/** Returns the Excel built-in style identifier of a passed style name.
@param rnStyleId The style identifier is returned here.
@param rnLevel The zero-based outline level for RowLevel and ColLevel styles is returned here.
@@ -225,7 +225,7 @@ public:
// Basic macro names ------------------------------------------------------
/** Returns the full StarBasic macro URL from an Excel macro name. */
- static OUString GetSbMacroUrl( const OUString& rMacroName, SfxObjectShell* pDocShell = 0 );
+ static OUString GetSbMacroUrl( const OUString& rMacroName, SfxObjectShell* pDocShell = nullptr );
/** Returns the Excel macro name from a full StarBasic macro URL. */
static OUString GetXclMacroName( const OUString& rSbMacroUrl );
diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx
index 22e55d2b9bff..85acbdc9ac83 100644
--- a/sc/source/filter/lotus/lotfilter.hxx
+++ b/sc/source/filter/lotus/lotfilter.hxx
@@ -56,18 +56,18 @@ struct LotusContext
, eTyp(eWK_UNKNOWN)
, bEOF(false)
, eCharVon(RTL_TEXTENCODING_DONTKNOW)
- , pDoc(0)
- , pLotusRoot(NULL)
+ , pDoc(nullptr)
+ , pLotusRoot(nullptr)
, nDefaultFormat(0)
- , pAttrRight(NULL)
- , pAttrLeft(NULL)
- , pAttrCenter(NULL)
- , pAttrRepeat(NULL)
- , pAttrStandard(NULL)
- , pAttrUnprot(NULL)
- , pAttrValForms(NULL)
- , pValueFormCache(NULL)
+ , pAttrRight(nullptr)
+ , pAttrLeft(nullptr)
+ , pAttrCenter(nullptr)
+ , pAttrRepeat(nullptr)
+ , pAttrStandard(nullptr)
+ , pAttrUnprot(nullptr)
+ , pAttrValForms(nullptr)
+ , pValueFormCache(nullptr)
{
}
};
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 9ec3a5030d47..14647408e680 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -380,7 +380,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
FUNC_TYPE eType = FT_NOP;
TokenId nMerk0;
DefTokenId eOc;
- const sal_Char* pExtName = 0;
+ const sal_Char* pExtName = nullptr;
RangeNameBufferWK3& rRangeNameBufferWK3 = *m_rContext.pLotusRoot->pRngNmBffWK3;
ScComplexRefData aCRD;
@@ -609,10 +609,10 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
DoFunc( ocNoName, nAnz, p.get() );
}
else
- DoFunc( ocNoName, nAnz, NULL );
+ DoFunc( ocNoName, nAnz, nullptr );
}
else
- DoFunc( ocNoName, nAnz, NULL );
+ DoFunc( ocNoName, nAnz, nullptr );
}
break;
case FT_Const10Float:
@@ -1720,159 +1720,159 @@ const sal_Char* GetAddInName( const sal_uInt8 n )
{
static const sal_Char* pNames[ 256 ] =
{
- NULL, // 0 8-Byte-IEEE-Float
- NULL, // 1 Variable
- NULL, // 2 Bereich
- NULL, // 3 return
- NULL, // 4 Bracket
- NULL, // 5 2-Byte-Integer
- NULL, // 6 ASCII-String
- NULL, // 7 Named range reference
- NULL, // 8 Absolut named range
- NULL, // 9 Err range reference
- NULL, // 10 Err cell reference
- NULL, // 11 Err constant
- NULL, // 12
- NULL, // 13
- NULL, // 14 Negation
- NULL, // 15 Addition
- NULL, // 16 Subtraktion
- NULL, // 17 Multiplikation
- NULL, // 18 Division
- NULL, // 19 Potenzierung
- NULL, // 20 equal
- NULL, // 21 unequal
- NULL, // 22 <=
- NULL, // 23 >=
- NULL, // 24 <
- NULL, // 25 >
- NULL, // 26 And (logic)
- NULL, // 27 Or (logic)
- NULL, // 28 Not (logic)
- NULL, // 29 unary Plus
- NULL, // 30 Concatenation
- NULL, // 31 Not applicable
- NULL, // 32 Error
- NULL, // 33 Absolute Value ABS()
- NULL, // 34 Integer INT()
- NULL, // 35 Square Root
- NULL, // 36 Zehnerlogarithmus
- NULL, // 37 Natuerlicher Logarithmus
- NULL, // 38 PI
- NULL, // 39 Sinus
- NULL, // 40 Cosinus
- NULL, // 41 Tangens
- NULL, // 42 Arcus-Tangens 2 (4.Quadrant)
- NULL, // 43 Arcus-Tangens (2.Quadrant)
- NULL, // 44 Arcus-Sinus
- NULL, // 45 Arcus-Cosinus
- NULL, // 46 Exponentialfunction
- NULL, // 47 Modulo
- NULL, // 48 Auswahl
- NULL, // 49 Is not applicable?
- NULL, // 50 Is Error?
- NULL, // 51 FALSE
- NULL, // 52 TRUE
- NULL, // 53 Random number
- NULL, // 54 Date
- NULL, // 55 Today
- NULL, // 56 Payment
- NULL, // 57 Present Value
- NULL, // 58 Future Value
- NULL, // 59 If ... then ... else ...
- NULL, // 60 Day of Month
- NULL, // 61 Monat
- NULL, // 62 Year
- NULL, // 63 Round
- NULL, // 64 Time
- NULL, // 65 Hour
- NULL, // 66 Minute
- NULL, // 67 Second
- NULL, // 68 Is Number?
- NULL, // 69 Is Text?
- NULL, // 70 Len()
- NULL, // 71 Val()
- NULL, // 72 String() ocFixed as substitute + special case
- NULL, // 73 Mid()
- NULL, // 74 Char()
- NULL, // 75 Ascii()
- NULL, // 76 Find()
- NULL, // 77 Datevalue
- NULL, // 78 Timevalue
+ nullptr, // 0 8-Byte-IEEE-Float
+ nullptr, // 1 Variable
+ nullptr, // 2 Bereich
+ nullptr, // 3 return
+ nullptr, // 4 Bracket
+ nullptr, // 5 2-Byte-Integer
+ nullptr, // 6 ASCII-String
+ nullptr, // 7 Named range reference
+ nullptr, // 8 Absolut named range
+ nullptr, // 9 Err range reference
+ nullptr, // 10 Err cell reference
+ nullptr, // 11 Err constant
+ nullptr, // 12
+ nullptr, // 13
+ nullptr, // 14 Negation
+ nullptr, // 15 Addition
+ nullptr, // 16 Subtraktion
+ nullptr, // 17 Multiplikation
+ nullptr, // 18 Division
+ nullptr, // 19 Potenzierung
+ nullptr, // 20 equal
+ nullptr, // 21 unequal
+ nullptr, // 22 <=
+ nullptr, // 23 >=
+ nullptr, // 24 <
+ nullptr, // 25 >
+ nullptr, // 26 And (logic)
+ nullptr, // 27 Or (logic)
+ nullptr, // 28 Not (logic)
+ nullptr, // 29 unary Plus
+ nullptr, // 30 Concatenation
+ nullptr, // 31 Not applicable
+ nullptr, // 32 Error
+ nullptr, // 33 Absolute Value ABS()
+ nullptr, // 34 Integer INT()
+ nullptr, // 35 Square Root
+ nullptr, // 36 Zehnerlogarithmus
+ nullptr, // 37 Natuerlicher Logarithmus
+ nullptr, // 38 PI
+ nullptr, // 39 Sinus
+ nullptr, // 40 Cosinus
+ nullptr, // 41 Tangens
+ nullptr, // 42 Arcus-Tangens 2 (4.Quadrant)
+ nullptr, // 43 Arcus-Tangens (2.Quadrant)
+ nullptr, // 44 Arcus-Sinus
+ nullptr, // 45 Arcus-Cosinus
+ nullptr, // 46 Exponentialfunction
+ nullptr, // 47 Modulo
+ nullptr, // 48 Auswahl
+ nullptr, // 49 Is not applicable?
+ nullptr, // 50 Is Error?
+ nullptr, // 51 FALSE
+ nullptr, // 52 TRUE
+ nullptr, // 53 Random number
+ nullptr, // 54 Date
+ nullptr, // 55 Today
+ nullptr, // 56 Payment
+ nullptr, // 57 Present Value
+ nullptr, // 58 Future Value
+ nullptr, // 59 If ... then ... else ...
+ nullptr, // 60 Day of Month
+ nullptr, // 61 Monat
+ nullptr, // 62 Year
+ nullptr, // 63 Round
+ nullptr, // 64 Time
+ nullptr, // 65 Hour
+ nullptr, // 66 Minute
+ nullptr, // 67 Second
+ nullptr, // 68 Is Number?
+ nullptr, // 69 Is Text?
+ nullptr, // 70 Len()
+ nullptr, // 71 Val()
+ nullptr, // 72 String() ocFixed as substitute + special case
+ nullptr, // 73 Mid()
+ nullptr, // 74 Char()
+ nullptr, // 75 Ascii()
+ nullptr, // 76 Find()
+ nullptr, // 77 Datevalue
+ nullptr, // 78 Timevalue
"ZELLZEIGER", // 79 Cellpointer
- NULL, // 80 Sum()
- NULL, // 81 Avg()
- NULL, // 82 Cnt()
- NULL, // 83 Min()
- NULL, // 84 Max()
- NULL, // 85 Vlookup()
- NULL, // 86 Npv()
- NULL, // 87 Var()
- NULL, // 88 Std()
- NULL, // 89 Irr()
- NULL, // 90 Hlookup()
- NULL, // 91 XlfDsum
- NULL, // 92 XlfDaverage
- NULL, // 93 XlfDcount
- NULL, // 94 XlfDmin
- NULL, // 95 XlfDmax
- NULL, // 96 XlfDvar
- NULL, // 97 XlfDstdev
- NULL, // 98 Index()
- NULL, // 99 Cols()
- NULL, // 100 Rows()
- NULL, // 101 Repeat()
- NULL, // 102 Upper()
- NULL, // 103 Lower()
- NULL, // 104 Left()
- NULL, // 105 Right()
- NULL, // 106 Replace()
- NULL, // 107 Proper()
+ nullptr, // 80 Sum()
+ nullptr, // 81 Avg()
+ nullptr, // 82 Cnt()
+ nullptr, // 83 Min()
+ nullptr, // 84 Max()
+ nullptr, // 85 Vlookup()
+ nullptr, // 86 Npv()
+ nullptr, // 87 Var()
+ nullptr, // 88 Std()
+ nullptr, // 89 Irr()
+ nullptr, // 90 Hlookup()
+ nullptr, // 91 XlfDsum
+ nullptr, // 92 XlfDaverage
+ nullptr, // 93 XlfDcount
+ nullptr, // 94 XlfDmin
+ nullptr, // 95 XlfDmax
+ nullptr, // 96 XlfDvar
+ nullptr, // 97 XlfDstdev
+ nullptr, // 98 Index()
+ nullptr, // 99 Cols()
+ nullptr, // 100 Rows()
+ nullptr, // 101 Repeat()
+ nullptr, // 102 Upper()
+ nullptr, // 103 Lower()
+ nullptr, // 104 Left()
+ nullptr, // 105 Right()
+ nullptr, // 106 Replace()
+ nullptr, // 107 Proper()
"ZELLE", // 108 Cell()
- NULL, // 109 Trim()
- NULL, // 110 Clean()
+ nullptr, // 109 Trim()
+ nullptr, // 110 Clean()
"F", // 111 F() (Excel: T()?)
"W", // 112 W()
- NULL, // 113 Exact()
- NULL, // 114 Call()
- NULL, // 115 @@()
- NULL, // 116 Rate()
+ nullptr, // 113 Exact()
+ nullptr, // 114 Call()
+ nullptr, // 115 @@()
+ nullptr, // 116 Rate()
"TERM", // 117 Term()
"CTERM", // 118 Cterm()
- NULL, // 119 Sln()
- NULL, // 120 Syd(), Soy()
- NULL, // 121 Ddb()
+ nullptr, // 119 Sln()
+ nullptr, // 120 Syd(), Soy()
+ nullptr, // 121 Ddb()
"SplFunc", // 122 Splfunc
"BLAETTER", // 123 Sheets
"INFO", // 124 Info
- NULL, // 125 Sumproduct
+ nullptr, // 125 Sumproduct
"ISTBEREICH", // 126 Isrange
- NULL, // 127 Dget
+ nullptr, // 127 Dget
"DABFRAGE", // 128 Dquery
"KOORD", // 129 Coord
- NULL, // 130 Reserved (internal)
- NULL, // 131 Today
- NULL, // 132 Vdb
- NULL, // 133 Dvars
- NULL, // 134 Dstds
- NULL, // 135 Vars
- NULL, // 136 Stds
- NULL, // 137 D360
- NULL, // 138 Reserved (internal)
- NULL, // 139 Isapp
+ nullptr, // 130 Reserved (internal)
+ nullptr, // 131 Today
+ nullptr, // 132 Vdb
+ nullptr, // 133 Dvars
+ nullptr, // 134 Dstds
+ nullptr, // 135 Vars
+ nullptr, // 136 Stds
+ nullptr, // 137 D360
+ nullptr, // 138 Reserved (internal)
+ nullptr, // 139 Isapp
"ISTDEFZUS", // 140 Isaaf
- NULL, // 141 Weekday
- NULL, // 142 Datedif
- NULL, // 143 Rank
- NULL, // 144 Numberstring
+ nullptr, // 141 Weekday
+ nullptr, // 142 Datedif
+ nullptr, // 143 Rank
+ nullptr, // 144 Numberstring
"DATUMFOLGE", // 145 Datestring
"DEZIMAL", // 146 Decimal
"HEX", // 147 Hex
- NULL, // 148 Db
- NULL, // 149 Pmti
- NULL, // 150 Spi
- NULL, // 151 Fullp
- NULL, // 152 Halfp
+ nullptr, // 148 Db
+ nullptr, // 149 Pmti
+ nullptr, // 150 Spi
+ nullptr, // 151 Fullp
+ nullptr, // 152 Halfp
"PURMITTELWERT", // 153 Pureavg
"PURquantity", // 154 Purecount
"PURMAX", // 155 Puremax
@@ -1881,101 +1881,101 @@ const sal_Char* GetAddInName( const sal_uInt8 n )
"PURVAR", // 158 Purevar
"PURSTDABWP", // 159 Purestds
"PURVARP", // 160 Purevars
- NULL, // 161 Pmt2
- NULL, // 162 Pv2
- NULL, // 163 Fv2
- NULL, // 164 Term2
- NULL, // 165-- <- new quantity ?
- NULL, // 166 D360 (US-Version, alternatively as in D360-function)
- NULL, // 167
- NULL, // 168
- NULL, // 169
- NULL, // 170
- NULL, // 171
- NULL, // 172
- NULL, // 173
- NULL, // 174
- NULL, // 175
- NULL, // 176
- NULL, // 177
- NULL, // 178
- NULL, // 179
- NULL, // 180
- NULL, // 181
- NULL, // 182
- NULL, // 183
- NULL, // 184
- NULL, // 185
- NULL, // 186
- NULL, // 187
- NULL, // 188
- NULL, // 189
- NULL, // 190
- NULL, // 191
- NULL, // 192
- NULL, // 193
- NULL, // 194
- NULL, // 195
- NULL, // 196
- NULL, // 197
- NULL, // 198
- NULL, // 199
- NULL, // 200
- NULL, // 201
- NULL, // 202
- NULL, // 203
- NULL, // 204
- NULL, // 205
- NULL, // 206 TODO: ?
- NULL, // 207
- NULL, // 208
- NULL, // 209
- NULL, // 210
- NULL, // 211
- NULL, // 212
- NULL, // 213
- NULL, // 214
- NULL, // 215
- NULL, // 216
- NULL, // 217
- NULL, // 218
- NULL, // 219
- NULL, // 220
- NULL, // 221
- NULL, // 222
- NULL, // 223
- NULL, // 224
- NULL, // 225
- NULL, // 226
- NULL, // 227
- NULL, // 228
- NULL, // 229
- NULL, // 230
- NULL, // 231
- NULL, // 232
- NULL, // 233
- NULL, // 234
- NULL, // 235
- NULL, // 236
- NULL, // 237
- NULL, // 238
- NULL, // 239
- NULL, // 240
- NULL, // 241
- NULL, // 242
- NULL, // 243
- NULL, // 244
- NULL, // 245
- NULL, // 246
- NULL, // 247
- NULL, // 248
- NULL, // 249
- NULL, // 250
- NULL, // 251
- NULL, // 252
- NULL, // 253
- NULL, // 254
- NULL // 255 TODO: ?
+ nullptr, // 161 Pmt2
+ nullptr, // 162 Pv2
+ nullptr, // 163 Fv2
+ nullptr, // 164 Term2
+ nullptr, // 165-- <- new quantity ?
+ nullptr, // 166 D360 (US-Version, alternatively as in D360-function)
+ nullptr, // 167
+ nullptr, // 168
+ nullptr, // 169
+ nullptr, // 170
+ nullptr, // 171
+ nullptr, // 172
+ nullptr, // 173
+ nullptr, // 174
+ nullptr, // 175
+ nullptr, // 176
+ nullptr, // 177
+ nullptr, // 178
+ nullptr, // 179
+ nullptr, // 180
+ nullptr, // 181
+ nullptr, // 182
+ nullptr, // 183
+ nullptr, // 184
+ nullptr, // 185
+ nullptr, // 186
+ nullptr, // 187
+ nullptr, // 188
+ nullptr, // 189
+ nullptr, // 190
+ nullptr, // 191
+ nullptr, // 192
+ nullptr, // 193
+ nullptr, // 194
+ nullptr, // 195
+ nullptr, // 196
+ nullptr, // 197
+ nullptr, // 198
+ nullptr, // 199
+ nullptr, // 200
+ nullptr, // 201
+ nullptr, // 202
+ nullptr, // 203
+ nullptr, // 204
+ nullptr, // 205
+ nullptr, // 206 TODO: ?
+ nullptr, // 207
+ nullptr, // 208
+ nullptr, // 209
+ nullptr, // 210
+ nullptr, // 211
+ nullptr, // 212
+ nullptr, // 213
+ nullptr, // 214
+ nullptr, // 215
+ nullptr, // 216
+ nullptr, // 217
+ nullptr, // 218
+ nullptr, // 219
+ nullptr, // 220
+ nullptr, // 221
+ nullptr, // 222
+ nullptr, // 223
+ nullptr, // 224
+ nullptr, // 225
+ nullptr, // 226
+ nullptr, // 227
+ nullptr, // 228
+ nullptr, // 229
+ nullptr, // 230
+ nullptr, // 231
+ nullptr, // 232
+ nullptr, // 233
+ nullptr, // 234
+ nullptr, // 235
+ nullptr, // 236
+ nullptr, // 237
+ nullptr, // 238
+ nullptr, // 239
+ nullptr, // 240
+ nullptr, // 241
+ nullptr, // 242
+ nullptr, // 243
+ nullptr, // 244
+ nullptr, // 245
+ nullptr, // 246
+ nullptr, // 247
+ nullptr, // 248
+ nullptr, // 249
+ nullptr, // 250
+ nullptr, // 251
+ nullptr, // 252
+ nullptr, // 253
+ nullptr, // 254
+ nullptr // 255 TODO: ?
};
return pNames[ n ];
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 8df563a5ac01..d51c7a8aaadc 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -80,7 +80,7 @@ ImportLotus::~ImportLotus()
{
LotusContext &rContext = aConv.getContext();
delete rContext.pLotusRoot;
- rContext.pLotusRoot = NULL;
+ rContext.pLotusRoot = nullptr;
// no need 4 pLotusRoot anymore
aLotImpSemaphore.release();
@@ -286,7 +286,7 @@ ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n )
pD->EnsureTable(aAddr.Tab());
pD->SetFormulaCell(aAddr, pCell);
- return NULL;
+ return nullptr;
}
void ImportLotus::Read( OUString &r )
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index aec53f3d5542..7760fe2dc930 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -40,12 +40,12 @@
void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString)
{
// evaluate Label-Format
- OSL_ENSURE( pString != NULL, "PutFormString(): pString == NULL" );
+ OSL_ENSURE( pString != nullptr, "PutFormString(): pString == NULL" );
if (!pString)
return;
sal_Char cForm;
- SvxHorJustifyItem* pJustify = NULL;
+ SvxHorJustifyItem* pJustify = nullptr;
cForm = *pString;
@@ -64,7 +64,7 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s
pString++;
break;
case '|': // printer command
- pString = NULL;
+ pString = nullptr;
break;
case '\\': // repetition
pJustify = rContext.pAttrRepeat;
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index 982daa1a7466..cd03e08b0c3a 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -724,7 +724,7 @@ AutoFilter* AutoFilterBuffer::getActiveAutoFilter()
// Excel expects not more than one auto filter per sheet or table
OSL_ENSURE( maAutoFilters.size() <= 1, "AutoFilterBuffer::getActiveAutoFilter - too many auto filters" );
// stick to the last imported auto filter
- return maAutoFilters.empty() ? 0 : maAutoFilters.back().get();
+ return maAutoFilters.empty() ? nullptr : maAutoFilters.back().get();
}
} // namespace xls
diff --git a/sc/source/filter/oox/autofiltercontext.cxx b/sc/source/filter/oox/autofiltercontext.cxx
index d7ea3d95f762..11f0da8a3668 100644
--- a/sc/source/filter/oox/autofiltercontext.cxx
+++ b/sc/source/filter/oox/autofiltercontext.cxx
@@ -44,7 +44,7 @@ ContextHandlerRef FilterSettingsContext::onCreateContext( sal_Int32 nElement, co
if( nElement == XLS_TOKEN( customFilter ) ) return this;
break;
}
- return 0;
+ return nullptr;
}
void FilterSettingsContext::onStartElement( const AttributeList& rAttribs )
@@ -63,7 +63,7 @@ ContextHandlerRef FilterSettingsContext::onCreateRecordContext( sal_Int32 nRecId
if( nRecId == BIFF12_ID_CUSTOMFILTER ) return this;
break;
}
- return 0;
+ return nullptr;
}
void FilterSettingsContext::onStartRecord( SequenceInputStream& rStrm )
@@ -88,7 +88,7 @@ ContextHandlerRef FilterColumnContext::onCreateContext( sal_Int32 nElement, cons
case XLS_TOKEN( customFilters ):
return new FilterSettingsContext( *this, mrFilterColumn.createFilterSettings< CustomFilter >() );
}
- return 0;
+ return nullptr;
}
void FilterColumnContext::onStartElement( const AttributeList& rAttribs )
@@ -107,7 +107,7 @@ ContextHandlerRef FilterColumnContext::onCreateRecordContext( sal_Int32 nRecId,
case BIFF12_ID_CUSTOMFILTERS:
return new FilterSettingsContext( *this, mrFilterColumn.createFilterSettings< CustomFilter >() );
}
- return 0;
+ return nullptr;
}
void FilterColumnContext::onStartRecord( SequenceInputStream& rStrm )
@@ -125,7 +125,7 @@ ContextHandlerRef AutoFilterContext::onCreateContext( sal_Int32 nElement, const
{
if( (getCurrentElement() == XLS_TOKEN( autoFilter )) && (nElement == XLS_TOKEN( filterColumn )) )
return new FilterColumnContext( *this, mrAutoFilter.createFilterColumn() );
- return 0;
+ return nullptr;
}
void AutoFilterContext::onStartElement( const AttributeList& rAttribs )
@@ -137,7 +137,7 @@ ContextHandlerRef AutoFilterContext::onCreateRecordContext( sal_Int32 nRecId, Se
{
if( (getCurrentElement() == BIFF12_ID_AUTOFILTER) && (nRecId == BIFF12_ID_FILTERCOLUMN) )
return new FilterColumnContext( *this, mrAutoFilter.createFilterColumn() );
- return 0;
+ return nullptr;
}
void AutoFilterContext::onStartRecord( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/biffinputstream.cxx b/sc/source/filter/oox/biffinputstream.cxx
index ab49d5fe0c41..f03204482230 100644
--- a/sc/source/filter/oox/biffinputstream.cxx
+++ b/sc/source/filter/oox/biffinputstream.cxx
@@ -30,7 +30,7 @@ namespace prv {
BiffInputRecordBuffer::BiffInputRecordBuffer( BinaryInputStream& rInStrm ) :
mrInStrm( rInStrm ),
- mpCurrentData( 0 ),
+ mpCurrentData( nullptr ),
mnHeaderPos( -1 ),
mnBodyPos( 0 ),
mnBufferBodyPos( 0 ),
diff --git a/sc/source/filter/oox/chartsheetfragment.cxx b/sc/source/filter/oox/chartsheetfragment.cxx
index 57e1685083c5..55c3267c1031 100644
--- a/sc/source/filter/oox/chartsheetfragment.cxx
+++ b/sc/source/filter/oox/chartsheetfragment.cxx
@@ -75,7 +75,7 @@ ContextHandlerRef ChartsheetFragment::onCreateContext( sal_Int32 nElement, const
}
break;
}
- return 0;
+ return nullptr;
}
void ChartsheetFragment::onCharacters( const OUString& rChars )
@@ -120,7 +120,7 @@ ContextHandlerRef ChartsheetFragment::onCreateRecordContext( sal_Int32 nRecId, S
if( nRecId == BIFF12_ID_CHARTSHEETVIEW ) getSheetViewSettings().importChartSheetView( rStrm );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* ChartsheetFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/commentsfragment.cxx b/sc/source/filter/oox/commentsfragment.cxx
index 17ce2df5c13d..1c6a031936e2 100644
--- a/sc/source/filter/oox/commentsfragment.cxx
+++ b/sc/source/filter/oox/commentsfragment.cxx
@@ -65,7 +65,7 @@ ContextHandlerRef CommentsFragment::onCreateContext( sal_Int32 nElement, const A
if( nElement == XLS_TOKEN( commentPr ) ) { mxComment->importCommentPr( rAttribs ); return this; }
break;
}
- return 0;
+ return nullptr;
}
void CommentsFragment::onCharacters( const OUString& rChars )
@@ -102,7 +102,7 @@ ContextHandlerRef CommentsFragment::onCreateRecordContext( sal_Int32 nRecId, Seq
mxComment->createText()->importString( rStrm, true );
break;
}
- return 0;
+ return nullptr;
}
void CommentsFragment::onEndRecord()
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index c8cdc4a51266..df133a4a4182 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -860,7 +860,7 @@ void CondFormatRule::finalizeImport()
{
ScDocument& rDoc = getScDocument();
OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
- ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, NULL, NULL, &rDoc, aPos, aStyleName );
+ ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, nullptr, nullptr, &rDoc, aPos, aStyleName );
mpFormat->AddEntry(pNewEntry);
}
else if( eOperator == SC_COND_BEGINS_WITH || eOperator == SC_COND_ENDS_WITH ||
@@ -871,7 +871,7 @@ void CondFormatRule::finalizeImport()
svl::SharedStringPool& rSPool = rDoc.GetSharedStringPool();
aTokenArray.AddString(rSPool.intern(maModel.maText));
OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
- ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArray, NULL, &rDoc, aPos, aStyleName );
+ ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArray, nullptr, &rDoc, aPos, aStyleName );
mpFormat->AddEntry(pNewEntry);
}
else if( (eOperator != SC_COND_NONE) && !maModel.maFormulas.empty() )
@@ -898,7 +898,7 @@ void CondFormatRule::finalizeImport()
ScTokenArray aTokenArray;
aTokenArray.AddDouble( maModel.mnRank );
OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
- ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArray, NULL, &rDoc, aPos, aStyleName );
+ ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArray, nullptr, &rDoc, aPos, aStyleName );
mpFormat->AddEntry(pNewEntry);
}
else if( eOperator == SC_COND_ABOVE_AVERAGE || eOperator == SC_COND_BELOW_AVERAGE ||
@@ -909,14 +909,14 @@ void CondFormatRule::finalizeImport()
ScTokenArray aTokenArrayDev;
aTokenArrayDev.AddDouble( maModel.mnStdDev );
OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
- ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArrayDev, NULL, &rDoc, aPos, aStyleName );
+ ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArrayDev, nullptr, &rDoc, aPos, aStyleName );
mpFormat->AddEntry(pNewEntry);
}
else if( eOperator == SC_COND_DUPLICATE || eOperator == SC_COND_NOTDUPLICATE )
{
ScDocument& rDoc = getScDocument();
OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
- ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, NULL, NULL, &rDoc, aPos, aStyleName );
+ ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, nullptr, nullptr, &rDoc, aPos, aStyleName );
mpFormat->AddEntry(pNewEntry);
}
else if( maModel.mnType == XML_timePeriod )
@@ -1025,7 +1025,7 @@ CondFormatModel::CondFormatModel() :
CondFormat::CondFormat( const WorksheetHelper& rHelper ) :
WorksheetHelper( rHelper ),
- mpFormat(NULL),
+ mpFormat(nullptr),
mbReadyForFinalize(false)
{
}
@@ -1121,7 +1121,7 @@ ScConditionalFormat* findFormatByRange(const ScRangeList& rRange, ScDocument* pD
}
}
- return NULL;
+ return nullptr;
}
}
@@ -1269,7 +1269,7 @@ void ExtCfDataBarRule::finalizeImport()
case CFVO:
{
ScDataBarFormatData* pDataBar = mpTarget;
- ScColorScaleEntry* pEntry = NULL;
+ ScColorScaleEntry* pEntry = nullptr;
if(maModel.mbIsLower)
pEntry = pDataBar->mpLowerLimit.get();
else
diff --git a/sc/source/filter/oox/condformatcontext.cxx b/sc/source/filter/oox/condformatcontext.cxx
index 5ba13c8bd833..fed21b7f93b7 100644
--- a/sc/source/filter/oox/condformatcontext.cxx
+++ b/sc/source/filter/oox/condformatcontext.cxx
@@ -38,16 +38,16 @@ ContextHandlerRef ColorScaleContext::onCreateContext( sal_Int32 nElement, const
switch( getCurrentElement() )
{
case XLS_TOKEN( cfRule ):
- return (nElement == XLS_TOKEN( colorScale )) ? this : 0;
+ return (nElement == XLS_TOKEN( colorScale )) ? this : nullptr;
case XLS_TOKEN( colorScale ):
if (nElement == XLS_TOKEN( cfvo ))
return this;
else if (nElement == XLS_TOKEN( color ))
return this;
else
- return 0;
+ return nullptr;
}
- return 0;
+ return nullptr;
}
void ColorScaleContext::onStartElement( const AttributeList& rAttribs )
@@ -74,16 +74,16 @@ ContextHandlerRef DataBarContext::onCreateContext( sal_Int32 nElement, const Att
switch( getCurrentElement() )
{
case XLS_TOKEN( cfRule ):
- return (nElement == XLS_TOKEN( dataBar )) ? this : 0;
+ return (nElement == XLS_TOKEN( dataBar )) ? this : nullptr;
case XLS_TOKEN( dataBar ):
if (nElement == XLS_TOKEN( cfvo ))
return this;
else if (nElement == XLS_TOKEN( color ))
return this;
else
- return 0;
+ return nullptr;
}
- return 0;
+ return nullptr;
}
void DataBarContext::onStartElement( const AttributeList& rAttribs )
@@ -114,7 +114,7 @@ ContextHandlerRef IconSetContext::onCreateContext( sal_Int32 nElement, const Att
{
case XLS_TOKEN( cfRule ):
case XLS14_TOKEN( cfRule ):
- return (nElement == XLS_TOKEN( iconSet ) || nElement == XLS14_TOKEN(iconSet)) ? this : 0;
+ return (nElement == XLS_TOKEN( iconSet ) || nElement == XLS14_TOKEN(iconSet)) ? this : nullptr;
case XLS_TOKEN( iconSet ):
case XLS14_TOKEN(iconSet):
if (nElement == XLS_TOKEN( cfvo ) ||
@@ -122,12 +122,12 @@ ContextHandlerRef IconSetContext::onCreateContext( sal_Int32 nElement, const Att
nElement == XLS14_TOKEN(cfIcon))
return this;
else
- return 0;
+ return nullptr;
case XLS14_TOKEN(cfvo):
if (nElement == XM_TOKEN(f))
return this;
}
- return 0;
+ return nullptr;
}
void IconSetContext::onStartElement( const AttributeList& rAttribs )
@@ -174,7 +174,7 @@ ContextHandlerRef CondFormatContext::onCreateContext( sal_Int32 nElement, const
switch( getCurrentElement() )
{
case XLS_TOKEN( conditionalFormatting ):
- return (nElement == XLS_TOKEN( cfRule )) ? this : 0;
+ return (nElement == XLS_TOKEN( cfRule )) ? this : nullptr;
case XLS_TOKEN( cfRule ):
if (nElement == XLS_TOKEN( formula ))
return this;
@@ -187,9 +187,9 @@ ContextHandlerRef CondFormatContext::onCreateContext( sal_Int32 nElement, const
else if (nElement == XLS_TOKEN( extLst ) )
return new ExtLstLocalContext( *this, mxRule->getDataBar()->getDataBarFormatData() );
else
- return 0;
+ return nullptr;
}
- return 0;
+ return nullptr;
}
void CondFormatContext::onEndElement()
@@ -227,9 +227,9 @@ ContextHandlerRef CondFormatContext::onCreateRecordContext( sal_Int32 nRecId, Se
switch( getCurrentElement() )
{
case BIFF12_ID_CONDFORMATTING:
- return (nRecId == BIFF12_ID_CFRULE) ? this : 0;
+ return (nRecId == BIFF12_ID_CFRULE) ? this : nullptr;
}
- return 0;
+ return nullptr;
}
void CondFormatContext::onStartRecord( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/connectionsfragment.cxx b/sc/source/filter/oox/connectionsfragment.cxx
index 7391e4057597..61de65374a9e 100644
--- a/sc/source/filter/oox/connectionsfragment.cxx
+++ b/sc/source/filter/oox/connectionsfragment.cxx
@@ -58,7 +58,7 @@ ContextHandlerRef ConnectionContext::onCreateContext( sal_Int32 nElement, const
mrConnection.importTable( rAttribs, nElement );
break;
}
- return 0;
+ return nullptr;
}
void ConnectionContext::onStartElement( const AttributeList& rAttribs )
@@ -91,7 +91,7 @@ ContextHandlerRef ConnectionContext::onCreateRecordContext( sal_Int32 nRecId, Se
mrConnection.importWebPrTable( rStrm, nRecId );
break;
}
- return 0;
+ return nullptr;
}
void ConnectionContext::onStartRecord( SequenceInputStream& rStrm )
@@ -119,7 +119,7 @@ ContextHandlerRef ConnectionsFragment::onCreateContext( sal_Int32 nElement, cons
return new ConnectionContext( *this, getConnections().createConnection() );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef ConnectionsFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& /*rStrm*/ )
@@ -136,7 +136,7 @@ ContextHandlerRef ConnectionsFragment::onCreateRecordContext( sal_Int32 nRecId,
return new ConnectionContext( *this, getConnections().createConnection() );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* ConnectionsFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index a1811d70c580..99ed9b71bdd6 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -229,7 +229,7 @@ Any DefinedNameBase::getReference( const CellAddress& rBaseAddr ) const
DefinedName::DefinedName( const WorkbookHelper& rHelper ) :
DefinedNameBase( rHelper ),
- mpScRangeData(NULL),
+ mpScRangeData(nullptr),
mnTokenIndex( -1 ),
mnCalcSheet( 0 ),
mcBuiltinId( BIFF_DEFNAME_UNKNOWN )
diff --git a/sc/source/filter/oox/drawingbase.cxx b/sc/source/filter/oox/drawingbase.cxx
index 6f6a06cb68fb..eb9b46649d98 100644
--- a/sc/source/filter/oox/drawingbase.cxx
+++ b/sc/source/filter/oox/drawingbase.cxx
@@ -122,7 +122,7 @@ void ShapeAnchor::importClientData( const AttributeList& rAttribs )
void ShapeAnchor::setCellPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue )
{
- CellAnchorModel* pCellAnchor = 0;
+ CellAnchorModel* pCellAnchor = nullptr;
switch( nParentContext )
{
case XDR_TOKEN( from ):
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index c97da72b5f02..c3f41c839eb4 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -160,7 +160,7 @@ GroupShapeContext::GroupShapeContext( ContextHandler2Helper& rParent,
return new GroupShapeContext( rParent, rHelper, rxParentShape, xShape );
}
}
- return 0;
+ return nullptr;
}
ContextHandlerRef GroupShapeContext::onCreateContext(
@@ -226,7 +226,7 @@ ContextHandlerRef DrawingFragment::onCreateContext( sal_Int32 nElement, const At
}
break;
}
- return 0;
+ return nullptr;
}
void DrawingFragment::onCharacters( const OUString& rChars )
@@ -504,7 +504,7 @@ Reference< XShape > VmlDrawing::createAndInsertClientXShape( const ::oox::vml::S
/* Move top border of groupbox up by half font height, because
Excel specifies Y position of the groupbox border line
instead the top border of the caption text. */
- if( const ::oox::vml::TextFontModel* pFontModel = pTextBox ? pTextBox->getFirstFont() : 0 )
+ if( const ::oox::vml::TextFontModel* pFontModel = pTextBox ? pTextBox->getFirstFont() : nullptr )
{
sal_Int32 nFontHeightHmm = getUnitConverter().scaleToMm100( pFontModel->monSize.get( 160 ), UNIT_TWIP );
sal_Int32 nYDiff = ::std::min< sal_Int32 >( nFontHeightHmm / 2, aShapeRect.Y );
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index edb19721ce6a..5edaadf2fc15 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -44,7 +44,7 @@ using ::oox::drawingml::table::TableStyleListPtr;
ExcelFilter::ExcelFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
XmlFilterBase( rxContext ),
- mpBookGlob( 0 )
+ mpBookGlob( nullptr )
{
}
@@ -66,7 +66,7 @@ WorkbookGlobals& ExcelFilter::getWorkbookGlobals() const
void ExcelFilter::unregisterWorkbookGlobals()
{
- mpBookGlob = 0;
+ mpBookGlob = nullptr;
}
bool ExcelFilter::importDocument()
@@ -123,7 +123,7 @@ const ::oox::drawingml::Theme* ExcelFilter::getCurrentTheme() const
::oox::vml::Drawing* ExcelFilter::getVmlDrawing()
{
- return 0;
+ return nullptr;
}
const TableStyleListPtr ExcelFilter::getTableStyles()
diff --git a/sc/source/filter/oox/externallinkbuffer.cxx b/sc/source/filter/oox/externallinkbuffer.cxx
index 25864b6a1182..e57cf73844f7 100644
--- a/sc/source/filter/oox/externallinkbuffer.cxx
+++ b/sc/source/filter/oox/externallinkbuffer.cxx
@@ -490,7 +490,7 @@ Reference< XExternalSheetCache > ExternalLink::getSheetCache( sal_Int32 nTabId )
catch( Exception& )
{
}
- return 0;
+ return nullptr;
}
void ExternalLink::getSheetRange( LinkSheetRange& orSheetRange, sal_Int32 nTabId1, sal_Int32 nTabId2 ) const
@@ -782,7 +782,7 @@ ExternalLinkRef ExternalLinkBuffer::createExternalLink()
const RefSheetsModel* ExternalLinkBuffer::getRefSheets( sal_Int32 nRefId ) const
{
return ((0 <= nRefId) && (static_cast< size_t >( nRefId ) < maRefSheets.size())) ?
- &maRefSheets[ static_cast< size_t >( nRefId ) ] : 0;
+ &maRefSheets[ static_cast< size_t >( nRefId ) ] : nullptr;
}
} // namespace xls
diff --git a/sc/source/filter/oox/externallinkfragment.cxx b/sc/source/filter/oox/externallinkfragment.cxx
index 31854efa4ab9..0ed09f50f816 100644
--- a/sc/source/filter/oox/externallinkfragment.cxx
+++ b/sc/source/filter/oox/externallinkfragment.cxx
@@ -57,7 +57,7 @@ ContextHandlerRef ExternalSheetDataContext::onCreateContext( sal_Int32 nElement,
if( nElement == XLS_TOKEN( v ) ) return this; // collect characters in onCharacters()
break;
}
- return 0;
+ return nullptr;
}
void ExternalSheetDataContext::onCharacters( const OUString& rChars )
@@ -99,7 +99,7 @@ ContextHandlerRef ExternalSheetDataContext::onCreateRecordContext( sal_Int32 nRe
}
break;
}
- return 0;
+ return nullptr;
}
// private --------------------------------------------------------------------
@@ -234,7 +234,7 @@ ContextHandlerRef ExternalLinkFragment::onCreateContext( sal_Int32 nElement, con
if( nElement == XLS_TOKEN( oleItem ) ) mxExtName = mrExtLink.importOleItem( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
void ExternalLinkFragment::onCharacters( const OUString& rChars )
@@ -307,7 +307,7 @@ ContextHandlerRef ExternalLinkFragment::onCreateRecordContext( sal_Int32 nRecId,
}
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef ExternalLinkFragment::createSheetDataContext( sal_Int32 nSheetId )
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx
index f0980d54ffb5..b7ff5de9b5a6 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -71,7 +71,7 @@ void ExtCfRuleContext::onStartElement( const AttributeList& rAttribs )
ExtConditionalFormattingContext::ExtConditionalFormattingContext(WorksheetContextBase& rFragment):
WorksheetContextBase(rFragment),
- mpCurrentRule(NULL)
+ mpCurrentRule(nullptr)
{
}
@@ -87,7 +87,7 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
ScAddress aPos(0, 0, nTab);
mpCurrentRule->SetData(&rIconSet, pDoc, aPos);
delete mpCurrentRule;
- mpCurrentRule = NULL;
+ mpCurrentRule = nullptr;
}
if (nElement == XLS14_TOKEN(cfRule))
{
@@ -98,12 +98,12 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
// an ext entry does not need to have an existing corresponding entry
ExtLst::const_iterator aExt = getExtLst().find( aId );
if(aExt == getExtLst().end())
- return NULL;
+ return nullptr;
ScDataBarFormatData* pInfo = aExt->second;
if (!pInfo)
{
- return NULL;
+ return nullptr;
}
return new ExtCfRuleContext( *this, pInfo );
}
@@ -125,7 +125,7 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
return this;
}
- return NULL;
+ return nullptr;
}
void ExtConditionalFormattingContext::onStartElement(const AttributeList& /*rAttribs*/)
@@ -191,15 +191,15 @@ ContextHandlerRef ExtLstLocalContext::onCreateContext( sal_Int32 nElement, const
if(nElement == XLS_TOKEN( ext ))
return this;
else
- return 0;
+ return nullptr;
break;
case XLS_TOKEN( ext ):
if (nElement == XLS14_TOKEN( id ))
return this;
else
- return 0;
+ return nullptr;
}
- return 0;
+ return nullptr;
}
void ExtLstLocalContext::onStartElement( const AttributeList& )
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index d830ccdb2b29..f216b77c7b95 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -417,21 +417,21 @@ static const FunctionData saFuncTableBiff2[] =
{ "TRUNC", "TRUNC", 197, 197, 1, 1, V, { VR, C }, 0 },
{ "ISLOGICAL", "ISLOGICAL", 198, 198, 1, 1, V, { VR }, 0 },
{ "DCOUNTA", "DCOUNTA", 199, 199, 3, 3, V, { RO, RR }, 0 },
- { 0, "EXTERN.CALL", 255, 255, 1, MX, R, { RO_E, RO }, FUNCFLAG_IMPORTONLY },
+ { nullptr, "EXTERN.CALL", 255, 255, 1, MX, R, { RO_E, RO }, FUNCFLAG_IMPORTONLY },
// *** macro sheet commands ***
- { 0, "A1.R1C1", 30, 30, 0, 1, V, { VR }, FUNCFLAG_MACROCMD },
- { 0, "RETURN", 55, 55, 0, 1, R, { RO }, FUNCFLAG_MACROFUNC },
- { 0, "ABSREF", 79, 79, 2, 2, R, { VR, RO }, FUNCFLAG_MACROFUNC },
- { 0, "ADD.ARROW", 81, 81, 0, 0, V, {}, FUNCFLAG_MACROCMD },
- { 0, "ACTIVE.CELL", 94, 94, 0, 0, R, {}, FUNCFLAG_MACROFUNC },
- { 0, "ACTIVATE", 103, 103, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
- { 0, "ACTIVATE.NEXT", 104, 104, 0, 0, V, {}, FUNCFLAG_MACROCMD },
- { 0, "ACTIVATE.PREV", 105, 105, 0, 0, V, {}, FUNCFLAG_MACROCMD },
- { 0, "ADD.BAR", 151, 151, 0, 0, V, {}, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
- { 0, "ADD.MENU", 152, 152, 2, 2, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
- { 0, "ADD.COMMAND", 153, 153, 3, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }
+ { nullptr, "A1.R1C1", 30, 30, 0, 1, V, { VR }, FUNCFLAG_MACROCMD },
+ { nullptr, "RETURN", 55, 55, 0, 1, R, { RO }, FUNCFLAG_MACROFUNC },
+ { nullptr, "ABSREF", 79, 79, 2, 2, R, { VR, RO }, FUNCFLAG_MACROFUNC },
+ { nullptr, "ADD.ARROW", 81, 81, 0, 0, V, {}, FUNCFLAG_MACROCMD },
+ { nullptr, "ACTIVE.CELL", 94, 94, 0, 0, R, {}, FUNCFLAG_MACROFUNC },
+ { nullptr, "ACTIVATE", 103, 103, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
+ { nullptr, "ACTIVATE.NEXT", 104, 104, 0, 0, V, {}, FUNCFLAG_MACROCMD },
+ { nullptr, "ACTIVATE.PREV", 105, 105, 0, 0, V, {}, FUNCFLAG_MACROCMD },
+ { nullptr, "ADD.BAR", 151, 151, 0, 0, V, {}, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
+ { nullptr, "ADD.MENU", 152, 152, 2, 2, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
+ { nullptr, "ADD.COMMAND", 153, 153, 3, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }
};
/** Functions new in BIFF3. */
@@ -443,9 +443,9 @@ static const FunctionData saFuncTableBiff3[] =
{ "GROWTH", "GROWTH", 52, 52, 1, 4, A, { RA, RA, RA, VV }, 0 }, // BIFF2: 1-3, BIFF3: 1-4
{ "TRUNC", "TRUNC", 197, 197, 1, 2, V, { VR }, 0 }, // BIFF2: 1, BIFF3: 1-2
{ "DOLLAR", "USDOLLAR", 204, 204, 1, 2, V, { VR }, FUNCFLAG_IMPORTONLY },
- { 0/*"FIND"*/, "FINDB", 205, 205, 2, 3, V, { VR }, 0 },
- { 0/*"SEARCH"*/, "SEARCHB", 206, 206, 2, 3, V, { VR }, 0 },
- { 0/*"REPLACE"*/, "REPLACEB", 207, 207, 4, 4, V, { VR }, 0 },
+ { nullptr/*"FIND"*/, "FINDB", 205, 205, 2, 3, V, { VR }, 0 },
+ { nullptr/*"SEARCH"*/, "SEARCHB", 206, 206, 2, 3, V, { VR }, 0 },
+ { nullptr/*"REPLACE"*/, "REPLACEB", 207, 207, 4, 4, V, { VR }, 0 },
{ "LEFTB", "LEFTB", 208, 208, 1, 2, V, { VR }, 0 },
{ "RIGHTB", "RIGHTB", 209, 209, 1, 2, V, { VR }, 0 },
{ "MIDB", "MIDB", 210, 210, 3, 3, V, { VR }, 0 },
@@ -475,9 +475,9 @@ static const FunctionData saFuncTableBiff3[] =
// *** macro sheet commands ***
- { 0, "ADD.BAR", 151, 151, 0, 1, V, { VR }, FUNCFLAG_MACROFUNC }, // BIFF2: 0, BIFF3: 0-1
- { 0, "ADD.MENU", 152, 152, 2, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC }, // BIFF2: 2, BIFF3: 2-3
- { 0, "ADD.COMMAND", 153, 153, 3, 4, V, { VR, RO }, FUNCFLAG_MACROFUNC } // BIFF2: 3, BIFF3: 3-4
+ { nullptr, "ADD.BAR", 151, 151, 0, 1, V, { VR }, FUNCFLAG_MACROFUNC }, // BIFF2: 0, BIFF3: 0-1
+ { nullptr, "ADD.MENU", 152, 152, 2, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC }, // BIFF2: 2, BIFF3: 2-3
+ { nullptr, "ADD.COMMAND", 153, 153, 3, 4, V, { VR, RO }, FUNCFLAG_MACROFUNC } // BIFF2: 3, BIFF3: 3-4
};
/** Functions new in BIFF4. */
@@ -651,8 +651,8 @@ static const FunctionData saFuncTableBiff4[] =
// *** macro sheet commands ***
- { 0, "ACTIVATE.NEXT", 104, 104, 0, 1, V, { VR }, FUNCFLAG_MACROCMD }, // BIFF2-3: 0, BIFF4: 0-1
- { 0, "ACTIVATE.PREV", 105, 105, 0, 1, V, { VR }, FUNCFLAG_MACROCMD } // BIFF2-3: 0, BIFF4: 0-1
+ { nullptr, "ACTIVATE.NEXT", 104, 104, 0, 1, V, { VR }, FUNCFLAG_MACROCMD }, // BIFF2-3: 0, BIFF4: 0-1
+ { nullptr, "ACTIVATE.PREV", 105, 105, 0, 1, V, { VR }, FUNCFLAG_MACROCMD } // BIFF2-3: 0, BIFF4: 0-1
};
/** Functions new in BIFF5/BIFF7. */
@@ -662,7 +662,7 @@ static const FunctionData saFuncTableBiff5[] =
{ "HLOOKUP", "HLOOKUP", 101, 101, 3, 4, V, { VV, RO, RO, VV }, 0 }, // BIFF2-4: 3, BIFF5: 3-4
{ "VLOOKUP", "VLOOKUP", 102, 102, 3, 4, V, { VV, RO, RO, VV }, 0 }, // BIFF2-4: 3, BIFF5: 3-4
{ "DAYS360", "DAYS360", 220, 220, 2, 3, V, { VR }, 0 }, // BIFF3-4: 2, BIFF5: 2-3
- { 0, "EXTERN.CALL", 255, 255, 1, MX, R, { RO_E, RO }, FUNCFLAG_EXPORTONLY }, // MACRO or EXTERNAL
+ { nullptr, "EXTERN.CALL", 255, 255, 1, MX, R, { RO_E, RO }, FUNCFLAG_EXPORTONLY }, // MACRO or EXTERNAL
{ "CONCATENATE", "CONCATENATE", 336, 336, 0, MX, V, { VR }, 0 },
{ "POWER", "POWER", 337, 337, 2, 2, V, { VR }, 0 },
{ "RADIANS", "RADIANS", 342, 342, 1, 1, V, { VR }, 0 },
@@ -673,8 +673,8 @@ static const FunctionData saFuncTableBiff5[] =
{ "COUNTBLANK", "COUNTBLANK", 347, 347, 1, 1, V, { RO }, 0 },
{ "ISPMT", "ISPMT", 350, 350, 4, 4, V, { VR }, 0 },
{ "DATEDIF", "DATEDIF", 351, 351, 3, 3, V, { VR }, 0 },
- { 0, "DATESTRING", 352, 352, 1, 1, V, { VR }, FUNCFLAG_IMPORTONLY }, // not supported in Calc, missing in OOXML spec
- { 0, "NUMBERSTRING", 353, 353, 2, 2, V, { VR }, FUNCFLAG_IMPORTONLY }, // not supported in Calc, missing in OOXML spec
+ { nullptr, "DATESTRING", 352, 352, 1, 1, V, { VR }, FUNCFLAG_IMPORTONLY }, // not supported in Calc, missing in OOXML spec
+ { nullptr, "NUMBERSTRING", 353, 353, 2, 2, V, { VR }, FUNCFLAG_IMPORTONLY }, // not supported in Calc, missing in OOXML spec
{ "ROMAN", "ROMAN", 354, 354, 1, 2, V, { VR }, 0 },
// *** EuroTool add-in ***
@@ -683,11 +683,11 @@ static const FunctionData saFuncTableBiff5[] =
// *** macro sheet commands ***
- { 0, "ADD.MENU", 152, 152, 2, 4, V, { VR, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 2-3, BIFF5: 2-4
- { 0, "ADD.COMMAND", 153, 153, 3, 5, V, { VR, RO, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5
- { 0, "ADD.CHART.AUTOFORMAT", 390, 390, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
- { 0, "ADD.LIST.ITEM", 451, 451, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
- { 0, "ACTIVE.CELL.FONT", 476, 476, 0, 14, V, { VR }, FUNCFLAG_MACROCMD }
+ { nullptr, "ADD.MENU", 152, 152, 2, 4, V, { VR, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 2-3, BIFF5: 2-4
+ { nullptr, "ADD.COMMAND", 153, 153, 3, 5, V, { VR, RO, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5
+ { nullptr, "ADD.CHART.AUTOFORMAT", 390, 390, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
+ { nullptr, "ADD.LIST.ITEM", 451, 451, 0, 2, V, { VR }, FUNCFLAG_MACROCMD },
+ { nullptr, "ACTIVE.CELL.FONT", 476, 476, 0, 14, V, { VR }, FUNCFLAG_MACROCMD }
};
/** Functions new in BIFF8. */
@@ -695,7 +695,7 @@ static const FunctionData saFuncTableBiff8[] =
{
{ "GETPIVOTDATA", "GETPIVOTDATA", 358, 358, 2, MX, V, { RR, RR, VR, VR }, FUNCFLAG_IMPORTONLY | FUNCFLAG_PARAMPAIRS },
{ "HYPERLINK", "HYPERLINK", 359, 359, 1, 2, V, { VV, VO }, 0 },
- { 0, "PHONETIC", 360, 360, 1, 1, V, { RO }, FUNCFLAG_IMPORTONLY },
+ { nullptr, "PHONETIC", 360, 360, 1, 1, V, { RO }, FUNCFLAG_IMPORTONLY },
{ "AVERAGEA", "AVERAGEA", 361, 361, 1, MX, V, { RX }, 0 },
{ "MAXA", "MAXA", 362, 362, 1, MX, V, { RX }, 0 },
{ "MINA", "MINA", 363, 363, 1, MX, V, { RX }, 0 },
@@ -704,29 +704,29 @@ static const FunctionData saFuncTableBiff8[] =
{ "STDEVA", "STDEVA", 366, 366, 1, MX, V, { RX }, 0 },
{ "VARA", "VARA", 367, 367, 1, MX, V, { RX }, 0 },
{ "COM.MICROSOFT.BAHTTEXT", "BAHTTEXT", 368, 368, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAIDAYOFWEEK", 369, 369, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAIDIGIT", 370, 370, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAIMONTHOFYEAR", 371, 371, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAINUMSOUND", 372, 372, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAINUMSTRING", 373, 373, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAISTRINGLENGTH", 374, 374, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "ISTHAIDIGIT", 375, 375, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "ROUNDBAHTDOWN", 376, 376, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "ROUNDBAHTUP", 377, 377, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "THAIYEAR", 378, 378, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
- { 0, "RTD", 379, 379, 3, 3, A, { VR, VR, RO }, 0 }
+ { nullptr, "THAIDAYOFWEEK", 369, 369, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAIDIGIT", 370, 370, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAIMONTHOFYEAR", 371, 371, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAINUMSOUND", 372, 372, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAINUMSTRING", 373, 373, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAISTRINGLENGTH", 374, 374, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "ISTHAIDIGIT", 375, 375, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "ROUNDBAHTDOWN", 376, 376, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "ROUNDBAHTUP", 377, 377, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "THAIYEAR", 378, 378, 1, 1, V, { VR }, FUNCFLAG_MACROCALL },
+ { nullptr, "RTD", 379, 379, 3, 3, A, { VR, VR, RO }, 0 }
};
/** Functions new in OOXML. */
static const FunctionData saFuncTableOox[] =
{
- { 0, "CUBEVALUE", 380, NOID, 1, MX, V, { VR, RX }, 0 },
- { 0, "CUBEMEMBER", 381, NOID, 2, 3, V, { VR, RX, VR }, 0 },
- { 0, "CUBEMEMBERPROPERTY", 382, NOID, 3, 3, V, { VR }, 0 },
- { 0, "CUBERANKEDMEMBER", 383, NOID, 3, 4, V, { VR }, 0 },
- { 0, "CUBEKPIMEMBER", 477, NOID, 3, 4, V, { VR }, 0 },
- { 0, "CUBESET", 478, NOID, 2, 5, V, { VR, RX, VR }, 0 },
- { 0, "CUBESETCOUNT", 479, NOID, 1, 1, V, { VR }, 0 },
+ { nullptr, "CUBEVALUE", 380, NOID, 1, MX, V, { VR, RX }, 0 },
+ { nullptr, "CUBEMEMBER", 381, NOID, 2, 3, V, { VR, RX, VR }, 0 },
+ { nullptr, "CUBEMEMBERPROPERTY", 382, NOID, 3, 3, V, { VR }, 0 },
+ { nullptr, "CUBERANKEDMEMBER", 383, NOID, 3, 4, V, { VR }, 0 },
+ { nullptr, "CUBEKPIMEMBER", 477, NOID, 3, 4, V, { VR }, 0 },
+ { nullptr, "CUBESET", 478, NOID, 2, 5, V, { VR, RX, VR }, 0 },
+ { nullptr, "CUBESETCOUNT", 479, NOID, 1, 1, V, { VR }, 0 },
{ "IFERROR", "IFERROR", 480, NOID, 2, 2, V, { VO, RO }, FUNCFLAG_MACROCALL },
{ "COUNTIFS", "COUNTIFS", 481, NOID, 2, MX, V, { RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS },
{ "SUMIFS", "SUMIFS", 482, NOID, 3, MX, V, { RO, RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS },
@@ -860,9 +860,9 @@ static const FunctionData saFuncTable2013[] =
{ "COM.MICROSOFT.FLOOR.MATH", "FLOOR.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW },
{ "FLOOR", "FLOOR.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_EXPORTONLY },
// NOTE: this FDIST is not our LEGACY.FDIST
- { 0/*"FDIST"*/, "FDIST", NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW },
+ { nullptr/*"FDIST"*/, "FDIST", NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW },
// NOTE: this FINV is not our LEGACY.FINV
- { 0/*"FINV"*/, "FINV", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW },
+ { nullptr/*"FINV"*/, "FINV", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW },
{ "FORMULA", "FORMULATEXT", NOID, NOID, 1, 1, V, { RO }, FUNCFLAG_MACROCALL_NEW },
{ "GAMMA", "GAMMA", NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALL_NEW },
{ "GAUSS", "GAUSS", NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALL_NEW },
@@ -898,8 +898,8 @@ static const FunctionData saFuncTable2013[] =
/** Functions defined by OpenFormula, but not supported by Calc or by Excel. */
static const FunctionData saFuncTableOdf[] =
{
- { "CHISQDIST", 0, NOID, NOID, 2, 3, V, { VR }, FUNCFLAG_MACROCALLODF },
- { "CHISQINV", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }
+ { "CHISQDIST", nullptr, NOID, NOID, 2, 3, V, { VR }, FUNCFLAG_MACROCALLODF },
+ { "CHISQINV", nullptr, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }
};
/** Functions defined by Calc, but not in OpenFormula nor supported by Excel. */
@@ -967,7 +967,7 @@ FunctionParamInfoIterator& FunctionParamInfoIterator::operator++()
++mpParamInfo;
// if last parameter type is 'Excel-only' or 'Calc-only', do not repeat it
else if( isExcelOnlyParam() || isCalcOnlyParam() )
- mpParamInfo = 0;
+ mpParamInfo = nullptr;
// points to last info, but parameter pairs expected, move to previous info
else if( mbParamPairs )
--mpParamInfo;
@@ -1260,7 +1260,7 @@ OpCodeProviderImpl::OpCodeProviderImpl( const FunctionInfoVector& rFuncInfos,
// functions
fillFuncTokenMaps( aTokenMap, aExtFuncTokenMap, aEntrySeq, xMapper ) &&
initFuncOpCodes( aTokenMap, aExtFuncTokenMap, rFuncInfos ) &&
- initOpCode( OPCODE_DDE, aTokenMap, "DDE", 0 );
+ initOpCode( OPCODE_DDE, aTokenMap, "DDE", nullptr );
OSL_ENSURE( bIsValid, "OpCodeProviderImpl::OpCodeProviderImpl - opcodes not initialized" );
(void)bIsValid;
@@ -1466,7 +1466,7 @@ const ApiOpCodes& OpCodeProvider::getOpCodes() const
const FunctionInfo* OpCodeProvider::getFuncInfoFromApiToken( const ApiToken& rToken ) const
{
- const FunctionInfo* pFuncInfo = 0;
+ const FunctionInfo* pFuncInfo = nullptr;
if( (rToken.OpCode == mxOpCodeImpl->OPCODE_EXTERNAL) && rToken.Data.has< OUString >() )
pFuncInfo = mxOpCodeImpl->maExtProgFuncs.get( rToken.Data.get< OUString >() ).get();
else if( (rToken.OpCode == mxOpCodeImpl->OPCODE_MACRO) && rToken.Data.has< OUString >() )
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 58507f8fd2d8..ef6172f46a9e 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -56,7 +56,7 @@ public:
SCROW mnRow;
ScFormulaCell* mpCell;
- Item() : mnRow(-1), mpCell(NULL) {}
+ Item() : mnRow(-1), mpCell(nullptr) {}
};
explicit CachedTokenArray( ScDocument& rDoc ) :
@@ -74,7 +74,7 @@ public:
// Check if a token array is cached for this column.
ColCacheType::iterator it = maCache.find(rPos.Col());
if (it == maCache.end())
- return NULL;
+ return nullptr;
Item& rCached = *it->second;
const ScTokenArray& rCode = *rCached.mpCell->GetCode();
@@ -82,7 +82,7 @@ public:
if (rFormula == aPredicted)
return &rCached;
- return NULL;
+ return nullptr;
}
void store( const ScAddress& rPos, ScFormulaCell* pCell )
@@ -193,7 +193,7 @@ void applyCellFormulas(
{
// Use the cached version to avoid re-compilation.
- ScFormulaCell* pCell = NULL;
+ ScFormulaCell* pCell = nullptr;
if (p->mnRow + 1 == aPos.Row())
{
// Put them in the same formula group.
@@ -350,11 +350,11 @@ FormulaBuffer::SharedFormulaDesc::SharedFormulaDesc(
maAddress(rAddr), mnSharedId(nSharedId), maCellValue(rCellValue), mnValueType(nValueType) {}
FormulaBuffer::SheetItem::SheetItem() :
- mpCellFormulas(NULL),
- mpArrayFormulas(NULL),
- mpCellFormulaValues(NULL),
- mpSharedFormulaEntries(NULL),
- mpSharedFormulaIDs(NULL) {}
+ mpCellFormulas(nullptr),
+ mpArrayFormulas(nullptr),
+ mpCellFormulaValues(nullptr),
+ mpSharedFormulaEntries(nullptr),
+ mpSharedFormulaIDs(nullptr) {}
FormulaBuffer::FormulaBuffer( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper )
{
@@ -425,7 +425,7 @@ void FormulaBuffer::finalizeImport()
}
}
- rDoc.getDoc().SetAutoNameCache(NULL);
+ rDoc.getDoc().SetAutoNameCache(nullptr);
xFormulaBar->setPosition( 1.0 );
}
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index 888edd6e3af9..3e8dd034fdc5 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -66,7 +66,7 @@ ApiTokenSequence FormulaFinalizer::finalizeTokenArray( const ApiTokenSequence& r
const FunctionInfo* FormulaFinalizer::resolveBadFuncName( const OUString& ) const
{
- return 0;
+ return nullptr;
}
OUString FormulaFinalizer::resolveDefinedName( sal_Int32 ) const
@@ -98,7 +98,7 @@ const FunctionInfo* FormulaFinalizer::getFunctionInfo( ApiToken& orFuncToken )
}
// no success - return null
- return 0;
+ return nullptr;
}
const FunctionInfo* FormulaFinalizer::getExternCallInfo( ApiToken& orFuncToken, const ApiToken& rECToken )
@@ -131,7 +131,7 @@ const FunctionInfo* FormulaFinalizer::getExternCallInfo( ApiToken& orFuncToken,
}
}
- return 0;
+ return nullptr;
}
void FormulaFinalizer::processTokens( const ApiToken* pToken, const ApiToken* pTokenEnd )
@@ -141,7 +141,7 @@ void FormulaFinalizer::processTokens( const ApiToken* pToken, const ApiToken* pT
// push the current token into the vector
bool bValid = appendFinalToken( *pToken );
// try to process a function
- if( const FunctionInfo* pFuncInfo = bValid ? getFunctionInfo( maTokens.back() ) : 0 )
+ if( const FunctionInfo* pFuncInfo = bValid ? getFunctionInfo( maTokens.back() ) : nullptr )
pToken = processParameters( *pFuncInfo, pToken + 1, pTokenEnd );
// otherwise, go to next token
else
@@ -297,7 +297,7 @@ bool FormulaFinalizer::isEmptyParameter( const ApiToken* pToken, const ApiToken*
const ApiToken* FormulaFinalizer::getSingleToken( const ApiToken* pToken, const ApiToken* pTokenEnd ) const
{
- const ApiToken* pSingleToken = 0;
+ const ApiToken* pSingleToken = nullptr;
// skip leading whitespace tokens
while( (pToken < pTokenEnd) && (pToken->OpCode == OPCODE_SPACES) ) ++pToken;
// remember first non-whitespace token
@@ -305,7 +305,7 @@ const ApiToken* FormulaFinalizer::getSingleToken( const ApiToken* pToken, const
// skip trailing whitespace tokens
while( (pToken < pTokenEnd) && (pToken->OpCode == OPCODE_SPACES) ) ++pToken;
// return null, if other non-whitespace tokens follow
- return (pToken == pTokenEnd) ? pSingleToken : 0;
+ return (pToken == pTokenEnd) ? pSingleToken : nullptr;
}
const ApiToken* FormulaFinalizer::skipParentheses( const ApiToken* pToken, const ApiToken* pTokenEnd ) const
@@ -464,20 +464,20 @@ protected:
ApiToken& getOperandToken( size_t nOpCountFromEnd, size_t nOpIndex, size_t nTokenIndex );
- bool pushOperandToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
- bool pushAnyOperandToken( const Any& rAny, sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
+ bool pushOperandToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
+ bool pushAnyOperandToken( const Any& rAny, sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
template< typename Type >
- bool pushValueOperandToken( const Type& rValue, sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
+ bool pushValueOperandToken( const Type& rValue, sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
template< typename Type >
- inline bool pushValueOperandToken( const Type& rValue, const WhiteSpaceVec* pSpaces = 0 )
+ inline bool pushValueOperandToken( const Type& rValue, const WhiteSpaceVec* pSpaces = nullptr )
{ return pushValueOperandToken( rValue, OPCODE_PUSH, pSpaces ); }
- bool pushParenthesesOperandToken( const WhiteSpaceVec* pOpeningSpaces = 0, const WhiteSpaceVec* pClosingSpaces = 0 );
- bool pushUnaryPreOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
- bool pushUnaryPostOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
- bool pushBinaryOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = 0 );
- bool pushParenthesesOperatorToken( const WhiteSpaceVec* pOpeningSpaces = 0, const WhiteSpaceVec* pClosingSpaces = 0 );
- bool pushFunctionOperatorToken( sal_Int32 nOpCode, size_t nParamCount, const WhiteSpaceVec* pLeadingSpaces = 0, const WhiteSpaceVec* pClosingSpaces = 0 );
- bool pushFunctionOperatorToken( const FunctionInfo& rFuncInfo, size_t nParamCount, const WhiteSpaceVec* pLeadingSpaces = 0, const WhiteSpaceVec* pClosingSpaces = 0 );
+ bool pushParenthesesOperandToken( const WhiteSpaceVec* pOpeningSpaces = nullptr, const WhiteSpaceVec* pClosingSpaces = nullptr );
+ bool pushUnaryPreOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
+ bool pushUnaryPostOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
+ bool pushBinaryOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces = nullptr );
+ bool pushParenthesesOperatorToken( const WhiteSpaceVec* pOpeningSpaces = nullptr, const WhiteSpaceVec* pClosingSpaces = nullptr );
+ bool pushFunctionOperatorToken( sal_Int32 nOpCode, size_t nParamCount, const WhiteSpaceVec* pLeadingSpaces = nullptr, const WhiteSpaceVec* pClosingSpaces = nullptr );
+ bool pushFunctionOperatorToken( const FunctionInfo& rFuncInfo, size_t nParamCount, const WhiteSpaceVec* pLeadingSpaces = nullptr, const WhiteSpaceVec* pClosingSpaces = nullptr );
bool pushOperand( sal_Int32 nOpCode );
bool pushAnyOperand( const Any& rAny, sal_Int32 nOpCode );
@@ -839,7 +839,7 @@ bool FormulaParserImpl::pushFunctionOperatorToken( sal_Int32 nOpCode, size_t nPa
// add function parentheses and function name
return bOk &&
- ((nParamCount > 0) ? pushParenthesesOperatorToken( 0, pClosingSpaces ) : pushParenthesesOperandToken( 0, pClosingSpaces )) &&
+ ((nParamCount > 0) ? pushParenthesesOperatorToken( nullptr, pClosingSpaces ) : pushParenthesesOperandToken( nullptr, pClosingSpaces )) &&
pushUnaryPreOperatorToken( nOpCode, pLeadingSpaces );
}
@@ -1199,7 +1199,7 @@ const FunctionInfo* FormulaParserImpl::resolveBadFuncName( const OUString& rToke
return pFuncInfo;
}
}
- return 0;
+ return nullptr;
}
OUString FormulaParserImpl::resolveDefinedName( sal_Int32 nTokenIndex ) const
@@ -2018,19 +2018,19 @@ BiffFormulaParserImpl::BiffFormulaParserImpl( const FormulaParser& rParent ) :
mnRefIdSize = 0;
break;
case BIFF_UNKNOWN:
- mpImportStrToken = NULL;
- mpImportSpaceToken = NULL;
- mpImportSheetToken = NULL;
- mpImportEndSheetToken = NULL;
- mpImportNlrToken = NULL;
- mpImportRefToken = NULL;
- mpImportAreaToken = NULL;
- mpImportRef3dToken = NULL;
- mpImportArea3dToken = NULL;
- mpImportNameXToken = NULL;
- mpImportFuncToken = NULL;
- mpImportFuncVarToken = NULL;
- mpImportFuncCEToken = NULL;
+ mpImportStrToken = nullptr;
+ mpImportSpaceToken = nullptr;
+ mpImportSheetToken = nullptr;
+ mpImportEndSheetToken = nullptr;
+ mpImportNlrToken = nullptr;
+ mpImportRefToken = nullptr;
+ mpImportAreaToken = nullptr;
+ mpImportRef3dToken = nullptr;
+ mpImportArea3dToken = nullptr;
+ mpImportNameXToken = nullptr;
+ mpImportFuncToken = nullptr;
+ mpImportFuncVarToken = nullptr;
+ mpImportFuncCEToken = nullptr;
mnAttrDataSize = 0;
mnArraySize = 0;
mnNameSize = 0;
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx
index 5a8d1286ae20..167e3117adfe 100644
--- a/sc/source/filter/oox/numberformatsbuffer.cxx
+++ b/sc/source/filter/oox/numberformatsbuffer.cxx
@@ -66,15 +66,15 @@ struct BuiltinFormat
/** Defines a built-in number format that maps to an own predefined format. */
#define NUMFMT_PREDEF( INDEX, PREDEFINED ) \
- { INDEX, 0, css::i18n::NumberFormatIndex::PREDEFINED, -1 }
+ { INDEX, nullptr, css::i18n::NumberFormatIndex::PREDEFINED, -1 }
/** Defines a built-in number format that is the same as the specified in nReuseId. */
#define NUMFMT_REUSE( INDEX, REUSED_INDEX ) \
- { INDEX, 0, -1, REUSED_INDEX }
+ { INDEX, nullptr, -1, REUSED_INDEX }
/** Terminates a built-in number format table. */
#define NUMFMT_ENDTABLE() \
- { -1, 0, -1, -1 }
+ { -1, nullptr, -1, -1 }
/** Defines builtin date and time formats 14...22.
@param SYSTEMDATE Complete short system date (for formats 14 and 22).
diff --git a/sc/source/filter/oox/ooxformulaparser.cxx b/sc/source/filter/oox/ooxformulaparser.cxx
index edf4ad94d824..c4c68522ffcb 100644
--- a/sc/source/filter/oox/ooxformulaparser.cxx
+++ b/sc/source/filter/oox/ooxformulaparser.cxx
@@ -96,7 +96,7 @@ const FunctionInfo* OOXMLFormulaParserImpl::resolveBadFuncName( const OUString&
}
}
}
- return 0;
+ return nullptr;
}
OOXMLFormulaParser::OOXMLFormulaParser()
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 704b098de939..df9196d3d133 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -740,7 +740,7 @@ const PivotCacheItem* PivotCacheField::getCacheItem( sal_Int32 nItemIdx ) const
return maGroupItems.getCacheItem( nItemIdx );
if( hasSharedItems() )
return maSharedItems.getCacheItem( nItemIdx );
- return 0;
+ return nullptr;
}
void PivotCacheField::applyItemCaptions( const IdCaptionPairList& vCaptions )
@@ -1416,7 +1416,7 @@ PivotCache* PivotCacheBuffer::importPivotCacheFragment( sal_Int32 nCacheId )
// check if a fragment path exists for the passed cache identifier
FragmentPathMap::iterator aIt = maFragmentPaths.find( nCacheId );
if( aIt == maFragmentPaths.end() )
- return 0;
+ return nullptr;
/* Import the cache fragment. This may create a dummy data sheet
for external sheet sources. */
@@ -1441,7 +1441,7 @@ PivotCache* PivotCacheBuffer::importPivotCacheFragment( sal_Int32 nCacheId )
nCacheId = ContainerHelper::getVectorElement( maCacheIds, nCacheId, -1 );
PivotCache* pCache = maCaches.get( nCacheId ).get();
if( !pCache )
- return 0;
+ return nullptr;
/* Try to find fragment path entry (stream name). If missing, the
stream has been read already, and the cache can be returned. */
@@ -1460,7 +1460,7 @@ PivotCache* PivotCacheBuffer::importPivotCacheFragment( sal_Int32 nCacheId )
case FILTER_UNKNOWN:
OSL_FAIL( "PivotCacheBuffer::importPivotCacheFragment - unknown filter type" );
}
- return 0;
+ return nullptr;
}
PivotCache& PivotCacheBuffer::createPivotCache( sal_Int32 nCacheId )
diff --git a/sc/source/filter/oox/pivotcachefragment.cxx b/sc/source/filter/oox/pivotcachefragment.cxx
index e90656ccb9ab..0ca92404a102 100644
--- a/sc/source/filter/oox/pivotcachefragment.cxx
+++ b/sc/source/filter/oox/pivotcachefragment.cxx
@@ -61,7 +61,7 @@ ContextHandlerRef PivotCacheFieldContext::onCreateContext( sal_Int32 nElement, c
case XLS_TOKEN( discretePr ): mrCacheField.importDiscretePrItem( nElement, rAttribs ); break;
case XLS_TOKEN( groupItems ): mrCacheField.importGroupItem( nElement, rAttribs ); break;
}
- return 0;
+ return nullptr;
}
void PivotCacheFieldContext::onStartElement( const AttributeList& rAttribs )
@@ -95,7 +95,7 @@ ContextHandlerRef PivotCacheFieldContext::onCreateRecordContext( sal_Int32 nRecI
case BIFF12_ID_PCDFDISCRETEPR: mrCacheField.importPCDFDiscretePrItem( nRecId, rStrm ); break;
case BIFF12_ID_PCDFGROUPITEMS: mrCacheField.importPCDFGroupItem( nRecId, rStrm ); break;
}
- return 0;
+ return nullptr;
}
void PivotCacheFieldContext::onStartRecord( SequenceInputStream& rStrm )
@@ -135,7 +135,7 @@ ContextHandlerRef PivotCacheDefinitionFragment::onCreateContext( sal_Int32 nElem
if( nElement == XLS_TOKEN( cacheField ) ) return new PivotCacheFieldContext( *this, mrPivotCache.createCacheField() );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef PivotCacheDefinitionFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -162,7 +162,7 @@ ContextHandlerRef PivotCacheDefinitionFragment::onCreateRecordContext( sal_Int32
if( nRecId == BIFF12_ID_PCDFIELD ) return new PivotCacheFieldContext( *this, mrPivotCache.createCacheField() );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* PivotCacheDefinitionFragment::getRecordInfos() const
@@ -251,7 +251,7 @@ ContextHandlerRef PivotCacheRecordsFragment::onCreateContext( sal_Int32 nElement
}
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef PivotCacheRecordsFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -271,7 +271,7 @@ ContextHandlerRef PivotCacheRecordsFragment::onCreateRecordContext( sal_Int32 nR
}
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* PivotCacheRecordsFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index 04b02687de07..4bed45cf4342 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -687,7 +687,7 @@ Reference< XDataPilotField > PivotTableField::convertRowColPageField( sal_Int32
else
{
const PivotCacheField* pCacheField = (maModel.mnSortRefField == OOX_PT_DATALAYOUTFIELD) ?
- mrPivotTable.getCacheFieldOfDataField( maModel.mnSortRefItem ) : 0;
+ mrPivotTable.getCacheFieldOfDataField( maModel.mnSortRefItem ) : nullptr;
if( pCacheField )
{
aSortInfo.Mode = DataPilotFieldSortMode::DATA;
@@ -902,9 +902,9 @@ PTLocationModel::PTLocationModel() :
PivotTable::PivotTable( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
- mpDPObject(NULL),
+ mpDPObject(nullptr),
maDataField( *this, OOX_PT_DATALAYOUTFIELD ),
- mpPivotCache( 0 )
+ mpPivotCache( nullptr )
{
}
@@ -1303,13 +1303,13 @@ Reference< XDataPilotField > PivotTable::getDataLayoutField() const
const PivotCacheField* PivotTable::getCacheField( sal_Int32 nFieldIdx ) const
{
- return mpPivotCache ? mpPivotCache->getCacheField( nFieldIdx ) : 0;
+ return mpPivotCache ? mpPivotCache->getCacheField( nFieldIdx ) : nullptr;
}
const PivotCacheField* PivotTable::getCacheFieldOfDataField( sal_Int32 nDataItemIdx ) const
{
const PTDataFieldModel* pDataField = ContainerHelper::getVectorElement( maDataFields, nDataItemIdx );
- return pDataField ? getCacheField( pDataField->mnField ) : 0;
+ return pDataField ? getCacheField( pDataField->mnField ) : nullptr;
}
sal_Int32 PivotTable::getCacheDatabaseIndex( sal_Int32 nFieldIdx ) const
diff --git a/sc/source/filter/oox/pivottablefragment.cxx b/sc/source/filter/oox/pivottablefragment.cxx
index 9c2fa02dd06b..ca26708b13e4 100644
--- a/sc/source/filter/oox/pivottablefragment.cxx
+++ b/sc/source/filter/oox/pivottablefragment.cxx
@@ -60,7 +60,7 @@ ContextHandlerRef PivotTableFieldContext::onCreateContext( sal_Int32 nElement, c
if( nElement == XLS_TOKEN( x ) ) mrTableField.importReferenceItem( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
void PivotTableFieldContext::onStartElement( const AttributeList& rAttribs )
@@ -96,7 +96,7 @@ ContextHandlerRef PivotTableFieldContext::onCreateRecordContext( sal_Int32 nRecI
if( nRecId == BIFF12_ID_PTREFERENCEITEM ) mrTableField.importPTReferenceItem( rStrm );
break;
}
- return 0;
+ return nullptr;
}
void PivotTableFieldContext::onStartRecord( SequenceInputStream& rStrm )
@@ -125,7 +125,7 @@ ContextHandlerRef PivotTableFilterContext::onCreateContext( sal_Int32 nElement,
if( nElement == XLS_TOKEN( top10 ) ) mrTableFilter.importTop10( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
void PivotTableFilterContext::onStartElement( const AttributeList& rAttribs )
@@ -148,7 +148,7 @@ ContextHandlerRef PivotTableFilterContext::onCreateRecordContext( sal_Int32 nRec
if( nRecId == BIFF12_ID_TOP10FILTER ) mrTableFilter.importTop10Filter( rStrm );
break;
}
- return 0;
+ return nullptr;
}
void PivotTableFilterContext::onStartRecord( SequenceInputStream& rStrm )
@@ -203,7 +203,7 @@ ContextHandlerRef PivotTableFragment::onCreateContext( sal_Int32 nElement, const
if( nElement == XLS_TOKEN( filter ) ) return new PivotTableFilterContext( *this, mrPivotTable.createTableFilter() );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef PivotTableFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -240,7 +240,7 @@ ContextHandlerRef PivotTableFragment::onCreateRecordContext( sal_Int32 nRecId, S
if( nRecId == BIFF12_ID_PTFILTER ) return new PivotTableFilterContext( *this, mrPivotTable.createTableFilter() );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* PivotTableFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/querytablefragment.cxx b/sc/source/filter/oox/querytablefragment.cxx
index 32ae66291766..c085daea18d7 100644
--- a/sc/source/filter/oox/querytablefragment.cxx
+++ b/sc/source/filter/oox/querytablefragment.cxx
@@ -42,7 +42,7 @@ ContextHandlerRef QueryTableFragment::onCreateContext( sal_Int32 nElement, const
mrQueryTable.importQueryTable( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef QueryTableFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -54,7 +54,7 @@ ContextHandlerRef QueryTableFragment::onCreateRecordContext( sal_Int32 nRecId, S
mrQueryTable.importQueryTable( rStrm );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* QueryTableFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index 08d257907bb9..7b7861d235f1 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -144,7 +144,7 @@ protected:
{
// The value is a rich text string.
ScDocument& rDoc = getScDocument();
- EditTextObject* pTextObj = mxRichString->convert(rDoc.GetEditEngine(), NULL);
+ EditTextObject* pTextObj = mxRichString->convert(rDoc.GetEditEngine(), nullptr);
if (pTextObj)
{
svl::SharedStringPool& rPool = rDoc.GetSharedStringPool();
@@ -166,7 +166,7 @@ private:
OUString aRefStr = rAttribs.getString(XML_r, OUString());
if (!aRefStr.isEmpty())
{
- mrPos.Parse(aRefStr, NULL, formula::FormulaGrammar::CONV_XL_OOX);
+ mrPos.Parse(aRefStr, nullptr, formula::FormulaGrammar::CONV_XL_OOX);
if (mnSheetIndex != -1)
mrPos.SetTab(mnSheetIndex-1);
}
@@ -293,7 +293,7 @@ void RevisionHeadersFragment::importHeader( const AttributeList& rAttribs )
if (!aDateTimeStr.isEmpty())
{
util::DateTime aDateTime;
- sax::Converter::parseDateTime(aDateTime, 0, aDateTimeStr);
+ sax::Converter::parseDateTime(aDateTime, nullptr, aDateTimeStr);
Date aDate(aDateTime);
tools::Time aTime(aDateTime);
aMetadata.maDateTime.SetDate(aDate.GetDate());
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index 6023a71e5d60..b4158764cfb1 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -118,7 +118,7 @@ void RichStringPortion::convert( ScEditEngineDefaulter& rEE, ESelection& rSelect
rSelection.nStartPara = rSelection.nEndPara;
SfxItemSet aItemSet( rEE.GetEmptyItemSet() );
- const Font* pFontToUse = mxFont.get() ? mxFont.get() : lclNeedsRichTextFormat( pFont ) ? pFont : NULL;
+ const Font* pFontToUse = mxFont.get() ? mxFont.get() : lclNeedsRichTextFormat( pFont ) ? pFont : nullptr;
if ( pFontToUse )
pFontToUse->fillToItemSet( aItemSet, true );
@@ -395,7 +395,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, co
for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt )
{
(*aIt)->convert( rxText, pFirstPortionFont, bReplaceOld );
- pFirstPortionFont = 0; // use passed font for first portion only
+ pFirstPortionFont = nullptr; // use passed font for first portion only
bReplaceOld = false; // do not replace first portion text with following portions
}
}
@@ -416,7 +416,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, co
for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt )
{
(*aIt)->convert( rEE, aSelection, pFirstPortionFont );
- pFirstPortionFont = 0;
+ pFirstPortionFont = nullptr;
}
return rEE.CreateTextObject();
diff --git a/sc/source/filter/oox/richstringcontext.cxx b/sc/source/filter/oox/richstringcontext.cxx
index 1bb6c96491d9..a9ab0722d052 100644
--- a/sc/source/filter/oox/richstringcontext.cxx
+++ b/sc/source/filter/oox/richstringcontext.cxx
@@ -69,7 +69,7 @@ ContextHandlerRef RichStringContext::onCreateContext( sal_Int32 nElement, const
}
break;
}
- return 0;
+ return nullptr;
}
void RichStringContext::onCharacters( const OUString& rChars )
diff --git a/sc/source/filter/oox/scenariocontext.cxx b/sc/source/filter/oox/scenariocontext.cxx
index 8535b89a67b0..b58663c1f867 100644
--- a/sc/source/filter/oox/scenariocontext.cxx
+++ b/sc/source/filter/oox/scenariocontext.cxx
@@ -40,7 +40,7 @@ ContextHandlerRef ScenarioContext::onCreateContext( sal_Int32 nElement, const At
if( nElement == XLS_TOKEN( inputCells ) ) mrScenario.importInputCells( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
void ScenarioContext::onStartElement( const AttributeList& rAttribs )
@@ -57,7 +57,7 @@ ContextHandlerRef ScenarioContext::onCreateRecordContext( sal_Int32 nRecId, Sequ
if( nRecId == BIFF12_ID_INPUTCELLS ) mrScenario.importInputCells( rStrm );
break;
}
- return 0;
+ return nullptr;
}
void ScenarioContext::onStartRecord( SequenceInputStream& rStrm )
@@ -80,7 +80,7 @@ ContextHandlerRef ScenariosContext::onCreateContext( sal_Int32 nElement, const A
if( nElement == XLS_TOKEN( scenario ) ) return new ScenarioContext( *this, mrSheetScenarios );
break;
}
- return 0;
+ return nullptr;
}
void ScenariosContext::onStartElement( const AttributeList& rAttribs )
@@ -97,7 +97,7 @@ ContextHandlerRef ScenariosContext::onCreateRecordContext( sal_Int32 nRecId, Seq
if( nRecId == BIFF12_ID_SCENARIO ) return new ScenarioContext( *this, mrSheetScenarios );
break;
}
- return 0;
+ return nullptr;
}
void ScenariosContext::onStartRecord( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/sharedstringsfragment.cxx b/sc/source/filter/oox/sharedstringsfragment.cxx
index be2061e5ba9d..3438ae2b9252 100644
--- a/sc/source/filter/oox/sharedstringsfragment.cxx
+++ b/sc/source/filter/oox/sharedstringsfragment.cxx
@@ -47,7 +47,7 @@ ContextHandlerRef SharedStringsFragment::onCreateContext( sal_Int32 nElement, co
return new RichStringContext( *this, getSharedStrings().createRichString() );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef SharedStringsFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -64,7 +64,7 @@ ContextHandlerRef SharedStringsFragment::onCreateRecordContext( sal_Int32 nRecId
getSharedStrings().createRichString()->importString( rStrm, true );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* SharedStringsFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index e98abff0399a..0cf6280ca0d1 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -118,7 +118,7 @@ ContextHandlerRef SheetDataContext::onCreateContext( sal_Int32 nElement, const A
}
break;
}
- return 0;
+ return nullptr;
}
void SheetDataContext::onCharacters( const OUString& rChars )
@@ -263,7 +263,7 @@ ContextHandlerRef SheetDataContext::onCreateRecordContext( sal_Int32 nRecId, Seq
}
break;
}
- return 0;
+ return nullptr;
}
// private --------------------------------------------------------------------
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 5fa5a5a93adf..ce909ad4367e 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1680,7 +1680,7 @@ BorderLineModel* Border::getBorderLine( sal_Int32 nElement )
case XLS_TOKEN( bottom ): return &maModel.maBottom;
case XLS_TOKEN( diagonal ): return &maModel.maDiagonal;
}
- return 0;
+ return nullptr;
}
bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& rModel )
@@ -2082,7 +2082,7 @@ Xf::Xf( const WorkbookHelper& rHelper ) :
maAlignment( rHelper ),
maProtection( rHelper ),
meRotationRef( css::table::CellVertJustify2::STANDARD ),
- mpStyleSheet( NULL )
+ mpStyleSheet( nullptr )
{
}
@@ -2305,7 +2305,7 @@ Xf::createPattern( bool bSkipPoolDefs )
*/
StylesBuffer& rStyles = getStyles();
- const Xf* pStyleXf = isCellXf() ? rStyles.getStyleXf( maModel.mnStyleXfId ).get() : 0;
+ const Xf* pStyleXf = isCellXf() ? rStyles.getStyleXf( maModel.mnStyleXfId ).get() : nullptr;
if( pStyleXf && !mpStyleSheet )
{
rStyles.createCellStyle( maModel.mnStyleXfId );
@@ -2365,7 +2365,7 @@ Xf::createPattern( bool bSkipPoolDefs )
border line of the cell is set (either explicitly or via cell style),
and the cell contents are rotated, set rotation reference to bottom of
cell. This causes the borders to be painted rotated with the text. */
- if( const Alignment* pAlignment = maModel.mbAlignUsed ? &maAlignment : (pStyleXf ? &pStyleXf->maAlignment : 0) )
+ if( const Alignment* pAlignment = maModel.mbAlignUsed ? &maAlignment : (pStyleXf ? &pStyleXf->maAlignment : nullptr) )
{
SvxRotateMode eRotateMode = SVX_ROTATE_MODE_STANDARD;
sal_Int32 nBorderId = maModel.mbBorderUsed ? maModel.mnBorderId : (pStyleXf ? pStyleXf->maModel.mnBorderId : -1);
@@ -2523,9 +2523,9 @@ const sal_Char* const sppcStyleNames[] =
"Followed Hyperlink",
"Note", // new in OOX
"Warning Text",
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
"Title",
"Heading 1",
"Heading 2",
@@ -2573,7 +2573,7 @@ OUString lclGetBuiltinStyleName( sal_Int32 nBuiltinId, const OUString& rName, sa
OSL_ENSURE( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount), "lclGetBuiltinStyleName - unknown built-in style" );
OUStringBuffer aStyleName;
aStyleName.appendAscii( spcStyleNamePrefix );
- if( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount) && (sppcStyleNames[ nBuiltinId ] != 0) )
+ if( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount) && (sppcStyleNames[ nBuiltinId ] != nullptr) )
aStyleName.appendAscii( sppcStyleNames[ nBuiltinId ] );
else if( !rName.isEmpty() )
aStyleName.append( rName );
@@ -2614,7 +2614,7 @@ bool CellStyleModel::isDefaultStyle() const
CellStyle::CellStyle( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
mbCreated( false ),
- mpStyleSheet( NULL )
+ mpStyleSheet( nullptr )
{
}
@@ -2842,7 +2842,7 @@ void CellStyleBuffer::insertCellStyle( CellStyleRef xCellStyle )
::ScStyleSheet* CellStyleBuffer::getCellStyleSheet( const CellStyleRef& rxCellStyle )
{
- ::ScStyleSheet* pStyleSheet = NULL;
+ ::ScStyleSheet* pStyleSheet = nullptr;
if ( rxCellStyle.get() )
pStyleSheet = rxCellStyle->getStyleSheet();
return pStyleSheet;
diff --git a/sc/source/filter/oox/stylesfragment.cxx b/sc/source/filter/oox/stylesfragment.cxx
index 10876fc98ab4..608e2fd8b8d5 100644
--- a/sc/source/filter/oox/stylesfragment.cxx
+++ b/sc/source/filter/oox/stylesfragment.cxx
@@ -39,7 +39,7 @@ ContextHandlerRef IndexedColorsContext::onCreateContext( sal_Int32 nElement, con
if( nElement == XLS_TOKEN( rgbColor ) ) getStyles().importPaletteColor( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef IndexedColorsContext::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -50,14 +50,14 @@ ContextHandlerRef IndexedColorsContext::onCreateRecordContext( sal_Int32 nRecId,
if( nRecId == BIFF12_ID_RGBCOLOR ) getStyles().importPaletteColor( rStrm );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef FontContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
if( mxFont.get() )
mxFont->importAttribs( nElement, rAttribs );
- return 0;
+ return nullptr;
}
void BorderContext::onStartElement( const AttributeList& rAttribs )
@@ -78,7 +78,7 @@ ContextHandlerRef BorderContext::onCreateContext( sal_Int32 nElement, const Attr
if( nElement == XLS_TOKEN( color ) )
mxBorder->importColor( getCurrentElement(), rAttribs );
}
- return 0;
+ return nullptr;
}
ContextHandlerRef FillContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
@@ -111,7 +111,7 @@ ContextHandlerRef FillContext::onCreateContext( sal_Int32 nElement, const Attrib
mxFill->importColor( rAttribs, mfGradPos );
break;
}
- return 0;
+ return nullptr;
}
void XfContext::onStartElement( const AttributeList& rAttribs )
@@ -132,7 +132,7 @@ ContextHandlerRef XfContext::onCreateContext( sal_Int32 nElement, const Attribut
}
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef DxfContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
@@ -154,7 +154,7 @@ ContextHandlerRef DxfContext::onCreateContext( sal_Int32 nElement, const Attribu
}
break;
}
- return 0;
+ return nullptr;
}
StylesFragment::StylesFragment( const WorkbookHelper& rHelper, const OUString& rFragmentPath ) :
@@ -213,7 +213,7 @@ ContextHandlerRef StylesFragment::onCreateContext( sal_Int32 nElement, const Att
if( nElement == XLS_TOKEN( cellStyle ) ) getStyles().importCellStyle( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef StylesFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -267,7 +267,7 @@ ContextHandlerRef StylesFragment::onCreateRecordContext( sal_Int32 nRecId, Seque
if( nRecId == BIFF12_ID_CELLSTYLE ) getStyles().importCellStyle( rStrm );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* StylesFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/tablecolumnsbuffer.cxx b/sc/source/filter/oox/tablecolumnsbuffer.cxx
index 4bc71ddbcd3f..63395d25c1ec 100644
--- a/sc/source/filter/oox/tablecolumnsbuffer.cxx
+++ b/sc/source/filter/oox/tablecolumnsbuffer.cxx
@@ -133,7 +133,7 @@ TableColumns* TableColumnsBuffer::getActiveTableColumns()
SAL_WARN_IF( maTableColumnsVector.size() > 1, "sc.filter",
"TableColumnsBuffer::getActiveTableColumns - too many table columns" );
// stick to the last imported table columns
- return maTableColumnsVector.empty() ? 0 : maTableColumnsVector.back().get();
+ return maTableColumnsVector.empty() ? nullptr : maTableColumnsVector.back().get();
}
} // namespace xls
diff --git a/sc/source/filter/oox/tablecolumnscontext.cxx b/sc/source/filter/oox/tablecolumnscontext.cxx
index 8ad4ea21caad..f3e64d9cbc63 100644
--- a/sc/source/filter/oox/tablecolumnscontext.cxx
+++ b/sc/source/filter/oox/tablecolumnscontext.cxx
@@ -36,7 +36,7 @@ TableColumnContext::TableColumnContext( WorksheetContextBase& rParent, TableColu
ContextHandlerRef TableColumnContext::onCreateContext( sal_Int32 /*nElement*/, const AttributeList& /*rAttribs*/ )
{
/* no known child elements */
- return 0;
+ return nullptr;
}
void TableColumnContext::onStartElement( const AttributeList& rAttribs )
@@ -47,7 +47,7 @@ void TableColumnContext::onStartElement( const AttributeList& rAttribs )
ContextHandlerRef TableColumnContext::onCreateRecordContext( sal_Int32 /*nRecId*/, SequenceInputStream& /*rStrm*/ )
{
/* no known child elements */
- return 0;
+ return nullptr;
}
void TableColumnContext::onStartRecord( SequenceInputStream& rStrm )
@@ -65,7 +65,7 @@ ContextHandlerRef TableColumnsContext::onCreateContext( sal_Int32 nElement, cons
{
if( (getCurrentElement() == XLS_TOKEN( tableColumns )) && (nElement == XLS_TOKEN( tableColumn )) )
return new TableColumnContext( *this, mrTableColumns.createTableColumn() );
- return 0;
+ return nullptr;
}
void TableColumnsContext::onStartElement( const AttributeList& rAttribs )
@@ -80,7 +80,7 @@ ContextHandlerRef TableColumnsContext::onCreateRecordContext( sal_Int32 /*nRecId
if( (getCurrentElement() == BIFF12_ID_TABLECOLUMNS) && (nRecId == BIFF12_ID_TABLECOLUMN) )
return new TableColumnContext( *this, mrTableColumns.createTableColumn() );
#endif
- return 0;
+ return nullptr;
}
void TableColumnsContext::onStartRecord( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/tablefragment.cxx b/sc/source/filter/oox/tablefragment.cxx
index b8f5d7d8d746..a9972494d1c7 100644
--- a/sc/source/filter/oox/tablefragment.cxx
+++ b/sc/source/filter/oox/tablefragment.cxx
@@ -57,7 +57,7 @@ ContextHandlerRef TableFragment::onCreateContext( sal_Int32 nElement, const Attr
}
break;
}
- return 0;
+ return nullptr;
}
ContextHandlerRef TableFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
@@ -76,7 +76,7 @@ ContextHandlerRef TableFragment::onCreateRecordContext( sal_Int32 nRecId, Sequen
return new AutoFilterContext( *this, mrTable.createAutoFilter() );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* TableFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index fbddd7433346..4bb9522dd21c 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -137,7 +137,7 @@ ContextHandlerRef WorkbookFragment::onCreateContext( sal_Int32 nElement, const A
if( nElement == XLS_TOKEN( pivotCache ) ) importPivotCache( rAttribs );
break;
}
- return 0;
+ return nullptr;
}
void WorkbookFragment::onCharacters( const OUString& rChars )
@@ -191,7 +191,7 @@ ContextHandlerRef WorkbookFragment::onCreateRecordContext( sal_Int32 nRecId, Seq
case BIFF12_ID_PIVOTCACHES:
if( nRecId == BIFF12_ID_PIVOTCACHE ) importPivotCache( rStrm );
}
- return 0;
+ return nullptr;
}
const RecordInfo* WorkbookFragment::getRecordInfos() const
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 4ccbd136c40e..27bee11b41c2 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -317,8 +317,8 @@ WorkbookGlobals::WorkbookGlobals( ExcelFilter& rFilter ) :
meFilterType( FILTER_OOXML ),
mpOoxFilter( &rFilter ),
meBiff( BIFF_UNKNOWN ),
- mpDoc(NULL),
- mpDocShell(NULL)
+ mpDoc(nullptr),
+ mpDocShell(nullptr)
{
// register at the filter, needed for virtual callbacks (even during construction)
mrExcelFilter.registerWorkbookGlobals( *this );
@@ -406,7 +406,7 @@ ScRangeData* WorkbookGlobals::createNamedRangeObject(
OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags )
{
// create the name and insert it into the Calc document
- ScRangeData* pScRangeData = NULL;
+ ScRangeData* pScRangeData = nullptr;
if( !orName.isEmpty() )
{
ScDocument& rDoc = getScDocument();
@@ -423,7 +423,7 @@ ScRangeData* WorkbookGlobals::createLocalNamedRangeObject(
OUString& orName, const Sequence< FormulaToken >& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab )
{
// create the name and insert it into the Calc document
- ScRangeData* pScRangeData = NULL;
+ ScRangeData* pScRangeData = nullptr;
if( !orName.isEmpty() )
{
ScDocument& rDoc = getScDocument();
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 97539e686044..cf783211b4d1 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -100,7 +100,7 @@ ContextHandlerRef DataValidationsContext::onCreateContext( sal_Int32 nElement, c
}
break;
}
- return 0;
+ return nullptr;
}
void DataValidationsContext::onCharacters( const OUString& rChars )
@@ -132,7 +132,7 @@ ContextHandlerRef DataValidationsContext::onCreateRecordContext( sal_Int32 nRecI
{
if( nRecId == BIFF12_ID_DATAVALIDATION )
importDataValidation( rStrm );
- return 0;
+ return nullptr;
}
void DataValidationsContext::importDataValidation( const AttributeList& rAttribs )
@@ -210,12 +210,12 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
{
case XML_ROOT_CONTEXT: switch( getSheetType() )
{
- case SHEETTYPE_WORKSHEET: return (nElement == XLS_TOKEN( worksheet )) ? this : 0;
- case SHEETTYPE_CHARTSHEET: return 0;
- case SHEETTYPE_MACROSHEET: return (nElement == XM_TOKEN( macrosheet )) ? this : 0;
- case SHEETTYPE_DIALOGSHEET: return (nElement == XLS_TOKEN( dialogsheet )) ? this : 0;
- case SHEETTYPE_MODULESHEET: return 0;
- case SHEETTYPE_EMPTYSHEET: return 0;
+ case SHEETTYPE_WORKSHEET: return (nElement == XLS_TOKEN( worksheet )) ? this : nullptr;
+ case SHEETTYPE_CHARTSHEET: return nullptr;
+ case SHEETTYPE_MACROSHEET: return (nElement == XM_TOKEN( macrosheet )) ? this : nullptr;
+ case SHEETTYPE_DIALOGSHEET: return (nElement == XLS_TOKEN( dialogsheet )) ? this : nullptr;
+ case SHEETTYPE_MODULESHEET: return nullptr;
+ case SHEETTYPE_EMPTYSHEET: return nullptr;
}
break;
@@ -335,7 +335,7 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
}
break;
}
- return 0;
+ return nullptr;
}
void WorksheetFragment::onCharacters( const OUString& rChars )
@@ -427,7 +427,7 @@ ContextHandlerRef WorksheetFragment::onCreateRecordContext( sal_Int32 nRecId, Se
if( nRecId == BIFF12_ID_CONTROL ) importControl( rStrm );
break;
}
- return 0;
+ return nullptr;
}
const RecordInfo* WorksheetFragment::getRecordInfos() const
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index be14ec89b8e0..334efb38c947 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -71,7 +71,7 @@ orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(const char
{
OUString aTabName(sheet_name, sheet_name_length, RTL_TEXTENCODING_UTF8);
if (!maDoc.appendSheet(aTabName))
- return NULL;
+ return nullptr;
SCTAB nTab = maDoc.getSheetCount() - 1;
maSheets.push_back(new ScOrcusSheet(maDoc, nTab, *this));
@@ -95,7 +95,7 @@ orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::get_sheet(const char* s
SCTAB nTab = maDoc.getSheetIndex(aTabName);
if (nTab < 0)
// Sheet by that name not found.
- return NULL;
+ return nullptr;
// See if we already have an orcus sheet instance by that index.
boost::ptr_vector<ScOrcusSheet>::iterator it =
@@ -461,7 +461,7 @@ void ScOrcusSheet::cellInserted()
os::iface::import_table* ScOrcusSheet::get_table()
{
- return NULL;
+ return nullptr;
}
os::iface::import_sheet_properties* ScOrcusSheet::get_sheet_properties()
diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
index 284d7cc8b0f1..d0412b25c111 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -203,7 +203,7 @@ bool ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM
// Root element.
orcus::xml_structure_tree::element aElem = aWalker.root();
- populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, NULL, rParam);
+ populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, nullptr, rParam);
}
catch (const std::exception&)
{
@@ -244,7 +244,7 @@ bool ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
const char* path = aSysPath.getStr();
try
{
- orcus::orcus_xml filter(maNsRepo, &aFactory, NULL);
+ orcus::orcus_xml filter(maNsRepo, &aFactory, nullptr);
// Define all used namespaces.
std::for_each(rParam.maNamespaces.begin(), rParam.maNamespaces.end(), SetNamespaceAlias(filter, maNsRepo));
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 95e4db36549f..770aa6e8d9f6 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -189,7 +189,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
FUNC_TYPE eType;
DefTokenId eOc;
double nFloatArray[ nBufSize ] = {0};
- const sal_Char* pExtString = 0;
+ const sal_Char* pExtString = nullptr;
aCRD.InitFlags();
aSRD.InitFlags();
@@ -255,37 +255,37 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
break;
case FT_FuncFix0:
- DoFunc( eOc, 0, NULL );
+ DoFunc( eOc, 0, nullptr );
break;
case FT_FuncFix1:
- DoFunc( eOc, 1, NULL );
+ DoFunc( eOc, 1, nullptr );
break;
case FT_FuncFix2:
- DoFunc( eOc, 2, NULL );
+ DoFunc( eOc, 2, nullptr );
break;
case FT_FuncFix3:
- DoFunc( eOc, 3, NULL );
+ DoFunc( eOc, 3, nullptr );
break;
case FT_FuncFix4:
- DoFunc( eOc, 4, NULL );
+ DoFunc( eOc, 4, nullptr );
break;
case FT_FuncFix5:
- DoFunc( eOc, 5, NULL );
+ DoFunc( eOc, 5, nullptr );
break;
case FT_FuncFix6:
- DoFunc( eOc, 6, NULL );
+ DoFunc( eOc, 6, nullptr );
break;
case FT_DLL:{
eOc = IndexToDLLId( nDLLArray[ nDLLCount ] );
sal_uInt8 nPar = nArgArray[ nArgCount ];
- DoFunc( eOc, nPar, NULL );
+ DoFunc( eOc, nPar, nullptr );
nDLLCount++;
nArgCount++;
}
@@ -313,7 +313,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
sal_uInt8 nArgs;
i++;
nArgs = nFmla[ i ];
- DoFunc( eOc, nArgs, NULL );
+ DoFunc( eOc, nArgs, nullptr );
}
break;
@@ -633,7 +633,7 @@ DefTokenId QProToSc::IndexToDLLId( sal_uInt16 nIndex )
const sal_Char* QProToSc::getString( sal_uInt8 nIndex )
{
- const sal_Char* pExtString = 0;
+ const sal_Char* pExtString = nullptr;
switch( nIndex )
{
case 57:
@@ -717,7 +717,7 @@ const sal_Char* QProToSc::getString( sal_uInt8 nIndex )
break;
default:
- pExtString = NULL;
+ pExtString = nullptr;
break;
}
return pExtString;
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index d988d365dbe8..2b91ff2ad5ac 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -61,7 +61,7 @@
ScEEImport::ScEEImport( ScDocument* pDocP, const ScRange& rRange ) :
maRange( rRange ),
mpDoc( pDocP ),
- mpParser( NULL )
+ mpParser( nullptr )
{
const ScPatternAttr* pPattern = mpDoc->GetPattern(
maRange.aStart.Col(), maRange.aStart.Row(), maRange.aStart.Tab() );
@@ -174,7 +174,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
bool bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara );
for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState = aSet.GetItemState( nId, true, &pItem );
if (eState == SfxItemState::DONTCARE)
bSimple = false;
@@ -242,18 +242,18 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
// HTML LATIN/CJK/CTL script type dependent
const SfxPoolItem* pFont;
if ( rESet.GetItemState( ATTR_FONT, false, &pFont) != SfxItemState::SET )
- pFont = 0;
+ pFont = nullptr;
const SfxPoolItem* pHeight;
if ( rESet.GetItemState( ATTR_FONT_HEIGHT, false, &pHeight) != SfxItemState::SET )
- pHeight = 0;
+ pHeight = nullptr;
const SfxPoolItem* pWeight;
if ( rESet.GetItemState( ATTR_FONT_WEIGHT, false, &pWeight) != SfxItemState::SET )
- pWeight = 0;
+ pWeight = nullptr;
const SfxPoolItem* pPosture;
if ( rESet.GetItemState( ATTR_FONT_POSTURE, false, &pPosture) != SfxItemState::SET )
- pPosture = 0;
+ pPosture = nullptr;
// Number format
- const SfxPoolItem* pNumFmt = NULL;
+ const SfxPoolItem* pNumFmt = nullptr;
if ( rESet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SfxItemState::SET )
rSet.Put(*pNumFmt);
if ( pFont || pHeight || pWeight || pPosture )
@@ -342,7 +342,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
bool bTextFormat = false;
- const SfxPoolItem* pNumFmt = NULL;
+ const SfxPoolItem* pNumFmt = nullptr;
if (rSet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SfxItemState::SET)
{
sal_uInt32 nNumFmt = static_cast<const SfxUInt32Item*>(pNumFmt)->GetValue();
@@ -610,7 +610,7 @@ ScEEParser::ScEEParser( EditEngine* pEditP ) :
// pPool is foisted on SvxRTFParser at RTFIMP_START later on
pPool->SetSecondaryPool( pDocPool );
pPool->FreezeIdRanges();
- NewActEntry( NULL );
+ NewActEntry( nullptr );
}
ScEEParser::~ScEEParser()
@@ -623,7 +623,7 @@ ScEEParser::~ScEEParser()
}
// Don't delete Pool until the lists have been deleted
- pPool->SetSecondaryPool( NULL );
+ pPool->SetSecondaryPool( nullptr );
SfxItemPool::Free(pDocPool);
SfxItemPool::Free(pPool);
}
diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx
index acfee57d5389..c9dc1c340fbe 100644
--- a/sc/source/filter/rtf/expbase.cxx
+++ b/sc/source/filter/rtf/expbase.cxx
@@ -28,7 +28,7 @@ ScExportBase::ScExportBase( SvStream& rStrmP, ScDocument* pDocP,
aRange( rRangeP ),
pDoc( pDocP ),
pFormatter( pDocP->GetFormatTable() ),
- pEditEngine( NULL )
+ pEditEngine( nullptr )
{
}
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index f36f24109de8..96e000d17cb2 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -128,7 +128,7 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow )
case SVX_VER_JUSTIFY_CENTER: pChar = OOO_STRING_SVTOOLS_RTF_CLVERTALC; break;
case SVX_VER_JUSTIFY_BOTTOM: pChar = OOO_STRING_SVTOOLS_RTF_CLVERTALB; break;
case SVX_VER_JUSTIFY_STANDARD: pChar = OOO_STRING_SVTOOLS_RTF_CLVERTALB; break; //! Bottom
- default: pChar = NULL; break;
+ default: pChar = nullptr; break;
}
if ( pChar )
rStrm.WriteCharPtr( pChar );
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 729a8fffce12..1fa1dbd635c4 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -36,8 +36,8 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
ScEEParser( pEditP ),
mnCurPos(0),
pColTwips( new ScRTFColTwips ),
- pActDefault( NULL ),
- pDefMerge( NULL ),
+ pActDefault( nullptr ),
+ pDefMerge( nullptr ),
nStartAdjust( (sal_uLong)~0 ),
nLastWidth(0),
bNewDef( false )
@@ -177,7 +177,7 @@ IMPL_LINK_TYPED( ScRTFParser, RTFImportHdl, ImportInfo&, rInfo, void )
case RTFIMP_END:
if ( rInfo.aSelection.nEndPos )
{ // If still text: create last paragraph
- pActDefault = NULL;
+ pActDefault = nullptr;
rInfo.nToken = RTF_PAR;
// EditEngine did not attach an empty paragraph anymore
// which EntryEnd could strip
@@ -230,8 +230,8 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
pColTwips->insert( rD.nTwips );
}
}
- pDefMerge = NULL;
- pActDefault = maDefaultList.empty() ? NULL : &maDefaultList[0];
+ pDefMerge = nullptr;
+ pActDefault = maDefaultList.empty() ? nullptr : &maDefaultList[0];
mnCurPos = 0;
OSL_ENSURE( pActDefault, "NewCellRow: pActDefault==0" );
}
@@ -274,7 +274,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
nColCnt = 0;
maDefaultList.clear();
- pDefMerge = NULL;
+ pDefMerge = nullptr;
nLastToken = pInfo->nToken;
mnCurPos = 0;
}
@@ -357,7 +357,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
pActEntry->aSel.nStartPara = pInfo->aSelection.nEndPara - 1;
}
- pActDefault = NULL;
+ pActDefault = nullptr;
if (!maDefaultList.empty() && (mnCurPos+1) < maDefaultList.size())
pActDefault = &maDefaultList[++mnCurPos];
diff --git a/sc/source/filter/starcalc/collect.cxx b/sc/source/filter/starcalc/collect.cxx
index dcc20858b474..dbb4c10f63a2 100644
--- a/sc/source/filter/starcalc/collect.cxx
+++ b/sc/source/filter/starcalc/collect.cxx
@@ -43,7 +43,7 @@ ScCollection::ScCollection(sal_uInt16 nLim, sal_uInt16 nDel) :
nCount ( 0 ),
nLimit ( nLim ),
nDelta ( nDel ),
- pItems ( NULL )
+ pItems ( nullptr )
{
if (nDelta > MAXDELTA)
nDelta = MAXDELTA;
@@ -61,7 +61,7 @@ ScCollection::ScCollection(const ScCollection& rCollection)
nCount ( 0 ),
nLimit ( 0 ),
nDelta ( 0 ),
- pItems ( NULL )
+ pItems ( nullptr )
{
*this = rCollection;
}
@@ -104,7 +104,7 @@ ScDataObject* ScCollection::At(sal_uInt16 nIndex) const
if (nIndex < nCount)
return pItems[nIndex];
else
- return NULL;
+ return nullptr;
}
ScCollection& ScCollection::operator=( const ScCollection& r )
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 683445c8c4cd..7d3a56e77e64 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -875,8 +875,8 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
// Area-Parameter:
{
- ScRange* pRepeatRow = NULL;
- ScRange* pRepeatCol = NULL;
+ ScRange* pRepeatRow = nullptr;
+ ScRange* pRepeatCol = nullptr;
if ( pPage->ColRepeatStart >= 0 )
pRepeatCol = new ScRange( static_cast<SCCOL> (pPage->ColRepeatStart), 0, 0 );
@@ -928,14 +928,14 @@ ScDataObject* Sc10PageData::Clone() const
Sc10Import::Sc10Import(SvStream& rStr, ScDocument* pDocument ) :
rStream (rStr),
pDoc (pDocument),
- pFontCollection (NULL),
- pNameCollection (NULL),
- pPatternCollection (NULL),
- pDataBaseCollection (NULL),
+ pFontCollection (nullptr),
+ pNameCollection (nullptr),
+ pPatternCollection (nullptr),
+ pDataBaseCollection (nullptr),
nError (0),
nShowTab (0)
{
- pPrgrsBar = NULL;
+ pPrgrsBar = nullptr;
}
Sc10Import::~Sc10Import()
@@ -948,7 +948,7 @@ Sc10Import::~Sc10Import()
delete pPatternCollection;
delete pDataBaseCollection;
- OSL_ENSURE( pPrgrsBar == NULL,
+ OSL_ENSURE( pPrgrsBar == nullptr,
"*Sc10Import::Sc10Import(): Progressbar lebt noch!?" );
}
@@ -987,7 +987,7 @@ sal_uLong Sc10Import::Import()
delete pPrgrsBar;
#if OSL_DEBUG_LEVEL > 0
- pPrgrsBar = NULL;
+ pPrgrsBar = nullptr;
#endif
return nError;
@@ -1110,7 +1110,7 @@ void Sc10Import::LoadPatternCollection()
Sc10PatternData* pPattern = pPatternCollection->At( i );
OUString aName( pPattern->Name, strlen(pPattern->Name), DEFCHARSET );
SfxStyleSheetBase* pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
- if( pStyle == NULL )
+ if( pStyle == nullptr )
pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
else
{
@@ -1120,7 +1120,7 @@ void Sc10Import::LoadPatternCollection()
pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
}
pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
- if( pStyle != NULL )
+ if( pStyle != nullptr )
{
SfxItemSet &rItemSet = pStyle->GetItemSet();
// Font
@@ -2111,12 +2111,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
sal_uInt16 nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1;
Sc10PatternData* pPattern = pPatternCollection->At(nPatternIndex);
- if (pPattern != NULL)
+ if (pPattern != nullptr)
{
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStylePool->Find(
SC10TOSTRING( pPattern->Name ), SFX_STYLE_FAMILY_PARA) );
- if (pStyle != NULL)
+ if (pStyle != nullptr)
pDoc->ApplyStyleAreaTab(Col, nStart, Col, nEnd, Tab, *pStyle);
}
}
@@ -2137,7 +2137,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr)
return;
rAttr.pData = new (::std::nothrow) Sc10ColData[rAttr.Count];
- if (rAttr.pData == NULL)
+ if (rAttr.pData == nullptr)
{
nError = errOutOfMemory;
rAttr.Count = 0;
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 970459fe6dc4..bc23c549488b 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -81,7 +81,7 @@ static void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rStri
static inline void lcl_GenerateGUID( sal_uInt8* pGUID, bool& rValidGUID )
{
- rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, false );
+ rtl_createUuid( pGUID, rValidGUID ? pGUID : nullptr, false );
rValidGUID = true;
}
@@ -350,17 +350,17 @@ void XclExpChTrHeader::SaveXml( XclExpXmlStream& rRevisionHeadersStrm )
sax_fastparser::FSHelperPtr pHeaders = rRevisionHeadersStrm.GetCurrentStream();
rRevisionHeadersStrm.WriteAttributes(
XML_guid, lcl_GuidToOString( aGUID ).getStr(),
- XML_lastGuid, NULL, // OOXTODO
- XML_shared, NULL, // OOXTODO
- XML_diskRevisions, NULL, // OOXTODO
- XML_history, NULL, // OOXTODO
- XML_trackRevisions, NULL, // OOXTODO
- XML_exclusive, NULL, // OOXTODO
- XML_revisionId, NULL, // OOXTODO
- XML_version, NULL, // OOXTODO
- XML_keepChangeHistory, NULL, // OOXTODO
- XML_protected, NULL, // OOXTODO
- XML_preserveHistory, NULL, // OOXTODO
+ XML_lastGuid, nullptr, // OOXTODO
+ XML_shared, nullptr, // OOXTODO
+ XML_diskRevisions, nullptr, // OOXTODO
+ XML_history, nullptr, // OOXTODO
+ XML_trackRevisions, nullptr, // OOXTODO
+ XML_exclusive, nullptr, // OOXTODO
+ XML_revisionId, nullptr, // OOXTODO
+ XML_version, nullptr, // OOXTODO
+ XML_keepChangeHistory, nullptr, // OOXTODO
+ XML_protected, nullptr, // OOXTODO
+ XML_preserveHistory, nullptr, // OOXTODO
FSEND );
pHeaders->write( ">" );
}
@@ -380,17 +380,17 @@ void XclExpXmlChTrHeaders::SaveXml( XclExpXmlStream& rStrm )
XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
XML_guid, lcl_GuidToOString(maGUID).getStr(),
- XML_lastGuid, NULL, // OOXTODO
- XML_shared, NULL, // OOXTODO
- XML_diskRevisions, NULL, // OOXTODO
- XML_history, NULL, // OOXTODO
- XML_trackRevisions, NULL, // OOXTODO
- XML_exclusive, NULL, // OOXTODO
- XML_revisionId, NULL, // OOXTODO
- XML_version, NULL, // OOXTODO
- XML_keepChangeHistory, NULL, // OOXTODO
- XML_protected, NULL, // OOXTODO
- XML_preserveHistory, NULL, // OOXTODO
+ XML_lastGuid, nullptr, // OOXTODO
+ XML_shared, nullptr, // OOXTODO
+ XML_diskRevisions, nullptr, // OOXTODO
+ XML_history, nullptr, // OOXTODO
+ XML_trackRevisions, nullptr, // OOXTODO
+ XML_exclusive, nullptr, // OOXTODO
+ XML_revisionId, nullptr, // OOXTODO
+ XML_version, nullptr, // OOXTODO
+ XML_keepChangeHistory, nullptr, // OOXTODO
+ XML_protected, nullptr, // OOXTODO
+ XML_preserveHistory, nullptr, // OOXTODO
FSEND);
pHeaders->write(">");
@@ -419,7 +419,7 @@ void XclExpXmlChTrHeader::SaveXml( XclExpXmlStream& rStrm )
OUString aRelId;
sax_fastparser::FSHelperPtr pRevLogStrm = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName("xl/revisions/", "revisionLog", mnLogNumber),
- XclXmlUtils::GetStreamName(NULL, "revisionLog", mnLogNumber),
+ XclXmlUtils::GetStreamName(nullptr, "revisionLog", mnLogNumber),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml",
CREATE_OFFICEDOC_RELATION_TYPE("revisionLog"),
@@ -654,7 +654,7 @@ XclExpChTrAction::XclExpChTrAction( const XclExpChTrAction& rCopy ) :
sUsername( rCopy.sUsername ),
aDateTime( rCopy.aDateTime ),
nIndex( 0 ),
- pAddAction( 0 ),
+ pAddAction( nullptr ),
bAccepted( rCopy.bAccepted ),
rTabInfo( rCopy.rTabInfo ),
rIdBuffer( rCopy.rIdBuffer ),
@@ -672,7 +672,7 @@ XclExpChTrAction::XclExpChTrAction(
sUsername( rAction.GetUser() ),
aDateTime( rAction.GetDateTime() ),
nIndex( 0 ),
- pAddAction( NULL ),
+ pAddAction( nullptr ),
bAccepted( rAction.IsAccepted() ),
rTabInfo( rRoot.GetTabInfo() ),
rIdBuffer( rTabIdBuffer ),
@@ -750,8 +750,8 @@ sal_Size XclExpChTrAction::GetLen() const
}
XclExpChTrData::XclExpChTrData() :
- pString( NULL ),
- mpFormulaCell( NULL ),
+ pString( nullptr ),
+ mpFormulaCell( nullptr ),
fValue( 0.0 ),
nRKValue( 0 ),
nType( EXC_CHTR_TYPE_EMPTY ),
@@ -767,7 +767,7 @@ XclExpChTrData::~XclExpChTrData()
void XclExpChTrData::Clear()
{
DELETEZ( pString );
- mpFormulaCell = NULL;
+ mpFormulaCell = nullptr;
mxTokArr.reset();
maRefLog.clear();
fValue = 0.0;
@@ -829,8 +829,8 @@ XclExpChTrCellContent::XclExpChTrCellContent(
const XclExpChTrTabIdBuffer& rTabIdBuffer ) :
XclExpChTrAction( rAction, rRoot, rTabIdBuffer, EXC_CHTR_OP_CELL ),
XclExpRoot( rRoot ),
- pOldData( 0 ),
- pNewData( 0 ),
+ pOldData( nullptr ),
+ pNewData( nullptr ),
aPosition( rAction.GetBigRange().MakeRange().aStart )
{
sal_uInt32 nDummy32;
@@ -864,7 +864,7 @@ void XclExpChTrCellContent::GetCellData(
if (rScCell.isEmpty())
{
delete rpData;
- rpData = NULL;
+ rpData = nullptr;
return;
}
@@ -897,7 +897,7 @@ void XclExpChTrCellContent::GetCellData(
{
sCellStr = rScCell.mpString->getString();
rpData->mpFormattedString = XclExpStringHelper::CreateCellString(
- rRoot, sCellStr, NULL);
+ rRoot, sCellStr, nullptr);
}
else
{
@@ -906,12 +906,12 @@ void XclExpChTrCellContent::GetCellData(
{
sCellStr = ScEditUtil::GetString(*rScCell.mpEditText, &GetDoc());
rpData->mpFormattedString = XclExpStringHelper::CreateCellString(
- rRoot, *rScCell.mpEditText, NULL, aLinkHelper);
+ rRoot, *rScCell.mpEditText, nullptr, aLinkHelper);
}
else
{
rpData->mpFormattedString = XclExpStringHelper::CreateCellString(
- rRoot, EMPTY_OUSTRING, NULL);
+ rRoot, EMPTY_OUSTRING, nullptr);
}
}
rpData->pString = new XclExpString( sCellStr, EXC_STR_DEFAULT, 32766 );
@@ -1013,11 +1013,11 @@ static void lcl_WriteCell( XclExpXmlStream& rStrm, sal_Int32 nElement, const ScA
pStream->startElement( nElement,
XML_r, XclXmlUtils::ToOString( rPosition ).getStr(),
- XML_s, NULL, // OOXTODO: not supported
+ XML_s, nullptr, // OOXTODO: not supported
XML_t, lcl_GetType( pData ),
- XML_cm, NULL, // OOXTODO: not supported
- XML_vm, NULL, // OOXTODO: not supported
- XML_ph, NULL, // OOXTODO: not supported
+ XML_cm, nullptr, // OOXTODO: not supported
+ XML_vm, nullptr, // OOXTODO: not supported
+ XML_ph, nullptr, // OOXTODO: not supported
FSEND );
switch( pData->nType )
{
@@ -1057,18 +1057,18 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
pStream->startElement( XML_rcc,
XML_rId, OString::number( GetActionNumber() ).getStr(),
XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
- XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
XML_sId, OString::number( GetTabId( aPosition.Tab() ) ).getStr(),
- XML_odxf, NULL, // OOXTODO: not supported
- XML_xfDxf, NULL, // OOXTODO: not supported
- XML_s, NULL, // OOXTODO: not supported
- XML_dxf, NULL, // OOXTODO: not supported
- XML_numFmtId, NULL, // OOXTODO: not supported
- XML_quotePrefix, NULL, // OOXTODO: not supported
- XML_oldQuotePrefix, NULL, // OOXTODO: not supported
- XML_ph, NULL, // OOXTODO: not supported
- XML_oldPh, NULL, // OOXTODO: not supported
- XML_endOfListFormulaUpdate, NULL, // OOXTODO: not supported
+ XML_odxf, nullptr, // OOXTODO: not supported
+ XML_xfDxf, nullptr, // OOXTODO: not supported
+ XML_s, nullptr, // OOXTODO: not supported
+ XML_dxf, nullptr, // OOXTODO: not supported
+ XML_numFmtId, nullptr, // OOXTODO: not supported
+ XML_quotePrefix, nullptr, // OOXTODO: not supported
+ XML_oldQuotePrefix, nullptr, // OOXTODO: not supported
+ XML_ph, nullptr, // OOXTODO: not supported
+ XML_oldPh, nullptr, // OOXTODO: not supported
+ XML_endOfListFormulaUpdate, nullptr, // OOXTODO: not supported
FSEND );
if( pOldData )
{
@@ -1190,17 +1190,17 @@ void XclExpChTrInsert::SaveXml( XclExpXmlStream& rRevisionLogStrm )
pStream->startElement( XML_rrc,
XML_rId, OString::number( GetActionNumber() ).getStr(),
XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
- XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
XML_sId, OString::number( GetTabId( aRange.aStart.Tab() ) ).getStr(),
XML_eol, XclXmlUtils::ToPsz10(mbEndOfList),
XML_ref, XclXmlUtils::ToOString( aRange ).getStr(),
XML_action, lcl_GetAction( nOpCode ),
- XML_edge, NULL, // OOXTODO: ???
+ XML_edge, nullptr, // OOXTODO: ???
FSEND );
// OOXTODO: does this handle XML_rfmt, XML_undo?
XclExpChTrAction* pAction = GetAddAction();
- while( pAction != NULL )
+ while( pAction != nullptr )
{
pAction->SaveXml( rRevisionLogStrm );
pAction = pAction->GetAddAction();
@@ -1249,7 +1249,7 @@ void XclExpChTrInsertTab::SaveXml( XclExpXmlStream& rStrm )
pStream->singleElement( XML_ris,
XML_rId, OString::number( GetActionNumber() ).getStr(),
XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
- XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
XML_sheetId, OString::number( GetTabId( nTab ) ).getStr(),
XML_name, XclXmlUtils::ToOString( GetTabInfo().GetScTabName( nTab ) ).getStr(),
XML_sheetPosition, OString::number( nTab ).getStr(),
@@ -1317,7 +1317,7 @@ void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm )
pStream->startElement( XML_rm,
XML_rId, OString::number( GetActionNumber() ).getStr(),
XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
- XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
XML_sheetId, OString::number( GetTabId( aDestRange.aStart.Tab() ) ).getStr(),
XML_source, XclXmlUtils::ToOString( aSourceRange ).getStr(),
XML_destination, XclXmlUtils::ToOString( aDestRange ).getStr(),
@@ -1325,7 +1325,7 @@ void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm )
FSEND );
// OOXTODO: does this handle XML_rfmt, XML_undo?
XclExpChTrAction* pAction = GetAddAction();
- while( pAction != NULL )
+ while( pAction != nullptr )
{
pAction->SaveXml( rRevisionLogStrm );
pAction = pAction->GetAddAction();
@@ -1368,11 +1368,11 @@ void XclExpChTr0x014A::SaveXml( XclExpXmlStream& rStrm )
pStream->startElement( XML_rfmt,
XML_sheetId, OString::number( GetTabId( aRange.aStart.Tab() ) ).getStr(),
- XML_xfDxf, NULL, // OOXTODO: not supported
- XML_s, NULL, // OOXTODO: style
+ XML_xfDxf, nullptr, // OOXTODO: not supported
+ XML_s, nullptr, // OOXTODO: style
XML_sqref, XclXmlUtils::ToOString( aRange ).getStr(),
- XML_start, NULL, // OOXTODO: for string changes
- XML_length, NULL, // OOXTODO: for string changes
+ XML_start, nullptr, // OOXTODO: for string changes
+ XML_length, nullptr, // OOXTODO: for string changes
FSEND );
// OOXTODO: XML_dxf, XML_extLst
@@ -1411,9 +1411,9 @@ void EndXmlElement::SaveXml( XclExpXmlStream& rStrm )
XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
aActionStack(),
- pTabIdBuffer( NULL ),
- pTempDoc( NULL ),
- pHeader( NULL ),
+ pTabIdBuffer( nullptr ),
+ pTempDoc( nullptr ),
+ pHeader( nullptr ),
bValidGUID( false )
{
OSL_ENSURE( GetOldRoot().pTabId, "XclExpChangeTrack::XclExpChangeTrack - root data incomplete" );
@@ -1496,7 +1496,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
DateTime aLastDateTime(DateTime::EMPTY);
sal_uInt32 nIndex = 1;
sal_Int32 nLogNumber = 1;
- XclExpXmlChTrHeader* pCurHeader = NULL;
+ XclExpXmlChTrHeader* pCurHeader = nullptr;
while (!aActionStack.empty())
{
@@ -1542,7 +1542,7 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack()
ScChangeTrack* pOrigChangeTrack = GetDoc().GetChangeTrack();
OSL_ENSURE( pOrigChangeTrack, "XclExpChangeTrack::CreateTempChangeTrack - no change track data" );
if( !pOrigChangeTrack )
- return NULL;
+ return nullptr;
// create empty document
pTempDoc = new ScDocument;
@@ -1558,14 +1558,14 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack()
OSL_ENSURE( nOrigCount == pTempDoc->GetTableCount(),
"XclExpChangeTrack::CreateTempChangeTrack - table count mismatch" );
if( nOrigCount != pTempDoc->GetTableCount() )
- return NULL;
+ return nullptr;
return pOrigChangeTrack->Clone(pTempDoc);
}
void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
{
- XclExpChTrAction* pXclAction = NULL;
+ XclExpChTrAction* pXclAction = nullptr;
ScChangeTrack* pTempChangeTrack = pTempDoc->GetChangeTrack();
switch( rAction.GetType() )
{
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 06c41e0bd473..75da05a11f29 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -35,8 +35,8 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
XclImpRoot( rRoot ),
aRecHeader(),
sOldUsername(),
- pChangeTrack( NULL ),
- pStrm( NULL ),
+ pChangeTrack( nullptr ),
+ pStrm( nullptr ),
nTabIdCount( 0 ),
bGlobExit( false ),
eNestedMode( nmBase )
@@ -104,7 +104,7 @@ void XclImpChangeTrack::DoInsertRange( const ScRange& rRange, bool bEndOfList )
void XclImpChangeTrack::DoDeleteRange( const ScRange& rRange )
{
sal_uLong nFirst, nLast;
- pChangeTrack->AppendDeleteRange( rRange, NULL, nFirst, nLast );
+ pChangeTrack->AppendDeleteRange( rRange, nullptr, nFirst, nLast );
DoAcceptRejectAction( nFirst, nLast );
}
@@ -199,7 +199,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres
// assume that this part is broken
if(nRead != nFmlSize)
{
- rpTokenArray = NULL;
+ rpTokenArray = nullptr;
pStrm->Ignore(1);
return;
}
@@ -209,10 +209,10 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres
XclImpChTrFmlConverter aFmlConv( GetRoot(), *this );
// read the formula, 3D tab refs from extended data
- const ScTokenArray* pArray = NULL;
+ const ScTokenArray* pArray = nullptr;
aFmlConv.Reset( rPosition );
bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false ) == ConvOK); // JEG : Check This
- rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : NULL;
+ rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : nullptr;
pStrm->Ignore( 1 );
}
@@ -268,7 +268,7 @@ void XclImpChangeTrack::ReadCell(
break;
case EXC_CHTR_TYPE_FORMULA:
{
- ScTokenArray* pTokenArray = NULL;
+ ScTokenArray* pTokenArray = nullptr;
ReadFormula( pTokenArray, rPosition );
if( pStrm->IsValid() && pTokenArray )
{
@@ -416,7 +416,7 @@ void XclImpChangeTrack::ReadChTrMoveRange()
if( bValid )
{
- pChangeTrack->AppendMove( aSourceRange, aDestRange, NULL );
+ pChangeTrack->AppendMove( aSourceRange, aDestRange, nullptr );
DoAcceptRejectAction( pChangeTrack->GetLast() );
}
}
@@ -492,7 +492,7 @@ void XclImpChangeTrack::Apply()
pChangeTrack->SetUseFixDateTime( false );
GetDoc().SetChangeTrack( pChangeTrack );
- pChangeTrack = NULL;
+ pChangeTrack = nullptr;
ScChangeViewSettings aSettings;
aSettings.SetShowChanges( true );
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index f71f2f639fa8..0297cbfb07a0 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -96,13 +96,13 @@ XclEscherEx::XclEscherEx( const XclExpRoot& rRoot, XclExpObjectManager& rObjMgr,
EscherEx( pParent ? pParent->mxGlobal : EscherExGlobalRef( new XclEscherExGlobal( rRoot ) ), &rStrm ),
XclExpRoot( rRoot ),
mrObjMgr( rObjMgr ),
- pCurrXclObj( NULL ),
- pCurrAppData( NULL ),
+ pCurrXclObj( nullptr ),
+ pCurrAppData( nullptr ),
pTheClientData( new XclEscherClientData ),
- pAdditionalText( NULL ),
+ pAdditionalText( nullptr ),
nAdditionalText( 0 ),
mnNextKey( 0 ),
- mbIsRootDff( pParent == 0 )
+ mbIsRootDff( pParent == nullptr )
{
InsertPersistOffset( mnNextKey, 0 );
}
@@ -191,7 +191,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
{
if ( nAdditionalText )
nAdditionalText++;
- bool bInGroup = ( pCurrXclObj != NULL );
+ bool bInGroup = ( pCurrXclObj != nullptr );
if ( bInGroup )
{ // stacked recursive group object
if ( !pCurrAppData->IsStackedGroup() )
@@ -209,7 +209,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDocRef() ); // just what is it?!?
else
{
- pCurrXclObj = NULL;
+ pCurrXclObj = nullptr;
sal_uInt16 nObjType = pObj->GetObjIdentifier();
if( nObjType == OBJ_OLE2 )
@@ -225,7 +225,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
if ( SotExchange::IsChart( aObjClsId ) )
{ // yes, it's a chart diagram
mrObjMgr.AddObj( new XclExpChartObj( mrObjMgr, rxShape, pChildAnchor ) );
- pCurrXclObj = NULL; // no metafile or whatsoever
+ pCurrXclObj = nullptr; // no metafile or whatsoever
}
else // metafile and OLE object
pCurrXclObj = new XclObjOle( mrObjMgr, *pObj );
@@ -269,7 +269,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
{
if ( !mrObjMgr.AddObj( pCurrXclObj ) )
{ // maximum count reached, object got deleted
- pCurrXclObj = NULL;
+ pCurrXclObj = nullptr;
}
else
{
@@ -358,7 +358,7 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID )
XclObj* pLastObj = mrObjMgr.RemoveLastObj();
OSL_ENSURE( pLastObj == pCurrXclObj, "XclEscherEx::EndShape - wrong object" );
DELETEZ( pLastObj );
- pCurrXclObj = 0;
+ pCurrXclObj = nullptr;
}
if( pCurrXclObj )
@@ -378,8 +378,8 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID )
DeleteCurrAppData();
if (aStack.empty())
{
- pCurrXclObj = NULL;
- pCurrAppData = NULL;
+ pCurrXclObj = nullptr;
+ pCurrAppData = nullptr;
}
else
{
@@ -395,7 +395,7 @@ EscherExHostAppData* XclEscherEx::EnterAdditionalTextGroup()
{
nAdditionalText = 1;
pAdditionalText = static_cast<XclEscherClientTextbox*>( pCurrAppData->GetClientTextbox() );
- pCurrAppData->SetClientTextbox( NULL );
+ pCurrAppData->SetClientTextbox( nullptr );
return pCurrAppData;
}
@@ -425,7 +425,7 @@ std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< X
// writes from xCtrlModel into mxCtlsStrm, raw class name returned in aClassName
Reference< XOutputStream > xOut( new utl::OSeekableOutputStreamWrapper( *mxCtlsStrm ) );
- Reference< css::frame::XModel > xModel( GetDocShell() ? GetDocShell()->GetModel() : NULL );
+ Reference< css::frame::XModel > xModel( GetDocShell() ? GetDocShell()->GetModel() : nullptr );
if( xModel.is() && xOut.is() && oox::ole::MSConvertOCXControls::WriteOCXExcelKludgeStream( xModel, xOut, xCtrlModel, xShape->getSize(), aClassName ) )
{
sal_uInt32 nStrmSize = static_cast< sal_uInt32 >( mxCtlsStrm->Tell() - nStrmStart );
@@ -552,7 +552,7 @@ ShapeInteractionHelper::PopulateShapeInteractionInfo( XclExpObjectManager& rObjM
{
try
{
- SvMemoryStream* pMemStrm = NULL;
+ SvMemoryStream* pMemStrm = nullptr;
OUString sHyperLink;
OUString sMacro;
if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( ::GetSdrObjectFromXShape( xShape ) ) )
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 31acde1a86dd..5a76ae87ef27 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -99,7 +99,7 @@ XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx )
XclExpRoot( rRoot ),
mnScTab( rRoot.GetCurrScTab() ),
mrEscherEx( rEscherEx ),
- pSolverContainer( 0 )
+ pSolverContainer( nullptr )
{
pMsodrawingPerSheet = new XclExpMsoDrawing( rEscherEx );
// open the DGCONTAINER and the patriarch group shape
@@ -342,8 +342,8 @@ void XclExpObjList::ResetCounters()
XclObj::XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool bOwnEscher ) :
XclExpRecord( EXC_ID_OBJ, 26 ),
mrEscherEx( rObjMgr.GetEscherEx() ),
- pClientTextbox( NULL ),
- pTxo( NULL ),
+ pClientTextbox( nullptr ),
+ pTxo( nullptr ),
mnObjType( nObjType ),
nObjId(0),
nGrbit( 0x6011 ), // AutoLine, AutoFill, Printable, Locked
@@ -799,7 +799,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje
if( !aParaText.isEmpty() )
{
SfxItemSet aSet( rEditObj.GetParaAttribs( 0));
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( aSet.GetItemState( EE_PARA_JUST, true, &pItem ) == SfxItemState::SET )
{
SvxAdjust eEEAlign = static_cast< const SvxAdjustItem& >( *pItem ).GetAdjust();
@@ -1164,7 +1164,7 @@ void XclObjAny::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
- ShapeExport aDML( XML_xdr, pDrawing, NULL, &rStrm, DrawingML::DOCUMENT_XLSX );
+ ShapeExport aDML( XML_xdr, pDrawing, nullptr, &rStrm, DrawingML::DOCUMENT_XLSX );
std::shared_ptr<oox::drawingml::URLTransformer> pURLTransformer(new ScURLTransformer(*mpDoc));
aDML.SetURLTranslator(pURLTransformer);
@@ -1250,7 +1250,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm )
OUString sId;
rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName( "xl/", "worksheets/sheet", nTab+1),
- XclXmlUtils::GetStreamName( NULL, "worksheets/sheet", nTab+1),
+ XclXmlUtils::GetStreamName( nullptr, "worksheets/sheet", nTab+1),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index 7fb7b29eec48..46745b740c1e 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -104,7 +104,7 @@ SvXMLImportContext *ScXMLCalculationSettingsContext::CreateChildContext( sal_uIn
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -166,7 +166,7 @@ ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& rImport,
if (nPrefix == XML_NAMESPACE_TABLE && IsXMLToken(aLocalName, XML_DATE_VALUE))
{
util::DateTime aDateTime;
- ::sax::Converter::parseDateTime(aDateTime, 0, sValue);
+ ::sax::Converter::parseDateTime(aDateTime, nullptr, sValue);
util::Date aDate;
aDate.Day = aDateTime.Day;
aDate.Month = aDateTime.Month;
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index bf0eafd5ad92..8c3b6cc93147 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -45,12 +45,12 @@ using namespace xmloff::token;
ScChangeTrackingExportHelper::ScChangeTrackingExportHelper(ScXMLExport& rTempExport)
: rExport(rTempExport),
- pChangeTrack(NULL),
- pEditTextObj(NULL),
- pDependings(NULL),
+ pChangeTrack(nullptr),
+ pEditTextObj(nullptr),
+ pDependings(nullptr),
sChangeIDPrefix(SC_CHANGE_ID_PREFIX)
{
- pChangeTrack = rExport.GetDocument() ? rExport.GetDocument()->GetChangeTrack() : NULL;
+ pChangeTrack = rExport.GetDocument() ? rExport.GetDocument()->GetChangeTrack() : nullptr;
pDependings = new ScChangeActionMap();
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index cbc0442f1292..2aad7356ee5a 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -80,7 +80,7 @@ const ScCellValue& ScMyCellInfo::CreateCell( ScDocument* pDoc )
ScMyDeleted::ScMyDeleted()
: nID(0)
- , pCellInfo(NULL)
+ , pCellInfo(nullptr)
{
}
@@ -128,7 +128,7 @@ ScMyInsAction::~ScMyInsAction()
ScMyDelAction::ScMyDelAction(const ScChangeActionType nActionTypeP)
: ScMyBaseAction(nActionTypeP),
aGeneratedList(),
- pInsCutOff(NULL),
+ pInsCutOff(nullptr),
aMoveCutOffs(),
nD(0)
{
@@ -142,7 +142,7 @@ ScMyDelAction::~ScMyDelAction()
ScMyMoveAction::ScMyMoveAction()
: ScMyBaseAction(SC_CAT_MOVE),
aGeneratedList(),
- pMoveRanges(NULL)
+ pMoveRanges(nullptr)
{
}
@@ -153,7 +153,7 @@ ScMyMoveAction::~ScMyMoveAction()
ScMyContentAction::ScMyContentAction()
: ScMyBaseAction(SC_CAT_CONTENT),
- pCellInfo(NULL)
+ pCellInfo(nullptr)
{
}
@@ -173,9 +173,9 @@ ScMyRejAction::~ScMyRejAction()
ScXMLChangeTrackingImportHelper::ScXMLChangeTrackingImportHelper() :
aActions(),
- pDoc(NULL),
- pTrack(NULL),
- pCurrentAction(NULL),
+ pDoc(nullptr),
+ pTrack(nullptr),
+ pCurrentAction(nullptr),
sIDPrefix(SC_CHANGE_ID_PREFIX),
nMultiSpanned(0),
nMultiSpannedSlaveCount(0),
@@ -426,7 +426,7 @@ void ScXMLChangeTrackingImportHelper::EndChangeAction()
OSL_FAIL("no current action");
}
- pCurrentAction = NULL;
+ pCurrentAction = nullptr;
}
void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime)
@@ -489,7 +489,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
pAction->pMoveRanges->aTargetRange, aUser, aDateTime, sComment, pAction->pMoveRanges->aSourceRange , pTrack);
return pNewAction;
}
- return NULL;
+ return nullptr;
}
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction)
@@ -807,7 +807,7 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pTempDoc)
ScMyActions::iterator aEndItr(aActions.end());
while (aItr != aEndItr)
{
- ScChangeAction* pAction = NULL;
+ ScChangeAction* pAction = nullptr;
switch ((*aItr)->nActionType)
{
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index 525aacf97586..f47bd10bc5d9 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -100,7 +100,7 @@ void ScXMLConsolidationContext::EndElement()
aConsParam.eFunction = eFunction;
sal_uInt16 nCount = (sal_uInt16) std::min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF );
- ScArea** ppAreas = nCount ? new ScArea*[ nCount ] : NULL;
+ ScArea** ppAreas = nCount ? new ScArea*[ nCount ] : nullptr;
if( ppAreas )
{
sal_Int32 nOffset = 0;
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index a3a9986a0563..4a94d3848cf8 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -37,9 +37,9 @@ ScDocument* ScXMLConverter::GetScDocument( uno::Reference< frame::XModel > xMode
if (xModel.is())
{
ScModelObj* pDocObj = ScModelObj::getImplementation( xModel );
- return pDocObj ? pDocObj->GetDocument() : NULL;
+ return pDocObj ? pDocObj->GetDocument() : nullptr;
}
- return NULL;
+ return nullptr;
}
sheet::GeneralFunction ScXMLConverter::GetFunctionFromString( const OUString& sFunction )
@@ -313,7 +313,7 @@ void ScXMLConverter::ParseFormula(OUString& sFormula, const bool bIsFormula)
void ScXMLConverter::ConvertDateTimeToString(const DateTime& aDateTime, OUStringBuffer& sDate)
{
css::util::DateTime aAPIDateTime = aDateTime.GetUNODateTime();
- ::sax::Converter::convertDateTime(sDate, aAPIDateTime, 0);
+ ::sax::Converter::convertDateTime(sDate, aAPIDateTime, nullptr);
}
namespace {
@@ -375,7 +375,7 @@ const ScXMLConditionInfo* lclGetConditionInfo( const sal_Unicode*& rpcString, co
if( (nLength == pInfo->mnIdentLength) && (::rtl_ustr_ascii_shortenedCompare_WithLength( pcIdStart, nLength, pInfo->mpcIdentifier, nLength ) == 0) )
return pInfo;
- return 0;
+ return nullptr;
}
sheet::ConditionOperator lclGetConditionOperator( const sal_Unicode*& rpcString, const sal_Unicode* pcEnd )
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index ceb7eba48a52..5216fa02c232 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -50,7 +50,7 @@ SvXMLImportContext *ScXMLDDELinksContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ((nPrefix == XML_NAMESPACE_TABLE) && IsXMLToken(rLName, XML_DDE_LINK))
pContext = new ScXMLDDELinkContext(GetScImport(), nPrefix, rLName, xAttrList);
@@ -91,7 +91,7 @@ SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ((nPrefix == XML_NAMESPACE_OFFICE) && IsXMLToken(rLName, XML_DDE_SOURCE))
pContext = new ScXMLDDESourceContext(GetScImport(), nPrefix, rLName, xAttrList, this);
@@ -265,7 +265,7 @@ SvXMLImportContext *ScXMLDDETableContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = NULL;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -368,7 +368,7 @@ SvXMLImportContext *ScXMLDDERowContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = NULL;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TABLE)
if (IsXMLToken(rLName, XML_TABLE_CELL))
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index c01c7cb9643c..543c4bb069db 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -78,7 +78,7 @@ SvXMLImportContext *ScXMLDetectiveContext::CreateChildContext(
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDetectiveElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index da683d42cc65..160cbf5e73c9 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -57,7 +57,7 @@ using namespace xmloff::token;
ScXMLExportDataPilot::ScXMLExportDataPilot(ScXMLExport& rTempExport)
: rExport(rTempExport),
- pDoc( NULL )
+ pDoc( nullptr )
{
}
@@ -433,7 +433,7 @@ void ScXMLExportDataPilot::WriteSubTotals(ScDPSaveDimension* pDim)
using sheet::GeneralFunction;
sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount();
- const OUString* pLayoutName = NULL;
+ const OUString* pLayoutName = nullptr;
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
// Export display names only for 1.2 extended or later.
pLayoutName = pDim->GetSubtotalName();
@@ -632,8 +632,8 @@ void ScXMLExportDataPilot::WriteNumGroupDim(const ScDPSaveNumGroupDimension* pNu
void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData)
{
- const ScDPSaveGroupDimension* pGroupDim = NULL;
- const ScDPSaveNumGroupDimension* pNumGroupDim = NULL;
+ const ScDPSaveGroupDimension* pGroupDim = nullptr;
+ const ScDPSaveNumGroupDimension* pNumGroupDim = nullptr;
if (pDimData)
{
pGroupDim = pDimData->GetNamedGroupDim(pDim->GetName());
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 88f56982ae34..208476751da2 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -58,7 +58,7 @@ using namespace xmloff::token;
ScXMLExportDatabaseRanges::ScXMLExportDatabaseRanges(ScXMLExport& rTempExport)
: rExport(rTempExport),
- pDoc( NULL )
+ pDoc( nullptr )
{
}
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 319b3d086c9f..188770ef0bd9 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -572,7 +572,7 @@ void ScMyDetectiveOpContainer::Sort()
ScMyCell::ScMyCell() :
aShapeList(),
aDetectiveObjVec(),
- pNote(NULL),
+ pNote(nullptr),
nValidationIndex(-1),
nStyleIndex(-1),
nNumberFormat(-1),
@@ -596,13 +596,13 @@ ScMyCell::~ScMyCell()
}
ScMyNotEmptyCellsIterator::ScMyNotEmptyCellsIterator(ScXMLExport& rTempXMLExport)
- : pShapes(NULL),
- pNoteShapes(NULL),
- pEmptyDatabaseRanges(NULL),
- pMergedRanges(NULL),
- pAreaLinks(NULL),
- pDetectiveObj(NULL),
- pDetectiveOp(NULL),
+ : pShapes(nullptr),
+ pNoteShapes(nullptr),
+ pEmptyDatabaseRanges(nullptr),
+ pMergedRanges(nullptr),
+ pAreaLinks(nullptr),
+ pDetectiveObj(nullptr),
+ pDetectiveOp(nullptr),
rExport(rTempXMLExport),
nCellCol(0),
nCellRow(0),
@@ -618,13 +618,13 @@ ScMyNotEmptyCellsIterator::~ScMyNotEmptyCellsIterator()
void ScMyNotEmptyCellsIterator::Clear()
{
mpCellItr.reset();
- pShapes = NULL;
- pNoteShapes = NULL;
- pMergedRanges = NULL;
- pAreaLinks = NULL;
- pEmptyDatabaseRanges = NULL;
- pDetectiveObj = NULL;
- pDetectiveOp = NULL;
+ pShapes = nullptr;
+ pNoteShapes = nullptr;
+ pMergedRanges = nullptr;
+ pAreaLinks = nullptr;
+ pEmptyDatabaseRanges = nullptr;
+ pDetectiveObj = nullptr;
+ pDetectiveOp = nullptr;
nCurrentTable = SCTAB_MAX;
}
diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index 0e3fd2c61f50..59e3bef03fca 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -26,11 +26,11 @@ using namespace com::sun::star;
ScMySharedData::ScMySharedData(const sal_Int32 nTempTableCount) :
nLastColumns(nTempTableCount, 0),
nLastRows(nTempTableCount, 0),
- pTableShapes(NULL),
- pDrawPages(NULL),
- pShapesContainer(NULL),
+ pTableShapes(nullptr),
+ pDrawPages(nullptr),
+ pShapesContainer(nullptr),
pDetectiveObjContainer(new ScMyDetectiveObjContainer()),
- pNoteShapes(NULL),
+ pNoteShapes(nullptr),
nTableCount(nTempTableCount)
{
}
diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx
index 645d22489d5f..926957e3066a 100644
--- a/sc/source/filter/xml/XMLExportSharedData.hxx
+++ b/sc/source/filter/xml/XMLExportSharedData.hxx
@@ -64,7 +64,7 @@ public:
void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms);
css::uno::Reference<css::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
- bool HasDrawPage() const { return pDrawPages != NULL; }
+ bool HasDrawPage() const { return pDrawPages != nullptr; }
bool HasForm(const sal_Int32 nTable, css::uno::Reference<css::drawing::XDrawPage>& xDrawPage);
void AddNewShape(const ScMyShape& aMyShape);
void SortShapesContainer();
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 0ac150c62003..979024ae0e76 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -311,7 +311,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, XML_TRUE);
else
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, XML_FALSE);
- SvXMLElementExport* pMessage(NULL);
+ SvXMLElementExport* pMessage(nullptr);
if (bIsHelpMessage)
pMessage = new SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_HELP_MESSAGE, true, true);
else
@@ -525,7 +525,7 @@ bool ScMyRowFormatRange::operator< (const ScMyRowFormatRange& rRange) const
ScRowFormatRanges::ScRowFormatRanges()
: aRowFormatRanges(),
- pColDefaults(NULL),
+ pColDefaults(nullptr),
nSize(0)
{
}
@@ -705,7 +705,7 @@ ScFormatRangeStyles::ScFormatRangeStyles()
: aTables(),
aStyleNames(),
aAutoStyleNames(),
- pColDefaults(0)
+ pColDefaults(nullptr)
{
}
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index fa5c289b4820..1cf65b434584 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -41,7 +41,7 @@ sal_Int32 ScMyStyleNumberFormats::GetStyleNumberFormat(const OUString& rStyleNam
}
ScMyStyleRanges::ScMyStyleRanges() :
- pCurrencyList(NULL)
+ pCurrencyList(nullptr)
{
}
@@ -176,49 +176,49 @@ void ScMyStyleRanges::SetStylesToRanges(const OUString* pStyleName, ScXMLImport&
{
list<ScRange> aList;
mpNumberList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::NUMBER, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::NUMBER, nullptr, rImport);
mpNumberList->clear();
}
if (mpTextList)
{
list<ScRange> aList;
mpTextList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::TEXT, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::TEXT, nullptr, rImport);
mpTextList->clear();
}
if (mpTimeList)
{
list<ScRange> aList;
mpTimeList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::TIME, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::TIME, nullptr, rImport);
mpTimeList->clear();
}
if (mpDateTimeList)
{
list<ScRange> aList;
mpDateTimeList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::DATETIME, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::DATETIME, nullptr, rImport);
mpDateTimeList->clear();
}
if (mpPercentList)
{
list<ScRange> aList;
mpPercentList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::PERCENT, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::PERCENT, nullptr, rImport);
mpPercentList->clear();
}
if (mpLogicalList)
{
list<ScRange> aList;
mpLogicalList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::LOGICAL, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::LOGICAL, nullptr, rImport);
mpLogicalList->clear();
}
if (mpUndefinedList)
{
list<ScRange> aList;
mpUndefinedList->getRangeList(aList);
- SetStylesToRanges(aList, pStyleName, util::NumberFormat::UNDEFINED, NULL, rImport);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::UNDEFINED, nullptr, rImport);
mpUndefinedList->clear();
}
if (pCurrencyList)
@@ -239,10 +239,10 @@ ScMyStylesImportHelper::ScMyStylesImportHelper(ScXMLImport& rTempImport)
:
aRowDefaultStyle(aCellStyles.end()),
rImport(rTempImport),
- pStyleName(NULL),
- pPrevStyleName(NULL),
- pCurrency(NULL),
- pPrevCurrency(NULL),
+ pStyleName(nullptr),
+ pPrevStyleName(nullptr),
+ pCurrency(nullptr),
+ pPrevCurrency(nullptr),
nCellType(0),
nPrevCellType(0),
bPrevRangeAdded(true)
@@ -264,8 +264,8 @@ void ScMyStylesImportHelper::ResetAttributes()
pPrevStyleName = pStyleName;
pPrevCurrency = pCurrency;
nPrevCellType = nCellType;
- pStyleName = NULL;
- pCurrency = NULL;
+ pStyleName = nullptr;
+ pCurrency = nullptr;
nCellType = 0;
}
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index 7606526ceced..d14e39bb8f8d 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -107,7 +107,7 @@ SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_TEXT) &&
IsXMLToken(rLocalName, XML_P))
@@ -219,7 +219,7 @@ SvXMLImportContext *XMLHeaderFooterRegionContext::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_TEXT) &&
IsXMLToken(rLocalName, XML_P))
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index fc96546e7a8c..553c36fae9c2 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -43,7 +43,7 @@ using namespace xmloff::token;
XMLTableShapeImportHelper::XMLTableShapeImportHelper(
ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) :
XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper ),
- pAnnotationContext(NULL),
+ pAnnotationContext(nullptr),
bOnTable(false)
{
}
@@ -97,7 +97,7 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
table::CellAddress aEndCell;
- OUString* pRangeList(NULL);
+ OUString* pRangeList(nullptr);
sal_Int16 nLayerID(-1);
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
index 4ecc44db4af7..1e1fcf91f72c 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
@@ -34,7 +34,7 @@ class XMLTableShapeImportHelper : public XMLShapeImportHelper
public:
- XMLTableShapeImportHelper( ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper=0 );
+ XMLTableShapeImportHelper( ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper=nullptr );
virtual ~XMLTableShapeImportHelper();
static void SetLayer(css::uno::Reference<css::drawing::XShape>& rShape, sal_Int16 nLayerID, const OUString& sType);
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 21f854c7944f..098b2371d54a 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -43,7 +43,7 @@ using ::std::vector;
ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport)
: rImport(rTempImport),
aShapes(),
- pCollection(NULL)
+ pCollection(nullptr)
{
}
diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx
index 2650de14dfc0..05530fcf2b29 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.cxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.cxx
@@ -42,7 +42,7 @@ SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPre
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (!pContext)
{
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 368326371fda..172dd658c327 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -254,7 +254,7 @@ public:
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override;
void CreateTextPContext(bool bIsNewParagraph);
- bool IsEditCell() { return pEditTextObj != 0; }
+ bool IsEditCell() { return pEditTextObj != nullptr; }
void SetText(const OUString& sTempText) { sText = sTempText; }
virtual void EndElement() override;
@@ -481,7 +481,7 @@ SvXMLImportContext *ScXMLTrackedChangesContext::CreateChildContext( sal_uInt16 n
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -558,7 +558,7 @@ SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if( XML_NAMESPACE_DC == nPrefix )
{
@@ -586,7 +586,7 @@ SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPref
void ScXMLChangeInfoContext::EndElement()
{
aInfo.sUser = sAuthorBuffer.makeStringAndClear();
- ::sax::Converter::parseDateTime(aInfo.aDateTime, 0,
+ ::sax::Converter::parseDateTime(aInfo.aDateTime, nullptr,
sDateTimeBuffer.makeStringAndClear());
aInfo.sComment = sCommentBuffer.makeStringAndClear();
pChangeTrackingImportHelper->SetActionInfo(aInfo);
@@ -719,7 +719,7 @@ SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( sal_uIn
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -814,7 +814,7 @@ SvXMLImportContext *ScXMLDependingsContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -894,7 +894,7 @@ SvXMLImportContext *ScXMLDeletionsContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -924,7 +924,7 @@ ScXMLChangeTextPContext::ScXMLChangeTextPContext( ScXMLImport& rImport,
sLName(rLName),
sText(),
pChangeCellContext(pTempChangeCellContext),
- pTextPContext(NULL),
+ pTextPContext(nullptr),
nPrefix(nPrfx)
{
// here are no attributes
@@ -939,7 +939,7 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTem
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xTempAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_TEXT) && (IsXMLToken(rLName, XML_S)) && !pTextPContext)
{
@@ -1012,7 +1012,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport,
: SvXMLImportContext( rImport, nPrfx, rLName )
, mrOldCell(rOldCell)
, rInputString(rTempInputString)
- , pEditTextObj(NULL)
+ , pEditTextObj(nullptr)
, rDateTimeValue(fDateTimeValue)
, fValue(0.0)
, rType(nType)
@@ -1110,7 +1110,7 @@ SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_TEXT) && (IsXMLToken(rLocalName, XML_P)))
{
@@ -1246,7 +1246,7 @@ SvXMLImportContext *ScXMLPreviousContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_TABLE) && (IsXMLToken(rLocalName, XML_CHANGE_TRACK_TABLE_CELL)))
pContext = new ScXMLChangeCellContext(GetScImport(), nPrefix, rLocalName, xAttrList,
@@ -1319,7 +1319,7 @@ SvXMLImportContext *ScXMLContentChangeContext::CreateChildContext( sal_uInt16 nP
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_OFFICE) && (IsXMLToken(rLocalName, XML_CHANGE_INFO)))
{
@@ -1434,7 +1434,7 @@ SvXMLImportContext *ScXMLInsertionContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_OFFICE) && (IsXMLToken(rLocalName, XML_CHANGE_INFO)))
{
@@ -1590,7 +1590,7 @@ SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -1694,7 +1694,7 @@ SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_OFFICE) && (IsXMLToken(rLocalName, XML_CHANGE_INFO)))
{
@@ -1780,7 +1780,7 @@ SvXMLImportContext *ScXMLMovementContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_OFFICE) && (IsXMLToken(rLocalName, XML_CHANGE_INFO)))
{
@@ -1865,7 +1865,7 @@ SvXMLImportContext *ScXMLRejectionContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
if ((nPrefix == XML_NAMESPACE_OFFICE) && (IsXMLToken(rLocalName, XML_CHANGE_INFO)))
{
diff --git a/sc/source/filter/xml/editattributemap.cxx b/sc/source/filter/xml/editattributemap.cxx
index fd5de8cc0380..014edd3a6495 100644
--- a/sc/source/filter/xml/editattributemap.cxx
+++ b/sc/source/filter/xml/editattributemap.cxx
@@ -79,13 +79,13 @@ ScXMLEditAttributeMap::ScXMLEditAttributeMap()
const ScXMLEditAttributeMap::Entry* ScXMLEditAttributeMap::getEntryByAPIName(const OUString& rAPIName) const
{
StrToEntriesType::const_iterator it = maAPIEntries.find(rAPIName);
- return it == maAPIEntries.end() ? NULL : it->second;
+ return it == maAPIEntries.end() ? nullptr : it->second;
}
const ScXMLEditAttributeMap::Entry* ScXMLEditAttributeMap::getEntryByItemID(sal_uInt16 nItemID) const
{
IndexToEntriesType::const_iterator it = maItemIDEntries.find(nItemID);
- return it == maItemIDEntries.end() ? NULL : it->second;
+ return it == maItemIDEntries.end() ? nullptr : it->second;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index 9063d4a4920f..0dab506b09b7 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -49,7 +49,7 @@ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport,
SvXMLImportContext( rImport, nPrfx, rLName ),
mrAnnotationData( rAnnotationData ),
pCellContext(pTempCellContext),
- pShapeContext(NULL)
+ pShapeContext(nullptr)
{
uno::Reference<drawing::XShapes> xLocalShapes (GetScImport().GetTables().GetCurrentXShapes());
if (xLocalShapes.is())
@@ -121,7 +121,7 @@ SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_DC == nPrefix )
{
@@ -159,7 +159,7 @@ void ScXMLAnnotationContext::EndElement()
{
pShapeContext->EndElement();
delete pShapeContext;
- pShapeContext = NULL;
+ pShapeContext = nullptr;
}
mrAnnotationData.maAuthor = maAuthorBuffer.makeStringAndClear();
@@ -169,7 +169,7 @@ void ScXMLAnnotationContext::EndElement()
mrAnnotationData.maSimpleText = maTextBuffer.makeStringAndClear();
XMLTableShapeImportHelper* pTableShapeImport = static_cast<XMLTableShapeImportHelper*>(GetScImport().GetShapeImport().get());
- pTableShapeImport->SetAnnotation(NULL);
+ pTableShapeImport->SetAnnotation(nullptr);
}
void ScXMLAnnotationContext::SetShape( const uno::Reference< drawing::XShape >& rxShape, const uno::Reference< drawing::XShapes >& rxShapes,
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index 03da40290d6c..c04c287974fe 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -66,7 +66,7 @@ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport,
meHash2(PASSHASH_UNSPECIFIED),
bProtected(false),
bHadCalculationSettings(false),
- pChangeTrackingImportHelper(NULL)
+ pChangeTrackingImportHelper(nullptr)
{
ScDocument* pDoc = GetScImport().GetDocument();
if (pDoc)
@@ -138,7 +138,7 @@ SvXMLImportContext *ScXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix,
pSheetData->EndStreamPos( nEndOffset );
}
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetBodyElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLocalName ) )
@@ -239,7 +239,7 @@ void ScXMLBodyContext::EndElement()
if (!bHadCalculationSettings)
{
// #111055#; set calculation settings defaults if there is no calculation settings element
- ScXMLCalculationSettingsContext aContext( GetScImport(), XML_NAMESPACE_TABLE, GetXMLToken(XML_CALCULATION_SETTINGS), NULL );
+ ScXMLCalculationSettingsContext aContext( GetScImport(), XML_NAMESPACE_TABLE, GetXMLToken(XML_CALCULATION_SETTINGS), nullptr );
aContext.EndElement();
}
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index b0e48691458f..904f8c22b0ab 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -139,8 +139,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
ScXMLImportContext(rImport, nPrfx, rLName),
mpEditEngine(GetScImport().GetEditEngine()),
mnCurParagraph(0),
- pDetectiveObjVec(NULL),
- pCellRangeSource(NULL),
+ pDetectiveObjVec(nullptr),
+ pCellRangeSource(nullptr),
fValue(0.0),
nMergedRows(1),
nMatrixRows(0),
@@ -171,8 +171,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
rXMLImport.GetTables().AddColumn(bTempIsCovered);
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
OUString aLocalName;
- OUString* pStyleName = NULL;
- OUString* pCurrencySymbol = NULL;
+ OUString* pStyleName = nullptr;
+ OUString* pCurrencySymbol = nullptr;
const SvXMLTokenMap& rTokenMap = rImport.GetTableRowCellAttrTokenMap();
for (sal_Int16 i = 0; i < nAttrCount; ++i)
{
@@ -668,7 +668,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPr
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = rXMLImport.GetTableRowCellElemTokenMap();
bool bTextP(false);
@@ -865,7 +865,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
LockSolarMutex();
- ScPostIt* pNote = 0;
+ ScPostIt* pNote = nullptr;
uno::Reference< drawing::XShapes > xShapes = rXMLImport.GetTables().GetCurrentXShapes();
uno::Reference< container::XIndexAccess > xShapesIA( xShapes, uno::UNO_QUERY );
@@ -889,7 +889,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
// create the cell note with the caption object
pNote = ScNoteUtil::CreateNoteFromCaption( *pDoc, rPos, *pCaption, true );
// forget pointer to object (do not create note again below)
- pObject = 0;
+ pObject = nullptr;
}
}
@@ -906,7 +906,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
aCaptionRect = pObject->GetLogicRect();
// remove the shape from the drawing page, this invalidates pObject
mxAnnotationData->mxShapes->remove( mxAnnotationData->mxShape );
- pObject = 0;
+ pObject = nullptr;
// update current number of existing objects
if( xShapesIA.is() )
nOldShapeCount = xShapesIA->getCount();
@@ -937,7 +937,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
OUString aDate;
- Color* pColor = 0;
+ Color* pColor = nullptr;
Color** ppColor = &pColor;
pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
pNote->SetDate( aDate );
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 7399136a9fa2..2f88e644083d 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -94,7 +94,7 @@ SvXMLImportContext *ScXMLTableColContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -204,7 +204,7 @@ SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetTableColsElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 2d6884bb68a8..7a06e0e797ee 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -34,7 +34,7 @@ SvXMLImportContext* ScXMLConditionalFormatsContext::CreateChildContext( sal_uInt
{
const SvXMLTokenMap& rTokenMap = GetScImport().GetCondFormatsTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch (nToken)
{
case XML_TOK_CONDFORMATS_CONDFORMAT:
@@ -95,7 +95,7 @@ SvXMLImportContext* ScXMLConditionalFormatContext::CreateChildContext( sal_uInt1
{
const SvXMLTokenMap& rTokenMap = GetScImport().GetCondFormatTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch (nToken)
{
case XML_TOK_CONDFORMAT_CONDITION:
@@ -139,7 +139,7 @@ ScXMLConditionalFormatContext::~ScXMLConditionalFormatContext()
ScXMLColorScaleFormatContext::ScXMLColorScaleFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName, ScConditionalFormat* pFormat):
SvXMLImportContext( rImport, nPrfx, rLName ),
- pColorScaleFormat(NULL)
+ pColorScaleFormat(nullptr)
{
pColorScaleFormat = new ScColorScaleFormat(GetScImport().GetDocument());
pFormat->AddEntry(pColorScaleFormat);
@@ -151,7 +151,7 @@ SvXMLImportContext* ScXMLColorScaleFormatContext::CreateChildContext( sal_uInt16
{
const SvXMLTokenMap& rTokenMap = GetScImport().GetColorScaleTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch (nToken)
{
case XML_TOK_COLORSCALE_COLORSCALEENTRY:
@@ -168,8 +168,8 @@ ScXMLDataBarFormatContext::ScXMLDataBarFormatContext( ScXMLImport& rImport, sal_
const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
ScConditionalFormat* pFormat):
SvXMLImportContext( rImport, nPrfx, rLName ),
- mpDataBarFormat(NULL),
- mpFormatData(NULL)
+ mpDataBarFormat(nullptr),
+ mpFormatData(nullptr)
{
OUString sPositiveColor;
OUString sNegativeColor;
@@ -293,13 +293,13 @@ SvXMLImportContext* ScXMLDataBarFormatContext::CreateChildContext( sal_uInt16 nP
{
const SvXMLTokenMap& rTokenMap = GetScImport().GetFormattingTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch (nToken)
{
case XML_TOK_FORMATTING_ENTRY:
case XML_TOK_DATABAR_DATABARENTRY:
{
- ScColorScaleEntry* pEntry(0);
+ ScColorScaleEntry* pEntry(nullptr);
pContext = new ScXMLFormattingEntryContext( GetScImport(), nPrefix, rLocalName, xAttrList, pEntry );
if(mpFormatData->mpLowerLimit)
{
@@ -383,12 +383,12 @@ SvXMLImportContext* ScXMLIconSetFormatContext::CreateChildContext( sal_uInt16 nP
{
const SvXMLTokenMap& rTokenMap = GetScImport().GetFormattingTokenMap();
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName);
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch (nToken)
{
case XML_TOK_FORMATTING_ENTRY:
{
- ScColorScaleEntry* pEntry(0);
+ ScColorScaleEntry* pEntry(nullptr);
pContext = new ScXMLFormattingEntryContext( GetScImport(), nPrefix, rLocalName, xAttrList, pEntry );
mpFormatData->m_Entries.push_back(std::unique_ptr<ScColorScaleEntry>(pEntry));
}
@@ -642,7 +642,7 @@ ScXMLColorScaleFormatEntryContext::ScXMLColorScaleFormatEntryContext( ScXMLImpor
const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
ScColorScaleFormat* pFormat):
SvXMLImportContext( rImport, nPrfx, rLName ),
- mpFormatEntry( NULL )
+ mpFormatEntry( nullptr )
{
double nVal = 0;
Color aColor;
diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx
index dcbf27324a8c..de74e8148c06 100644
--- a/sc/source/filter/xml/xmlconti.cxx
+++ b/sc/source/filter/xml/xmlconti.cxx
@@ -48,7 +48,7 @@ SvXMLImportContext *ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ((nPrefix == XML_NAMESPACE_TEXT) && IsXMLToken(rLName, XML_S))
{
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index 4a083dca5999..a8c768956d4e 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -174,7 +174,7 @@ SvXMLImportContext *ScXMLContentValidationsContext::CreateChildContext( sal_uInt
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationsElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -262,7 +262,7 @@ SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( sal_uInt1
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -505,7 +505,7 @@ SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nPre
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationMessageElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -577,7 +577,7 @@ SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 nPr
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationMessageElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -643,7 +643,7 @@ SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = NULL;
+ SvXMLImportContext *pContext = nullptr;
if ((nPrefix == XML_NAMESPACE_SCRIPT) && IsXMLToken(rLName, XML_EVENTS))
{
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index a50915277e7a..61e3db86d9da 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -73,7 +73,7 @@ SvXMLImportContext *ScXMLDataPilotTablesContext::CreateChildContext( sal_uInt16
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotTablesElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -105,8 +105,8 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList) :
SvXMLImportContext( rImport, nPrfx, rLName ),
pDoc(GetScImport().GetDocument()),
- pDPObject(NULL),
- pDPDimSaveData(NULL),
+ pDPObject(nullptr),
+ pDPDimSaveData(nullptr),
sDataPilotTableName(),
sApplicationData(),
nSourceType(SQL),
@@ -222,7 +222,7 @@ SvXMLImportContext *ScXMLDataPilotTableContext::CreateChildContext( sal_uInt16 n
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotTableElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -287,21 +287,21 @@ const ScDPSaveDimension* getDimension(
case ScDPOutputGeometry::Column:
{
if (rColDims.size() <= nPos)
- return NULL;
+ return nullptr;
return rColDims[nPos];
}
case ScDPOutputGeometry::Row:
{
if (rRowDims.size() <= nPos)
- return NULL;
+ return nullptr;
return rRowDims[nPos];
}
case ScDPOutputGeometry::Page:
{
if (rPageDims.size() <= nPos)
- return NULL;
+ return nullptr;
return rPageDims[nPos];
}
@@ -312,7 +312,7 @@ const ScDPSaveDimension* getDimension(
default:
break;
}
- return NULL;
+ return nullptr;
}
ScDPOutputGeometry::FieldType toFieldType(sal_uInt16 nOrient)
@@ -366,7 +366,7 @@ void ScXMLDataPilotTableContext::SetButtons()
const ScDPSaveDimension* pDim = getDimension(
aRowDims, aColDims, aPageDims, aBtnType.first, aBtnType.second);
- bool bDimension = pDim != NULL;
+ bool bDimension = pDim != nullptr;
bool bDataLayout = pDim && pDim->IsDataLayout();
bool bHasHidden = pDim && pDim->HasInvisibleMember();
bool bPageDim = pDim && pDim->GetOrientation() == sheet::DataPilotFieldOrientation_PAGE;
@@ -634,7 +634,7 @@ SvXMLImportContext *ScXMLDPSourceSQLContext::CreateChildContext( sal_uInt16 nPre
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -688,7 +688,7 @@ SvXMLImportContext *ScXMLDPSourceTableContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -742,7 +742,7 @@ SvXMLImportContext *ScXMLDPSourceQueryContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -811,7 +811,7 @@ SvXMLImportContext *ScXMLSourceServiceContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -942,7 +942,7 @@ SvXMLImportContext *ScXMLSourceCellRangeContext::CreateChildContext( sal_uInt16
const css::uno::Reference<
css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotTableSourceCellRangeElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -969,7 +969,7 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
ScXMLDataPilotTableContext* pTempDataPilotTable) :
SvXMLImportContext( rImport, nPrfx, rLName ),
pDataPilotTable(pTempDataPilotTable),
- pDim(NULL),
+ pDim(nullptr),
fStart(0.0),
fEnd(0.0),
fStep(0.0),
@@ -1066,7 +1066,7 @@ SvXMLImportContext *ScXMLDataPilotFieldContext::CreateChildContext( sal_uInt16 n
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotFieldElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -1281,7 +1281,7 @@ SvXMLImportContext *ScXMLDataPilotLevelContext::CreateChildContext( sal_uInt16 n
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotLevelElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -1462,7 +1462,7 @@ ScXMLDataPilotSubTotalsContext::ScXMLDataPilotSubTotalsContext( ScXMLImport& rIm
SvXMLImportContext( rImport, nPrfx, rLName ),
pDataPilotField(pTempDataPilotField),
nFunctionCount(0),
- pFunctions(NULL)
+ pFunctions(nullptr)
{
// has no attributes
@@ -1477,7 +1477,7 @@ SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( sal_uInt
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotSubTotalsElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -1567,7 +1567,7 @@ SvXMLImportContext *ScXMLDataPilotSubTotalContext::CreateChildContext( sal_uInt1
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -1599,7 +1599,7 @@ SvXMLImportContext *ScXMLDataPilotMembersContext::CreateChildContext( sal_uInt16
const css::uno::Reference<
css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDataPilotMembersElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -1676,7 +1676,7 @@ SvXMLImportContext *ScXMLDataPilotMemberContext::CreateChildContext( sal_uInt16
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -1802,7 +1802,7 @@ SvXMLImportContext *ScXMLDataPilotGroupsContext::CreateChildContext( sal_uInt16
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -1853,7 +1853,7 @@ SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( sal_uInt16 n
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (nPrefix == XML_NAMESPACE_TABLE)
{
@@ -1905,7 +1905,7 @@ SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( sal_uI
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index c12fea50426c..22a4f7622afd 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -77,7 +77,7 @@ SvXMLImportContext *ScXMLDatabaseRangesContext::CreateChildContext( sal_uInt16 n
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDatabaseRangesElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -224,7 +224,7 @@ SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDatabaseRangeElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -278,7 +278,7 @@ SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( sal_uInt16 nP
std::unique_ptr<ScDBData> ScXMLDatabaseRangeContext::ConvertToDBData(const OUString& rName)
{
if (!mbValidRange)
- return NULL;
+ return nullptr;
ScDocument* pDoc = GetScImport().GetDocument();
@@ -395,8 +395,8 @@ std::unique_ptr<ScDBData> ScXMLDatabaseRangeContext::ConvertToDBData(const OUStr
}
else
{
- aParam.pSubTotals[nPos] = NULL;
- aParam.pFunctions[nPos] = NULL;
+ aParam.pSubTotals[nPos] = nullptr;
+ aParam.pFunctions[nPos] = nullptr;
}
}
@@ -532,7 +532,7 @@ SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ( nPrefix == XML_NAMESPACE_FORM )
{
@@ -598,7 +598,7 @@ SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( sal_uInt16 nPre
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ( nPrefix == XML_NAMESPACE_FORM )
{
@@ -664,7 +664,7 @@ SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( sal_uInt16 nPre
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if ( nPrefix == XML_NAMESPACE_FORM )
{
@@ -723,7 +723,7 @@ SvXMLImportContext *ScXMLConResContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -782,7 +782,7 @@ SvXMLImportContext *ScXMLSubTotalRulesContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetDatabaseRangeSubTotalRulesElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -881,7 +881,7 @@ SvXMLImportContext *ScXMLSortGroupsContext::CreateChildContext( sal_uInt16 nPref
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
@@ -930,7 +930,7 @@ SvXMLImportContext *ScXMLSubTotalRuleContext::CreateChildContext( sal_uInt16 nPr
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetSubTotalRulesSubTotalRuleElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -997,7 +997,7 @@ SvXMLImportContext *ScXMLSubTotalFieldContext::CreateChildContext( sal_uInt16 nP
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !pContext )
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index e06e29fc2137..f1ebdc5d996d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -341,23 +341,23 @@ ScXMLExport::ScXMLExport(
OUString const & implementationName, SvXMLExportFlags nExportFlag)
: SvXMLExport( GetMeasureUnit(),
rContext, implementationName, XML_SPREADSHEET, nExportFlag ),
- pDoc(NULL),
+ pDoc(nullptr),
nSourceStreamPos(0),
- pNumberFormatAttributesExportHelper(NULL),
- pSharedData(NULL),
- pColumnStyles(NULL),
- pRowStyles(NULL),
- pCellStyles(NULL),
- pRowFormatRanges(NULL),
+ pNumberFormatAttributesExportHelper(nullptr),
+ pSharedData(nullptr),
+ pColumnStyles(nullptr),
+ pRowStyles(nullptr),
+ pCellStyles(nullptr),
+ pRowFormatRanges(nullptr),
aTableStyles(),
- pGroupColumns (NULL),
- pGroupRows (NULL),
- pDefaults(NULL),
- pChartListener(NULL),
- pCurrentCell(NULL),
- pMergedRangesContainer(NULL),
- pValidationsContainer(NULL),
- pChangeTrackingExportHelper(NULL),
+ pGroupColumns (nullptr),
+ pGroupRows (nullptr),
+ pDefaults(nullptr),
+ pChartListener(nullptr),
+ pCurrentCell(nullptr),
+ pMergedRangesContainer(nullptr),
+ pValidationsContainer(nullptr),
+ pChangeTrackingExportHelper(nullptr),
sLayerID( SC_LAYERID ),
sCaptionShape("com.sun.star.drawing.CaptionShape"),
nOpenRow(-1),
@@ -588,7 +588,7 @@ void ScXMLExport::CollectShapesAutoStyles(SCTAB nTableCount)
pSharedData->SortShapesContainer();
pSharedData->SortNoteShapes();
- const ScMyShapeList* pShapeList(NULL);
+ const ScMyShapeList* pShapeList(nullptr);
ScMyShapeList::const_iterator aShapeItr = aDummyInitList.end();
if (pSharedData->GetShapesContainer())
{
@@ -971,7 +971,7 @@ const SvxFieldData* toXMLPropertyStates(
std::vector<XMLPropertyState>& rPropStates, const std::vector<const SfxPoolItem*>& rSecAttrs,
const rtl::Reference<XMLPropertySetMapper>& xMapper, const ScXMLEditAttributeMap& rAttrMap )
{
- const SvxFieldData* pField = NULL;
+ const SvxFieldData* pField = nullptr;
sal_Int32 nEntryCount = xMapper->GetEntryCount();
rPropStates.reserve(rSecAttrs.size());
std::vector<const SfxPoolItem*>::const_iterator it = rSecAttrs.begin(), itEnd = rSecAttrs.end();
@@ -2055,7 +2055,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
if (!pCellStyles->AddStyleName(pTemp, nIndex, false))
{
delete pTemp;
- pTemp = NULL;
+ pTemp = nullptr;
}
if ( !pOldName )
{
@@ -2494,7 +2494,7 @@ void ScXMLExport::_ExportAutoStyles()
Reference <beans::XPropertySet> xProperties (xCellRanges, uno::UNO_QUERY);
if (xProperties.is())
{
- AddStyleFromCells(xProperties, xTable, nTable, NULL);
+ AddStyleFromCells(xProperties, xTable, nTable, nullptr);
IncrementProgressBar(false);
}
}
@@ -2528,7 +2528,7 @@ void ScXMLExport::_ExportAutoStyles()
Reference <beans::XPropertySet> xColumnProperties(xTableColumns->getByIndex(nColumn), uno::UNO_QUERY);
if (xColumnProperties.is())
{
- AddStyleFromColumn( xColumnProperties, NULL, nIndex, bIsVisible );
+ AddStyleFromColumn( xColumnProperties, nullptr, nIndex, bIsVisible );
pColumnStyles->AddFieldStyleName(nTable, nColumn, nIndex, bIsVisible);
}
sal_Int32 nOld(nColumn);
@@ -2558,7 +2558,7 @@ void ScXMLExport::_ExportAutoStyles()
Reference <beans::XPropertySet> xRowProperties(xTableRows->getByIndex(nRow), uno::UNO_QUERY);
if(xRowProperties.is())
{
- AddStyleFromRow( xRowProperties, NULL, nIndex );
+ AddStyleFromRow( xRowProperties, nullptr, nIndex );
pRowStyles->AddFieldStyleName(nTable, nRow, nIndex);
}
sal_Int32 nOld(nRow);
@@ -2749,7 +2749,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe
AddAttribute(sAttrStyleName, aTableStyles[nTable]);
uno::Reference<util::XProtectable> xProtectable (xTable, uno::UNO_QUERY);
- ScTableProtection* pProtect = NULL;
+ ScTableProtection* pProtect = nullptr;
if (xProtectable.is() && xProtectable->isProtected())
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE);
@@ -2945,7 +2945,7 @@ void writeContent(
if (pField)
{
// Write an field item.
- OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, rExport.GetDocument(), NULL);
+ OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, rExport.GetDocument(), nullptr);
switch (pField->GetClassId())
{
case text::textfield::Type::URL:
@@ -3357,7 +3357,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
bIsChart = true;
uno::Sequence< OUString > aRepresentations(
xReceiver->getUsedRangeRepresentations());
- SvXMLAttributeList* pAttrList = 0;
+ SvXMLAttributeList* pAttrList = nullptr;
if(aRepresentations.getLength())
{
// add the ranges used by the chart to the shape
@@ -3479,7 +3479,7 @@ void ScXMLExport::WriteTableShapes()
ExportShape(*aItr, &aPoint);
}
else
- ExportShape(*aItr, NULL);
+ ExportShape(*aItr, nullptr);
}
aItr = (*pTableShapes)[nCurrentTable].erase(aItr);
}
@@ -3586,7 +3586,7 @@ void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell)
GetShapeExport()->exportShape(xShape, SEF_DEFAULT|XMLShapeExportFlags::ANNOTATION);
}
- pCurrentCell = NULL;
+ pCurrentCell = nullptr;
}
}
@@ -4092,7 +4092,7 @@ OUString getCondFormatEntryType(const ScColorScaleEntry& rEntry, bool bFirst = t
OUString getIconSetName(ScIconSetType eType)
{
- const char* pName = NULL;
+ const char* pName = nullptr;
ScIconSetMap* pMap = ScIconSetFormat::getIconSetMap();
for(;pMap->pName;++pMap)
{
@@ -4682,7 +4682,7 @@ XMLPageExport* ScXMLExport::CreatePageExport()
void ScXMLExport::GetChangeTrackViewSettings(uno::Sequence<beans::PropertyValue>& rProps)
{
- ScChangeViewSettings* pViewSettings(GetDocument() ? GetDocument()->GetChangeViewSettings() : NULL);
+ ScChangeViewSettings* pViewSettings(GetDocument() ? GetDocument()->GetChangeViewSettings() : nullptr);
if (pViewSettings)
{
sal_Int32 nChangePos(rProps.getLength());
@@ -4848,7 +4848,7 @@ void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uIn
for( sal_uInt32 i = 0; i < nItems; ++i )
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = pPool->GetItem2( nAttrib, i ) ) )
+ if( nullptr != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown(static_cast<const SvXMLAttrContainerItem *>(pItem));
if( (pUnknown->GetAttrCount() > 0) )
@@ -5011,8 +5011,8 @@ sal_Int64 SAL_CALL ScXMLExport::getSomething( const css::uno::Sequence< sal_Int8
void ScXMLExport::DisposingModel()
{
SvXMLExport::DisposingModel();
- pDoc = NULL;
- xCurrentTable = 0;
+ pDoc = nullptr;
+ xCurrentTable = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 2c718ed11541..f9b96b3107a6 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -106,7 +106,7 @@ SvXMLImportContext *ScXMLFilterContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -216,7 +216,7 @@ SvXMLImportContext *ScXMLAndContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -266,7 +266,7 @@ SvXMLImportContext *ScXMLOrContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -358,7 +358,7 @@ SvXMLImportContext *ScXMLConditionContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLName,
const Reference<XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = NULL;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterConditionElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -595,7 +595,7 @@ SvXMLImportContext *ScXMLDPFilterContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -667,7 +667,7 @@ SvXMLImportContext *ScXMLDPAndContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -715,7 +715,7 @@ SvXMLImportContext *ScXMLDPOrContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetFilterElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 63e5d94ac455..40a9af7a4da0 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -49,7 +49,7 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8
{
const SfxPoolItem* pItem;
sal_uInt16 nWhichId(pWhichIds[i]);
- if (bExportDefaults && (0 != (pItem = &pItemPool->GetDefaultItem(nWhichId))))
+ if (bExportDefaults && (nullptr != (pItem = &pItemPool->GetDefaultItem(nWhichId))))
{
const SvxFontItem *pFont(static_cast<const SvxFontItem *>(pItem));
Add( pFont->GetFamilyName(), pFont->GetStyleName(),
@@ -59,7 +59,7 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8
sal_uInt32 nItems(pItemPool->GetItemCount2( nWhichId ));
for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = pItemPool->GetItem2( nWhichId, j ) ) )
+ if( nullptr != (pItem = pItemPool->GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont(static_cast<const SvxFontItem *>(pItem));
Add( pFont->GetFamilyName(), pFont->GetStyleName(),
@@ -72,7 +72,7 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8
ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP, bool bBlockFontEmbedding)
: XMLFontAutoStylePool(rExportP, bBlockFontEmbedding)
- , mpEditEnginePool(NULL)
+ , mpEditEnginePool(nullptr)
{
sal_uInt16 aWhichIds[3] = { ATTR_FONT, ATTR_CJK_FONT,
ATTR_CTL_FONT };
@@ -110,7 +110,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
for (sal_uInt32 k = 0; k < nPageHFItems; ++k)
{
const ScPageHFItem* pPageItem;
- if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k))))
+ if (nullptr != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k))))
{
const EditTextObject* pLeftArea(pPageItem->GetLeftArea());
if (pLeftArea)
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index ad11e91e3e4b..bbcdbca36445 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -343,7 +343,7 @@ SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetDocElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLocalName ) )
@@ -1950,7 +1950,7 @@ SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( (XML_NAMESPACE_OFFICE == nPrefix) &&
( IsXMLToken(rLocalName, XML_DOCUMENT_STYLES) ||
@@ -1979,107 +1979,107 @@ ScXMLImport::ScXMLImport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
OUString const & implementationName, SvXMLImportFlags nImportFlag)
: SvXMLImport( rContext, implementationName, nImportFlag ),
- pDoc( NULL ),
- pChangeTrackingImportHelper(NULL),
- pStylesImportHelper(NULL),
+ pDoc( nullptr ),
+ pChangeTrackingImportHelper(nullptr),
+ pStylesImportHelper(nullptr),
sNumberFormat(SC_UNONAME_NUMFMT),
sLocale(SC_LOCALE),
sCellStyle(SC_UNONAME_CELLSTYL),
- pDocElemTokenMap( 0 ),
- pStylesElemTokenMap( 0 ),
- pStylesAttrTokenMap( 0 ),
- pStyleElemTokenMap( 0 ),
- pBodyElemTokenMap( 0 ),
- pContentValidationsElemTokenMap( 0 ),
- pContentValidationElemTokenMap( 0 ),
- pContentValidationAttrTokenMap( 0 ),
- pContentValidationMessageElemTokenMap( 0 ),
- pContentValidationHelpMessageAttrTokenMap( 0 ),
- pContentValidationErrorMessageAttrTokenMap( 0 ),
- pContentValidationErrorMacroAttrTokenMap( 0 ),
- pCondFormatsTokenMap( 0 ),
- pCondFormatTokenMap( 0 ),
- pCondFormatAttrMap( 0 ),
- pCondDateAttrMap( 0 ),
- pConditionAttrMap( 0 ),
- pColorScaleTokenMap( 0 ),
- pColorScaleEntryAttrTokenMap( 0 ),
- pDataBarTokenMap( 0 ),
- pDataBarAttrMap( 0 ),
- pFormattingEntryAttrMap( 0 ),
- pIconSetAttrMap( 0 ),
- pLabelRangesElemTokenMap( 0 ),
- pLabelRangeAttrTokenMap( 0 ),
- pTableElemTokenMap( 0 ),
- pTableProtectionElemTokenMap(NULL),
- pTableRowsElemTokenMap( 0 ),
- pTableColsElemTokenMap( 0 ),
- pTableScenarioAttrTokenMap( 0 ),
- pTableAttrTokenMap( 0 ),
- pTableColAttrTokenMap( 0 ),
- pTableRowElemTokenMap( 0 ),
- pTableRowAttrTokenMap( 0 ),
- pTableRowCellElemTokenMap( 0 ),
- pTableRowCellAttrTokenMap( 0 ),
- pTableAnnotationAttrTokenMap( 0 ),
- pDetectiveElemTokenMap( 0 ),
- pDetectiveHighlightedAttrTokenMap( 0 ),
- pDetectiveOperationAttrTokenMap( 0 ),
- pTableCellRangeSourceAttrTokenMap( 0 ),
- pNamedExpressionsElemTokenMap( 0 ),
- pNamedRangeAttrTokenMap( 0 ),
- pNamedExpressionAttrTokenMap( 0 ),
- pDatabaseRangesElemTokenMap( 0 ),
- pDatabaseRangeElemTokenMap( 0 ),
- pDatabaseRangeAttrTokenMap( 0 ),
- pDatabaseRangeSourceSQLAttrTokenMap( 0 ),
- pDatabaseRangeSourceTableAttrTokenMap( 0 ),
- pDatabaseRangeSourceQueryAttrTokenMap( 0 ),
- pFilterElemTokenMap( 0 ),
- pFilterAttrTokenMap( 0 ),
- pFilterConditionElemTokenMap( 0 ),
- pFilterConditionAttrTokenMap( 0 ),
- pFilterSetItemAttrTokenMap( 0 ),
- pSortElemTokenMap( 0 ),
- pSortAttrTokenMap( 0 ),
- pSortSortByAttrTokenMap( 0 ),
- pDatabaseRangeSubTotalRulesElemTokenMap( 0 ),
- pDatabaseRangeSubTotalRulesAttrTokenMap( 0 ),
- pSubTotalRulesSortGroupsAttrTokenMap( 0 ),
- pSubTotalRulesSubTotalRuleElemTokenMap( 0 ),
- pSubTotalRulesSubTotalRuleAttrTokenMap( 0 ),
- pSubTotalRuleSubTotalFieldAttrTokenMap( 0 ),
- pDataPilotTablesElemTokenMap( 0 ),
- pDataPilotTableAttrTokenMap( 0 ),
- pDataPilotTableElemTokenMap( 0 ),
- pDataPilotTableSourceServiceAttrTokenMap( 0 ),
- pDataPilotGrandTotalAttrTokenMap(NULL),
- pDataPilotTableSourceCellRangeElemTokenMap( 0 ),
- pDataPilotTableSourceCellRangeAttrTokenMap( 0 ),
- pDataPilotFieldAttrTokenMap( 0 ),
- pDataPilotFieldElemTokenMap( 0 ),
- pDataPilotLevelAttrTokenMap( 0 ),
- pDataPilotLevelElemTokenMap( 0 ),
- pDataPilotSubTotalsElemTokenMap( 0 ),
- pDataPilotSubTotalAttrTokenMap( 0 ),
- pDataPilotMembersElemTokenMap( 0 ),
- pDataPilotMemberAttrTokenMap( 0 ),
- pConsolidationAttrTokenMap( 0 ),
- pCellTextParaElemTokenMap(NULL),
- pCellTextSpanElemTokenMap(NULL),
- pCellTextSpanAttrTokenMap(NULL),
- pCellTextURLAttrTokenMap(NULL),
- pCellTextSAttrTokenMap(NULL),
- pDataStreamAttrTokenMap(NULL),
- mpPostProcessData(NULL),
+ pDocElemTokenMap( nullptr ),
+ pStylesElemTokenMap( nullptr ),
+ pStylesAttrTokenMap( nullptr ),
+ pStyleElemTokenMap( nullptr ),
+ pBodyElemTokenMap( nullptr ),
+ pContentValidationsElemTokenMap( nullptr ),
+ pContentValidationElemTokenMap( nullptr ),
+ pContentValidationAttrTokenMap( nullptr ),
+ pContentValidationMessageElemTokenMap( nullptr ),
+ pContentValidationHelpMessageAttrTokenMap( nullptr ),
+ pContentValidationErrorMessageAttrTokenMap( nullptr ),
+ pContentValidationErrorMacroAttrTokenMap( nullptr ),
+ pCondFormatsTokenMap( nullptr ),
+ pCondFormatTokenMap( nullptr ),
+ pCondFormatAttrMap( nullptr ),
+ pCondDateAttrMap( nullptr ),
+ pConditionAttrMap( nullptr ),
+ pColorScaleTokenMap( nullptr ),
+ pColorScaleEntryAttrTokenMap( nullptr ),
+ pDataBarTokenMap( nullptr ),
+ pDataBarAttrMap( nullptr ),
+ pFormattingEntryAttrMap( nullptr ),
+ pIconSetAttrMap( nullptr ),
+ pLabelRangesElemTokenMap( nullptr ),
+ pLabelRangeAttrTokenMap( nullptr ),
+ pTableElemTokenMap( nullptr ),
+ pTableProtectionElemTokenMap(nullptr),
+ pTableRowsElemTokenMap( nullptr ),
+ pTableColsElemTokenMap( nullptr ),
+ pTableScenarioAttrTokenMap( nullptr ),
+ pTableAttrTokenMap( nullptr ),
+ pTableColAttrTokenMap( nullptr ),
+ pTableRowElemTokenMap( nullptr ),
+ pTableRowAttrTokenMap( nullptr ),
+ pTableRowCellElemTokenMap( nullptr ),
+ pTableRowCellAttrTokenMap( nullptr ),
+ pTableAnnotationAttrTokenMap( nullptr ),
+ pDetectiveElemTokenMap( nullptr ),
+ pDetectiveHighlightedAttrTokenMap( nullptr ),
+ pDetectiveOperationAttrTokenMap( nullptr ),
+ pTableCellRangeSourceAttrTokenMap( nullptr ),
+ pNamedExpressionsElemTokenMap( nullptr ),
+ pNamedRangeAttrTokenMap( nullptr ),
+ pNamedExpressionAttrTokenMap( nullptr ),
+ pDatabaseRangesElemTokenMap( nullptr ),
+ pDatabaseRangeElemTokenMap( nullptr ),
+ pDatabaseRangeAttrTokenMap( nullptr ),
+ pDatabaseRangeSourceSQLAttrTokenMap( nullptr ),
+ pDatabaseRangeSourceTableAttrTokenMap( nullptr ),
+ pDatabaseRangeSourceQueryAttrTokenMap( nullptr ),
+ pFilterElemTokenMap( nullptr ),
+ pFilterAttrTokenMap( nullptr ),
+ pFilterConditionElemTokenMap( nullptr ),
+ pFilterConditionAttrTokenMap( nullptr ),
+ pFilterSetItemAttrTokenMap( nullptr ),
+ pSortElemTokenMap( nullptr ),
+ pSortAttrTokenMap( nullptr ),
+ pSortSortByAttrTokenMap( nullptr ),
+ pDatabaseRangeSubTotalRulesElemTokenMap( nullptr ),
+ pDatabaseRangeSubTotalRulesAttrTokenMap( nullptr ),
+ pSubTotalRulesSortGroupsAttrTokenMap( nullptr ),
+ pSubTotalRulesSubTotalRuleElemTokenMap( nullptr ),
+ pSubTotalRulesSubTotalRuleAttrTokenMap( nullptr ),
+ pSubTotalRuleSubTotalFieldAttrTokenMap( nullptr ),
+ pDataPilotTablesElemTokenMap( nullptr ),
+ pDataPilotTableAttrTokenMap( nullptr ),
+ pDataPilotTableElemTokenMap( nullptr ),
+ pDataPilotTableSourceServiceAttrTokenMap( nullptr ),
+ pDataPilotGrandTotalAttrTokenMap(nullptr),
+ pDataPilotTableSourceCellRangeElemTokenMap( nullptr ),
+ pDataPilotTableSourceCellRangeAttrTokenMap( nullptr ),
+ pDataPilotFieldAttrTokenMap( nullptr ),
+ pDataPilotFieldElemTokenMap( nullptr ),
+ pDataPilotLevelAttrTokenMap( nullptr ),
+ pDataPilotLevelElemTokenMap( nullptr ),
+ pDataPilotSubTotalsElemTokenMap( nullptr ),
+ pDataPilotSubTotalAttrTokenMap( nullptr ),
+ pDataPilotMembersElemTokenMap( nullptr ),
+ pDataPilotMemberAttrTokenMap( nullptr ),
+ pConsolidationAttrTokenMap( nullptr ),
+ pCellTextParaElemTokenMap(nullptr),
+ pCellTextSpanElemTokenMap(nullptr),
+ pCellTextSpanAttrTokenMap(nullptr),
+ pCellTextURLAttrTokenMap(nullptr),
+ pCellTextSAttrTokenMap(nullptr),
+ pDataStreamAttrTokenMap(nullptr),
+ mpPostProcessData(nullptr),
aTables(*this),
m_pMyNamedExpressions(nullptr),
- pMyLabelRanges(NULL),
- pValidations(NULL),
- pDetectiveOpArray(NULL),
- pSolarMutexGuard(NULL),
- pNumberFormatAttributesExportHelper(NULL),
- pStyleNumberFormats(NULL),
+ pMyLabelRanges(nullptr),
+ pValidations(nullptr),
+ pDetectiveOpArray(nullptr),
+ pSolarMutexGuard(nullptr),
+ pNumberFormatAttributesExportHelper(nullptr),
+ pStyleNumberFormats(nullptr),
sPrevStyleName(),
sPrevCurrency(),
nSolarMutexLocked(0),
@@ -2281,14 +2281,14 @@ SvXMLImportContext *ScXMLImport::CreateBodyContext(const OUString& rLocalName,
SvXMLImportContext *ScXMLImport::CreateMetaContext(
const OUString& rLocalName )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
if (getImportFlags() & SvXMLImportFlags::META)
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> const xDocProps(
- (IsStylesOnlyMode()) ? 0 : xDPS->getDocumentProperties());
+ (IsStylesOnlyMode()) ? nullptr : xDPS->getDocumentProperties());
pContext = new SvXMLMetaDocumentContext(*this,
XML_NAMESPACE_OFFICE, rLocalName,
xDocProps);
@@ -2304,7 +2304,7 @@ SvXMLImportContext *ScXMLImport::CreateMetaContext(
SvXMLImportContext *ScXMLImport::CreateScriptContext(
const OUString& rLocalName )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
if( !(IsStylesOnlyMode()) )
{
@@ -2324,13 +2324,13 @@ void ScXMLImport::SetStatistics(
const uno::Sequence<beans::NamedValue> & i_rStats)
{
static const char* s_stats[] =
- { "TableCount", "CellCount", "ObjectCount", 0 };
+ { "TableCount", "CellCount", "ObjectCount", nullptr };
SvXMLImport::SetStatistics(i_rStats);
sal_uInt32 nCount(0);
for (sal_Int32 i = 0; i < i_rStats.getLength(); ++i) {
- for (const char** pStat = s_stats; *pStat != 0; ++pStat) {
+ for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) {
if (i_rStats[i].Name.equalsAscii(*pStat)) {
sal_Int32 val = 0;
if (i_rStats[i].Value >>= val) {
@@ -2707,7 +2707,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
if (sCurrentCurrency.equals(sTemp))
return true;
// #i61657# This may be a legacy currency symbol that changed in the meantime.
- if (SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sCurrentCurrency, sBankSymbol) != NULL)
+ if (SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sCurrentCurrency, sBankSymbol) != nullptr)
return true;
// In the rare case that sCurrentCurrency is not the
// currency symbol, but a matching ISO code
@@ -2718,7 +2718,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
// B$,BOB matched B$->BOP, which leads to
// sCurrentCurrency being BOP, and the previous call
// with BOP,BOB didn't find an entry, but B$,BOB will.
- return SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sTemp, sBankSymbol) != NULL;
+ return SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sTemp, sBankSymbol) != nullptr;
}
}
}
@@ -2831,7 +2831,7 @@ void ScXMLImport::SetStyleToRanges()
if (xProperties.is())
{
XMLTableStylesContext *pStyles(static_cast<XMLTableStylesContext *>(GetAutoStyles()));
- XMLTableStyleContext* pStyle = NULL;
+ XMLTableStyleContext* pStyle = nullptr;
if ( pStyles )
pStyle = const_cast<XMLTableStyleContext*>(static_cast<const XMLTableStyleContext *>(pStyles->FindStyleChildContext(
XML_STYLE_FAMILY_TABLE_CELL, sPrevStyleName, true)));
@@ -3002,7 +3002,7 @@ throw( css::xml::sax::SAXException, css::uno::RuntimeException, std::exception )
uno::Reference< beans::XPropertySet > const xImportInfo( getImportInfo() );
uno::Reference< beans::XPropertySetInfo > const xPropertySetInfo(
- xImportInfo.is() ? xImportInfo->getPropertySetInfo() : 0);
+ xImportInfo.is() ? xImportInfo->getPropertySetInfo() : nullptr);
if (xPropertySetInfo.is())
{
OUString const sOrganizerMode(
@@ -3282,7 +3282,7 @@ void SAL_CALL ScXMLImport::endDocument()
void ScXMLImport::DisposingModel()
{
SvXMLImport::DisposingModel();
- pDoc = NULL;
+ pDoc = nullptr;
}
ScXMLImport::MutexGuard::MutexGuard(ScXMLImport& rImport) :
@@ -3323,7 +3323,7 @@ void ScXMLImport::UnlockSolarMutex()
{
OSL_ENSURE(pSolarMutexGuard, "Solar Mutex is always unlocked");
delete pSolarMutexGuard;
- pSolarMutexGuard = NULL;
+ pSolarMutexGuard = nullptr;
}
}
}
@@ -3364,7 +3364,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
{
// parse the attribute value, extract namespace ID, literal namespace, and formula string
rFormulaNmsp.clear();
- sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, false );
+ sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, nullptr, &rFormula, &rFormulaNmsp, false );
// check if we have an ODF formula namespace
if( !bRestrictToExternalNmsp ) switch( nNsId )
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index 82cc26d23c4c..d84daf0101aa 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -45,7 +45,7 @@ SvXMLImportContext* ScXMLLabelRangesContext::CreateChildContext(
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
- SvXMLImportContext* pContext(NULL);
+ SvXMLImportContext* pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetLabelRangesElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index 57a92722f208..99f5def87f61 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -65,7 +65,7 @@ SvXMLImportContext *ScXMLNamedExpressionsContext::CreateChildContext( sal_uInt16
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetNamedExpressionsElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index ae29109c62ef..521209bf077a 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -107,7 +107,7 @@ SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( sal_uInt16 nPrefix
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetTableRowElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
@@ -256,7 +256,7 @@ SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( sal_uInt16 nPrefi
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetTableRowsElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 9c84b14bbfde..6abdc921d025 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -107,7 +107,7 @@ SvXMLImportContext *ScXMLSortContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList )
{
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
const SvXMLTokenMap& rTokenMap(GetScImport().GetSortElemTokenMap());
switch( rTokenMap.Get( nPrefix, rLName ) )
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index aa8d133e5a40..ea45c1bd5df1 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -58,7 +58,7 @@ using namespace ::formula;
#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
// extensions import only
#define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
{
@@ -193,47 +193,47 @@ void ScXMLCellExportPropertyMapper::ContextFilter(
::std::vector< XMLPropertyState >& rProperties,
uno::Reference< beans::XPropertySet > rPropSet ) const
{
- XMLPropertyState* pPadding = NULL;
- XMLPropertyState* pPadding_Bottom = NULL;
- XMLPropertyState* pPadding_Left = NULL;
- XMLPropertyState* pPadding_Right = NULL;
- XMLPropertyState* pPadding_Top = NULL;
-
- XMLPropertyState* pBorder = NULL;
- XMLPropertyState* pBorder_Bottom = NULL;
- XMLPropertyState* pBorder_Left = NULL;
- XMLPropertyState* pBorder_Right = NULL;
- XMLPropertyState* pBorder_Top = NULL;
- XMLPropertyState* pSWBorder = NULL;
- XMLPropertyState* pSWBorder_Bottom = NULL;
- XMLPropertyState* pSWBorder_Left = NULL;
- XMLPropertyState* pSWBorder_Right = NULL;
- XMLPropertyState* pSWBorder_Top = NULL;
-
- XMLPropertyState* pAllBorderWidthState = NULL;
- XMLPropertyState* pLeftBorderWidthState = NULL;
- XMLPropertyState* pRightBorderWidthState = NULL;
- XMLPropertyState* pTopBorderWidthState = NULL;
- XMLPropertyState* pBottomBorderWidthState = NULL;
- XMLPropertyState* pSWAllBorderWidthState = NULL;
- XMLPropertyState* pSWLeftBorderWidthState = NULL;
- XMLPropertyState* pSWRightBorderWidthState = NULL;
- XMLPropertyState* pSWTopBorderWidthState = NULL;
- XMLPropertyState* pSWBottomBorderWidthState = NULL;
- XMLPropertyState* pDiagonalTLBRWidthState = NULL;
- XMLPropertyState* pDiagonalBLTRWidthState = NULL;
-
- XMLPropertyState* pParaMarginLeft = NULL;
- XMLPropertyState* pParaMarginLeftRel = NULL;
- XMLPropertyState* pParaMarginRight = NULL;
- XMLPropertyState* pParaMarginRightRel = NULL;
- XMLPropertyState* pParaMarginTop = NULL;
- XMLPropertyState* pParaMarginTopRel = NULL;
- XMLPropertyState* pParaMarginBottom = NULL;
- XMLPropertyState* pParaMarginBottomRel = NULL;
-
- XMLPropertyState* pParaAdjust = NULL;
- XMLPropertyState* pParaAdjustLast = NULL;
+ XMLPropertyState* pPadding = nullptr;
+ XMLPropertyState* pPadding_Bottom = nullptr;
+ XMLPropertyState* pPadding_Left = nullptr;
+ XMLPropertyState* pPadding_Right = nullptr;
+ XMLPropertyState* pPadding_Top = nullptr;
+
+ XMLPropertyState* pBorder = nullptr;
+ XMLPropertyState* pBorder_Bottom = nullptr;
+ XMLPropertyState* pBorder_Left = nullptr;
+ XMLPropertyState* pBorder_Right = nullptr;
+ XMLPropertyState* pBorder_Top = nullptr;
+ XMLPropertyState* pSWBorder = nullptr;
+ XMLPropertyState* pSWBorder_Bottom = nullptr;
+ XMLPropertyState* pSWBorder_Left = nullptr;
+ XMLPropertyState* pSWBorder_Right = nullptr;
+ XMLPropertyState* pSWBorder_Top = nullptr;
+
+ XMLPropertyState* pAllBorderWidthState = nullptr;
+ XMLPropertyState* pLeftBorderWidthState = nullptr;
+ XMLPropertyState* pRightBorderWidthState = nullptr;
+ XMLPropertyState* pTopBorderWidthState = nullptr;
+ XMLPropertyState* pBottomBorderWidthState = nullptr;
+ XMLPropertyState* pSWAllBorderWidthState = nullptr;
+ XMLPropertyState* pSWLeftBorderWidthState = nullptr;
+ XMLPropertyState* pSWRightBorderWidthState = nullptr;
+ XMLPropertyState* pSWTopBorderWidthState = nullptr;
+ XMLPropertyState* pSWBottomBorderWidthState = nullptr;
+ XMLPropertyState* pDiagonalTLBRWidthState = nullptr;
+ XMLPropertyState* pDiagonalBLTRWidthState = nullptr;
+
+ XMLPropertyState* pParaMarginLeft = nullptr;
+ XMLPropertyState* pParaMarginLeftRel = nullptr;
+ XMLPropertyState* pParaMarginRight = nullptr;
+ XMLPropertyState* pParaMarginRightRel = nullptr;
+ XMLPropertyState* pParaMarginTop = nullptr;
+ XMLPropertyState* pParaMarginTopRel = nullptr;
+ XMLPropertyState* pParaMarginBottom = nullptr;
+ XMLPropertyState* pParaMarginBottomRel = nullptr;
+
+ XMLPropertyState* pParaAdjust = nullptr;
+ XMLPropertyState* pParaAdjustLast = nullptr;
::std::vector< XMLPropertyState >::iterator aEndIter(rProperties.end());
for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx
index 6cff5eff454a..ce27051d1115 100644
--- a/sc/source/filter/xml/xmlstyle.hxx
+++ b/sc/source/filter/xml/xmlstyle.hxx
@@ -118,7 +118,7 @@ public:
SvXMLExport& rExport,
const XMLPropertyState& rProperty,
SvXmlExportFlags nFlags,
- const ::std::vector< XMLPropertyState > *pProperties = 0,
+ const ::std::vector< XMLPropertyState > *pProperties = nullptr,
sal_uInt32 nIdx = 0 ) const override;
/** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set */
@@ -127,7 +127,7 @@ public:
const XMLPropertyState& rProperty,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const ::std::vector< XMLPropertyState > *pProperties = 0,
+ const ::std::vector< XMLPropertyState > *pProperties = nullptr,
sal_uInt32 nIdx = 0 ) const override;
};
@@ -158,7 +158,7 @@ public:
const XMLPropertyState& rProperty,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const ::std::vector< XMLPropertyState > *pProperties = 0,
+ const ::std::vector< XMLPropertyState > *pProperties = nullptr,
sal_uInt32 nIdx = 0 ) const override;
};
@@ -176,7 +176,7 @@ public:
const XMLPropertyState& rProperty,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const ::std::vector< XMLPropertyState > *pProperties = 0,
+ const ::std::vector< XMLPropertyState > *pProperties = nullptr,
sal_uInt32 nIdx = 0 ) const override;
};
@@ -217,7 +217,7 @@ public:
ScXMLStyleExport(
SvXMLExport& rExp,
const OUString& rPoolStyleName,
- SvXMLAutoStylePoolP *pAutoStyleP=0 );
+ SvXMLAutoStylePoolP *pAutoStyleP=nullptr );
virtual ~ScXMLStyleExport();
};
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index aecabd5aa620..f1aae904e0af 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -91,17 +91,17 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
CTF_SC_TOPBORDER, CTF_SC_BOTTOMBORDER };
SvXMLImportPropertyMapper::finished(rProperties, nStartIndex, nEndIndex);
- XMLPropertyState* pAllPaddingProperty(NULL);
- XMLPropertyState* pPadding[4] = { NULL, NULL, NULL, NULL };
- XMLPropertyState* pNewPadding[4] = { NULL, NULL, NULL, NULL };
- XMLPropertyState* pAllBorderProperty = NULL;
- XMLPropertyState* pBorders[4] = { NULL, NULL, NULL, NULL };
- XMLPropertyState* pNewBorders[4] = { NULL, NULL, NULL, NULL };
- XMLPropertyState* pAllBorderWidthProperty = NULL;
- XMLPropertyState* pBorderWidths[4] = { NULL, NULL, NULL, NULL };
- XMLPropertyState* pDiagBorders[2] = { 0 };
- XMLPropertyState* pOldDiagBorderWidths[2] = { 0 }; // old attribute names without "s"
- XMLPropertyState* pDiagBorderWidths[2] = { 0 };
+ XMLPropertyState* pAllPaddingProperty(nullptr);
+ XMLPropertyState* pPadding[4] = { nullptr, nullptr, nullptr, nullptr };
+ XMLPropertyState* pNewPadding[4] = { nullptr, nullptr, nullptr, nullptr };
+ XMLPropertyState* pAllBorderProperty = nullptr;
+ XMLPropertyState* pBorders[4] = { nullptr, nullptr, nullptr, nullptr };
+ XMLPropertyState* pNewBorders[4] = { nullptr, nullptr, nullptr, nullptr };
+ XMLPropertyState* pAllBorderWidthProperty = nullptr;
+ XMLPropertyState* pBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr };
+ XMLPropertyState* pDiagBorders[2] = { nullptr };
+ XMLPropertyState* pOldDiagBorderWidths[2] = { nullptr }; // old attribute names without "s"
+ XMLPropertyState* pDiagBorderWidths[2] = { nullptr };
::std::vector< XMLPropertyState >::iterator endproperty(rProperties.end());
for (::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
@@ -229,9 +229,9 @@ ScXMLRowImportPropertyMapper::~ScXMLRowImportPropertyMapper()
void ScXMLRowImportPropertyMapper::finished(::std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const
{
SvXMLImportPropertyMapper::finished(rProperties, nStartIndex, nEndIndex);
- XMLPropertyState* pHeight(NULL);
- XMLPropertyState* pOptimalHeight(NULL);
- XMLPropertyState* pPageBreak(NULL);
+ XMLPropertyState* pHeight(nullptr);
+ XMLPropertyState* pOptimalHeight(nullptr);
+ XMLPropertyState* pPageBreak(nullptr);
::std::vector< XMLPropertyState >::iterator endproperty(rProperties.end());
for (::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
aIter != endproperty; ++aIter)
@@ -447,7 +447,7 @@ XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport,
nNumberFormat(-1),
nLastSheet(-1),
bParentSet(false),
- mpCondFormat(NULL),
+ mpCondFormat(nullptr),
mbDeleteCondFormat(true)
{
}
@@ -463,7 +463,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext(NULL);
+ SvXMLImportContext *pContext(nullptr);
if( (XML_NAMESPACE_STYLE == nPrefix) &&
IsXMLToken(rLocalName, XML_MAP ) )
@@ -594,7 +594,7 @@ void XMLTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::An
XMLPropertyState* XMLTableStyleContext::FindProperty(const sal_Int16 nContextID)
{
- XMLPropertyState* pRet = NULL;
+ XMLPropertyState* pRet = nullptr;
rtl::Reference < XMLPropertySetMapper > xPrMap;
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
pStyles->GetImportPropertyMapper( GetFamily() );
@@ -948,7 +948,7 @@ SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleChildContext(
const OUString& rLocalName,
const uno::Reference< XAttributeList > & xAttrList )
{
- SvXMLStyleContext *pContext(0);
+ SvXMLStyleContext *pContext(nullptr);
if( (XML_NAMESPACE_STYLE == nPrefix) &&
IsXMLToken(rLocalName, XML_MASTER_PAGE) &&
@@ -968,7 +968,7 @@ SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleStyleChildContext(
const OUString& /* rLocalName */,
const uno::Reference< XAttributeList > & /* xAttrList */ )
{
- return 0;
+ return nullptr;
}
void ScXMLMasterStylesContext::EndElement()
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index fa7d491335d8..e0a18c846a52 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -249,7 +249,7 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
return new SvXMLImportContext(GetImport(), nPrefix, rLName);
}
- SvXMLImportContext *pContext(0);
+ SvXMLImportContext *pContext(nullptr);
switch (nToken)
{
@@ -472,7 +472,7 @@ ScXMLTableProtectionContext::~ScXMLTableProtectionContext()
SvXMLImportContext* ScXMLTableProtectionContext::CreateChildContext(
sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ )
{
- return NULL;
+ return nullptr;
}
void ScXMLTableProtectionContext::EndElement()
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index feeea1b72372..a365584f05d8 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -303,7 +303,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
nReturn = rDoc.GetRangeOverflowType();
// free the component
- xParser->setDocumentHandler( NULL );
+ xParser->setDocumentHandler( nullptr );
// success!
return nReturn;
@@ -460,11 +460,11 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
SAL_INFO( "sc.filter", "meta import end" );
}
- SvXMLGraphicHelper* pGraphicHelper = NULL;
+ SvXMLGraphicHelper* pGraphicHelper = nullptr;
uno::Reference< document::XGraphicObjectResolver > xGrfContainer;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = NULL;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
if( xStorage.is() )
{
@@ -828,7 +828,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
bool bStylesRet (false);
bool bDocRet(false);
bool bSettingsRet(false);
- ScMySharedData* pSharedData = NULL;
+ ScMySharedData* pSharedData = nullptr;
bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
@@ -878,10 +878,10 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
}
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
uno::Reference< document::XGraphicObjectResolver > xGrfContainer;
- SvXMLGraphicHelper* pGraphicHelper = 0;
+ SvXMLGraphicHelper* pGraphicHelper = nullptr;
if( xStorage.is() )
{
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index e50345fc7b29..eb10c6004350 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -112,9 +112,9 @@ void SAL_CALL ScAccessibleCell::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
- mpAccDoc = NULL;
+ mpAccDoc = nullptr;
ScAccessibleCellBase::disposing();
}
@@ -161,7 +161,7 @@ Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const
vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos);
if (pWindow)
{
- Rectangle aRect = pWindow->GetWindowExtentsRelative(NULL);
+ Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
aCellRect.setX(aCellRect.getX() + aRect.getX());
aCellRect.setY(aCellRect.getY() + aRect.getY());
}
@@ -290,7 +290,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- utl::AccessibleRelationSetHelper* pRelationSet = NULL;
+ utl::AccessibleRelationSetHelper* pRelationSet = nullptr;
if (mpAccDoc)
pRelationSet = mpAccDoc->GetRelationSet(&maCellAddress);
if (!pRelationSet)
@@ -326,7 +326,7 @@ uno::Sequence< OUString> SAL_CALL
bool ScAccessibleCell::IsDefunc(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- return ScAccessibleContextBase::IsDefunc() || (mpDoc == NULL) || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpDoc == nullptr) || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
@@ -386,7 +386,7 @@ bool ScAccessibleCell::IsSelected()
ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
{
- ScDocument* pDoc = NULL;
+ ScDocument* pDoc = nullptr;
if (pViewShell)
pDoc = pViewShell->GetViewData().GetDocument();
return pDoc;
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 1de3ee8581a7..b971cff5af44 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -95,7 +95,7 @@ void SAL_CALL ScAccessibleContextBase::disposing()
uno::Reference< XAccessibleEventBroadcaster > xBroadcaster (mxParent->getAccessibleContext(), uno::UNO_QUERY);
if (xBroadcaster.is())
xBroadcaster->removeAccessibleEventListener(this);
- mxParent = NULL;
+ mxParent = nullptr;
}
ScAccessibleContextBaseWeakImpl::disposing();
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 5fb03c99b8fd..d5561f44c028 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -97,7 +97,7 @@ ScAccessibleCsvControl::~ScAccessibleCsvControl()
void SAL_CALL ScAccessibleCsvControl::disposing()
{
SolarMutexGuard aGuard;
- mpControl = NULL;
+ mpControl = nullptr;
ScAccessibleContextBase::disposing();
}
@@ -107,7 +107,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvControl::getAccessibleAtPoint(
throw( RuntimeException, std::exception )
{
ensureAlive();
- return NULL;
+ return nullptr;
}
bool SAL_CALL ScAccessibleCsvControl::isVisible() throw( RuntimeException, std::exception )
@@ -176,7 +176,7 @@ Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const throw( RuntimeE
{
SolarMutexGuard aGuard;
ensureAlive();
- return implGetControl().GetWindowExtentsRelative( NULL );
+ return implGetControl().GetWindowExtentsRelative( nullptr );
}
Rectangle ScAccessibleCsvControl::GetBoundingBox() const throw( RuntimeException, std::exception )
@@ -257,7 +257,7 @@ void ScAccessibleCsvControl::implDispose()
Point ScAccessibleCsvControl::implGetAbsPos( const Point& rPos ) const
{
- return rPos + implGetControl().GetWindowExtentsRelative( NULL ).TopLeft();
+ return rPos + implGetControl().GetWindowExtentsRelative( nullptr ).TopLeft();
}
// Ruler ======================================================================
@@ -1009,14 +1009,14 @@ Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleRowHead
throw( RuntimeException, std::exception )
{
ensureAlive();
- return NULL;
+ return nullptr;
}
Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnHeaders()
throw( RuntimeException, std::exception )
{
ensureAlive();
- return NULL;
+ return nullptr;
}
Sequence< sal_Int32 > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleRows()
@@ -1073,14 +1073,14 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCaption()
throw( RuntimeException, std::exception )
{
ensureAlive();
- return NULL;
+ return nullptr;
}
Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleSummary()
throw( RuntimeException, std::exception )
{
ensureAlive();
- return NULL;
+ return nullptr;
}
sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleSelected( sal_Int32 /* nRow */, sal_Int32 nColumn )
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index d1279ced0851..65603904aaa6 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -106,7 +106,7 @@ using ::std::for_each;
struct ScAccessibleShapeData
{
- ScAccessibleShapeData() : pRelationCell(NULL), bSelected(false), bSelectable(true) {}
+ ScAccessibleShapeData() : pRelationCell(nullptr), bSelected(false), bSelectable(true) {}
~ScAccessibleShapeData();
mutable rtl::Reference< ::accessibility::AccessibleShape > pAccShape;
mutable ScAddress* pRelationCell; // if it is NULL this shape is anchored on the table
@@ -339,7 +339,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
meSplitPos(eSplitPos)
{
FillSelectionSupplier();
- maZOrderedShapes.push_back(NULL); // add an element which represents the table
+ maZOrderedShapes.push_back(nullptr); // add an element which represents the table
GetCount(); // fill list with filtered shapes (no internal shapes)
@@ -363,7 +363,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument()->GetDrawLayer()) );
maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
- maShapeTreeInfo.SetController(NULL);
+ maShapeTreeInfo.SetController(nullptr);
maShapeTreeInfo.SetWindow(pViewShell->GetWindowByPos(meSplitPos));
maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
}
@@ -393,7 +393,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument()->GetDrawLayer()) );
maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
- maShapeTreeInfo.SetController(NULL);
+ maShapeTreeInfo.SetController(nullptr);
maShapeTreeInfo.SetWindow(mpViewShell->GetWindowByPos(meSplitPos));
maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
}
@@ -509,7 +509,7 @@ bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurrentC
}
}
}
- return NULL;
+ return nullptr;
}
css::uno::Reference < css::accessibility::XAccessible >
@@ -527,7 +527,7 @@ ScChildrenShapes::GetAccessibleCaption (const css::uno::Reference < css::drawing
return xNewChild;
}
}
- return NULL;
+ return nullptr;
}
sal_Int32 ScChildrenShapes::GetCount() const
@@ -553,7 +553,7 @@ sal_Int32 ScChildrenShapes::GetCount() const
uno::Reference< XAccessible > ScChildrenShapes::Get(const ScAccessibleShapeData* pData) const
{
if (!pData)
- return NULL;
+ return nullptr;
if (!pData->pAccShape.is())
{
@@ -580,7 +580,7 @@ uno::Reference< XAccessible > ScChildrenShapes::Get(sal_Int32 nIndex) const
GetCount(); // fill list with filtered shapes (no internal shapes)
if (static_cast<sal_uInt32>(nIndex) >= maZOrderedShapes.size())
- return NULL;
+ return nullptr;
return Get(maZOrderedShapes[nIndex]);
}
@@ -880,7 +880,7 @@ void ScChildrenShapes::Deselect(sal_Int32 nChildIndex)
SdrPage* ScChildrenShapes::GetDrawPage() const
{
SCTAB nTab(mpAccessibleDocument->getVisibleTable());
- SdrPage* pDrawPage = NULL;
+ SdrPage* pDrawPage = nullptr;
if (mpViewShell)
{
ScViewData& rViewData = mpViewShell->GetViewData();
@@ -903,7 +903,7 @@ struct SetRelation
SetRelation(const ScChildrenShapes* pChildrenShapes, const ScAddress* pAddress)
:
mpChildrenShapes(pChildrenShapes),
- mpRelationSet(NULL),
+ mpRelationSet(nullptr),
mpAddress(pAddress)
{
}
@@ -955,7 +955,7 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
}
else
mnShapesSelected = 0;
- SdrObject *pFocusedObj = NULL;
+ SdrObject *pFocusedObj = nullptr;
if( mnShapesSelected == 1 && aShapesList.size() == 1)
{
pFocusedObj = GetSdrObjectFromXShape(aShapesList[0]->xShape);
@@ -1034,9 +1034,9 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
bWinFocus = pWin->HasFocus();
}
}
- const SdrMarkList* pMarkList = NULL;
- SdrObject* pMarkedObj = NULL;
- SdrObject* pUpObj = NULL;
+ const SdrMarkList* pMarkList = nullptr;
+ SdrObject* pMarkedObj = nullptr;
+ SdrObject* pUpObj = nullptr;
bool bIsFocuseMarked = true;
if( mpViewShell && mnShapesSelected == 1 && bWinFocus)
{
@@ -1169,7 +1169,7 @@ void ScChildrenShapes::FillSelectionSupplier() const
ScAddress* ScChildrenShapes::GetAnchor(const uno::Reference<drawing::XShape>& xShape) const
{
- ScAddress* pAddress = NULL;
+ ScAddress* pAddress = nullptr;
if (mpViewShell)
{
SvxShape* pShapeImp = SvxShape::getImplementation(xShape);
@@ -1336,7 +1336,7 @@ bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape,
aShape.xShape = xShape;
ScShapeDataLess aLess;
rItr = std::lower_bound(maZOrderedShapes.begin(), maZOrderedShapes.end(), &aShape, aLess);
- if ((rItr != maZOrderedShapes.end()) && (*rItr != NULL) && ((*rItr)->xShape.get() == xShape.get()))
+ if ((rItr != maZOrderedShapes.end()) && (*rItr != nullptr) && ((*rItr)->xShape.get() == xShape.get()))
bResult = true; // if the shape is found
#if OSL_DEBUG_LEVEL > 0 // test whether it finds truly the correct shape (perhaps it is not really sorted)
@@ -1402,8 +1402,8 @@ ScAccessibleDocument::ScAccessibleDocument(
: ScAccessibleDocumentBase(rxParent),
mpViewShell(pViewShell),
meSplitPos(eSplitPos),
- mpChildrenShapes(NULL),
- mpTempAccEdit(NULL),
+ mpChildrenShapes(nullptr),
+ mpTempAccEdit(nullptr),
mbCompleteSheetSelected(false)
{
maVisArea = GetVisibleArea_Impl();
@@ -1465,7 +1465,7 @@ void SAL_CALL ScAccessibleDocument::disposing()
pWin->RemoveChildEventListener( LINK( this, ScAccessibleDocument, WindowChildEventListener ));
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
if (mpChildrenShapes)
DELETEZ(mpChildrenShapes);
@@ -1617,7 +1617,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpTempAccEdit)
mpTempAccEdit->LostFocus();
- mpTempAccEdit = NULL;
+ mpTempAccEdit = nullptr;
RemoveChild(mxTempAcc, true);
if (mpAccessibleSpreadsheet.is() && mpViewShell && mpViewShell->IsActive())
mpAccessibleSpreadsheet->GotFocus();
@@ -1720,7 +1720,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin
const awt::Point& rPoint )
throw (uno::RuntimeException, std::exception)
{
- uno::Reference<XAccessible> xAccessible = NULL;
+ uno::Reference<XAccessible> xAccessible = nullptr;
if (containsPoint(rPoint))
{
SolarMutexGuard aGuard;
@@ -2132,7 +2132,7 @@ Point ScAccessibleDocument::LogicToPixel (const Point& rPoint) const
if (pWin)
{
aPoint = pWin->LogicToPixel(rPoint, pWin->GetDrawMapMode());
- aPoint += pWin->GetWindowExtentsRelative(NULL).TopLeft();
+ aPoint += pWin->GetWindowExtentsRelative(nullptr).TopLeft();
}
return aPoint;
}
@@ -2152,7 +2152,7 @@ Size ScAccessibleDocument::LogicToPixel (const Size& rSize) const
utl::AccessibleRelationSetHelper* ScAccessibleDocument::GetRelationSet(const ScAddress* pAddress) const
{
- utl::AccessibleRelationSetHelper* pRelationSet = NULL;
+ utl::AccessibleRelationSetHelper* pRelationSet = nullptr;
if (mpChildrenShapes)
pRelationSet = mpChildrenShapes->GetRelationSet(pAddress);
return pRelationSet;
@@ -2186,7 +2186,7 @@ Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const
{
vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos);
if (pWindow)
- aRect = pWindow->GetWindowExtentsRelative(NULL);
+ aRect = pWindow->GetWindowExtentsRelative(nullptr);
}
return aRect;
}
@@ -2251,7 +2251,7 @@ bool ScAccessibleDocument::IsTableSelected() const
bool ScAccessibleDocument::IsDefunc(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- return ScAccessibleContextBase::IsDefunc() || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
@@ -2286,7 +2286,7 @@ void ScAccessibleDocument::RemoveChild(const uno::Reference<XAccessible>& xAcc,
aEvent.OldValue <<= mxTempAcc;
CommitChange( aEvent );
}
- mxTempAcc = NULL;
+ mxTempAcc = nullptr;
}
}
@@ -2309,7 +2309,7 @@ OUString ScAccessibleDocument::GetCurrentCellDescription()
ScDocument *ScAccessibleDocument::GetDocument() const
{
- return mpViewShell ? mpViewShell->GetViewData().GetDocument() : NULL;
+ return mpViewShell ? mpViewShell->GetViewData().GetDocument() : nullptr;
}
ScAddress ScAccessibleDocument::GetCurCellAddress() const
@@ -2329,7 +2329,7 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
sal_uInt16 sheetIndex;
OUString sSheetName;
sheetIndex = getVisibleTable();
- if(GetDocument()==NULL)
+ if(GetDocument()==nullptr)
return anyAtrribute;
GetDocument()->GetName(sheetIndex,sSheetName);
sName = "page-name:";
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index d32f3c1416c1..4cccf56c8b9a 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -74,7 +74,7 @@ struct ScAccNote
bool mbMarkNote;
ScAccNote()
- : mpTextHelper(NULL)
+ : mpTextHelper(nullptr)
, mnParaCount(0)
, mbMarkNote(false)
{
@@ -474,7 +474,7 @@ void ScNotesChildren::DataChanged(const Rectangle& rVisRect)
inline ScDocument* ScNotesChildren::GetDocument() const
{
- ScDocument* pDoc = NULL;
+ ScDocument* pDoc = nullptr;
if (mpViewShell)
pDoc = &mpViewShell->GetDocument();
return pDoc;
@@ -503,7 +503,7 @@ private:
};
ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
- : mpViewShell(NULL), mpAccDoc(NULL), mbValid(false)
+ : mpViewShell(nullptr), mpAccDoc(nullptr), mbValid(false)
{
}
@@ -1019,7 +1019,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi
{
::accessibility::AccessibleShapeTreeInfo aShapeTreeInfo;
aShapeTreeInfo.SetSdrView(mpViewShell->GetPreview()->GetDrawView());
- aShapeTreeInfo.SetController(NULL);
+ aShapeTreeInfo.SetController(nullptr);
aShapeTreeInfo.SetWindow(mpViewShell->GetWindow());
aShapeTreeInfo.SetViewForwarder(&(maShapeRanges[rShape.mnRangeId].maViewForwarder));
rShape.mpAccShape = rShapeHandler.CreateAccessibleObject(aShapeInfo, aShapeTreeInfo);
@@ -1115,7 +1115,7 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode
SdrPage* ScShapeChildren::GetDrawPage() const
{
SCTAB nTab( mpViewShell->GetLocationData().GetPrintTab() );
- SdrPage* pDrawPage = NULL;
+ SdrPage* pDrawPage = nullptr;
ScDocument& rDoc = mpViewShell->GetDocument();
if (rDoc.GetDrawLayer())
{
@@ -1192,10 +1192,10 @@ ScAccessibleDocumentPagePreview::ScAccessibleDocumentPagePreview(
const uno::Reference<XAccessible>& rxParent, ScPreviewShell* pViewShell ) :
ScAccessibleDocumentBase(rxParent),
mpViewShell(pViewShell),
- mpNotesChildren(NULL),
- mpShapeChildren(NULL),
- mpHeader(NULL),
- mpFooter(NULL)
+ mpNotesChildren(nullptr),
+ mpShapeChildren(nullptr),
+ mpHeader(nullptr),
+ mpFooter(nullptr)
{
if (pViewShell)
pViewShell->AddAccessibilityObject(*this);
@@ -1220,18 +1220,18 @@ void SAL_CALL ScAccessibleDocumentPagePreview::disposing()
if (mpHeader)
{
mpHeader->release();
- mpHeader = NULL;
+ mpHeader = nullptr;
}
if (mpFooter)
{
mpFooter->release();
- mpFooter = NULL;
+ mpFooter = nullptr;
}
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
// no need to Dispose the AccessibleTextHelper,
@@ -1576,7 +1576,7 @@ Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const throw
{
vcl::Window* pWindow = mpViewShell->GetWindow();
if (pWindow)
- aRect = pWindow->GetWindowExtentsRelative(NULL);
+ aRect = pWindow->GetWindowExtentsRelative(nullptr);
}
return aRect;
}
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 58ce83085854..122a080a1754 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -63,7 +63,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(
const OUString& rDescription, EditObjectType eObjectType)
:
ScAccessibleContextBase(rxParent, AccessibleRole::TEXT_FRAME),
- mpTextHelper(NULL),
+ mpTextHelper(nullptr),
mpEditView(pEditView),
mpWindow(pWin),
meObjectType(eObjectType),
@@ -82,11 +82,11 @@ ScAccessibleEditObject::ScAccessibleEditObject(
}
else
{
- m_pScDoc=NULL;
+ m_pScDoc=nullptr;
}
}
else
- m_pScDoc=NULL;
+ m_pScDoc=nullptr;
}
ScAccessibleEditObject::~ScAccessibleEditObject()
@@ -185,7 +185,7 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const
MapMode aMapMode( mpEditView->GetEditEngine()->GetRefMapMode() );
aScreenBounds = mpWindow->LogicToPixel( mpEditView->GetOutputArea(), aMapMode );
Point aCellLoc = aScreenBounds.TopLeft();
- Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( NULL );
+ Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr );
Point aWindowLoc = aWindowRect.TopLeft();
Point aPos( aCellLoc.getX() + aWindowLoc.getX(), aCellLoc.getY() + aWindowLoc.getY() );
aScreenBounds.SetPos( aPos );
@@ -193,7 +193,7 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const
}
else
{
- aScreenBounds = mpWindow->GetWindowExtentsRelative( NULL );
+ aScreenBounds = mpWindow->GetWindowExtentsRelative( nullptr );
}
}
@@ -366,7 +366,7 @@ void ScAccessibleEditObject::CreateTextHelper()
else
{
pAccessibleTextData.reset
- (new ScAccessibleEditLineTextData(NULL, mpWindow));
+ (new ScAccessibleEditLineTextData(nullptr, mpWindow));
}
::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleTextData)));
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 72ce834e4f78..1a20e96977ce 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -78,7 +78,7 @@ struct Dispose
pArea->dispose();
pArea->release();
}
- pArea = NULL;
+ pArea = nullptr;
}
};
@@ -88,7 +88,7 @@ ScAccessibleContextBase( rxParent, bHeader ? AccessibleRole::HEADER : Accessible
mpViewShell( pViewShell ),
mnIndex( nIndex ),
mbHeader( bHeader ),
- maAreas(MAX_AREAS, NULL),
+ maAreas(MAX_AREAS, nullptr),
mnChildCount(-1)
{
if (mpViewShell)
@@ -111,7 +111,7 @@ void SAL_CALL ScAccessiblePageHeader::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
std::for_each(maAreas.begin(), maAreas.end(), Dispose());
@@ -352,7 +352,7 @@ Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const throw (uno::Run
vcl::Window* pWindow = mpViewShell->GetWindow();
if (pWindow)
{
- Rectangle aRect = pWindow->GetWindowExtentsRelative(NULL);
+ Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
aCellRect.setX(aCellRect.getX() + aRect.getX());
aCellRect.setY(aCellRect.getY() + aRect.getY());
}
@@ -386,7 +386,7 @@ Rectangle ScAccessiblePageHeader::GetBoundingBox() const throw (uno::RuntimeExce
bool ScAccessiblePageHeader::IsDefunc( const uno::Reference<XAccessibleStateSet>& rxParentStates )
{
- return ScAccessibleContextBase::IsDefunc() || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
@@ -415,7 +415,7 @@ void ScAccessiblePageHeader::AddChild(const EditTextObject* pArea, sal_uInt32 nI
if (maAreas[nIndex])
{
maAreas[nIndex]->release();
- maAreas[nIndex] = NULL;
+ maAreas[nIndex] = nullptr;
}
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index d22ddfdd6acb..0c76e2ab20cd 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -56,7 +56,7 @@ ScAccessiblePageHeaderArea::ScAccessiblePageHeaderArea(
SvxAdjust eAdjust)
: ScAccessibleContextBase(rxParent, AccessibleRole::TEXT),
mpEditObj(pEditObj->Clone()),
- mpTextHelper(NULL),
+ mpTextHelper(nullptr),
mpViewShell(pViewShell),
mbHeader(bHeader),
meAdjust(eAdjust)
@@ -81,7 +81,7 @@ void SAL_CALL ScAccessiblePageHeaderArea::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
if (mpTextHelper)
DELETEZ(mpTextHelper);
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 54c2a246855c..939b5297a4cb 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -50,9 +50,9 @@ ScAccessiblePreviewCell::ScAccessiblePreviewCell( const css::uno::Reference<css:
ScPreviewShell* pViewShell,
/* const */ ScAddress& rCellAddress,
sal_Int32 nIndex ) :
- ScAccessibleCellBase( rxParent, ( pViewShell ? &pViewShell->GetDocument() : NULL ), rCellAddress, nIndex ),
+ ScAccessibleCellBase( rxParent, ( pViewShell ? &pViewShell->GetDocument() : nullptr ), rCellAddress, nIndex ),
mpViewShell( pViewShell ),
- mpTextHelper(NULL)
+ mpTextHelper(nullptr)
{
if (mpViewShell)
mpViewShell->AddAccessibilityObject(*this);
@@ -75,7 +75,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
if (mpTextHelper)
@@ -219,7 +219,7 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const throw (uno::Ru
vcl::Window* pWindow = mpViewShell->GetWindow();
if (pWindow)
{
- Rectangle aRect = pWindow->GetWindowExtentsRelative(NULL);
+ Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
aCellRect.setX(aCellRect.getX() + aRect.getX());
aCellRect.setY(aCellRect.getY() + aRect.getY());
}
@@ -252,7 +252,7 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBox() const throw (uno::RuntimeExc
bool ScAccessiblePreviewCell::IsDefunc(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- return ScAccessibleContextBase::IsDefunc() || (mpDoc == NULL) || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpDoc == nullptr) || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 5701e538bb88..54f456bd3f66 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -83,12 +83,12 @@ ScAccessiblePreviewHeaderCell::ScAccessiblePreviewHeaderCell( const css::uno::Re
sal_Int32 nIndex ) :
ScAccessibleContextBase( rxParent, AccessibleRole::TABLE_CELL ),
mpViewShell( pViewShell ),
- mpTextHelper( NULL ),
+ mpTextHelper( nullptr ),
mnIndex( nIndex ),
maCellPos( rCellPos ),
mbColumnHeader( bIsColHdr ),
mbRowHeader( bIsRowHdr ),
- mpTableInfo( NULL )
+ mpTableInfo( nullptr )
{
if (mpViewShell)
mpViewShell->AddAccessibilityObject(*this);
@@ -106,7 +106,7 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
if (mpTableInfo)
@@ -348,7 +348,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const throw (u
vcl::Window* pWindow = mpViewShell->GetWindow();
if (pWindow)
{
- Rectangle aRect = pWindow->GetWindowExtentsRelative(NULL);
+ Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
aCellRect.setX(aCellRect.getX() + aRect.getX());
aCellRect.setY(aCellRect.getY() + aRect.getY());
}
@@ -418,7 +418,7 @@ OUString SAL_CALL ScAccessiblePreviewHeaderCell::createAccessibleName() throw(un
bool ScAccessiblePreviewHeaderCell::IsDefunc( const uno::Reference<XAccessibleStateSet>& rxParentStates )
{
- return ScAccessibleContextBase::IsDefunc() || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 947b988d81fd..b1af3790bc83 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -51,7 +51,7 @@ ScAccessiblePreviewTable::ScAccessiblePreviewTable( const css::uno::Reference<cs
ScAccessibleContextBase( rxParent, AccessibleRole::TABLE ),
mpViewShell( pViewShell ),
mnIndex( nIndex ),
- mpTableInfo( NULL )
+ mpTableInfo( nullptr )
{
if (mpViewShell)
mpViewShell->AddAccessibilityObject(*this);
@@ -73,7 +73,7 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
if (mpTableInfo)
@@ -252,13 +252,13 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnExtentAt( sal_In
uno::Reference< XAccessibleTable > SAL_CALL ScAccessiblePreviewTable::getAccessibleRowHeaders() throw (uno::RuntimeException, std::exception)
{
//! missing
- return NULL;
+ return nullptr;
}
uno::Reference< XAccessibleTable > SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnHeaders() throw (uno::RuntimeException, std::exception)
{
//! missing
- return NULL;
+ return nullptr;
}
uno::Sequence< sal_Int32 > SAL_CALL ScAccessiblePreviewTable::getSelectedAccessibleRows() throw (uno::RuntimeException, std::exception)
@@ -343,13 +343,13 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCe
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCaption() throw (uno::RuntimeException, std::exception)
{
//! missing
- return NULL;
+ return nullptr;
}
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleSummary() throw (uno::RuntimeException, std::exception)
{
//! missing
- return NULL;
+ return nullptr;
}
sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
@@ -637,7 +637,7 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const throw (uno::R
vcl::Window* pWindow = mpViewShell->GetWindow();
if (pWindow)
{
- Rectangle aRect = pWindow->GetWindowExtentsRelative(NULL);
+ Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr);
aCellRect.setX(aCellRect.getX() + aRect.getX());
aCellRect.setY(aCellRect.getY() + aRect.getY());
}
@@ -671,7 +671,7 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBox() const
bool ScAccessiblePreviewTable::IsDefunc( const uno::Reference<XAccessibleStateSet>& rxParentStates )
{
- return ScAccessibleContextBase::IsDefunc() || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 8c85c4518c6d..e1a56c54c812 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -197,7 +197,7 @@ bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc, ScRange *p
//In Src , Not in Dest
bool ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet)
{
- if (pSrc == NULL || pDest == NULL)
+ if (pSrc == nullptr || pDest == nullptr)
{
return false;
}
@@ -285,8 +285,8 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
ScSplitPos eSplitPos)
{
mpViewShell = pViewShell;
- mpMarkedRanges = 0;
- mpSortedMarkedCells = 0;
+ mpMarkedRanges = nullptr;
+ mpSortedMarkedCells = nullptr;
mpAccDoc = pAccDoc;
mpAccCell.clear();
meSplitPos = eSplitPos;
@@ -319,7 +319,7 @@ void SAL_CALL ScAccessibleSpreadsheet::disposing()
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
mpAccCell.clear();
@@ -1004,7 +1004,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAtP
}
catch(const css::lang::IndexOutOfBoundsException &)
{
- return NULL;
+ return nullptr;
}
}
}
@@ -1041,9 +1041,9 @@ sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getBackground( )
uno::Reference<XAccessibleRelationSet> SAL_CALL ScAccessibleSpreadsheet::getAccessibleRelationSet()
throw (css::uno::RuntimeException, std::exception)
{
- utl::AccessibleRelationSetHelper* pRelationSet = NULL;
+ utl::AccessibleRelationSetHelper* pRelationSet = nullptr;
if(mpAccDoc)
- pRelationSet = mpAccDoc->GetRelationSet(NULL);
+ pRelationSet = mpAccDoc->GetRelationSet(nullptr);
if (!pRelationSet)
pRelationSet = new utl::AccessibleRelationSetHelper();
return pRelationSet;
@@ -1356,7 +1356,7 @@ Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const
{
vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos);
if (pWindow)
- aRect = pWindow->GetWindowExtentsRelative(NULL);
+ aRect = pWindow->GetWindowExtentsRelative(nullptr);
}
return aRect;
}
@@ -1378,7 +1378,7 @@ Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const
bool ScAccessibleSpreadsheet::IsDefunc(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- return ScAccessibleContextBase::IsDefunc() || (mpViewShell == NULL) || !getAccessibleParent().is() ||
+ return ScAccessibleContextBase::IsDefunc() || (mpViewShell == nullptr) || !getAccessibleParent().is() ||
(rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC));
}
@@ -1427,7 +1427,7 @@ bool ScAccessibleSpreadsheet::IsCompleteSheetSelected()
ScDocument* ScAccessibleSpreadsheet::GetDocument(ScTabViewShell* pViewShell)
{
- ScDocument* pDoc = NULL;
+ ScDocument* pDoc = nullptr;
if (pViewShell)
pDoc = pViewShell->GetViewData().GetDocument();
return pDoc;
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 761f078926a4..c9e7e140eeda 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -54,7 +54,7 @@ ScAccessibleTableBase::~ScAccessibleTableBase()
void SAL_CALL ScAccessibleTableBase::disposing()
{
SolarMutexGuard aGuard;
- mpDoc = NULL;
+ mpDoc = nullptr;
ScAccessibleContextBase::disposing();
}
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 69cd4378d3b3..d18735d3a815 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -74,7 +74,7 @@ ScViewForwarder::~ScViewForwarder()
bool ScViewForwarder::IsValid() const
{
- return mpViewShell != NULL;
+ return mpViewShell != nullptr;
}
Rectangle ScViewForwarder::GetVisArea() const
@@ -137,7 +137,7 @@ Point ScViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMod
void ScViewForwarder::SetInvalid()
{
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
class ScEditObjectViewForwarder : public SvxViewForwarder
@@ -237,7 +237,7 @@ Point ScEditObjectViewForwarder::PixelToLogic( const Point& rPoint, const MapMod
void ScEditObjectViewForwarder::SetInvalid()
{
- mpWindow = NULL;
+ mpWindow = nullptr;
}
class ScPreviewViewForwarder : public SvxViewForwarder
@@ -265,7 +265,7 @@ public:
ScPreviewViewForwarder::ScPreviewViewForwarder(ScPreviewShell* pViewShell)
:
mpViewShell(pViewShell),
- mpTableInfo(NULL)
+ mpTableInfo(nullptr)
{
}
@@ -276,7 +276,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder()
bool ScPreviewViewForwarder::IsValid() const
{
- return mpViewShell != NULL;
+ return mpViewShell != nullptr;
}
Rectangle ScPreviewViewForwarder::GetVisArea() const
@@ -330,7 +330,7 @@ Point ScPreviewViewForwarder::PixelToLogic( const Point& rPoint, const MapMode&
void ScPreviewViewForwarder::SetInvalid()
{
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
Rectangle ScPreviewViewForwarder::GetVisRect() const
@@ -693,8 +693,8 @@ bool ScEditViewForwarder::Paste()
void ScEditViewForwarder::SetInvalid()
{
- mpWindow = NULL;
- mpEditView = NULL;
+ mpWindow = nullptr;
+ mpEditView = nullptr;
}
// ScAccessibleCellTextData: shared data between sub objects of a accessible cell text object
@@ -702,8 +702,8 @@ void ScEditViewForwarder::SetInvalid()
ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
const ScAddress& rP, ScSplitPos eSplitPos, ScAccessibleCell* pAccCell)
: ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
- mpViewForwarder(NULL),
- mpEditViewForwarder(NULL),
+ mpViewForwarder(nullptr),
+ mpEditViewForwarder(nullptr),
mpViewShell(pViewShell),
meSplitPos(eSplitPos),
mpAccessibleCell( pAccCell )
@@ -728,7 +728,7 @@ void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpViewShell = NULL; // invalid now
+ mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
if (mpEditViewForwarder)
@@ -929,7 +929,7 @@ SvxViewForwarder* ScAccessibleCellTextData::GetViewForwarder()
SvxEditViewForwarder* ScAccessibleCellTextData::GetEditViewForwarder( bool /* bCreate */ )
{
//#102219#; there should no EditViewForwarder be, because the cell is now readonly in this interface
- return NULL;
+ return nullptr;
}
IMPL_LINK_TYPED(ScAccessibleTextData, NotifyHdl, EENotify&, aNotify, void)
@@ -942,7 +942,7 @@ IMPL_LINK_TYPED(ScAccessibleTextData, NotifyHdl, EENotify&, aNotify, void)
ScDocShell* ScAccessibleCellTextData::GetDocShell(ScTabViewShell* pViewShell)
{
- ScDocShell* pDocSh = NULL;
+ ScDocShell* pDocSh = nullptr;
if (pViewShell)
pDocSh = pViewShell->GetViewData().GetDocShell();
return pDocSh;
@@ -950,11 +950,11 @@ ScDocShell* ScAccessibleCellTextData::GetDocShell(ScTabViewShell* pViewShell)
ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, vcl::Window* pWin, bool isClone)
:
- mpViewForwarder(NULL),
- mpEditViewForwarder(NULL),
+ mpViewForwarder(nullptr),
+ mpEditViewForwarder(nullptr),
mpEditView(pEditView),
- mpEditEngine(pEditView ? pEditView->GetEditEngine() : 0),
- mpForwarder(NULL),
+ mpEditEngine(pEditView ? pEditView->GetEditEngine() : nullptr),
+ mpForwarder(nullptr),
mpWindow(pWin)
{
// If the object is cloned, do NOT add notify hdl.
@@ -984,9 +984,9 @@ void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint&
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpWindow = NULL;
- mpEditView = NULL;
- mpEditEngine = NULL;
+ mpWindow = nullptr;
+ mpEditView = nullptr;
+ mpEditEngine = nullptr;
DELETEZ(mpForwarder);
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
@@ -1071,7 +1071,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
if (mbEditEngineCreated && mpEditEngine)
{
delete mpEditEngine;
- mpEditEngine = NULL; // don't access in ScAccessibleEditObjectTextData dtor!
+ mpEditEngine = nullptr; // don't access in ScAccessibleEditObjectTextData dtor!
}
else if (pTxtWnd && pTxtWnd->GetEditView() && pTxtWnd->GetEditView()->GetEditEngine())
{
@@ -1090,7 +1090,7 @@ void ScAccessibleEditLineTextData::Dispose()
pTxtWnd->RemoveAccessibleTextData( *this );
ResetEditMode();
- mpWindow = NULL;
+ mpWindow = nullptr;
}
ScAccessibleTextData* ScAccessibleEditLineTextData::Clone() const
@@ -1113,7 +1113,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
mpEditView = pTxtWnd->GetEditView();
ScAccessibleEditObjectTextData::GetTextForwarder(); // fill the mpForwarder
- mpEditEngine = NULL;
+ mpEditEngine = nullptr;
}
else
{
@@ -1123,7 +1123,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true);
+ mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
mbEditEngineCreated = true;
mpEditEngine->EnableUndo( false );
mpEditEngine->SetRefMapMode( MAP_100TH_MM );
@@ -1174,7 +1174,7 @@ void ScAccessibleEditLineTextData::ResetEditMode()
delete mpEditEngine;
else if (pTxtWnd && pTxtWnd->GetEditView() && pTxtWnd->GetEditView()->GetEditEngine())
pTxtWnd->GetEditView()->GetEditEngine()->SetNotifyHdl(Link<EENotify&,void>());
- mpEditEngine = NULL;
+ mpEditEngine = nullptr;
DELETEZ(mpForwarder);
DELETEZ(mpEditViewForwarder);
@@ -1196,7 +1196,7 @@ void ScAccessibleEditLineTextData::TextChanged()
void ScAccessibleEditLineTextData::StartEdit()
{
ResetEditMode();
- mpEditView = NULL;
+ mpEditView = nullptr;
// send HINT_BEGEDIT
SdrHint aHint(HINT_BEGEDIT);
@@ -1210,7 +1210,7 @@ void ScAccessibleEditLineTextData::EndEdit()
GetBroadcaster().Broadcast( aHint );
ResetEditMode();
- mpEditView = NULL;
+ mpEditView = nullptr;
}
// ScAccessiblePreviewCellTextData: shared data between sub objects of a accessible cell text object
@@ -1218,7 +1218,7 @@ void ScAccessibleEditLineTextData::EndEdit()
ScAccessiblePreviewCellTextData::ScAccessiblePreviewCellTextData(ScPreviewShell* pViewShell,
const ScAddress& rP)
: ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
- mpViewForwarder(NULL),
+ mpViewForwarder(nullptr),
mpViewShell(pViewShell)
{
}
@@ -1239,7 +1239,7 @@ void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpViewShell = NULL; // invalid now
+ mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
}
@@ -1254,7 +1254,7 @@ ScAccessibleTextData* ScAccessiblePreviewCellTextData::Clone() const
SvxTextForwarder* ScAccessiblePreviewCellTextData::GetTextForwarder()
{
- bool bEditEngineBefore(pEditEngine != NULL);
+ bool bEditEngineBefore(pEditEngine != nullptr);
ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
@@ -1282,7 +1282,7 @@ SvxViewForwarder* ScAccessiblePreviewCellTextData::GetViewForwarder()
ScDocShell* ScAccessiblePreviewCellTextData::GetDocShell(ScPreviewShell* pViewShell)
{
- ScDocShell* pDocSh = NULL;
+ ScDocShell* pDocSh = nullptr;
if (pViewShell)
pDocSh = static_cast<ScDocShell*>( pViewShell->GetDocument().GetDocumentShell());
return pDocSh;
@@ -1293,7 +1293,7 @@ ScDocShell* ScAccessiblePreviewCellTextData::GetDocShell(ScPreviewShell* pViewSh
ScAccessiblePreviewHeaderCellTextData::ScAccessiblePreviewHeaderCellTextData(ScPreviewShell* pViewShell,
const OUString& rText, const ScAddress& rP, bool bColHeader, bool bRowHeader)
: ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
- mpViewForwarder(NULL),
+ mpViewForwarder(nullptr),
mpViewShell(pViewShell),
maText(rText),
mbColHeader(bColHeader),
@@ -1317,7 +1317,7 @@ void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const S
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpViewShell = NULL; // invalid now
+ mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
}
@@ -1343,7 +1343,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true);
+ pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
}
pEditEngine->EnableUndo( false );
if (pDocShell)
@@ -1390,7 +1390,7 @@ SvxViewForwarder* ScAccessiblePreviewHeaderCellTextData::GetViewForwarder()
ScDocShell* ScAccessiblePreviewHeaderCellTextData::GetDocShell(ScPreviewShell* pViewShell)
{
- ScDocShell* pDocSh = NULL;
+ ScDocShell* pDocSh = nullptr;
if (pViewShell)
pDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
return pDocSh;
@@ -1399,11 +1399,11 @@ ScDocShell* ScAccessiblePreviewHeaderCellTextData::GetDocShell(ScPreviewShell* p
ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* pViewShell,
const EditTextObject* pEditObj, bool bHeader, SvxAdjust eAdjust)
:
- mpViewForwarder(NULL),
+ mpViewForwarder(nullptr),
mpViewShell(pViewShell),
- mpEditEngine(NULL),
- mpForwarder(NULL),
- mpDocSh(NULL),
+ mpEditEngine(nullptr),
+ mpForwarder(nullptr),
+ mpDocSh(nullptr),
mpEditObj(pEditObj),
mbHeader(bHeader),
mbDataValid(false),
@@ -1440,8 +1440,8 @@ void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpViewShell = NULL;// invalid now
- mpDocSh = NULL;
+ mpViewShell = nullptr;// invalid now
+ mpDocSh = nullptr;
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
}
@@ -1514,11 +1514,11 @@ SvxViewForwarder* ScAccessibleHeaderTextData::GetViewForwarder()
ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
const OUString& sText, const ScAddress& aCellPos, bool bMarkNote)
:
- mpViewForwarder(NULL),
+ mpViewForwarder(nullptr),
mpViewShell(pViewShell),
- mpEditEngine(NULL),
- mpForwarder(NULL),
- mpDocSh(NULL),
+ mpEditEngine(nullptr),
+ mpForwarder(nullptr),
+ mpDocSh(nullptr),
msText(sText),
maCellPos(aCellPos),
mbMarkNote(bMarkNote),
@@ -1555,8 +1555,8 @@ void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- mpViewShell = NULL;// invalid now
- mpDocSh = NULL;
+ mpViewShell = nullptr;// invalid now
+ mpDocSh = nullptr;
if (mpViewForwarder)
mpViewForwarder->SetInvalid();
}
@@ -1576,7 +1576,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true);
+ mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
}
mpEditEngine->EnableUndo( false );
if (mpDocSh)
@@ -1670,7 +1670,7 @@ Point ScCsvViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMap
void ScCsvViewForwarder::SetInvalid()
{
- mpWindow = NULL;
+ mpWindow = nullptr;
}
ScAccessibleCsvTextData::ScAccessibleCsvTextData(
@@ -1696,8 +1696,8 @@ void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
sal_uLong nId = pSimpleHint->GetId();
if( nId == SFX_HINT_DYING )
{
- mpWindow = NULL;
- mpEditEngine = NULL;
+ mpWindow = nullptr;
+ mpEditEngine = nullptr;
if (mpViewForwarder.get())
mpViewForwarder->SetInvalid();
}
@@ -1733,7 +1733,7 @@ SvxViewForwarder* ScAccessibleCsvTextData::GetViewForwarder()
SvxEditViewForwarder* ScAccessibleCsvTextData::GetEditViewForwarder( bool /* bCreate */ )
{
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 0416a688c66a..e6329bc5d5bc 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -37,12 +37,12 @@ struct StatisticCalculation {
static StatisticCalculation lclBasicStatistics[] =
{
- { STR_ANOVA_LABEL_GROUPS, NULL, NULL },
+ { STR_ANOVA_LABEL_GROUPS, nullptr, nullptr },
{ STRID_CALC_COUNT, "=COUNT(%RANGE%)", "COUNT_RANGE" },
{ STRID_CALC_SUM, "=SUM(%RANGE%)", "SUM_RANGE" },
{ STRID_CALC_MEAN, "=AVERAGE(%RANGE%)", "MEAN_RANGE" },
{ STRID_CALC_VARIANCE, "=VAR(%RANGE%)", "VAR_RANGE" },
- { 0, NULL, NULL }
+ { 0, nullptr, nullptr }
};
static sal_Int16 lclAnovaLabels[] =
@@ -166,7 +166,7 @@ void ScAnalysisOfVarianceDialog::FactorChanged()
void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalkerWriter& aOutput, FormulaTemplate& aTemplate,
OUString& sFormula, GroupedBy aGroupedBy, ScRange* pResultRange)
{
- if (pResultRange != NULL)
+ if (pResultRange != nullptr)
pResultRange->aStart = aOutput.current();
if (!sFormula.isEmpty())
{
@@ -176,7 +176,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke
aTemplate.setTemplate(sFormula);
aTemplate.applyRange(strWildcardRange, *pRange);
aOutput.writeFormula(aTemplate.getTemplate());
- if (pResultRange != NULL)
+ if (pResultRange != nullptr)
pResultRange->aEnd = aOutput.current();
aOutput.nextRow();
}
@@ -191,7 +191,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke
aTemplate.setTemplate(aLabelTemplate);
aTemplate.applyNumber(strWildcardNumber, i + 1);
aOutput.writeString(aTemplate.getTemplate());
- if (pResultRange != NULL)
+ if (pResultRange != nullptr)
pResultRange->aEnd = aOutput.current();
aOutput.nextRow();
}
@@ -233,7 +233,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
OUString sFormula = OUString::createFromAscii(lclBasicStatistics[i].aFormula);
RowColumn(aRangeList, output, aTemplate, sFormula, mGroupedBy, &aResultRange);
output.nextColumn();
- if (lclBasicStatistics[i].aResultRangeName != NULL)
+ if (lclBasicStatistics[i].aResultRangeName != nullptr)
{
OUString sResultRangeName = OUString::createFromAscii(lclBasicStatistics[i].aResultRangeName);
aTemplate.autoReplaceRange("%" + sResultRangeName + "%", aResultRange);
@@ -381,7 +381,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
ScRange aResultRange;
OUString sFormula = OUString::createFromAscii(lclBasicStatistics[i].aFormula);
RowColumn(aColumnRangeList, output, aTemplate, sFormula, BY_COLUMN, &aResultRange);
- if (lclBasicStatistics[i].aResultRangeName != NULL)
+ if (lclBasicStatistics[i].aResultRangeName != nullptr)
{
OUString sResultRangeName = OUString::createFromAscii(lclBasicStatistics[i].aResultRangeName);
aTemplate.autoReplaceRange("%" + sResultRangeName + "_COLUMN%", aResultRange);
@@ -399,7 +399,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
OUString sFormula = OUString::createFromAscii(lclBasicStatistics[i].aFormula);
RowColumn(aRowRangeList, output, aTemplate, sFormula, BY_ROW, &aResultRange);
- if (lclBasicStatistics[i].aResultRangeName != NULL)
+ if (lclBasicStatistics[i].aResultRangeName != nullptr)
{
OUString sResultRangeName = OUString::createFromAscii(lclBasicStatistics[i].aResultRangeName);
aTemplate.autoReplaceRange("%" + sResultRangeName + "_ROW%", aResultRange);
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 0701b2e049cd..24854e3d9c91 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -51,7 +51,7 @@ static const StatisticCalculation lclCalcDefinitions[] =
{ STRID_CALC_MAX, "=MAX(%RANGE%)"},
{ STRID_CALC_SUM, "=SUM(%RANGE%)"},
{ STRID_CALC_COUNT, "=COUNT(%RANGE%)" },
- { 0, NULL }
+ { 0, nullptr }
};
static const char strWildcardRange[] = "%RANGE%";
@@ -114,7 +114,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.push();
// Write calculation labels
- for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != NULL; i++)
+ for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != nullptr; i++)
{
OUString aLabel(SC_STRLOAD(RID_STATISTICS_DLGS, lclCalcDefinitions[i].aCalculationNameId));
aOutput.writeString(aLabel);
@@ -128,7 +128,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
{
aOutput.resetRow();
- for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != NULL; i++)
+ for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != nullptr; i++)
{
aTemplate.setTemplate(lclCalcDefinitions[i].aFormula);
aTemplate.applyRange(strWildcardRange, pIterator->get(), b3DAddress);
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 3f2c93005b57..83b1cedf035f 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -328,8 +328,8 @@ void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const
IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, OkClicked, Button*, void )
{
- ApplyClicked(NULL);
- CloseClicked(NULL);
+ ApplyClicked(nullptr);
+ CloseClicked(nullptr);
}
IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, ApplyClicked, Button*, void )
@@ -344,7 +344,7 @@ IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, CloseClicked, Button*, voi
IMPL_LINK_TYPED( ScRandomNumberGeneratorDialog, GetFocusHandler, Control&, rCtrl, void )
{
- Edit* pEdit = NULL;
+ Edit* pEdit = nullptr;
if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
pEdit = mpInputRangeEdit;
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index ebffefe8323d..4a03c7ec1775 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -29,7 +29,7 @@ ScSamplingDialog::ScSamplingDialog(
vcl::Window* pParent, ScViewData* pViewData ) :
ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent,
"SamplingDialog", "modules/scalc/ui/samplingdialog.ui" ),
- mpActiveEdit ( NULL ),
+ mpActiveEdit ( nullptr ),
mViewData ( pViewData ),
mDocument ( pViewData->GetDocument() ),
mInputRange ( ScAddress::INITIALIZE_INVALID ),
@@ -296,7 +296,7 @@ IMPL_LINK_NOARG_TYPED( ScSamplingDialog, OkClicked, Button*, void )
IMPL_LINK_TYPED( ScSamplingDialog, GetFocusHandler, Control&, rCtrl, void )
{
- mpActiveEdit = NULL;
+ mpActiveEdit = nullptr;
if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
mpActiveEdit = mpInputRangeEdit;
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 51d36af4d0ba..02a3e717be86 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -63,7 +63,7 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
mOutputAddress ( ScAddress::INITIALIZE_INVALID ),
mGroupedBy ( BY_COLUMN ),
- mpActiveEdit ( NULL ),
+ mpActiveEdit ( nullptr ),
mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
mDialogLostFocus( false )
{
@@ -200,7 +200,7 @@ IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, OkClicked, Button*, void )
IMPL_LINK_TYPED( ScStatisticsInputOutputDialog, GetFocusHandler, Control&, rCtrl, void )
{
- mpActiveEdit = NULL;
+ mpActiveEdit = nullptr;
if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
mpActiveEdit = mpInputRangeEdit;
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index b6376a564c1f..df6dc0117615 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -36,7 +36,7 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
mAddressDetails ( mDocument->GetAddressConvention(), 0, 0 ),
mOutputAddress ( ScAddress::INITIALIZE_INVALID ),
mGroupedBy ( BY_COLUMN ),
- mpActiveEdit ( NULL ),
+ mpActiveEdit ( nullptr ),
mCurrentAddress ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ),
mDialogLostFocus( false )
{
@@ -213,7 +213,7 @@ IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, OkClicked, Button*, void )
IMPL_LINK_TYPED( ScStatisticsTwoVariableDialog, GetFocusHandler, Control&, rCtrl, void )
{
- mpActiveEdit = NULL;
+ mpActiveEdit = nullptr;
if( &rCtrl == mpVariable1RangeEdit
|| &rCtrl == mpVariable1RangeButton )
{
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index 0bc4d938fe26..3594aa7f4372 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -175,7 +175,7 @@ void AddressWalkerWriter::writeMatrixFormula(const OUString& aFormula)
ScRange aRange;
aRange.aStart = mCurrentAddress;
aRange.aEnd = mCurrentAddress;
- mpDocShell->GetDocFunc().EnterMatrix(aRange, NULL, NULL, aFormula, false, false, OUString(), meGrammar );
+ mpDocShell->GetDocFunc().EnterMatrix(aRange, nullptr, nullptr, aFormula, false, false, OUString(), meGrammar );
}
void AddressWalkerWriter::writeString(const OUString& aString)
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 11702c6efc23..a762755cd8c3 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -42,7 +42,7 @@ using namespace com::sun::star;
ScClient::ScClient( ScTabViewShell* pViewShell, vcl::Window* pDraw, SdrModel* pSdrModel, SdrOle2Obj* pObj ) :
SfxInPlaceClient( pViewShell, pDraw, pObj->GetAspect() ),
pModel( pSdrModel ),
- pGrafEdit( 0 )
+ pGrafEdit( nullptr )
{
SetObject( pObj->GetObjRef() );
}
@@ -54,7 +54,7 @@ ScClient::~ScClient()
SdrOle2Obj* ScClient::GetDrawObj()
{
uno::Reference < embed::XEmbeddedObject > xObj = GetObject();
- SdrOle2Obj* pOle2Obj = NULL;
+ SdrOle2Obj* pOle2Obj = nullptr;
OUString aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
sal_uInt16 nPages = pModel->GetPageCount();
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 527ff99f8f6d..a257bc533368 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -78,11 +78,11 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
const TransferableObjectDescriptor& rDesc ) :
pModel( pClipModel ),
aObjDesc( rDesc ),
- pBookmark( NULL ),
+ pBookmark( nullptr ),
bGraphic( false ),
bGrIsBit( false ),
bOleObj( false ),
- pDragSourceView( NULL ),
+ pDragSourceView( nullptr ),
nDragSourceFlags( 0 ),
bDragWasInternal( false ),
nSourceDocID( 0 ),
@@ -157,7 +157,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
OUString aUrl = sTmp;
OUString aAbs;
const SfxMedium* pMedium;
- if (pContainerShell && (pMedium = pContainerShell->GetMedium()) != NULL)
+ if (pContainerShell && (pMedium = pContainerShell->GetMedium()) != nullptr)
{
bool bWasAbs = true;
aAbs = pMedium->GetURLObject().smartRel2Abs( aUrl, bWasAbs ).
@@ -227,7 +227,7 @@ ScDrawTransferObj::~ScDrawTransferObj()
if ( pScMod->GetClipData().pDrawClipboard == this )
{
OSL_FAIL("ScDrawTransferObj wasn't released");
- pScMod->SetClipObject( NULL, NULL );
+ pScMod->SetClipObject( nullptr, nullptr );
}
if ( pScMod->GetDragData().pDrawTransfer == this )
{
@@ -594,7 +594,7 @@ void ScDrawTransferObj::ObjectReleased()
{
ScModule* pScMod = SC_MOD();
if ( pScMod->GetClipData().pDrawClipboard == this )
- pScMod->SetClipObject( NULL, NULL );
+ pScMod->SetClipObject( nullptr, nullptr );
TransferableHelper::ObjectReleased();
}
@@ -690,7 +690,7 @@ SdrOle2Obj* ScDrawTransferObj::GetSingleObject()
}
}
- return NULL;
+ return nullptr;
}
void ScDrawTransferObj::CreateOLEData()
@@ -735,7 +735,7 @@ void ScDrawTransferObj::InitDocShell()
aDestView.Paste(
*pModel,
Point(aSrcSize.Width()/2, aSrcSize.Height()/2),
- NULL, SdrInsertFlags::NONE, OUString(), OUString());
+ nullptr, SdrInsertFlags::NONE, OUString(), OUString());
// put objects to right layer (see ScViewFunc::PasteDataFormat for SotClipboardFormatId::DRAWING)
@@ -762,7 +762,7 @@ void ScDrawTransferObj::InitDocShell()
aViewOpt.SetOption( VOPT_GRID, false );
rDestDoc.SetViewOptions( aViewOpt );
- ScViewData aViewData( pDocSh, NULL );
+ ScViewData aViewData( pDocSh, nullptr );
aViewData.SetTabNo( 0 );
aViewData.SetScreen( aDestArea );
aViewData.SetCurX( 0 );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index f3d4eb95cb86..070c94a25fc7 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -501,16 +501,16 @@ static sal_Int32 lcl_MatchParenthesis( const OUString& rStr, sal_Int32 nPos )
}
ScInputHandler::ScInputHandler()
- : pInputWin( NULL ),
- pEngine( NULL ),
- pTableView( NULL ),
- pTopView( NULL ),
- pColumnData( NULL ),
- pFormulaData( NULL ),
- pFormulaDataPara( NULL ),
- pTipVisibleParent( NULL ),
+ : pInputWin( nullptr ),
+ pEngine( nullptr ),
+ pTableView( nullptr ),
+ pTopView( nullptr ),
+ pColumnData( nullptr ),
+ pFormulaData( nullptr ),
+ pFormulaDataPara( nullptr ),
+ pTipVisibleParent( nullptr ),
nTipVisible( 0 ),
- pTipVisibleSecParent( NULL ),
+ pTipVisibleSecParent( nullptr ),
nTipVisibleSec( 0 ),
nFormSelStart( 0 ),
nFormSelEnd( 0 ),
@@ -535,17 +535,17 @@ ScInputHandler::ScInputHandler()
eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ),
aScaleX( 1,1 ),
aScaleY( 1,1 ),
- pRefViewSh( NULL ),
- pLastPattern( NULL ),
- pEditDefaults( NULL ),
- pLastState( NULL ),
- pDelayTimer( NULL ),
- pRangeFindList( NULL ),
+ pRefViewSh( nullptr ),
+ pLastPattern( nullptr ),
+ pEditDefaults( nullptr ),
+ pLastState( nullptr ),
+ pDelayTimer( nullptr ),
+ pRangeFindList( nullptr ),
maFormulaChar()
{
// The InputHandler is constructed with the view, so SfxViewShell::Current
// doesn't have the right view yet. pActiveViewSh is updated in NotifyChange.
- pActiveViewSh = NULL;
+ pActiveViewSh = nullptr;
// Bindings (only still used for Invalidate) are retrieved if needed on demand
}
@@ -558,10 +558,10 @@ ScInputHandler::~ScInputHandler()
EnterHandler(); // Finish input
if (SC_MOD()->GetRefInputHdl() == this)
- SC_MOD()->SetRefInputHdl(NULL);
+ SC_MOD()->SetRefInputHdl(nullptr);
if ( pInputWin && pInputWin->GetInputHandler() == this )
- pInputWin->SetInputHandler( NULL );
+ pInputWin->SetInputHandler( nullptr );
delete pRangeFindList;
delete pEditDefaults;
@@ -603,7 +603,7 @@ void ScInputHandler::UpdateRefDevice()
if ( bTextWysiwyg && pActiveViewSh )
pEngine->SetRefDevice( pActiveViewSh->GetViewData().GetDocument()->GetPrinter() );
else
- pEngine->SetRefDevice( NULL );
+ pEngine->SetRefDevice( nullptr );
MapMode aMode( MAP_100TH_MM, Point(), aScaleX, aScaleY );
pEngine->SetRefMapMode( aMode );
@@ -626,7 +626,7 @@ void ScInputHandler::ImplCreateEditEngine()
pEngine = new ScFieldEditEngine(&rDoc, rDoc.GetEnginePool(), rDoc.GetEditPool());
}
else
- pEngine = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true);
+ pEngine = new ScFieldEditEngine(nullptr, EditEngine::CreatePool(), nullptr, true);
pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) );
UpdateRefDevice(); // also sets MapMode
pEngine->SetPaperSize( Size( 1000000, 1000000 ) );
@@ -785,7 +785,7 @@ void ScInputHandler::HideTip()
pTipVisibleParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
Help::HideTip( nTipVisible );
nTipVisible = 0;
- pTipVisibleParent = NULL;
+ pTipVisibleParent = nullptr;
}
aManualTip.clear();
}
@@ -797,7 +797,7 @@ void ScInputHandler::HideTipBelow()
pTipVisibleSecParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
Help::HideTip( nTipVisibleSec );
nTipVisibleSec = 0;
- pTipVisibleSecParent = NULL;
+ pTipVisibleSecParent = nullptr;
}
aManualTip.clear();
}
@@ -818,7 +818,7 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText )
sal_Int32 nNextFStart = aHelper.GetFunctionStart( rSelText, nLeftParentPos, true);
const IFunctionDescription* ppFDesc;
::std::vector< OUString> aArgs;
- if( aHelper.GetNextFunc( rSelText, false, nNextFStart, NULL, &ppFDesc, &aArgs ) )
+ if( aHelper.GetNextFunc( rSelText, false, nNextFStart, nullptr, &ppFDesc, &aArgs ) )
{
if( !ppFDesc->getFunctionName().isEmpty() )
{
@@ -1658,8 +1658,8 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
if ( pViewSh == pActiveViewSh )
{
delete pLastState;
- pLastState = NULL;
- pLastPattern = NULL;
+ pLastState = nullptr;
+ pLastPattern = nullptr;
}
if ( pViewSh == pRefViewSh )
@@ -1668,9 +1668,9 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
// We end the EditMode anyways
EnterHandler();
bFormulaMode = false;
- pRefViewSh = NULL;
+ pRefViewSh = nullptr;
SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
- SC_MOD()->SetRefInputHdl(NULL);
+ SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
@@ -1681,7 +1681,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
if ( pActiveViewSh && pActiveViewSh == pViewSh )
{
OSL_FAIL("pActiveViewSh is gone");
- pActiveViewSh = NULL;
+ pActiveViewSh = nullptr;
}
if ( SC_MOD()->GetInputOptions().GetTextWysiwyg() )
@@ -1699,7 +1699,7 @@ void ScInputHandler::UpdateActiveView()
vcl::Window* pShellWin = pActiveViewSh ?
pActiveViewSh->GetWindowByPos( pActiveViewSh->GetViewData().GetEditActivePart() ) :
- NULL;
+ nullptr;
sal_uInt16 nCount = pEngine->GetViewCount();
if (nCount > 0)
@@ -1714,7 +1714,7 @@ void ScInputHandler::UpdateActiveView()
}
}
else
- pTableView = NULL;
+ pTableView = nullptr;
// setup the pTableView editeng for tiled rendering to get cursor and selections
if (pActiveViewSh && pTableView)
@@ -1732,7 +1732,7 @@ void ScInputHandler::UpdateActiveView()
if (pInputWin && eMode == SC_INPUT_TOP )
pTopView = pInputWin->GetEditView();
else
- pTopView = NULL;
+ pTopView = nullptr;
}
void ScInputHandler::SetInputWindow( ScInputWindow* pNew )
@@ -1745,7 +1745,7 @@ void ScInputHandler::StopInputWinEngine( bool bAll )
if (pInputWin)
pInputWin->StopEditEngine( bAll );
- pTopView = NULL; // invalid now
+ pTopView = nullptr; // invalid now
}
EditView* ScInputHandler::GetActiveView()
@@ -1756,7 +1756,7 @@ EditView* ScInputHandler::GetActiveView()
void ScInputHandler::ForgetLastPattern()
{
- pLastPattern = NULL;
+ pLastPattern = nullptr;
if ( !pLastState && pActiveViewSh )
pActiveViewSh->UpdateInputHandler( true ); // Get status again
else
@@ -2207,9 +2207,9 @@ void ScInputHandler::UpdateFormulaMode()
{
ShowRefFrame();
bFormulaMode = false;
- pRefViewSh = NULL;
+ pRefViewSh = nullptr;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
- SC_MOD()->SetRefInputHdl(NULL);
+ SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
@@ -2418,8 +2418,8 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
bool bMatrix = ( nBlockMode == ScEnterMode::MATRIX );
SfxApplication* pSfxApp = SfxGetpApp();
- EditTextObject* pObject = NULL;
- ScPatternAttr* pCellAttrs = NULL;
+ EditTextObject* pObject = nullptr;
+ ScPatternAttr* pCellAttrs = nullptr;
bool bForget = false; // Remove due to validity?
OUString aString = GetEditText(pEngine);
@@ -2434,7 +2434,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
lcl_SelectionToEnd(pTableView);
}
- vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : NULL;
+ vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : nullptr;
if (pTopView)
pTopView->CompleteAutoCorrect(); // CompleteAutoCorrect for both Views
@@ -2534,12 +2534,12 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) );
SfxItemSet aOldAttribs = pEngine->GetAttribs( aSel );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
// Find common (cell) attributes before RemoveAdjust
if ( pActiveViewSh && bUniformAttribs )
{
- SfxItemSet* pCommonAttrs = NULL;
+ SfxItemSet* pCommonAttrs = nullptr;
for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
{
SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
@@ -2640,12 +2640,12 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
bFormulaMode = false;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
- SC_MOD()->SetRefInputHdl(NULL);
+ SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
- pRefViewSh = NULL; // Also without FormulaMode due to FunctionsAutoPilot
+ pRefViewSh = nullptr; // Also without FormulaMode due to FunctionsAutoPilot
DeleteRangeFinder();
ResetAutoPar();
@@ -2658,7 +2658,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
// Text input (through number formats) or ApplySelectionPattern modify
// the cell's attributes, so pLastPattern is no longer valid
- pLastPattern = NULL;
+ pLastPattern = nullptr;
if (bOldMod && !bProtected && !bForget)
{
@@ -2715,12 +2715,12 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
const SfxPoolItem* aArgs[2];
aArgs[0] = &aItem;
- aArgs[1] = NULL;
+ aArgs[1] = nullptr;
rBindings.Execute( nId, aArgs );
}
delete pLastState; // pLastState still contains the old text
- pLastState = NULL;
+ pLastState = nullptr;
}
else
pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
@@ -2768,12 +2768,12 @@ void ScInputHandler::CancelHandler()
}
bFormulaMode = false;
SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
- SC_MOD()->SetRefInputHdl(NULL);
+ SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
- pRefViewSh = NULL; // Also without FormulaMode due to FunctionsAutoPilot
+ pRefViewSh = nullptr; // Also without FormulaMode due to FunctionsAutoPilot
DeleteRangeFinder();
ResetAutoPar();
@@ -3184,7 +3184,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
{
if (pTableView)
{
- vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : NULL;
+ vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : nullptr;
if ( pTableView->PostKeyEvent( rKEvt, pFrameWin ) )
bUsed = true;
}
@@ -3398,7 +3398,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( pState != pLastState )
{
delete pLastState;
- pLastState = pState ? new ScInputHdlState( *pState ) : NULL;
+ pLastState = pState ? new ScInputHdlState( *pState ) : nullptr;
}
if ( pState && pActiveViewSh )
@@ -3573,7 +3573,7 @@ void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust )
void ScInputHandler::ResetDelayTimer()
{
- if(pDelayTimer!=NULL)
+ if(pDelayTimer!=nullptr)
{
DELETEZ( pDelayTimer );
@@ -3590,7 +3590,7 @@ IMPL_LINK_TYPED( ScInputHandler, DelayTimer, Timer*, pTimer, void )
{
DELETEZ( pDelayTimer );
- if ( NULL == pLastState || SC_MOD()->IsFormulaMode() || SC_MOD()->IsRefDialogOpen())
+ if ( nullptr == pLastState || SC_MOD()->IsFormulaMode() || SC_MOD()->IsRefDialogOpen())
{
//! New method at ScModule to query if function autopilot is open
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -3606,7 +3606,7 @@ IMPL_LINK_TYPED( ScInputHandler, DelayTimer, Timer*, pTimer, void )
{
bInOwnChange = true; // disable ModifyHdl (reset below)
- pActiveViewSh = NULL;
+ pActiveViewSh = nullptr;
pEngine->SetText( EMPTY_OUSTRING );
if ( pInputWin )
{
@@ -3726,7 +3726,7 @@ EditView* ScInputHandler::GetFuncEditView()
{
UpdateActiveView(); // Due to pTableView
- EditView* pView = NULL;
+ EditView* pView = nullptr;
if ( pInputWin )
{
pInputWin->MakeDialogEditView();
@@ -3825,12 +3825,12 @@ ScInputHdlState::ScInputHdlState( const ScAddress& rCurPos,
aStartPos ( rStartPos ),
aEndPos ( rEndPos ),
aString ( rString ),
- pEditData ( pData ? pData->Clone() : NULL )
+ pEditData ( pData ? pData->Clone() : nullptr )
{
}
ScInputHdlState::ScInputHdlState( const ScInputHdlState& rCpy )
- : pEditData ( NULL )
+ : pEditData ( nullptr )
{
*this = rCpy;
}
@@ -3857,7 +3857,7 @@ ScInputHdlState& ScInputHdlState::operator=( const ScInputHdlState& r )
aStartPos = r.aStartPos;
aEndPos = r.aEndPos;
aString = r.aString;
- pEditData = r.pEditData ? r.pEditData->Clone() : NULL;
+ pEditData = r.pEditData ? r.pEditData->Clone() : nullptr;
return *this;
}
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d880c974491d..8fe0dc7bcb0d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -149,7 +149,7 @@ SfxChildWinInfo ScInputWindowWrapper::GetInfo() const
static VclPtr<ScTextWndBase> lcl_chooseRuntimeImpl( vcl::Window* pParent, SfxBindings* pBind )
{
- ScTabViewShell* pViewSh = NULL;
+ ScTabViewShell* pViewSh = nullptr;
SfxDispatcher* pDisp = pBind->GetDispatcher();
if ( pDisp )
{
@@ -167,7 +167,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
aWndPos ( VclPtr<ScPosWnd>::Create(this) ),
pRuntimeWindow ( lcl_chooseRuntimeImpl( this, pBind ) ),
aTextWindow ( *pRuntimeWindow ),
- pInputHdl ( NULL ),
+ pInputHdl ( nullptr ),
aTextOk ( ScResId( SCSTR_QHELP_BTNOK ) ), // Not always new as a Resource
aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ),
aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ),
@@ -181,7 +181,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
// #i73615# don't rely on SfxViewShell::Current while constructing the input line
// (also for GetInputHdl below)
- ScTabViewShell* pViewSh = NULL;
+ ScTabViewShell* pViewSh = nullptr;
SfxDispatcher* pDisp = pBind->GetDispatcher();
if ( pDisp )
{
@@ -254,7 +254,7 @@ ScInputWindow::~ScInputWindow()
void ScInputWindow::dispose()
{
- bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear?
+ bool bDown = ( ScGlobal::pSysLocale == nullptr ); // after Clear?
// if any view's input handler has a pointer to this input window, reset it
// (may be several ones, #74522#)
@@ -268,7 +268,7 @@ void ScInputWindow::dispose()
ScInputHandler* pHdl = static_cast<ScTabViewShell*>(pSh)->GetInputHandler();
if ( pHdl && pHdl->GetInputWindow() == this )
{
- pHdl->SetInputWindow( NULL );
+ pHdl->SetInputWindow( nullptr );
pHdl->StopInputWinEngine( false ); // reset pTopView pointer
}
pSh = SfxViewShell::GetNext( *pSh, true, checkSfxViewShell<ScTabViewShell> );
@@ -939,7 +939,7 @@ void ScInputBarGroup::Resize()
ScInputWindow *pParent;
pParent = dynamic_cast<ScInputWindow*>(w);
- if (pParent == NULL)
+ if (pParent == nullptr)
{
OSL_FAIL("The parent window pointer pParent is null");
return;
@@ -1044,7 +1044,7 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void)
ScInputWindow* pParent;
pParent = dynamic_cast<ScInputWindow*>(w);
- if (pParent == NULL)
+ if (pParent == nullptr)
{
OSL_FAIL("The parent window pointer pParent is null");
return;
@@ -1094,7 +1094,7 @@ void ScInputBarGroup::TriggerToolboxLayout()
else
rParent.SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
xLayoutManager->lock();
- DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, NULL, AllSettingsFlags::STYLE );
+ DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, nullptr, AllSettingsFlags::STYLE );
// this basically will trigger the reposititioning of the
// items in the toolbar from ImplFormat ( which is controlled by
@@ -1320,7 +1320,7 @@ void ScMultiTextWnd::InitEditEngine()
{
ScFieldEditEngine* pNew;
ScTabViewShell* pViewSh = GetViewShell();
- ScDocShell* pDocSh = NULL;
+ ScDocShell* pDocSh = nullptr;
if ( pViewSh )
{
pDocSh = pViewSh->GetViewData().GetDocShell();
@@ -1328,7 +1328,7 @@ void ScMultiTextWnd::InitEditEngine()
pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool());
}
else
- pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true);
+ pNew = new ScFieldEditEngine(nullptr, EditEngine::CreatePool(), nullptr, true);
pNew->SetExecuteURL( false );
pEditEngine = pNew;
@@ -1420,8 +1420,8 @@ void ScMultiTextWnd::SetTextString( const OUString& rNewString )
ScTextWnd::ScTextWnd( vcl::Window* pParent, ScTabViewShell* pViewSh )
: ScTextWndBase(pParent, WinBits(WB_HIDE | WB_BORDER)),
DragSourceHelper(this),
- pEditEngine (NULL),
- pEditView (NULL),
+ pEditEngine (nullptr),
+ pEditView (nullptr),
bIsInsertMode(true),
bFormulaMode (false),
bInputMode (false),
@@ -1470,9 +1470,9 @@ void ScTextWnd::dispose()
maAccTextDatas.back()->Dispose();
}
delete pEditView;
- pEditView = NULL;
+ pEditView = nullptr;
delete pEditEngine;
- pEditEngine = NULL;
+ pEditEngine = nullptr;
ScTextWndBase::dispose();
}
@@ -1577,7 +1577,7 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
{
// Is dragged onto another View?
ScTabViewShell* pEndViewSh = ScTabViewShell::GetActiveViewShell();
- if ( pEndViewSh != pStartViewSh && pStartViewSh != NULL )
+ if ( pEndViewSh != pStartViewSh && pStartViewSh != nullptr )
{
ScViewData& rViewData = pStartViewSh->GetViewData();
ScInputHandler* pHdl = pScMod->GetInputHdl( pStartViewSh );
@@ -1707,7 +1707,7 @@ void ScTextWnd::StartEditEngine()
pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool());
}
else
- pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true);
+ pNew = new ScFieldEditEngine(nullptr, EditEngine::CreatePool(), nullptr, true);
pNew->SetExecuteURL( false );
pEditEngine = pNew;
@@ -1949,7 +1949,7 @@ void ScTextWnd::MakeDialogEditView()
pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool());
}
else
- pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true);
+ pNew = new ScFieldEditEngine(nullptr, EditEngine::CreatePool(), nullptr, true);
pNew->SetExecuteURL( false );
pEditEngine = pNew;
@@ -1994,7 +1994,7 @@ void ScTextWnd::ImplInitSettings()
css::uno::Reference< css::accessibility::XAccessible > ScTextWnd::CreateAccessible()
{
- return new ScAccessibleEditObject(GetAccessibleParentWindow()->GetAccessible(), NULL, this,
+ return new ScAccessibleEditObject(GetAccessibleParentWindow()->GetAccessible(), nullptr, this,
OUString(ScResId(STR_ACC_EDITLINE_NAME)),
OUString(ScResId(STR_ACC_EDITLINE_DESCR)), ScAccessibleEditObject::EditLine);
}
@@ -2036,7 +2036,7 @@ void ScTextWnd::TextGrabFocus()
ScPosWnd::ScPosWnd( vcl::Window* pParent ) :
ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ),
- pAccel ( NULL ),
+ pAccel ( nullptr ),
nTipVisible ( 0 ),
bFormulaMode( false )
{
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index ee6d269e7018..f39fd78bc62a 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -41,16 +41,16 @@ static SfxItemInfo const aMsgItemInfos[] =
ScMessagePool::ScMessagePool()
: SfxItemPool ( OUString("ScMessagePool"),
MSGPOOL_START, MSGPOOL_END,
- aMsgItemInfos, NULL ),
+ aMsgItemInfos, nullptr ),
aGlobalStringItem ( SfxStringItem ( SCITEM_STRING, OUString() ) ),
aGlobalSearchItem ( SvxSearchItem ( SCITEM_SEARCHDATA ) ),
- aGlobalSortItem ( ScSortItem ( SCITEM_SORTDATA, NULL ) ),
- aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ),
- aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ),
- aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ),
- aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, false ) ),
- aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ),
+ aGlobalSortItem ( ScSortItem ( SCITEM_SORTDATA, nullptr ) ),
+ aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, nullptr, nullptr ) ),
+ aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, nullptr, nullptr ) ),
+ aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, nullptr ) ),
+ aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, nullptr, nullptr, false ) ),
+ aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, nullptr ) ),
aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ),
aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, false ) )
@@ -78,7 +78,7 @@ ScMessagePool::ScMessagePool()
ScMessagePool::~ScMessagePool()
{
Delete();
- SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults)
+ SetSecondaryPool( nullptr ); // before deleting defaults (accesses defaults)
for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
SetRefCount( *ppPoolDefaults[i], 0 );
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 9c9315362145..6327a373fb94 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -133,24 +133,24 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
SfxModule( ResMgr::CreateResMgr( "sc" ), false, pFact, NULL ),
mpDragData(new ScDragData),
mpClipData(new ScClipData),
- pSelTransfer( NULL ),
- pMessagePool( NULL ),
- pRefInputHandler( NULL ),
- pViewCfg( NULL ),
- pDocCfg( NULL ),
- pAppCfg( NULL ),
- pDefaultsCfg( NULL ),
- pFormulaCfg( NULL ),
- pInputCfg( NULL ),
- pPrintCfg( NULL ),
- pNavipiCfg( NULL ),
- pAddInCfg( NULL ),
- pColorConfig( NULL ),
- pAccessOptions( NULL ),
- pCTLOptions( NULL ),
- pUserOptions( NULL ),
- pErrorHdl( NULL ),
- pFormEditData( NULL ),
+ pSelTransfer( nullptr ),
+ pMessagePool( nullptr ),
+ pRefInputHandler( nullptr ),
+ pViewCfg( nullptr ),
+ pDocCfg( nullptr ),
+ pAppCfg( nullptr ),
+ pDefaultsCfg( nullptr ),
+ pFormulaCfg( nullptr ),
+ pInputCfg( nullptr ),
+ pPrintCfg( nullptr ),
+ pNavipiCfg( nullptr ),
+ pAddInCfg( nullptr ),
+ pColorConfig( nullptr ),
+ pAccessOptions( nullptr ),
+ pCTLOptions( nullptr ),
+ pUserOptions( nullptr ),
+ pErrorHdl( nullptr ),
+ pFormEditData( nullptr ),
nCurRefDlgId( 0 ),
bIsWaterCan( false ),
bIsInEditCommand( false ),
@@ -162,7 +162,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
SetName("StarCalc"); // for Basic
ResetDragObject();
- SetClipObject( NULL, NULL );
+ SetClipObject( nullptr, nullptr );
// InputHandler does not need to be created
@@ -367,7 +367,7 @@ void ScModule::DeleteCfg()
void ScModule::Execute( SfxRequest& rReq )
{
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
- SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL;
+ SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : nullptr;
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
@@ -567,7 +567,7 @@ void ScModule::Execute( SfxRequest& rReq )
void ScModule::GetState( SfxItemSet& rSet )
{
ScDocShell* pDocSh = dynamic_cast<ScDocShell*>( SfxObjectShell::Current() );
- bool bTabView = pDocSh && (pDocSh->GetBestViewShell() != NULL);
+ bool bTabView = pDocSh && (pDocSh->GetBestViewShell() != nullptr);
SfxWhichIter aIter(rSet);
for (sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich())
@@ -628,9 +628,9 @@ void ScModule::HideDisabledSlots( SfxItemSet& rSet )
void ScModule::ResetDragObject()
{
- mpDragData->pCellTransfer = NULL;
- mpDragData->pDrawTransfer = NULL;
- mpDragData->pJumpLocalDoc = NULL;
+ mpDragData->pCellTransfer = nullptr;
+ mpDragData->pDrawTransfer = nullptr;
+ mpDragData->pJumpLocalDoc = nullptr;
(mpDragData->aLinkDoc).clear();
(mpDragData->aLinkTable).clear();
(mpDragData->aLinkArea).clear();
@@ -675,11 +675,11 @@ void ScModule::SetClipObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawO
ScDocument* ScModule::GetClipDoc()
{
// called from document
- ScTransferObj* pObj = ScTransferObj::GetOwnClipboard( NULL );
+ ScTransferObj* pObj = ScTransferObj::GetOwnClipboard( nullptr );
if (pObj)
return pObj->GetDocument();
- return NULL;
+ return nullptr;
}
void ScModule::SetSelectionTransfer( ScSelectionTransferObj* pNew )
@@ -955,12 +955,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
OSL_ENSURE( pInputCfg, "InputOptions not initialised :-(" );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
- SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL;
+ SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : nullptr;
ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
ScDocShell* pDocSh = dynamic_cast<ScDocShell*>( SfxObjectShell::Current() );
- ScDocument* pDoc = pDocSh ? &pDocSh->GetDocument() : NULL;
- const SfxPoolItem* pItem = NULL;
+ ScDocument* pDoc = pDocSh ? &pDocSh->GetDocument() : nullptr;
+ const SfxPoolItem* pItem = nullptr;
bool bRepaint = false;
bool bUpdateMarks = false;
bool bUpdateRefDev = false;
@@ -1371,7 +1371,7 @@ ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, bool bUseRef )
if ( pRefInputHandler && bUseRef )
return pRefInputHandler;
- ScInputHandler* pHdl = NULL;
+ ScInputHandler* pHdl = nullptr;
if ( !pViewSh )
{
// in case a UIActive embedded object has no ViewShell (UNO component)
@@ -1582,7 +1582,7 @@ static SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId )
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
// #i46999# current view frame can be null (for example, when closing help)
- SfxChildWindow* pChildWnd = pViewFrm ? pViewFrm->GetChildWindow( nId ) : NULL;
+ SfxChildWindow* pChildWnd = pViewFrm ? pViewFrm->GetChildWindow( nId ) : nullptr;
if ( pChildWnd )
return pChildWnd; // found in the current view
@@ -1599,7 +1599,7 @@ static SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId )
pViewFrm = SfxViewFrame::GetNext( *pViewFrm );
}
- return NULL; // none found
+ return nullptr; // none found
}
bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
@@ -1940,7 +1940,7 @@ IMPL_LINK_NOARG_TYPED(ScModule, SpellTimerHdl, Idle *, void)
*/
SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
{
- SfxItemSet* pRet = 0;
+ SfxItemSet* pRet = nullptr;
if(SID_SC_EDITOPTIONS == nId)
{
pRet = new SfxItemSet( GetPool(),
@@ -2224,12 +2224,12 @@ bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd )
vcl::Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAncestor )
{
if (!pWndAncestor)
- return NULL;
+ return nullptr;
auto iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return NULL;
+ return nullptr;
std::list<VclPtr<vcl::Window> > & rlRefWindow = iSlot->second;
@@ -2239,7 +2239,7 @@ vcl::Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAn
if ( pWndAncestor->IsWindowOrChild( *i, (*i)->IsSystemWindow() ) )
return *i;
- return NULL;
+ return nullptr;
}
using namespace com::sun::star;
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 488ae52c644e..ead955f31c2d 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -69,7 +69,7 @@ static bool lcl_IsURLButton( SdrObject* pObject )
ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView )
{
- ScSelectionTransferObj* pRet = NULL;
+ ScSelectionTransferObj* pRet = nullptr;
try
{
@@ -142,8 +142,8 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView
ScSelectionTransferObj::ScSelectionTransferObj( ScTabView* pSource, ScSelectionTransferMode eNewMode ) :
pView( pSource ),
eMode( eNewMode ),
- pCellData( NULL ),
- pDrawData( NULL )
+ pCellData( nullptr ),
+ pDrawData( nullptr )
{
//! store range for StillValid
}
@@ -157,7 +157,7 @@ ScSelectionTransferObj::~ScSelectionTransferObj()
// (CopyToSelection has no effect under Windows)
ForgetView();
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
}
OSL_ENSURE( !pView, "ScSelectionTransferObj dtor: ForgetView not called" );
@@ -165,18 +165,18 @@ ScSelectionTransferObj::~ScSelectionTransferObj()
void ScSelectionTransferObj::ForgetView()
{
- pView = NULL;
+ pView = nullptr;
eMode = SC_SELTRANS_INVALID;
if (pCellData)
{
pCellData->release();
- pCellData = NULL;
+ pCellData = nullptr;
}
if (pDrawData)
{
pDrawData->release();
- pDrawData = NULL;
+ pDrawData = nullptr;
}
}
@@ -285,7 +285,7 @@ void ScSelectionTransferObj::CreateCellData()
// (this may be called from pasting into the edit line)
bool bCopied = rViewData.GetView()->CopyToClip( pClipDoc, false, true, true, false );
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
if ( bCopied )
{
@@ -338,7 +338,7 @@ void ScSelectionTransferObj::CreateDrawData()
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
SdrModel* pModel = pDrawView->GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
ScViewData& rViewData = pView->GetViewData();
ScDocShell* pDocSh = rViewData.GetDocShell();
@@ -421,7 +421,7 @@ void ScSelectionTransferObj::ObjectReleased()
ScModule* pScMod = SC_MOD();
if ( pScMod->GetSelectionTransfer() == this )
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
TransferableHelper::ObjectReleased();
}
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index b539596c26ba..85f65e2dc168 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -100,7 +100,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr
Point aPoint;
Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area?
- ScViewData aViewData(NULL,NULL);
+ ScViewData aViewData(nullptr,nullptr);
aViewData.InitData( pDoc );
aViewData.SetTabNo( rBlock.aEnd.Tab() );
@@ -181,7 +181,7 @@ ScTransferObj::~ScTransferObj()
if ( pScMod->GetClipData().pCellClipboard == this )
{
OSL_FAIL("ScTransferObj wasn't released");
- pScMod->SetClipObject( NULL, NULL );
+ pScMod->SetClipObject( nullptr, nullptr );
}
if ( pScMod->GetDragData().pCellTransfer == this )
{
@@ -212,7 +212,7 @@ ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin )
if ( !aDataHelper.HasFormat( SotClipboardFormatId::DIF ) )
{
// OSL_FAIL("ScTransferObj wasn't released");
- pObj = NULL;
+ pObj = nullptr;
}
}
return pObj;
@@ -482,7 +482,7 @@ void ScTransferObj::ObjectReleased()
{
ScModule* pScMod = SC_MOD();
if ( pScMod->GetClipData().pCellClipboard == this )
- pScMod->SetClipObject( NULL, NULL );
+ pScMod->SetClipObject( nullptr, nullptr );
TransferableHelper::ObjectReleased();
}
@@ -506,7 +506,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction )
if ( pScMod->GetDragData().pCellTransfer == this )
pScMod->ResetDragObject();
- xDragSourceRanges = NULL; // don't keep source after dropping
+ xDragSourceRanges = nullptr; // don't keep source after dropping
TransferableHelper::DragFinished( nDropAction );
}
@@ -554,7 +554,7 @@ ScDocument* ScTransferObj::GetSourceDocument()
ScDocShell* pSourceDocSh = GetSourceDocShell();
if (pSourceDocSh)
return &pSourceDocSh->GetDocument();
- return NULL;
+ return nullptr;
}
ScDocShell* ScTransferObj::GetSourceDocShell()
@@ -563,7 +563,7 @@ ScDocShell* ScTransferObj::GetSourceDocShell()
if (pRangesObj)
return pRangesObj->GetDocShell();
- return NULL; // none set
+ return nullptr; // none set
}
ScMarkData ScTransferObj::GetSourceMarkData()
@@ -646,7 +646,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
bool bWasCut = pDoc->IsCutMode();
if (!bWasCut)
pDoc->SetClipArea( aDestRange, true ); // Cut
- rDestDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL, NULL, pDoc, false );
+ rDestDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL, nullptr, pDoc, false );
pDoc->SetClipArea( aDestRange, bWasCut );
StripRefs( pDoc, nStartX,nStartY, nEndX,nEndY, &rDestDoc );
@@ -672,7 +672,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
pDestPool->CopyStyleFrom( pStylePool, aStyleName, SFX_STYLE_FAMILY_PAGE );
}
- ScViewData aViewData( pDocSh, NULL );
+ ScViewData aViewData( pDocSh, nullptr );
aViewData.SetScreen( nStartX,nStartY, nEndX,nEndY );
aViewData.SetCurX( nStartX );
aViewData.SetCurY( nStartY );
@@ -742,7 +742,7 @@ SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle )
else
{
ScGlobal::xDrawClipDocShellRef.Clear();
- return NULL;
+ return nullptr;
}
}
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 6bf0f365ce10..0002c815ecd7 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -42,26 +42,26 @@ ScAttrDlg::ScAttrDlg(SfxViewFrame* pFrameP, vcl::Window* pParent, const SfxItemS
OSL_ENSURE(pFact, "Dialog creation failed!");
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
- m_nNumberPageId = AddTabPage( "numbers", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
+ m_nNumberPageId = AddTabPage( "numbers", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), nullptr );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- m_nFontPageId = AddTabPage( "font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
+ m_nFontPageId = AddTabPage( "font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- AddTabPage( "fonteffects", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
+ AddTabPage( "fonteffects", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
- AddTabPage( "alignment", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 );
+ AddTabPage( "alignment", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), nullptr );
if ( aCJKOptions.IsAsianTypographyEnabled() )
{
OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- AddTabPage( "asiantypography", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), 0 );
+ AddTabPage( "asiantypography", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), nullptr );
}
else
RemoveTabPage( "asiantypography" );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- AddTabPage( "borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
+ AddTabPage( "borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- AddTabPage( "background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- AddTabPage( "cellprotection" , ScTabPageProtection::Create, 0 );
+ AddTabPage( "background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
+ AddTabPage( "cellprotection" , ScTabPageProtection::Create, nullptr );
}
ScAttrDlg::~ScAttrDlg()
@@ -90,7 +90,7 @@ void ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
IMPL_LINK_NOARG_TYPED(ScAttrDlg, OkHandler, SfxPoolItem*, void)
{
- GetOKButton().GetClickHdl().Call( NULL );
+ GetOKButton().GetClickHdl().Call( nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index cd8d1b7ce54f..a11e45a9034e 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -38,7 +38,7 @@ extern "C" ScAbstractDialogFactory* ScCreateDialogFactory();
ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
{
- ScFuncPtrCreateDialogFactory fp = 0;
+ ScFuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -56,7 +56,7 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index b4881436ded6..3f7e5a0eb8e6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -646,7 +646,7 @@ AbstractScCondFormatManagerDlg* ScAbstractDialogFactory_Impl::CreateScCondFormat
if(pDlg)
return new AbstractScCondFormatManagerDlg_Impl( pDlg );
- return NULL;
+ return nullptr;
}
AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(vcl::Window* pParent)
@@ -678,7 +678,7 @@ AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSe
if ( pDlg )
return new AbstractScDataPilotServiceDlg_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(vcl::Window* pParent,
@@ -740,7 +740,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( v
if ( pDlg )
return new AbstractScInsertCellDlg_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( vcl::Window* pParent,
@@ -838,7 +838,7 @@ AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(
{
if( nId == RID_SCDLG_DPNUMGROUP )
return new AbstractScDPNumGroupDlg_Impl( VclPtr<ScDPNumGroupDlg>::Create( pParent, rInfo ) );
- return 0;
+ return nullptr;
}
AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
@@ -847,7 +847,7 @@ AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
{
if( nId == RID_SCDLG_DPDATEGROUP )
return new AbstractScDPDateGroupDlg_Impl( VclPtr<ScDPDateGroupDlg>::Create( pParent, rInfo, nDatePart, rNullDate ) );
- return 0;
+ return nullptr;
}
AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
@@ -855,7 +855,7 @@ AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDl
{
if( nId == RID_SCDLG_DPSHOWDETAIL )
return new AbstractScDPShowDetailDlg_Impl( VclPtr<ScDPShowDetailDlg>::Create( pParent, rDPObj, nOrient ) );
- return 0;
+ return nullptr;
}
AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(vcl::Window* pParent, const OUString& rName,
@@ -956,7 +956,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
break;
}
- return pDlg ? new ScAbstractTabDialog_Impl( pDlg ) : NULL;
+ return pDlg ? new ScAbstractTabDialog_Impl( pDlg ) : nullptr;
}
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( vcl::Window* pParent,
@@ -977,7 +977,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( vcl::Wind
if ( pDlg )
return new ScAbstractTabDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
@@ -1042,7 +1042,7 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
break;
}
- return 0;
+ return nullptr;
}
GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc()
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index c4ab71e757e9..5971f6c8ec7f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -225,11 +225,11 @@ class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg
DECL_ABSTDLG_BASE( AbstractScInsertTableDlg_Impl, ScInsertTableDlg)
virtual bool GetTablesFromFile() override;
virtual bool GetTablesAsLink() override;
- virtual const OUString* GetFirstTable( sal_uInt16* pN = NULL ) override;
+ virtual const OUString* GetFirstTable( sal_uInt16* pN = nullptr ) override;
virtual ScDocShell* GetDocShellTables() override;
virtual bool IsTableBefore() override;
virtual sal_uInt16 GetTableCount() override;
- virtual const OUString* GetNextTable( sal_uInt16* pN = NULL ) override;
+ virtual const OUString* GetNextTable( sal_uInt16* pN = nullptr ) override;
};
@@ -447,7 +447,7 @@ public:
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent,
InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
- const OUString* pStrTitle = NULL ) override;
+ const OUString* pStrTitle = nullptr ) override;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
SCTAB nTabCount, bool bFromFile) override;
@@ -523,8 +523,8 @@ public:
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( vcl::Window* pParent,
bool bAscii = true,
- const ScImportOptions* pOptions = NULL,
- const OUString* pStrTitle = NULL,
+ const ScImportOptions* pOptions = nullptr,
+ const OUString* pStrTitle = nullptr,
bool bMultiByte = false,
bool bOnlyDbtoolsEncodings = false,
bool bImport = true ) override;
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index 374e8ad74d15..b1e49d5a8cf8 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -54,7 +54,7 @@
namespace scui
{
- static ScAbstractDialogFactory_Impl* pFactory=NULL;
+ static ScAbstractDialogFactory_Impl* pFactory=nullptr;
ScAbstractDialogFactory_Impl* GetFactory()
{
if ( !pFactory )
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index ba339e42ab85..cd27c35386fe 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -83,7 +83,7 @@ void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs )
// Initialize variables
sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION );
- const ScProtectionAttr* pProtAttr = NULL;
+ const ScProtectionAttr* pProtAttr = nullptr;
SfxItemState eItemState = rCoreAttrs->GetItemState( nWhich, false,
reinterpret_cast<const SfxPoolItem**>(&pProtAttr) );
@@ -92,7 +92,7 @@ void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs )
pProtAttr = static_cast<const ScProtectionAttr*>(&(rCoreAttrs->Get(nWhich)));
// At SfxItemState::DONTCARE let to 0
- bTriEnabled = ( pProtAttr == NULL ); // TriState, when DontCare
+ bTriEnabled = ( pProtAttr == nullptr ); // TriState, when DontCare
bDontCare = bTriEnabled;
if (bTriEnabled)
{
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index b3a2e2cc4e86..f6e3cce92ffc 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -168,7 +168,7 @@ void ScDataBarSettingsDlg::Init()
if ( pDocSh )
{
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != NULL )
+ if ( pItem != nullptr )
pColorTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
}
if ( pColorTable.is() )
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index aa0c6f75c938..9e91618e2c5f 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -40,8 +40,8 @@ ScCondFormatList::ScCondFormatList(vcl::Window* pParent, WinBits nStyle)
: Control(pParent, nStyle | WB_DIALOGCONTROL)
, mbHasScrollBar(false)
, mpScrollBar(VclPtr<ScrollBar>::Create(this, WB_VERT ))
- , mpDoc(NULL)
- , mpDialogParent(NULL)
+ , mpDoc(nullptr)
+ , mpDialogParent(nullptr)
{
mpScrollBar->SetScrollHdl( LINK( this, ScCondFormatList, ScrollHdl ) );
mpScrollBar->EnableDrag();
@@ -169,7 +169,7 @@ void ScCondFormatList::Resize()
ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
{
if(maEntries.empty())
- return NULL;
+ return nullptr;
ScConditionalFormat* pFormat = new ScConditionalFormat(0, mpDoc);
for(EntryContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
@@ -425,7 +425,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW,
, mbManaged(bManaged)
, maPos(rPos)
, mpViewData(pViewData)
- , mpLastEdit(NULL)
+ , mpLastEdit(nullptr)
{
get(mpBtnOk, "ok");
get(mpBtnAdd, "add");
@@ -560,7 +560,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const
{
OUString aRangeStr = mpEdRange->GetText();
if(aRangeStr.isEmpty())
- return NULL;
+ return nullptr;
ScRangeList aRange;
sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(),
@@ -572,7 +572,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const
else
{
delete pFormat;
- pFormat = NULL;
+ pFormat = nullptr;
}
return pFormat;
@@ -580,7 +580,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const
void ScCondFormatDlg::InvalidateRefData()
{
- mpLastEdit = NULL;
+ mpLastEdit = nullptr;
}
// -------------------------------------------------------------
@@ -603,7 +603,7 @@ void ScCondFormatDlg::OkPressed()
pFormat, maPos.Tab(), pFormat->GetRange());
else
mpViewData->GetDocShell()->GetDocFunc().ReplaceConditionalFormat(maKey,
- NULL, maPos.Tab(), ScRangeList());
+ nullptr, maPos.Tab(), ScRangeList());
if ( mbManaged )
{
@@ -643,8 +643,8 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
OString sTagName;
OUString sTagValue;
- xmlNodePtr pXmlRoot = NULL;
- xmlNodePtr pXmlNode = NULL;
+ xmlNodePtr pXmlRoot = nullptr;
+ xmlNodePtr pXmlNode = nullptr;
OString sOString = OUStringToOString( sXMLString, RTL_TEXTENCODING_UTF8 );
xmlDocPtr pXmlDoc = xmlParseMemory(sOString.getStr(), sOString.getLength());
@@ -655,12 +655,12 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
pXmlRoot = xmlDocGetRootElement( pXmlDoc );
pXmlNode = pXmlRoot->children;
- while (pXmlNode != NULL && bRetVal)
+ while (pXmlNode != nullptr && bRetVal)
{
sTagName = OUStringToOString("Index", RTL_TEXTENCODING_UTF8);
if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0)
{
- if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE)
+ if (pXmlNode->children != nullptr && pXmlNode->children->type == XML_TEXT_NODE)
{
sTagValue = OUString(reinterpret_cast<char*>(pXmlNode->children->content),
strlen(reinterpret_cast<char*>(pXmlNode->children->content)),
@@ -674,7 +674,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
sTagName = OUStringToOString("Type", RTL_TEXTENCODING_UTF8);
if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0)
{
- if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE)
+ if (pXmlNode->children != nullptr && pXmlNode->children->type == XML_TEXT_NODE)
{
sTagValue = OUString(reinterpret_cast<char*>(pXmlNode->children->content),
strlen(reinterpret_cast<char*>(pXmlNode->children->content)),
@@ -688,7 +688,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString,
sTagName = OUStringToOString("Managed", RTL_TEXTENCODING_UTF8);
if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0)
{
- if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE)
+ if (pXmlNode->children != nullptr && pXmlNode->children->type == XML_TEXT_NODE)
{
sTagValue = OUString(reinterpret_cast<char*>(pXmlNode->children->content),
strlen(reinterpret_cast<char*>(pXmlNode->children->content)),
@@ -717,18 +717,18 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
OString sTagName;
OString sTagValue;
- xmlNodePtr pXmlRoot = NULL;
- xmlNodePtr pXmlNode = NULL;
+ xmlNodePtr pXmlRoot = nullptr;
+ xmlNodePtr pXmlNode = nullptr;
- xmlChar* pBuffer = NULL;
- const xmlChar* pTagName = NULL;
- const xmlChar* pTagValue = NULL;
+ xmlChar* pBuffer = nullptr;
+ const xmlChar* pTagName = nullptr;
+ const xmlChar* pTagValue = nullptr;
xmlDocPtr pXmlDoc = xmlNewDoc(reinterpret_cast<const xmlChar*>("1.0"));
sTagName = OUStringToOString("ScCondFormatDlg", RTL_TEXTENCODING_UTF8);
pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr());
- pXmlRoot = xmlNewDocNode(pXmlDoc, NULL, pTagName, NULL);
+ pXmlRoot = xmlNewDocNode(pXmlDoc, nullptr, pTagName, nullptr);
xmlDocSetRootElement(pXmlDoc, pXmlRoot);
@@ -736,7 +736,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
sTagValue = OUStringToOString(OUString::number(nIndex), RTL_TEXTENCODING_UTF8);
pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr());
pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr());
- pXmlNode = xmlNewDocNode(pXmlDoc, NULL, pTagName, pTagValue);
+ pXmlNode = xmlNewDocNode(pXmlDoc, nullptr, pTagName, pTagValue);
xmlAddChild(pXmlRoot, pXmlNode);
@@ -744,7 +744,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
sTagValue = OUStringToOString(OUString::number(nType), RTL_TEXTENCODING_UTF8);
pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr());
pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr());
- pXmlNode = xmlNewDocNode(pXmlDoc, NULL, pTagName, pTagValue);
+ pXmlNode = xmlNewDocNode(pXmlDoc, nullptr, pTagName, pTagValue);
xmlAddChild(pXmlRoot, pXmlNode);
@@ -752,7 +752,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
sTagValue = OUStringToOString(OUString::boolean(bManaged), RTL_TEXTENCODING_UTF8);
pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr());
pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr());
- pXmlNode = xmlNewDocNode(pXmlDoc, NULL, pTagName, pTagValue);
+ pXmlNode = xmlNewDocNode(pXmlDoc, nullptr, pTagName, pTagValue);
xmlAddChild(pXmlRoot, pXmlNode);
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index b6318a2a43eb..059fbb5eb76d 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -288,7 +288,7 @@ ScFormatEntry* ScConditionFrmtEntry::createConditionEntry() const
aExpr2 = maEdVal2->GetText();
if (aExpr2.isEmpty())
{
- return NULL;
+ return nullptr;
}
}
@@ -609,7 +609,7 @@ ScFormatEntry* ScFormulaFrmtEntry::createFormulaEntry() const
ScConditionMode eMode = SC_COND_DIRECT;
OUString aFormula = maEdFormula->GetText();
if(aFormula.isEmpty())
- return NULL;
+ return nullptr;
OUString aExpr2;
ScFormatEntry* pEntry = new ScCondFormatEntry(eMode, aFormula, aExpr2, mpDoc, maPos, maLbStyle->GetSelectEntry());
@@ -800,7 +800,7 @@ void ScColorScale2FrmtEntry::Init()
if ( pDocSh )
{
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != NULL )
+ if ( pItem != nullptr )
pColorTable = static_cast<const SvxColorListItem*>(pItem) ->GetColorList();
}
if ( pColorTable.is() )
@@ -877,7 +877,7 @@ void ScColorScale2FrmtEntry::SetInactive()
IMPL_LINK_TYPED( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
{
- Edit* pEd = NULL;
+ Edit* pEd = nullptr;
if (&rBox == maLbEntryTypeMin.get())
pEd = maEdMin;
else if (&rBox == maLbEntryTypeMax.get())
@@ -980,7 +980,7 @@ void ScColorScale3FrmtEntry::Init()
if ( pDocSh )
{
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != NULL )
+ if ( pItem != nullptr )
pColorTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
}
if ( pColorTable.is() )
@@ -1069,7 +1069,7 @@ void ScColorScale3FrmtEntry::SetInactive()
IMPL_LINK_TYPED( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox&, rBox, void )
{
- Edit* pEd = NULL;
+ Edit* pEd = nullptr;
if(&rBox == maLbEntryTypeMin.get())
pEd = maEdMin.get();
else if(&rBox == maLbEntryTypeMiddle.get())
@@ -1402,7 +1402,7 @@ class ScIconSetFrmtDataEntry : public Control
public:
ScIconSetFrmtDataEntry( vcl::Window* pParent, ScIconSetType eType, ScDocument* pDoc,
- sal_Int32 i, const ScColorScaleEntry* pEntry = NULL );
+ sal_Int32 i, const ScColorScaleEntry* pEntry = nullptr );
virtual ~ScIconSetFrmtDataEntry();
virtual void dispose() override;
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index d581bd895342..e3afe8807db4 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -73,7 +73,7 @@ void ScCondFormatManagerWindow::DeleteSelection()
{
if(GetSelectionCount())
{
- for(SvTreeListEntry* pEntry = FirstSelected(); pEntry != NULL; pEntry = NextSelected(pEntry))
+ for(SvTreeListEntry* pEntry = FirstSelected(); pEntry != nullptr; pEntry = NextSelected(pEntry))
{
sal_Int32 nIndex = maMapLBoxEntryToCondIndex.find(pEntry)->second;
mpFormatList->erase(nIndex);
@@ -86,7 +86,7 @@ ScConditionalFormat* ScCondFormatManagerWindow::GetSelection()
{
SvTreeListEntry* pEntry = FirstSelected();
if(!pEntry)
- return NULL;
+ return nullptr;
sal_Int32 nIndex = maMapLBoxEntryToCondIndex.find(pEntry)->second;
return mpFormatList->GetFormat(nIndex);
@@ -104,7 +104,7 @@ void ScCondFormatManagerWindow::setColSizes()
ScCondFormatManagerDlg::ScCondFormatManagerDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList, const ScAddress& rPos):
ModalDialog(pParent, "CondFormatManager", "modules/scalc/ui/condformatmanager.ui"),
- mpFormatList( pFormatList ? new ScConditionalFormatList(*pFormatList) : NULL),
+ mpFormatList( pFormatList ? new ScConditionalFormatList(*pFormatList) : nullptr),
mpDoc(pDoc),
maPos(rPos),
mbModified(false)
@@ -143,7 +143,7 @@ void ScCondFormatManagerDlg::dispose()
ScConditionalFormatList* ScCondFormatManagerDlg::GetConditionalFormatList()
{
ScConditionalFormatList* pList = mpFormatList;
- mpFormatList = NULL;
+ mpFormatList = nullptr;
return pList;
}
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 447354633405..8ae684b5e538 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -48,11 +48,11 @@ ScRange lclGetRangeForNamedRange(OUString const & aName, ScDocument* pDocument)
{
ScRange aInvalidRange(ScAddress::INITIALIZE_INVALID);
ScRangeName* pRangeName = pDocument->GetRangeName();
- if (pRangeName == NULL)
+ if (pRangeName == nullptr)
return aInvalidRange;
const ScRangeData* pData = pRangeName->findByUpperName(aName.toAsciiUpperCase());
- if (pData == NULL)
+ if (pData == nullptr)
return aInvalidRange;
ScRange aRange;
@@ -69,12 +69,12 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
ScViewData* pViewData, const ScDPObject* pPivotTableObject, bool bNewPivotTable) :
ScAnyRefDlg (pSfxBindings, pChildWindow, pParent, "PivotTableLayout", "modules/scalc/ui/pivottablelayoutdialog.ui"),
maPivotTableObject (*pPivotTableObject),
- mpPreviouslyFocusedListBox(NULL),
- mpCurrentlyFocusedListBox(NULL),
+ mpPreviouslyFocusedListBox(nullptr),
+ mpCurrentlyFocusedListBox(nullptr),
mpViewData (pViewData),
mpDocument (pViewData->GetDocument()),
mbNewPivotTable (bNewPivotTable),
- mpActiveEdit (NULL),
+ mpActiveEdit (nullptr),
maAddressDetails (mpDocument->GetAddressConvention(), 0, 0),
mbDialogLostFocus (false)
{
@@ -161,7 +161,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
// Initialize Options
const ScDPSaveData* pSaveData = maPivotTableObject.GetSaveData();
- if (pSaveData == NULL)
+ if (pSaveData == nullptr)
{
mpCheckAddFilter->Check(false);
mpCheckDrillToDetail->Check(false);
@@ -391,7 +391,7 @@ bool ScPivotLayoutDialog::IsRefInputMode() const
void ScPivotLayoutDialog::ItemInserted(ScItemValue* pItemValue, ScPivotLayoutTreeList::SvPivotTreeListType eType)
{
- if (pItemValue == NULL)
+ if (pItemValue == nullptr)
return;
switch (eType)
@@ -507,7 +507,7 @@ bool ScPivotLayoutDialog::ApplyChanges()
SfxCallMode nCallMode = SfxCallMode::SLOT | SfxCallMode::RECORD;
const SfxPoolItem* pResult = pDispatcher->Execute(SID_PIVOT_TABLE, nCallMode, &aPivotItem, NULL, 0);
- if (pResult != NULL)
+ if (pResult != nullptr)
{
const SfxBoolItem* pItem = reinterpret_cast<const SfxBoolItem*>(pResult);
if (pItem)
@@ -565,7 +565,7 @@ void ScPivotLayoutDialog::ApplyLabelData(ScDPSaveData& rSaveData)
OUString aUnoName = ScDPUtil::createDuplicateDimensionName(pLabelData.maName, pLabelData.mnDupCount);
ScDPSaveDimension* pSaveDimensions = rSaveData.GetExistingDimensionByName(aUnoName);
- if (pSaveDimensions == NULL)
+ if (pSaveDimensions == nullptr)
continue;
pSaveDimensions->SetUsedHierarchy(pLabelData.mnUsedHier);
@@ -655,7 +655,7 @@ IMPL_LINK_NOARG_TYPED( ScPivotLayoutDialog, CancelClicked, Button*, void )
IMPL_LINK_TYPED(ScPivotLayoutDialog, GetFocusHandler, Control&, rCtrl, void)
{
- mpActiveEdit = NULL;
+ mpActiveEdit = nullptr;
if (&rCtrl == static_cast<Control*>(mpSourceEdit) ||
&rCtrl == static_cast<Control*>(mpSourceButton))
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
index 3b6dc553cf8f..82e5911dd939 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
@@ -77,7 +77,7 @@ void ScPivotLayoutTreeList::FillFields(ScPivotFieldVector& rFieldVector)
{
ScPivotField& rField = *it;
ScItemValue* pItemValue = mpParent->GetItem(rField.nCol);
- InsertEntry(pItemValue->maName, NULL, false, TREELIST_APPEND, pItemValue);
+ InsertEntry(pItemValue->maName, nullptr, false, TREELIST_APPEND, pItemValue);
}
}
@@ -92,14 +92,14 @@ void ScPivotLayoutTreeList::InsertEntryForSourceTarget(SvTreeListEntry* pSource,
mpParent->ItemInserted(pOriginalItemValue, meType);
- sal_uLong nPosition = (pTarget == NULL) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
+ sal_uLong nPosition = (pTarget == nullptr) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
InsertEntryForItem(pOriginalItemValue, nPosition);
}
void ScPivotLayoutTreeList::InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition)
{
OUString rName = pItemValue->maName;
- InsertEntry(rName, NULL, false, nPosition, pItemValue);
+ InsertEntry(rName, nullptr, false, nPosition, pItemValue);
}
void ScPivotLayoutTreeList::KeyInput(const KeyEvent& rKeyEvent)
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 376e28d39ad9..407a3b4a8557 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -21,7 +21,7 @@ using namespace std;
ScPivotLayoutTreeListBase::ScPivotLayoutTreeListBase(vcl::Window* pParent, WinBits nBits, SvPivotTreeListType eType)
: SvTreeListBox(pParent, nBits)
, meType(eType)
- , mpParent(NULL)
+ , mpParent(nullptr)
{
SetHighlightRange();
SetDragDropMode(DragDropMode::CTRL_MOVE | DragDropMode::APP_MOVE | DragDropMode::APP_DROP);
@@ -78,7 +78,7 @@ TriState ScPivotLayoutTreeListBase::NotifyCopying(SvTreeListEntry* /*pTarget*/,
bool ScPivotLayoutTreeListBase::HasEntry(SvTreeListEntry* pEntry)
{
SvTreeListEntry* pEachEntry;
- for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry))
+ for (pEachEntry = First(); pEachEntry != nullptr; pEachEntry = Next(pEachEntry))
{
if(pEachEntry == pEntry)
return true;
@@ -89,7 +89,7 @@ bool ScPivotLayoutTreeListBase::HasEntry(SvTreeListEntry* pEntry)
void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector& rVector)
{
SvTreeListEntry* pEachEntry;
- for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry))
+ for (pEachEntry = First(); pEachEntry != nullptr; pEachEntry = Next(pEachEntry))
{
ScItemValue* pItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData());
ScPivotFuncData& rFunctionData = pItemValue->maFunctionData;
@@ -113,7 +113,7 @@ void ScPivotLayoutTreeListBase::InsertEntryForItem(ScItemValue* /*pItemValue*/,
void ScPivotLayoutTreeListBase::RemoveEntryForItem(ScItemValue* pItemValue)
{
SvTreeListEntry* pEachEntry;
- for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry))
+ for (pEachEntry = First(); pEachEntry != nullptr; pEachEntry = Next(pEachEntry))
{
ScItemValue* pEachItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData());
if (pEachItemValue == pItemValue)
@@ -132,7 +132,7 @@ void ScPivotLayoutTreeListBase::GetFocus()
{
SvTreeListEntry* pEntry = mpParent->mpPreviouslyFocusedListBox->GetCurEntry();
if (pEntry)
- InsertEntryForSourceTarget(pEntry, NULL);
+ InsertEntryForSourceTarget(pEntry, nullptr);
if (mpParent->mpPreviouslyFocusedListBox != nullptr)
mpParent->mpPreviouslyFocusedListBox->GrabFocus();
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 5f9a2fb720c9..7623ed36eb65 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -138,14 +138,14 @@ void ScPivotLayoutTreeListData::FillDataField(ScPivotFieldVector& rDataFields)
pItemValue->maFunctionData.mnDupCount);
maDataItemValues.push_back(pItemValue);
- InsertEntry(sDataItemName, NULL, false, TREELIST_APPEND, pItemValue);
+ InsertEntry(sDataItemName, nullptr, false, TREELIST_APPEND, pItemValue);
}
}
void ScPivotLayoutTreeListData::PushDataFieldNames(vector<ScDPName>& rDataFieldNames)
{
SvTreeListEntry* pLoopEntry;
- for (pLoopEntry = First(); pLoopEntry != NULL; pLoopEntry = Next(pLoopEntry))
+ for (pLoopEntry = First(); pLoopEntry != nullptr; pLoopEntry = Next(pLoopEntry))
{
ScItemValue* pEachItemValue = static_cast<ScItemValue*>(pLoopEntry->GetUserData());
SCCOL nColumn = pEachItemValue->maFunctionData.mnCol;
@@ -179,12 +179,12 @@ void ScPivotLayoutTreeListData::InsertEntryForSourceTarget(SvTreeListEntry* pSou
{
OUString rText = GetEntryText(pSource);
GetModel()->Remove(pSource);
- sal_uLong nPosition = (pTarget == NULL) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
- InsertEntry(rText, NULL, false, nPosition, pItemValue);
+ sal_uLong nPosition = (pTarget == nullptr) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
+ InsertEntry(rText, nullptr, false, nPosition, pItemValue);
}
else
{
- sal_uLong nPosition = (pTarget == NULL) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
+ sal_uLong nPosition = (pTarget == nullptr) ? TREELIST_APPEND : GetModel()->GetAbsPos(pTarget) + 1;
InsertEntryForItem(pItemValue->mpOriginalItemValue, nPosition);
}
}
@@ -210,7 +210,7 @@ void ScPivotLayoutTreeListData::InsertEntryForItem(ScItemValue* pItemValue, sal_
pDataItemValue->maName,
rFunctionData.mnDupCount);
- InsertEntry(sDataName, NULL, false, nPosition, pDataItemValue);
+ InsertEntry(sDataName, nullptr, false, nPosition, pDataItemValue);
}
void ScPivotLayoutTreeListData::AdjustDuplicateCount(ScItemValue* pInputItemValue)
@@ -223,7 +223,7 @@ void ScPivotLayoutTreeListData::AdjustDuplicateCount(ScItemValue* pInputItemValu
sal_uInt8 nMaxDuplicateCount = 0;
SvTreeListEntry* pEachEntry;
- for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry))
+ for (pEachEntry = First(); pEachEntry != nullptr; pEachEntry = Next(pEachEntry))
{
ScItemValue* pItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData());
if (pItemValue == pInputItemValue)
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3bbfd6d4b1a3..fe3bfb40a098 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -38,8 +38,8 @@ ScAsciiOptions::ScAsciiOptions() :
bCharSetSystem ( false ),
nStartRow ( 1 ),
nInfoCount ( 0 ),
- pColStart ( NULL ),
- pColFormat ( NULL )
+ pColStart ( nullptr ),
+ pColFormat ( nullptr )
{
}
@@ -68,8 +68,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) :
}
else
{
- pColStart = NULL;
- pColFormat = NULL;
+ pColStart = nullptr;
+ pColFormat = nullptr;
}
}
@@ -98,17 +98,17 @@ void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const sal_Int32* pStart, con
}
else
{
- pColStart = NULL;
- pColFormat = NULL;
+ pColStart = nullptr;
+ pColFormat = nullptr;
}
}
void ScAsciiOptions::SetColumnInfo( const ScCsvExpDataVec& rDataVec )
{
delete[] pColStart;
- pColStart = NULL;
+ pColStart = nullptr;
delete[] pColFormat;
- pColFormat = NULL;
+ pColFormat = nullptr;
nInfoCount = static_cast< sal_uInt16 >( rDataVec.size() );
if( nInfoCount )
@@ -246,8 +246,8 @@ void ScAsciiOptions::ReadFromString( const OUString& rString )
}
else
{
- pColStart = NULL;
- pColFormat = NULL;
+ pColStart = nullptr;
+ pColFormat = nullptr;
}
}
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 0d8f58910ae3..cbcd7ba355d6 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -72,7 +72,7 @@ ScConsolidateDlg::ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::W
pDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())->
GetViewData().GetDocument() ),
pRangeUtil ( new ScRangeUtil ),
- pAreaData ( NULL ),
+ pAreaData ( nullptr ),
nAreaDataCount ( 0 ),
nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) ),
bDlgLostFocus ( false )
@@ -207,7 +207,7 @@ void ScConsolidateDlg::Init()
size_t nDbCount = pDbNames ? pDbNames->getNamedDBs().size() : 0;
nAreaDataCount = nRangeCount+nDbCount;
- pAreaData = NULL;
+ pAreaData = nullptr;
if ( nAreaDataCount > 0 )
{
@@ -326,7 +326,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
if ( pEd == pEdDataArea )
{
bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), pDoc,
- nTab, &theCompleteStr, NULL, NULL, eConv );
+ nTab, &theCompleteStr, nullptr, nullptr, eConv );
}
else if ( pEd == pEdDestArea )
{
@@ -334,7 +334,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
ScRangeUtil::CutPosString( pEd->GetText(), aPosStr );
bEditOk = ScRangeUtil::IsAbsPos( aPosStr, pDoc,
- nTab, &theCompleteStr, NULL, eConv );
+ nTab, &theCompleteStr, nullptr, eConv );
}
if ( bEditOk )
@@ -373,7 +373,7 @@ IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void)
OUString aDestPosStr( pEdDestArea->GetText() );
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, NULL, &aDestAddress, eConv ) )
+ if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, nullptr, &aDestAddress, eConv ) )
{
ScConsolidateParam theOutParam( theConsData );
ScArea** ppDataAreas = new ScArea*[nDataAreaCount];
@@ -428,7 +428,7 @@ IMPL_LINK_TYPED( ScConsolidateDlg, ClickHdl, Button*, pBtn, void )
if ( !pEdDataArea->GetText().isEmpty() )
{
OUString aNewEntry( pEdDataArea->GetText() );
- ScArea** ppAreas = NULL;
+ ScArea** ppAreas = nullptr;
sal_uInt16 nAreaCount = 0;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -500,7 +500,7 @@ IMPL_LINK_TYPED( ScConsolidateDlg, SelectHdl, ListBox&, rLb, void )
if ( pRangeUtil
&& (nSelPos > 0)
&& (nAreaDataCount > 0)
- && (pAreaData != NULL) )
+ && (pAreaData != nullptr) )
{
if ( static_cast<size_t>(nSelPos) <= nAreaDataCount )
{
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index aafe6abaccfc..2fb10309f0d5 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -59,7 +59,7 @@ ScCsvDiff ScCsvLayoutData::GetDiff( const ScCsvLayoutData& rData ) const
ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
Control( &rParent, WB_TABSTOP | WB_NODIALOGCONTROL ),
mrData( rParent.GetLayoutData() ),
- mxAccessible( NULL ),
+ mxAccessible( nullptr ),
mbValidGfx( false )
{
}
@@ -67,7 +67,7 @@ ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
ScCsvControl::ScCsvControl( vcl::Window* pParent, const ScCsvLayoutData& rData, WinBits nBits ) :
Control( pParent, nBits ),
mrData( rData ),
- mxAccessible( NULL ),
+ mxAccessible( nullptr ),
mbValidGfx( false )
{
}
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 4ffc12fb2b39..ce7c978e5694 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -64,7 +64,7 @@ ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) :
ScCsvControl( rParent ),
mpBackgrDev( VclPtr<VirtualDevice>::Create() ),
mpGridDev( VclPtr<VirtualDevice>::Create() ),
- mpColorConfig( 0 ),
+ mpColorConfig( nullptr ),
mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), true ) ),
maHeaderFont( GetFont() ),
maColStates( 1 ),
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 60b4b5cdfb1c..84237ad8efc8 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -144,7 +144,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
if ( !xSource.is() ) return;
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr),
uno::UNO_QUERY_THROW);
uno::Reference<sdbc::XConnection> xConnection = xSource->connectWithCompletion( xHandler );
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index d80ed97a40a7..422e7abbbad8 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -41,7 +41,7 @@
class DBSaveData;
-static DBSaveData* pSaveObj = NULL;
+static DBSaveData* pSaveObj = nullptr;
#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute()
@@ -217,7 +217,7 @@ void ScDbNameDlg::Init()
SCTAB nEndTab = 0;
ScDBCollection* pDBColl = pDoc->GetDBCollection();
- ScDBData* pDBData = NULL;
+ ScDBData* pDBData = nullptr;
pViewData->GetSimpleArea( nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab );
@@ -396,7 +396,7 @@ bool ScDbNameDlg::IsRefInputMode() const
IMPL_LINK_NOARG_TYPED(ScDbNameDlg, OkBtnHdl, Button*, void)
{
- AddBtnHdl( 0 );
+ AddBtnHdl( nullptr );
// Der View die Aenderungen und die Remove-Liste uebergeben:
// beide werden nur als Referenz uebergeben, so dass an dieser
@@ -477,7 +477,7 @@ IMPL_LINK_NOARG_TYPED(ScDbNameDlg, AddBtnHdl, Button*, void)
m_pBtnDoSize->Check( false );
m_pBtnKeepFmt->Check( false );
m_pBtnStripData->Check( false );
- SetInfoStrings( NULL ); // leer
+ SetInfoStrings( nullptr ); // leer
theCurArea = ScRange();
bSaved = true;
pSaveObj->Save();
@@ -557,7 +557,7 @@ IMPL_LINK_NOARG_TYPED(ScDbNameDlg, RemoveBtnHdl, Button*, void)
m_pBtnDoSize->Check( false );
m_pBtnKeepFmt->Check( false );
m_pBtnStripData->Check( false );
- SetInfoStrings( NULL ); // leer
+ SetInfoStrings( nullptr ); // leer
bSaved=false;
pSaveObj->Restore();
NameModifyHdl( *m_pEdName );
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index a43f66c08b1d..50ee6290df1a 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -58,15 +58,15 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPar
, aStrEmpty(SC_RESSTR(SCSTR_FILTER_EMPTY))
, aStrNotEmpty(SC_RESSTR(SCSTR_FILTER_NOTEMPTY))
, aStrColumn(SC_RESSTR(SCSTR_COLUMN))
- , pOptionsMgr(NULL)
+ , pOptionsMgr(nullptr)
, nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY))
, theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData())
- , pOutItem(NULL)
- , pViewData(NULL)
- , pDoc(NULL)
+ , pOutItem(nullptr)
+ , pViewData(nullptr)
+ , pDoc(nullptr)
, nSrcTab(0)
, bRefInputMode(false)
- , pTimer(NULL)
+ , pTimer(nullptr)
{
get(pLbConnect1,"connect1");
get(pLbField1,"field1");
@@ -231,7 +231,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
pLbCond4->SetSelectHdl( LINK( this, ScFilterDlg, LbSelectHdl ) );
pViewData = rQueryItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : NULL;
+ pDoc = pViewData ? pViewData->GetDocument() : nullptr;
nSrcTab = pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0);
// for easier access:
@@ -416,8 +416,8 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
pEdVal4->Disable();
}
- if(pDoc!=NULL &&
- pDoc->GetChangeTrack()!=NULL) pBtnCopyResult->Disable();
+ if(pDoc!=nullptr &&
+ pDoc->GetChangeTrack()!=nullptr) pBtnCopyResult->Disable();
// Switch on modal mode
// SetDispatcherLock( true );
//@BugID 54702 Enable/disable only in Basic class
@@ -516,7 +516,7 @@ void ScFilterDlg::UpdateValueList( size_t nList )
WaitObject aWaiter( this ); // even if only the list box has content
SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
- EntryList* pList = NULL;
+ EntryList* pList = nullptr;
if (!maEntryLists.count(nColumn))
{
size_t nOffset = GetSliderPos();
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index 8d3b82a0aa48..e5ae0ec42c9a 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -48,7 +48,7 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
const OUString& refStrUndefined )
: pViewData ( ptrViewData ),
- pDoc ( ptrViewData ? ptrViewData->GetDocument() : NULL ),
+ pDoc ( ptrViewData ? ptrViewData->GetDocument() : nullptr ),
pBtnCase ( refBtnCase ),
pBtnRegExp ( refBtnRegExp ),
pBtnHeader ( refBtnHeader ),
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index ba3e1ccbb392..c7c8b758c9ca 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -53,9 +53,9 @@ ScPivotFilterDlg::ScPivotFilterDlg(vcl::Window* pParent, const SfxItemSet& rArgS
nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
theQueryData ( static_cast<const ScQueryItem&>(
rArgSet.Get( nWhichQuery )).GetQueryData() ),
- pOutItem ( NULL ),
- pViewData ( NULL ),
- pDoc ( NULL ),
+ pOutItem ( nullptr ),
+ pViewData ( nullptr ),
+ pDoc ( nullptr ),
nSrcTab ( nSourceTab ), // is not in QueryParam
nFieldCount ( 0 )
{
@@ -76,7 +76,7 @@ ScPivotFilterDlg::ScPivotFilterDlg(vcl::Window* pParent, const SfxItemSet& rArgS
get(m_pFtDbArea, "dbarea");
for (sal_uInt16 i=0; i<=MAXCOL; i++)
- pEntryLists[i] = NULL;
+ pEntryLists[i] = nullptr;
Init( rArgSet );
}
@@ -131,7 +131,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
m_pBtnUnique->Check( !theQueryData.bDuplicate );
pViewData = rQueryItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : NULL;
+ pDoc = pViewData ? pViewData->GetDocument() : nullptr;
// for easier access:
aFieldLbArr [0] = m_pLbField1;
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index e1c7fe32e192..0bcca91ff5ef 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -499,7 +499,7 @@ void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa
mpRbAuto->SetClickHdl( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
mpRbUser->SetClickHdl( LINK( this, ScDPSubtotalDlg, RadioClickHdl ) );
- RadioButton* pRBtn = 0;
+ RadioButton* pRBtn = nullptr;
switch( rFuncData.mnFuncMask )
{
case PIVOT_FUNC_NONE: pRBtn = mpRbNone; break;
@@ -692,7 +692,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
m_pRbSortDesc->SetClickHdl( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
m_pRbSortMan->SetClickHdl( LINK( this, ScDPSubtotalOptDlg, RadioClickHdl ) );
- RadioButton* pRBtn = 0;
+ RadioButton* pRBtn = nullptr;
switch( nSortMode )
{
case DataPilotFieldSortMode::NONE:
@@ -835,7 +835,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj,
OUString aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
{
- const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : 0;
+ const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : nullptr;
if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
{
if (pDimension)
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 295edd1eddea..736c7747c41b 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -244,7 +244,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa
mpDatStream ( pInStream ),
mnStreamPos( pInStream ? pInStream->Tell() : 0 ),
- mpRowPosArray( NULL ),
+ mpRowPosArray( nullptr ),
mnRowPosCount(0),
aCharSetUser( ScResId( SCSTR_CHARSET_USER ) ),
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 45909ce90ecd..a631c537b92b 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -49,16 +49,16 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc
: ScAnyRefDlg ( pB, pCW, pParent, "AdvancedFilterDialog", "modules/scalc/ui/advancedfilterdialog.ui" ),
aStrUndefined ( SC_RESSTR(SCSTR_UNDEFINED) ),
- pOptionsMgr ( NULL ),
+ pOptionsMgr ( nullptr ),
nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
theQueryData ( static_cast<const ScQueryItem&>(
rArgSet.Get( nWhichQuery )).GetQueryData() ),
- pOutItem ( NULL ),
- pViewData ( NULL ),
- pDoc ( NULL ),
- pRefInputEdit ( NULL ),
+ pOutItem ( nullptr ),
+ pViewData ( nullptr ),
+ pDoc ( nullptr ),
+ pRefInputEdit ( nullptr ),
bRefInputMode ( false ),
- pIdle ( NULL )
+ pIdle ( nullptr )
{
get(pLbFilterArea,"lbfilterarea");
get(pEdFilterArea,"edfilterarea");
@@ -148,13 +148,13 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
pEdFilterArea->SetModifyHdl ( LINK( this, ScSpecialFilterDlg, FilterAreaModHdl ) );
pViewData = rQueryItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : NULL;
+ pDoc = pViewData ? pViewData->GetDocument() : nullptr;
pEdFilterArea->SetText( EMPTY_OUSTRING ); // may be overwritten below
if ( pViewData && pDoc )
{
- if(pDoc->GetChangeTrack()!=NULL) pBtnCopyResult->Disable();
+ if(pDoc->GetChangeTrack()!=nullptr) pBtnCopyResult->Disable();
ScRangeName* pRangeNames = pDoc->GetRangeName();
pLbFilterArea->Clear();
@@ -416,7 +416,7 @@ IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void )
}
else if( bRefInputMode )
{
- pRefInputEdit = NULL;
+ pRefInputEdit = nullptr;
bRefInputMode = false;
}
}
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index a5a6d567698f..86ff8096d09c 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -29,8 +29,8 @@ ScSortDlg::ScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
, bIsHeaders(false)
, bIsByRows(false)
{
- AddTabPage("criteria", ScTabPageSortFields::Create, 0);
- AddTabPage("options", ScTabPageSortOptions::Create, 0);
+ AddTabPage("criteria", ScTabPageSortFields::Create, nullptr);
+ AddTabPage("options", ScTabPageSortOptions::Create, nullptr);
}
ScSortWarningDlg::ScSortWarningDlg(vcl::Window* pParent,
diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx
index 42593d0e31ac..ffa0238f692a 100644
--- a/sc/source/ui/dbgui/subtdlg.cxx
+++ b/sc/source/ui/dbgui/subtdlg.cxx
@@ -29,10 +29,10 @@ ScSubTotalDlg::ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
{
get(m_pBtnRemove, "remove");
- AddTabPage("1stgroup", ScTpSubTotalGroup1::Create, 0);
- AddTabPage("2ndgroup", ScTpSubTotalGroup2::Create, 0);
- AddTabPage("3rdgroup", ScTpSubTotalGroup3::Create, 0);
- AddTabPage("options", ScTpSubTotalOptions::Create, 0);
+ AddTabPage("1stgroup", ScTpSubTotalGroup1::Create, nullptr);
+ AddTabPage("2ndgroup", ScTpSubTotalGroup2::Create, nullptr);
+ AddTabPage("3rdgroup", ScTpSubTotalGroup3::Create, nullptr);
+ AddTabPage("options", ScTpSubTotalOptions::Create, nullptr);
m_pBtnRemove->SetClickHdl( LINK( this, ScSubTotalDlg, RemoveHdl ) );
}
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index c81e7ad19d6e..daa45305c87a 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -79,7 +79,7 @@ ScTabPageSortFields::ScTabPageSortFields(vcl::Window* pParent,
nWhichSort ( rArgSet.GetPool()->GetWhich( SID_SORT ) ),
pDlg ( static_cast<ScSortDlg*>(GetParentDialog()) ),
- pViewData ( NULL ),
+ pViewData ( nullptr ),
aSortData ( static_cast<const ScSortItem&>(
rArgSet.Get( nWhichSort )).
GetSortData() ),
@@ -290,7 +290,7 @@ bool ScTabPageSortFields::FillItemSet( SfxItemSet* rArgSet )
aNewSortData.maKeyState[i].bDoSort = false;
}
- rArgSet->Put( ScSortItem( SCITEM_SORTDATA, NULL, &aNewSortData ) );
+ rArgSet->Put( ScSortItem( SCITEM_SORTDATA, nullptr, &aNewSortData ) );
return true;
}
@@ -494,11 +494,11 @@ ScTabPageSortOptions::ScTabPageSortOptions( vcl::Window* pParent,
, aStrUndefined(SC_RESSTR(SCSTR_UNDEFINED))
, nWhichSort(rArgSet.GetPool()->GetWhich(SID_SORT))
, aSortData(static_cast<const ScSortItem&>(rArgSet.Get(nWhichSort)).GetSortData())
- , pViewData(NULL)
- , pDoc(NULL)
+ , pViewData(nullptr)
+ , pDoc(nullptr)
, pDlg(static_cast<ScSortDlg*>(GetParentDialog()))
- , pColRes( NULL )
- , pColWrap( NULL )
+ , pColRes( nullptr )
+ , pColWrap( nullptr )
{
get(m_pBtnCase, "case");
get(m_pBtnHeader, "header");
@@ -573,7 +573,7 @@ void ScTabPageSortOptions::Init()
m_pLbLanguage->SetSelectHdl ( LINK( this, ScTabPageSortOptions, FillAlgorHdl ) );
pViewData = rSortItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : NULL;
+ pDoc = pViewData ? pViewData->GetDocument() : nullptr;
OSL_ENSURE( pViewData, "ViewData not found! :-/" );
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index ab1bf01394b5..82e142216481 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -41,8 +41,8 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( vcl::Window* pParent,
&rArgSet ),
aStrNone ( SC_RESSTR( SCSTR_NONE ) ),
aStrColumn ( SC_RESSTR( SCSTR_COLUMN ) ),
- pViewData ( NULL ),
- pDoc ( NULL ),
+ pViewData ( nullptr ),
+ pDoc ( nullptr ),
nWhichSubTotals ( rArgSet.GetPool()->GetWhich( SID_SUBTOTALS ) ),
rSubTotalData ( static_cast<const ScSubTotalItem&>(
rArgSet.Get( nWhichSubTotals )).
@@ -96,7 +96,7 @@ void ScTpSubTotalGroup::Init()
GetItemSet().Get( nWhichSubTotals ));
pViewData = rSubTotalItem.GetViewData();
- pDoc = ( pViewData ) ? pViewData->GetDocument() : NULL;
+ pDoc = ( pViewData ) ? pViewData->GetDocument() : nullptr;
OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found :-(" );
@@ -441,8 +441,8 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( vcl::Window* pParent,
: SfxTabPage ( pParent,
"SubTotalOptionsPage", "modules/scalc/ui/subtotaloptionspage.ui" ,
&rArgSet ),
- pViewData ( NULL ),
- pDoc ( NULL ),
+ pViewData ( nullptr ),
+ pDoc ( nullptr ),
nWhichSubTotals ( rArgSet.GetPool()->GetWhich( SID_SUBTOTALS ) ),
rSubTotalData ( static_cast<const ScSubTotalItem&>(
rArgSet.Get( nWhichSubTotals )).
@@ -486,7 +486,7 @@ void ScTpSubTotalOptions::Init()
GetItemSet().Get( nWhichSubTotals ));
pViewData = rSubTotalItem.GetViewData();
- pDoc = ( pViewData ) ? pViewData->GetDocument() : NULL;
+ pDoc = ( pViewData ) ? pViewData->GetDocument() : nullptr;
OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found!" );
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 6b0b56abf78c..459c5d731fc7 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -90,9 +90,9 @@ ScValidationDlg::ScValidationDlg(vcl::Window* pParent, const SfxItemSet* pArgSet
, m_bOwnRefHdlr(false)
, m_bRefInputting(false)
{
- m_nValuePageId = AddTabPage("criteria", ScTPValidationValue::Create, 0);
- AddTabPage("inputhelp", ScTPValidationHelp::Create, 0);
- AddTabPage("erroralert", ScTPValidationError::Create, 0);
+ m_nValuePageId = AddTabPage("criteria", ScTPValidationValue::Create, nullptr);
+ AddTabPage("inputhelp", ScTPValidationHelp::Create, nullptr);
+ AddTabPage("erroralert", ScTPValidationError::Create, nullptr);
get(m_pHBox, "refinputbox");
}
@@ -320,7 +320,7 @@ ScTPValidationValue::ScTPValidationValue( vcl::Window* pParent, const SfxItemSet
, maStrValue(ScResId(SCSTR_VALID_VALUE))
, maStrRange(ScResId(SCSTR_VALID_RANGE))
, maStrList(ScResId(SCSTR_VALID_LIST))
- , m_pRefEdit(NULL)
+ , m_pRefEdit(nullptr)
{
get(m_pLbAllow, "allow");
get(m_pCbAllow, "allowempty");
@@ -331,14 +331,14 @@ ScTPValidationValue::ScTPValidationValue( vcl::Window* pParent, const SfxItemSet
get(m_pFtMin, "minft");
get(m_pMinGrid, "mingrid");
get(m_pEdMin, "min");
- m_pEdMin->SetReferences(NULL, m_pFtMin);
+ m_pEdMin->SetReferences(nullptr, m_pFtMin);
get(m_pEdList, "minlist");
Size aSize(LogicToPixel(Size(174, 105), MAP_APPFONT));
m_pEdList->set_width_request(aSize.Width());
m_pEdList->set_height_request(aSize.Height());
get(m_pFtMax, "maxft");
get(m_pEdMax, "max");
- m_pEdMax->SetReferences(NULL, m_pFtMax);
+ m_pEdMax->SetReferences(nullptr, m_pFtMax);
get(m_pFtHint, "hintft");
get(m_pBtnRef, "validref");
m_pBtnRef->SetParentPage(this);
@@ -402,7 +402,7 @@ void ScTPValidationValue::Init()
m_pLbValue->SelectEntryPos( SC_VALIDDLG_DATA_EQUAL );
SelectHdl( *m_pLbAllow.get() );
- CheckHdl( NULL );
+ CheckHdl( nullptr );
}
VclPtr<SfxTabPage> ScTPValidationValue::Create( vcl::Window* pParent, const SfxItemSet* rArgSet )
@@ -450,7 +450,7 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
SetSecondFormula( aFmlaStr );
SelectHdl( *m_pLbAllow.get() );
- CheckHdl( NULL );
+ CheckHdl( nullptr );
}
bool ScTPValidationValue::FillItemSet( SfxItemSet* rArgSet )
@@ -515,8 +515,8 @@ ScValidationDlg * ScTPValidationValue::GetValidationDlg()
do{
if ( dynamic_cast<ScValidationDlg*>( pParent ) )
return static_cast< ScValidationDlg * >( pParent );
- }while ( NULL != ( pParent = pParent->GetParent() ) );
- return NULL;
+ }while ( nullptr != ( pParent = pParent->GetParent() ) );
+ return nullptr;
}
void ScTPValidationValue::SetupRefDlg()
@@ -531,7 +531,7 @@ void ScTPValidationValue::SetupRefDlg()
pValidationDlg->SetRefInputStartPreHdl( static_cast<ScRefHandlerHelper::PINPUTSTARTDLTYPE>( &ScTPValidationValue::RefInputStartPreHdl ) );
pValidationDlg->SetRefInputDonePostHdl( static_cast<ScRefHandlerHelper::PCOMMONHDLTYPE>( &ScTPValidationValue::RefInputDonePostHdl ) );
- vcl::Window *pLabel = NULL;
+ vcl::Window *pLabel = nullptr;
if ( m_pEdMax->IsVisible() )
{
@@ -561,17 +561,17 @@ void ScTPValidationValue::RemoveRefDlg()
{
if( pValidationDlg->RemoveRefDlg() )
{
- pValidationDlg->SetHandler( NULL );
- pValidationDlg->SetSetRefHdl( NULL );
- pValidationDlg->SetSetActHdl( NULL );
- pValidationDlg->SetRefInputStartPreHdl( NULL );
- pValidationDlg->SetRefInputDonePostHdl( NULL );
+ pValidationDlg->SetHandler( nullptr );
+ pValidationDlg->SetSetRefHdl( nullptr );
+ pValidationDlg->SetSetActHdl( nullptr );
+ pValidationDlg->SetRefInputStartPreHdl( nullptr );
+ pValidationDlg->SetRefInputDonePostHdl( nullptr );
if( m_pRefEdit )
- m_pRefEdit->SetReferences( NULL, NULL );
- m_pRefEdit = NULL;
+ m_pRefEdit->SetReferences( nullptr, nullptr );
+ m_pRefEdit = nullptr;
- m_pBtnRef->SetReferences( NULL, NULL );
+ m_pBtnRef->SetReferences( nullptr, nullptr );
}
}
}
@@ -845,7 +845,7 @@ IMPL_LINK_NOARG_TYPED(ScTPValidationError, ClickSearchHdl, Button*, void)
Application::SetDefDialogParent( pOld );
- if ( aScriptURL != NULL && !aScriptURL.isEmpty() )
+ if ( aScriptURL != nullptr && !aScriptURL.isEmpty() )
{
m_pEdtTitle->SetText( aScriptURL );
}
@@ -861,7 +861,7 @@ bool ScValidationDlg::EnterRefStatus()
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL;
+ if ( pWnd && pWnd->GetWindow()!= this ) pWnd = nullptr;
SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
@@ -951,7 +951,7 @@ void ScTPValidationValue::OnClick( Button *pBtn )
bool ScValidationDlg::IsChildFocus()
{
if ( const vcl::Window *pWin = Application::GetFocusWindow() )
- while( NULL != ( pWin = pWin->GetParent() ) )
+ while( nullptr != ( pWin = pWin->GetParent() ) )
if( pWin == this )
return true;
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index f9f2c12c3804..9f6b54777b53 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -24,7 +24,7 @@ namespace sc {
SearchResultsDlg::SearchResultsDlg( SfxBindings* _pBindings, vcl::Window* pParent, sal_uInt16 /* nId */ ) :
ModelessDialog(pParent, "SearchResultsDialog", "modules/scalc/ui/searchresults.ui"),
- mpBindings(_pBindings), mpDoc(NULL)
+ mpBindings(_pBindings), mpDoc(nullptr)
{
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("results");
Size aControlSize(150, 120);
@@ -66,7 +66,7 @@ void SearchResultsDlg::FillResults( ScDocument* pDoc, const ScRangeList &rMatche
// Out-of-bound sheet index.
continue;
- OUString aPosStr = aPos.Format(SCA_ABS, NULL, pDoc->GetAddressConvention());
+ OUString aPosStr = aPos.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention());
mpList->InsertEntry(aTabNames[aPos.Tab()] + "\t" + aPosStr + "\t" + pDoc->GetString(aPos));
}
}
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index df1829fcbf8d..d6d5d4dd44bd 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -51,7 +51,7 @@ struct AreaLink_Impl
ScDocShell* m_pDocSh;
AbstractScLinkedAreaDlg* m_pDialog;
- AreaLink_Impl() : m_pDocSh( NULL ), m_pDialog( NULL ) {}
+ AreaLink_Impl() : m_pDocSh( nullptr ), m_pDialog( nullptr ) {}
};
TYPEINIT1(ScAreaLink,::sfx2::SvBaseLink);
@@ -110,10 +110,10 @@ void ScAreaLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /* rEn
return SUCCESS;
sfx2::LinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument().GetLinkManager();
- if (pLinkManager!=NULL)
+ if (pLinkManager!=nullptr)
{
OUString aFile, aArea, aFilter;
- sfx2::LinkManager::GetDisplayNames(this, NULL, &aFile, &aArea, &aFilter);
+ sfx2::LinkManager::GetDisplayNames(this, nullptr, &aFile, &aArea, &aFilter);
// the file dialog returns the filter name with the application prefix
// -> remove prefix
@@ -127,7 +127,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /* rEn
// adjust in dialog:
OUString aNewLinkName;
OUString aTmp = aFilter;
- sfx2::MakeLnkName(aNewLinkName, NULL, aFile, aArea, &aTmp);
+ sfx2::MakeLnkName(aNewLinkName, nullptr, aFile, aArea, &aTmp);
aFilter = aTmp;
SetName( aNewLinkName );
}
@@ -176,7 +176,7 @@ void ScAreaLink::SetSource(const OUString& rDoc, const OUString& rFlt, const OUS
// also update link name for dialog
OUString aNewLinkName;
- sfx2::MakeLnkName( aNewLinkName, NULL, aFileName, aSourceArea, &aFilterName );
+ sfx2::MakeLnkName( aNewLinkName, nullptr, aFileName, aSourceArea, &aFilterName );
SetName( aNewLinkName );
}
@@ -324,7 +324,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
// Undo initialisieren
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bAddUndo && bUndo )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -392,7 +392,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewTokenRange );
- rDoc.CopyFromClip( aNewTokenRange, aDestMark, InsertDeleteFlags::ALL, NULL, &aClipDoc, false );
+ rDoc.CopyFromClip( aNewTokenRange, aDestMark, InsertDeleteFlags::ALL, nullptr, &aClipDoc, false );
aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 );
}
}
@@ -500,10 +500,10 @@ IMPL_LINK_NOARG_TYPED(ScAreaLink, AreaEndEditHdl, Dialog&, void)
// copy source data from members (set in Refresh) into link name for dialog
OUString aNewLinkName;
- sfx2::MakeLnkName( aNewLinkName, NULL, aFileName, aSourceArea, &aFilterName );
+ sfx2::MakeLnkName( aNewLinkName, nullptr, aFileName, aSourceArea, &aFilterName );
SetName( aNewLinkName );
}
- pImpl->m_pDialog = NULL; // dialog is deleted with parent
+ pImpl->m_pDialog = nullptr; // dialog is deleted with parent
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index 549a3ec6e5eb..81a80d27cb40 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -47,7 +47,7 @@ struct ScAutoStyleData
inline sal_uLong TimeNow() // Sekunden
{
- return (sal_uLong) time(0);
+ return (sal_uLong) time(nullptr);
}
namespace {
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index f95425b2ebb6..082fe89a643e 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -217,7 +217,7 @@ private:
{
while (!isTerminateRequested())
{
- DataStream::LinesType* pLines = NULL;
+ DataStream::LinesType* pLines = nullptr;
osl::ResettableMutexGuard aGuard(maMtxLines);
if (!maUsedLines.empty())
@@ -322,7 +322,7 @@ DataStream::DataStream(ScDocShell *pShell, const OUString& rURL, const ScRange&
mbRunning(false),
mbValuesInLine(false),
mbRefreshOnEmptyLine(false),
- mpLines(0),
+ mpLines(nullptr),
mnLinesCount(0),
mnLinesSinceRefresh(0),
mfLastRefreshTime(0.0),
@@ -424,7 +424,7 @@ void DataStream::StartImport()
if (!mxReaderThread.is())
{
- SvStream *pStream = 0;
+ SvStream *pStream = nullptr;
if (mnSettings & SCRIPT_STREAM)
pStream = new SvScriptStream(msURL);
else
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 9b26badde76c..f14f1e957c01 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -64,7 +64,7 @@ bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, bool
ScDBCollection* pDocColl = rDoc.GetDBCollection();
bool bUndo (rDoc.IsUndoEnabled());
- ScDBCollection* pUndoColl = NULL;
+ ScDBCollection* pUndoColl = nullptr;
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
@@ -123,7 +123,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName)
{
ScDocShellModificator aModificator( rDocShell );
- ScDBCollection* pUndoColl = NULL;
+ ScDBCollection* pUndoColl = nullptr;
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
@@ -201,7 +201,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
ScDBCollection* pDocColl = rDoc.GetDBCollection();
bool bUndo = rDoc.IsUndoEnabled();
- ScDBData* pData = NULL;
+ ScDBData* pData = nullptr;
if (rNewData.GetName() == STR_DB_LOCAL_NONAME)
{
ScRange aRange;
@@ -220,7 +220,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
rNewData.GetArea(aNewRange);
bool bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
- ScDBCollection* pUndoColl = NULL;
+ ScDBCollection* pUndoColl = nullptr;
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
@@ -247,7 +247,7 @@ void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::ve
ScDocShellModificator aModificator(rDocShell);
ScDocument& rDoc = rDocShell.GetDocument();
ScDBCollection* pOldColl = rDoc.GetDBCollection();
- ScDBCollection* pUndoColl = NULL;
+ ScDBCollection* pUndoColl = nullptr;
bool bRecord = rDoc.IsUndoEnabled();
std::vector<ScRange>::const_iterator iter;
@@ -268,7 +268,7 @@ void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::ve
rDoc.PreprocessDBDataUpdate();
rDoc.SetDBCollection( new ScDBCollection( rNewColl ) );
rDoc.CompileHybridFormula();
- pOldColl = NULL;
+ pOldColl = nullptr;
rDocShell.PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PAINT_GRID);
aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -289,7 +289,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
ScDocument& rDoc = rDocShell.GetDocument();
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
- ScDBData* pDBData = NULL;
+ ScDBData* pDBData = nullptr;
if (bIsUnnamed)
{
pDBData = rDoc.GetAnonymousDBData( aTab );
@@ -340,10 +340,10 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
//! Undo nur benoetigte Daten ?
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord)
{
@@ -391,7 +391,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
// Sortieren ohne SubTotals
aSubTotalParam.bRemoveOnly = true; // wird unten wieder zurueckgesetzt
- DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
+ DoSubTotals( nTab, aSubTotalParam, nullptr, false, bApi );
}
if (bSort)
@@ -406,7 +406,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
if (pDBData->GetAdvancedQuerySource(aAdvSource))
Query( nTab, aQueryParam, &aAdvSource, false, bApi );
else
- Query( nTab, aQueryParam, NULL, false, bApi );
+ Query( nTab, aQueryParam, nullptr, false, bApi );
// bei nicht-inplace kann die Tabelle umgestellt worden sein
// if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -416,7 +416,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
aSubTotalParam.bRemoveOnly = false;
- DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
+ DoSubTotals( nTab, aSubTotalParam, nullptr, false, bApi );
}
if (bRecord)
@@ -427,8 +427,8 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
SCROW nNewEndRow;
pDBData->GetArea( nDummyTab, nDummyCol,nDummyRow, nDummyCol,nNewEndRow );
- const ScRange* pOld = NULL;
- const ScRange* pNew = NULL;
+ const ScRange* pOld = nullptr;
+ const ScRange* pNew = nullptr;
if (bQuerySize)
{
ScDBData* pDest = rDoc.GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
@@ -641,13 +641,13 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
for (SCSIZE i=0; i<nEC; i++)
aOldQuery.GetEntry(i).bDoQuery = false;
aOldQuery.bDuplicate = true;
- Query( nTab, aOldQuery, NULL, bRecord, bApi );
+ Query( nTab, aOldQuery, nullptr, bRecord, bApi );
}
}
ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich
bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
- ScDBData* pDestData = NULL; // Bereich, in den kopiert wird
+ ScDBData* pDestData = nullptr; // Bereich, in den kopiert wird
bool bDoSize = false; // Zielgroesse anpassen (einf./loeschen)
SCCOL nFormulaCols = 0; // nur bei bDoSize
bool bKeepFmt = false;
@@ -725,9 +725,9 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
bKeepSub = true;
}
- ScDocument* pUndoDoc = NULL;
- ScDBCollection* pUndoDB = NULL;
- const ScRange* pOld = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
+ const ScRange* pOld = nullptr;
if ( bRecord )
{
@@ -760,7 +760,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
rDoc.BeginDrawUndo();
}
- ScDocument* pAttribDoc = NULL;
+ ScDocument* pAttribDoc = nullptr;
ScRange aAttribRange;
if (pDestData) // Zielbereich loeschen
{
@@ -1003,10 +1003,10 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
ScDocShellModificator aModificator( rDocShell );
ScSubTotalParam aNewParam( rParam ); // Bereichsende wird veraendert
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord) // alte Daten sichern
{
@@ -1354,7 +1354,7 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
{
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDataPilot(
- &rDocShell, pOldUndoDoc.release(), NULL, pUndoDPObj.get(), NULL, false));
+ &rDocShell, pOldUndoDoc.release(), nullptr, pUndoDPObj.get(), nullptr, false));
// pUndoDPObj is copied
}
@@ -1454,7 +1454,7 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool
if (bRecord)
{
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoDataPilot(&rDocShell, NULL, pNewUndoDoc.release(), NULL, &rDestObj, false));
+ new ScUndoDataPilot(&rDocShell, nullptr, pNewUndoDoc.release(), nullptr, &rDestObj, false));
}
// notify API objects
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index ce439e6debe0..1f258da9a526 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -119,13 +119,13 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
const svx::ODataAccessDescriptor* pDescriptor, bool bRecord, bool bAddrInsert )
{
ScDocument& rDoc = rDocShell.GetDocument();
- ScChangeTrack *pChangeTrack = NULL;
+ ScChangeTrack *pChangeTrack = nullptr;
ScRange aChangedRange;
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
- ScDBData* pDBData = NULL;
+ ScDBData* pDBData = nullptr;
if ( !bAddrInsert )
{
pDBData = rDoc.GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
@@ -228,7 +228,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr),
uno::UNO_QUERY_THROW);
xExecute->executeWithCompletion( xHandler );
}
@@ -415,7 +415,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
nErrStringId = aTester.GetMessageId();
bSuccess = false;
}
- else if ( (pChangeTrack = rDoc.GetChangeTrack()) != NULL )
+ else if ( (pChangeTrack = rDoc.GetChangeTrack()) != nullptr )
aChangedRange = ScRange(rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab );
}
@@ -476,8 +476,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
SCCOL nUndoEndCol = std::max( nEndCol, rParam.nCol2 ); // rParam = old end
SCROW nUndoEndRow = std::max( nEndRow, rParam.nRow2 );
- ScDocument* pUndoDoc = NULL;
- ScDBData* pUndoDBData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDBData* pUndoDBData = nullptr;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -588,14 +588,14 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bRecord)
{
ScDocument* pRedoDoc = pImportDoc;
- pImportDoc = NULL;
+ pImportDoc = nullptr;
if (nFormulaCols > 0) // include filled formulas for redo
rDoc.CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pRedoDoc );
- ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
+ ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : nullptr;
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoImportData( &rDocShell, nTab,
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 6f1e5930c93a..4b4afc130a72 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -177,7 +177,7 @@ bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).ShowPred( nCol, nRow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
@@ -218,7 +218,7 @@ bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).DeletePred( nCol, nRow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
@@ -257,7 +257,7 @@ bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).ShowSucc( nCol, nRow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
@@ -298,7 +298,7 @@ bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).DeleteSucc( nCol, nRow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
@@ -337,7 +337,7 @@ bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).ShowError( nCol, nRow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
@@ -377,7 +377,7 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
pModel->BeginCalcUndo(false);
bool bOverflow;
bool bDone = ScDetectiveFunc( &rDoc,nTab ).MarkInvalid( bOverflow );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (pWaitWin)
@@ -416,22 +416,22 @@ bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
if (bUndo)
pModel->BeginCalcUndo(false);
bool bDone = ScDetectiveFunc( &rDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
- SdrUndoGroup* pUndo = NULL;
+ SdrUndoGroup* pUndo = nullptr;
if (bUndo)
pUndo = pModel->GetCalcUndo();
if (bDone)
{
ScDetOpList* pOldList = rDoc.GetDetOpList();
- ScDetOpList* pUndoList = NULL;
+ ScDetOpList* pUndoList = nullptr;
if (bUndo)
- pUndoList = pOldList ? new ScDetOpList(*pOldList) : NULL;
+ pUndoList = pOldList ? new ScDetOpList(*pOldList) : nullptr;
rDoc.ClearDetectiveOperations();
if (bUndo)
{
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoDetective( &rDocShell, pUndo, NULL, pUndoList ) );
+ new ScUndoDetective( &rDocShell, pUndo, nullptr, pUndoList ) );
}
aModificator.SetDocumentModified();
SfxBindings* pBindings = rDocShell.GetViewBindings();
@@ -812,7 +812,7 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con
{
// wegen ChangeTracking darf UndoAction erst nach SetString angelegt werden
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoEnterData(&rDocShell, rPos, aOldValues, rText, NULL));
+ new ScUndoEnterData(&rDocShell, rPos, aOldValues, rText, nullptr));
}
if ( bEditDeleted || rDoc.HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) )
@@ -1084,7 +1084,7 @@ bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
rEngine.SetUpdateMode(false);
ScMyRememberItemList aRememberItems;
- ScMyRememberItem* pRememberItem = NULL;
+ ScMyRememberItem* pRememberItem = nullptr;
// All paragraph attributes must be removed before calling CreateTextObject,
// not only alignment, so the object doesn't contain the cell attributes as
@@ -1272,7 +1272,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c
if (aTester.IsEditable())
{
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : nullptr;
ScNoteData aOldData;
ScPostIt* pOldNote = rDoc.ReleaseNote( rPos );
@@ -1761,8 +1761,8 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
WaitObject aWait( ScDocShell::GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
- ScDocument* pRefUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pRefUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if ( bRecord )
{
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1816,9 +1816,9 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScDocAttrIterator aTestIter( &rDoc, i, nMergeTestStartCol, nMergeTestStartRow, nMergeTestEndCol, nMergeTestEndRow );
ScRange aExtendRange( nMergeTestStartCol, nMergeTestStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i );
- const ScPatternAttr* pPattern = NULL;
- const ScMergeFlagAttr* pMergeFlagAttr = NULL;
- while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL )
+ const ScPatternAttr* pPattern = nullptr;
+ const ScMergeFlagAttr* pMergeFlagAttr = nullptr;
+ while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != nullptr )
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) );
pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) );
@@ -2230,9 +2230,9 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScDocAttrIterator aTestIter( &rDoc, i, nUndoStartCol, nUndoStartRow, nMergeTestEndCol, nMergeTestEndRow );
ScRange aExtendRange( nUndoStartCol, nUndoStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i );
- const ScPatternAttr* pPattern = NULL;
- const ScMergeFlagAttr* pMergeFlagAttr = NULL;
- while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL )
+ const ScPatternAttr* pPattern = nullptr;
+ const ScMergeFlagAttr* pMergeFlagAttr = nullptr;
+ while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != nullptr )
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem( ATTR_MERGE ) );
pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem( ATTR_MERGE_FLAG ) );
@@ -2332,9 +2332,9 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
WaitObject aWait( ScDocShell::GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRefUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRefUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if ( bRecord )
{
// With the fix for #101329#, UpdateRef always puts cells into pRefUndoDoc at their old position,
@@ -2373,7 +2373,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
switch (eCmd)
{
case DEL_CELLSUP:
- rDoc.DeleteRow( nStartCol, 0, nEndCol, MAXTAB, nStartRow, static_cast<SCSIZE>(nEndRow-nStartRow+1), pRefUndoDoc, NULL, &aFullMark );
+ rDoc.DeleteRow( nStartCol, 0, nEndCol, MAXTAB, nStartRow, static_cast<SCSIZE>(nEndRow-nStartRow+1), pRefUndoDoc, nullptr, &aFullMark );
nPaintEndRow = MAXROW;
break;
case DEL_DELROWS:
@@ -2384,7 +2384,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nPaintFlags |= PAINT_LEFT;
break;
case DEL_CELLSLEFT:
- rDoc.DeleteCol( nStartRow, 0, nEndRow, MAXTAB, nStartCol, static_cast<SCSIZE>(nEndCol-nStartCol+1), pRefUndoDoc, NULL, &aFullMark );
+ rDoc.DeleteCol( nStartRow, 0, nEndRow, MAXTAB, nStartCol, static_cast<SCSIZE>(nEndCol-nStartCol+1), pRefUndoDoc, nullptr, &aFullMark );
nPaintEndCol = MAXCOL;
break;
case DEL_DELCOLS:
@@ -2411,7 +2411,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
// kopieren mit bColRowFlags=false (#54194#)
- pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,InsertDeleteFlags::FORMULA,false,pUndoDoc,NULL,false);
+ pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,InsertDeleteFlags::FORMULA,false,pUndoDoc,nullptr,false);
delete pRefUndoDoc;
SCTAB* pTabs = new SCTAB[nSelCount];
@@ -2612,7 +2612,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScClipParam aClipParam(ScRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nStartTab), bCut);
rDoc.CopyToClip(aClipParam, pClipDoc, &aSourceMark, false, bScenariosAdded, true);
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
SCCOL nOldEndCol = nEndCol;
SCROW nOldEndRow = nEndRow;
@@ -2692,7 +2692,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
// ausfuehren
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
@@ -2735,7 +2735,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
nUndoEndCol,nUndoEndRow,nDestEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ))
{
- rDoc.CopyFromClip( rSource, aSourceMark, InsertDeleteFlags::ALL, NULL, pClipDoc );
+ rDoc.CopyFromClip( rSource, aSourceMark, InsertDeleteFlags::ALL, nullptr, pClipDoc );
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
SCCOL nTmpEndCol = nEndCol;
@@ -2767,7 +2767,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScDrawLayer::MoveCells() which may move away inserted objects to wrong
positions (e.g. if source and destination range overlaps).*/
rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~(InsertDeleteFlags::OBJECTS),
- NULL, pClipDoc, true, false, bIncludeFiltered );
+ nullptr, pClipDoc, true, false, bIncludeFiltered );
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
@@ -2782,7 +2782,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
clipdoc does not contain a drawing layer.*/
if ( pClipDoc->GetDrawLayer() )
rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::OBJECTS,
- NULL, pClipDoc, true, false, bIncludeFiltered );
+ nullptr, pClipDoc, true, false, bIncludeFiltered );
if (bRecord)
{
@@ -2791,7 +2791,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
nStartCol, nStartRow, nStartTab,
nOldEndCol, nOldEndRow, nEndTab ),
ScAddress( nDestCol, nDestRow, nDestTab ),
- bCut, pUndoDoc, NULL, bScenariosAdded ) );
+ bCut, pUndoDoc, nullptr, bScenariosAdded ) );
}
SCCOL nDestPaintEndCol = nDestEndCol;
@@ -3047,8 +3047,8 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
if ( bVbaEnabled )
bRecord = false;
bool bWasLinked = rDoc.IsLinked(nTab);
- ScDocument* pUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -3400,8 +3400,8 @@ bool ScDocFunc::SetWidthOrHeight(
//! Option "Formeln anzeigen" - woher nehmen?
}
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
std::vector<sc::ColRowSpan> aUndoRanges;
if ( bRecord )
@@ -3448,7 +3448,7 @@ bool ScDocFunc::SetWidthOrHeight(
{
sal_uInt8 nOld = rDoc.GetRowFlags(nRow,nTab);
SCROW nLastRow = -1;
- bool bHidden = rDoc.RowHidden(nRow, nTab, NULL, &nLastRow);
+ bool bHidden = rDoc.RowHidden(nRow, nTab, nullptr, &nLastRow);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
rDoc.SetRowFlags( nRow, nTab, nOld & ~CR_MANUALSIZE );
}
@@ -3771,7 +3771,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
return false;
}
- rDoc.SetDocProtection(NULL);
+ rDoc.SetDocProtection(nullptr);
if (rDoc.IsUndoEnabled())
{
pProtectCopy->setProtected(false);
@@ -3801,7 +3801,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
return false;
}
- rDoc.SetTabProtection(nTab, NULL);
+ rDoc.SetTabProtection(nTab, nullptr);
if (rDoc.IsUndoEnabled())
{
pProtectCopy->setProtected(false);
@@ -3965,7 +3965,7 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
bool bSize = pAutoFormat->findByIndex(nFormatNo)->GetIncludeWidthHeight();
SCTAB nTabCount = rDoc.GetTableCount();
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -4064,7 +4064,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
{
WaitObject aWait( ScDocShell::GetActiveDialogParent() );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
const bool bUndo(rDoc.IsUndoEnabled());
if (bUndo)
@@ -4100,7 +4100,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
}
else
rDoc.InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow,
- aMark, rString, NULL, eGrammar);
+ aMark, rString, nullptr, eGrammar);
if (bUndo)
{
@@ -4319,7 +4319,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
break;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
SCTAB nTabCount = rDoc.GetTableCount();
@@ -4434,7 +4434,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
break;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
SCTAB nTabCount = rDoc.GetTableCount();
@@ -4583,7 +4583,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
WaitObject aWait( ScDocShell::GetActiveDialogParent() );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
SCTAB nTabCount = rDoc.GetTableCount();
@@ -4675,7 +4675,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
}
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
bool bNeedContentsUndo = false;
for (set<SCTAB>::const_iterator itr = itrBeg; itr != itrEnd; ++itr)
{
@@ -4728,7 +4728,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
if (pUndoDoc)
{
- SdrUndoGroup* pDrawUndo = rDoc.GetDrawLayer() ? rDoc.GetDrawLayer()->GetCalcUndo() : NULL;
+ SdrUndoGroup* pDrawUndo = rDoc.GetDrawLayer() ? rDoc.GetDrawLayer()->GetCalcUndo() : nullptr;
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoMerge(&rDocShell, rOption, bNeedContentsUndo, pUndoDoc, pDrawUndo) );
}
@@ -4770,7 +4770,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord )
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
for (set<SCTAB>::const_iterator itr = rOption.maTabs.begin(), itrEnd = rOption.maTabs.end();
itr != itrEnd; ++itr)
{
@@ -5084,7 +5084,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
ScEditableTester aTester( &rDoc, nTab, nStartCol,nStartRow, nEndCol,nEndRow );
if (aTester.IsEditable())
{
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
@@ -5185,11 +5185,11 @@ bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, bApi ) )
{
// GRAM_PODF_A1 for API compatibility.
- bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ bRet = EnterMatrix( aNewRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
if (!bRet)
{
// versuchen, alten Zustand wiederherzustellen
- EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ EnterMatrix( rOldRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -5296,7 +5296,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
return;
bool bUndo = rDoc.IsUndoEnabled();
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
ScRange aCombinedRange = rRanges.Combine();
ScRange aCompleteRange;
if(bUndo)
@@ -5408,7 +5408,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bRecord, bool
}
sc::TableValues aUndoVals(rRange);
- sc::TableValues* pUndoVals = bRecord ? &aUndoVals : NULL;
+ sc::TableValues* pUndoVals = bRecord ? &aUndoVals : nullptr;
rDoc.ConvertFormulaToValue(rRange, pUndoVals);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 4f8dd2b39c20..62a489a8920a 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -262,7 +262,7 @@ void ScDocShell::BeforeXMLLoading()
aDocument.EnableIdle(false);
// prevent unnecessary broadcasts and updates
- OSL_ENSURE(pModificator == NULL, "The Modificator should not exist");
+ OSL_ENSURE(pModificator == nullptr, "The Modificator should not exist");
pModificator = new ScDocShellModificator( *this );
aDocument.SetImportingXML( true );
@@ -369,7 +369,7 @@ void ScDocShell::AfterXMLLoading(bool bRet)
if (eRecalcState == ScDocument::HARDRECALCSTATE_OFF)
aDocument.SetHardRecalcState(ScDocument::HARDRECALCSTATE_TEMPORARY);
delete pModificator;
- pModificator = NULL;
+ pModificator = nullptr;
aDocument.SetHardRecalcState(eRecalcState);
}
else
@@ -579,7 +579,7 @@ bool ScDocShell::Load( SfxMedium& rMedium )
aDocument.GetStyleSheetPool()->CreateStandardStyles();
aDocument.UpdStlShtPtrsFrmNms();
- bRet = LoadXML( &rMedium, NULL );
+ bRet = LoadXML( &rMedium, nullptr );
}
}
@@ -667,7 +667,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( SwitchToShared( true, false ) )
{
ScViewData* pViewData = GetViewData();
- ScTabView* pTabView = ( pViewData ? dynamic_cast< ScTabView* >( pViewData->GetView() ) : NULL );
+ ScTabView* pTabView = ( pViewData ? dynamic_cast< ScTabView* >( pViewData->GetView() ) : nullptr );
if ( pTabView )
{
pTabView->UpdateLayerLocks();
@@ -725,10 +725,10 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
uno::Reference< task::XJob > xJob( xFactory->createInstanceWithContext( xContext ), uno::UNO_QUERY_THROW );
ScViewData* pViewData = GetViewData();
- SfxViewShell* pViewShell = ( pViewData ? pViewData->GetViewShell() : NULL );
- SfxViewFrame* pViewFrame = ( pViewShell ? pViewShell->GetViewFrame() : NULL );
- SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : NULL );
- uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : 0 );
+ SfxViewShell* pViewShell = ( pViewData ? pViewData->GetViewShell() : nullptr );
+ SfxViewFrame* pViewFrame = ( pViewShell ? pViewShell->GetViewFrame() : nullptr );
+ SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : nullptr );
+ uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : nullptr );
uno::Reference< sheet::XSpreadsheetView > xSpreadsheetView( xController, uno::UNO_QUERY_THROW );
uno::Sequence< beans::NamedValue > aArgsForJob { { "SpreadsheetView", uno::makeAny( xSpreadsheetView ) } };
xJob->execute( aArgsForJob );
@@ -761,7 +761,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// check if shared flag is set in shared file
bool bShared = false;
ScModelObj* pDocObj = ScModelObj::getImplementation( xModel );
- ScDocShell* pSharedDocShell = ( pDocObj ? dynamic_cast< ScDocShell* >( pDocObj->GetObjectShell() ) : NULL );
+ ScDocShell* pSharedDocShell = ( pDocObj ? dynamic_cast< ScDocShell* >( pDocObj->GetObjectShell() ) : nullptr );
if ( pSharedDocShell )
{
bShared = pSharedDocShell->HasSharedXMLFlagSet();
@@ -987,7 +987,7 @@ bool ScDocShell::LoadFrom( SfxMedium& rMedium )
// until loading/saving only the styles in XML is implemented,
// load the whole file
- bRet = LoadXML( &rMedium, NULL );
+ bRet = LoadXML( &rMedium, nullptr );
InitItems();
SfxObjectShell::LoadFrom( rMedium );
@@ -1064,7 +1064,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
aDocument.SetInsertingFromOtherDoc( true );
if (aFltName == pFilterXML)
- bRet = LoadXML( &rMedium, NULL );
+ bRet = LoadXML( &rMedium, nullptr );
else if (aFltName == "StarCalc 1.0")
{
SvStream* pStream = rMedium.GetInStream();
@@ -1497,7 +1497,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
// Update all rows in all tables.
ScSizeDeviceProvider aProv(this);
- ScDocRowHeightUpdater aUpdater(aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), NULL);
+ ScDocRowHeightUpdater aUpdater(aDocument, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), nullptr);
aUpdater.update();
}
else if (!aRecalcRowRangesArray.empty())
@@ -1619,7 +1619,7 @@ bool ScDocShell::Save()
// wait cursor is handled with progress bar
bool bRet = SfxObjectShell::Save();
if( bRet )
- bRet = SaveXML( GetMedium(), NULL );
+ bRet = SaveXML( GetMedium(), nullptr );
return bRet;
}
@@ -1689,7 +1689,7 @@ bool ScDocShell::SaveAs( SfxMedium& rMedium )
{
bRet = SfxObjectShell::SaveAs( rMedium );
if (bRet)
- bRet = SaveXML( &rMedium, NULL );
+ bRet = SaveXML( &rMedium, nullptr );
}
else
{
@@ -1875,7 +1875,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScHorizontalCellIterator aIter( &aDocument, nTab, nStartCol, nStartRow,
nEndCol, nEndRow );
ScRefCellValue* pCell;
- while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != NULL )
+ while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != nullptr )
{
bool bProgress = false; // only upon line change
if ( nNextRow < nRow )
@@ -2209,7 +2209,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
//TODO/LATER: this shouldn't happen!
OSL_FAIL("XML filter in ConvertFrom?!");
- bRet = SaveXML( &rMed, NULL );
+ bRet = SaveXML( &rMed, nullptr );
}
else if (aFltName == pFilterExcel5 || aFltName == pFilterExcel95 ||
aFltName == pFilterExcel97 || aFltName == pFilterEx5Temp ||
@@ -2231,7 +2231,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
if( (rMed.GetFilter()->GetFilterFlags() & SfxFilterFlags::ENCRYPTION) == SfxFilterFlags::NONE )
{
SfxItemSet* pItemSet = rMed.GetItemSet();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pItemSet && pItemSet->GetItemState( SID_PASSWORD, true, &pItem ) == SfxItemState::SET )
{
bDoSave = ScWarnPassword::WarningOnPassword( rMed );
@@ -2508,10 +2508,10 @@ bool ScDocShell::PrepareClose( bool bUI )
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( p );
- if(pViewSh!=NULL)
+ if(pViewSh!=nullptr)
{
vcl::Window *pWin=pViewSh->GetWindow();
- if(pWin!=NULL) pWin->GrabFocus();
+ if(pWin!=nullptr) pWin->GrabFocus();
}
}
@@ -2645,13 +2645,13 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
bUpdateEnabled ( true ),
nDocumentLock ( 0 ),
nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
- pOldAutoDBRange ( NULL ),
- pDocHelper ( NULL ),
- pAutoStyleList ( NULL ),
- pPaintLockData ( NULL ),
- pSolverSaveData ( NULL ),
- pSheetSaveData ( NULL ),
- pModificator ( NULL )
+ pOldAutoDBRange ( nullptr ),
+ pDocHelper ( nullptr ),
+ pAutoStyleList ( nullptr ),
+ pPaintLockData ( nullptr ),
+ pSolverSaveData ( nullptr ),
+ pSheetSaveData ( nullptr ),
+ pModificator ( nullptr )
#if ENABLE_TELEPATHY
, mpCollaboration( new ScCollaboration( this ) )
#endif
@@ -2670,7 +2670,7 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
if (pStlPool)
StartListening(*pStlPool);
- GetPageOnFromPageStyleSet( NULL, 0, bHeaderOn, bFooterOn );
+ GetPageOnFromPageStyleSet( nullptr, 0, bHeaderOn, bFooterOn );
SetHelpId( HID_SCSHELL_DOCSH );
// InitItems and CalcOutputFactor are called now in Load/ConvertFrom/InitNew
@@ -2690,13 +2690,13 @@ ScDocShell::ScDocShell( const SfxModelFlags i_nSfxCreationFlags ) :
bUpdateEnabled ( true ),
nDocumentLock ( 0 ),
nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG),
- pOldAutoDBRange ( NULL ),
- pDocHelper ( NULL ),
- pAutoStyleList ( NULL ),
- pPaintLockData ( NULL ),
- pSolverSaveData ( NULL ),
- pSheetSaveData ( NULL ),
- pModificator ( NULL )
+ pOldAutoDBRange ( nullptr ),
+ pDocHelper ( nullptr ),
+ pAutoStyleList ( nullptr ),
+ pPaintLockData ( nullptr ),
+ pSolverSaveData ( nullptr ),
+ pSheetSaveData ( nullptr ),
+ pModificator ( nullptr )
#if ENABLE_TELEPATHY
, mpCollaboration( new ScCollaboration( this ) )
#endif
@@ -2740,7 +2740,7 @@ ScDocShell::~ScDocShell()
delete pDocFunc;
delete aDocument.mpUndoManager;
- aDocument.mpUndoManager = 0;
+ aDocument.mpUndoManager = nullptr;
delete pImpl;
delete pPaintLockData;
@@ -2906,7 +2906,7 @@ VclPtr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog(
pDlg->AddTabPage( 42,
ScGlobal::GetRscString( STR_DOC_STAT ),
ScDocStatPageCreate,
- NULL);
+ nullptr);
}
return pDlg;
}
@@ -3103,7 +3103,7 @@ void ScDocShellModificator::SetDocumentModified()
bool ScDocShell::IsChangeRecording() const
{
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
- return pChangeTrack != NULL;
+ return pChangeTrack != nullptr;
}
bool ScDocShell::HasChangeRecordProtection() const
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index ea02ccf165a2..fd8cc681bd46 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -137,7 +137,7 @@ void ScDocShell::ResetDrawObjectShell()
{
ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
if (pDrawLayer)
- pDrawLayer->SetObjectShell( NULL );
+ pDrawLayer->SetObjectShell( nullptr );
}
ScDrawLayer* ScDocShell::MakeDrawLayer()
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 4ac965f4edf9..efcf435a26f0 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -229,7 +229,7 @@ void ScDocShell::UnlockPaint_Impl(bool bDoc)
// Paint jetzt ausfuehren
ScPaintLockData* pPaint = pPaintLockData;
- pPaintLockData = NULL; // nicht weitersammeln
+ pPaintLockData = nullptr; // nicht weitersammeln
ScRangeListRef xRangeList = pPaint->GetRangeList();
if (xRangeList)
@@ -438,7 +438,7 @@ void ScDocShell::UpdateFontList()
{
delete pImpl->pFontList;
// pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() );
- pImpl->pFontList = new FontList( GetRefDevice(), NULL, false ); // sal_False or sal_True???
+ pImpl->pFontList = new FontList( GetRefDevice(), nullptr, false ); // sal_False or sal_True???
SvxFontListItem aFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
@@ -554,11 +554,11 @@ ScChangeAction* ScDocShell::GetChangeAction( const ScAddress& rPos )
{
ScChangeTrack* pTrack = GetDocument().GetChangeTrack();
if (!pTrack)
- return NULL;
+ return nullptr;
SCTAB nTab = rPos.Tab();
- const ScChangeAction* pFound = NULL;
+ const ScChangeAction* pFound = nullptr;
long nModified = 0;
const ScChangeAction* pAction = pTrack->GetFirst();
while (pAction)
@@ -850,7 +850,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{ // deleted Table enthaelt deleted Cols, die nicht
sal_uLong nStart, nEnd;
pSourceTrack->AppendDeleteRange(
- pDel->GetOverAllRange().MakeRange(), NULL, nStart, nEnd );
+ pDel->GetOverAllRange().MakeRange(), nullptr, nStart, nEnd );
}
}
break;
@@ -858,7 +858,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
const ScChangeActionMove* pMove = static_cast<const ScChangeActionMove*>(pThisAction);
pSourceTrack->AppendMove( pMove->GetFromRange().MakeRange(),
- pMove->GetBigRange().MakeRange(), NULL );
+ pMove->GetBigRange().MakeRange(), nullptr );
}
break;
default:
@@ -996,7 +996,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
aSourceRange.aEnd.SetRow( aPos.Row() + nRows - 1 );
aValue = aValue.copy(1, aValue.getLength()-2); // remove the 1st and last characters.
GetDocFunc().EnterMatrix( aSourceRange,
- NULL, NULL, aValue, false, false,
+ nullptr, nullptr, aValue, false, false,
EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_DEFAULT );
}
break;
@@ -1013,10 +1013,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
}
break;
case SC_CAT_INSERT_ROWS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS_BEFORE, true, false );
+ GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSROWS_BEFORE, true, false );
break;
case SC_CAT_INSERT_COLS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS_BEFORE, true, false );
+ GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSCOLS_BEFORE, true, false );
break;
case SC_CAT_DELETE_TABS :
GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), true, false );
@@ -1027,7 +1027,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() )
{
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELROWS, true, false );
+ GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELROWS, true, false );
// #i101099# [Collaboration] Changes are not correctly shown
if ( bShared )
@@ -1047,7 +1047,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
{ // deleted Table enthaelt deleted Cols, die nicht
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, true, false );
+ GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELCOLS, true, false );
}
}
break;
@@ -1190,7 +1190,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
ScConflictsFinder aFinder( pSharedTrack, nActStartShared, nActEndShared, nActStartOwn, nActEndOwn, aConflictsList );
if ( aFinder.Find() )
{
- ScConflictsListHelper::TransformConflictsList( aConflictsList, NULL, &aOwnInverseMergeMap );
+ ScConflictsListHelper::TransformConflictsList( aConflictsList, nullptr, &aOwnInverseMergeMap );
bool bLoop = true;
while ( bLoop )
{
@@ -1245,7 +1245,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// resolve conflicts for shared non-content actions
if ( !aConflictsList.empty() )
{
- ScConflictsListHelper::TransformConflictsList( aConflictsList, &aSharedMergeMap, NULL );
+ ScConflictsListHelper::TransformConflictsList( aConflictsList, &aSharedMergeMap, nullptr );
ScConflictsResolver aResolver( pThisTrack, aConflictsList );
pAction = pThisTrack->GetAction( nEndShared );
while ( pAction && pAction->GetActionNumber() >= nStartShared )
@@ -1274,7 +1274,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// resolve conflicts for shared content actions and own actions
if ( !aConflictsList.empty() )
{
- ScConflictsListHelper::TransformConflictsList( aConflictsList, NULL, &aOwnMergeMap );
+ ScConflictsListHelper::TransformConflictsList( aConflictsList, nullptr, &aOwnMergeMap );
ScConflictsResolver aResolver( pThisTrack, aConflictsList );
pAction = pThisTrack->GetAction( nEndShared );
while ( pAction && pAction->GetActionNumber() >= nStartShared )
@@ -1317,7 +1317,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
aInfoBox->Execute();
}
- return ( pThisAction != NULL );
+ return ( pThisAction != nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e3fc6a37038b..e729d1e46231 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -571,14 +571,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
// xmlsec05/06:
// getting real parent window when called from Security-Options TP
- vcl::Window* pParent = NULL;
+ vcl::Window* pParent = nullptr;
const SfxPoolItem* pParentItem;
if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr();
// desired state
ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
- bool bActivateTracking = (pChangeTrack == 0); // toggle
+ bool bActivateTracking = (pChangeTrack == nullptr); // toggle
if ( pItem )
bActivateTracking = pItem->GetValue(); // from argument
@@ -598,7 +598,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pChangeTrack)
{
if ( pChangeTrack->IsProtected() )
- bDo = ExecuteChangeProtectionDialog( NULL );
+ bDo = ExecuteChangeProtectionDialog( nullptr );
}
if ( bDo )
{
@@ -633,7 +633,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_CHG_PROTECT :
{
- vcl::Window* pParent = NULL;
+ vcl::Window* pParent = nullptr;
const SfxPoolItem* pParentItem;
if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr();
@@ -660,12 +660,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
WinBits(WB_YES_NO | WB_DEF_NO),
ScGlobal::GetRscString( STR_END_REDLINING ) );
if( aBox->Execute() == RET_YES )
- bDo = ExecuteChangeProtectionDialog( NULL, true );
+ bDo = ExecuteChangeProtectionDialog( nullptr, true );
else
bDo = false;
}
else // merge might reject some actions
- bDo = ExecuteChangeProtectionDialog( NULL, true );
+ bDo = ExecuteChangeProtectionDialog( nullptr, true );
}
if ( !bDo )
{
@@ -675,7 +675,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
SfxApplication* pApp = SfxGetpApp();
const SfxPoolItem* pItem;
const SfxStringItem* pStringItem(nullptr);
- SfxMedium* pMed = NULL;
+ SfxMedium* pMed = nullptr;
if (pReqArgs && pReqArgs->GetItemState(SID_FILE_NAME, true, &pItem) == SfxItemState::SET)
{
pStringItem = dynamic_cast<const SfxStringItem*>(pItem);
@@ -752,7 +752,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !pOtherDocSh->GetError() ) // nur Errors
{
- bool bHadTrack = ( aDocument.GetChangeTrack() != NULL );
+ bool bHadTrack = ( aDocument.GetChangeTrack() != nullptr );
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
sal_uLong nStart = 0;
if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
@@ -1535,10 +1535,10 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
case SID_STATUS_PAGESTYLE: // Click auf StatusBar-Control
case SID_FORMATPAGE:
{
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
}
- else if ( pReqArgs == NULL )
+ else if ( pReqArgs == nullptr )
{
OUString aOldName = aDocument.GetPageStyle( nCurTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
@@ -1609,10 +1609,10 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
case SID_HFEDIT:
{
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
}
- else if ( pReqArgs == NULL )
+ else if ( pReqArgs == nullptr )
{
OUString aStr( aDocument.GetPageStyle( nCurTab ) );
@@ -1780,7 +1780,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
void ScDocShell::GetState( SfxItemSet &rSet )
{
- bool bTabView = GetBestViewShell() != NULL;
+ bool bTabView = GetBestViewShell() != nullptr;
SfxWhichIter aIter(rSet);
for (sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich())
@@ -1805,7 +1805,7 @@ void ScDocShell::GetState( SfxItemSet &rSet )
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem( nWhich,
- aDocument.GetChangeTrack() != NULL ) );
+ aDocument.GetChangeTrack() != nullptr ) );
break;
case SID_CHG_PROTECT:
@@ -1887,7 +1887,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
if ( nAspect == ASPECT_THUMBNAIL )
{
Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL );
- ScViewData aTmpData( this, NULL );
+ ScViewData aTmpData( this, nullptr );
aTmpData.SetTabNo(nVisTab);
SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
@@ -1896,7 +1896,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
else
{
Rectangle aBoundRect = SfxObjectShell::GetVisArea();
- ScViewData aTmpData( this, NULL );
+ ScViewData aTmpData( this, nullptr );
aTmpData.SetTabNo(nVisTab);
SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
@@ -2002,7 +2002,7 @@ void SnapVer( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCROW& rStartRow )
for (SCROW i = nRow; i <= MAXROW; ++i)
{
SCROW nLastRow;
- if (rDoc.RowHidden(i, nTab, NULL, &nLastRow))
+ if (rDoc.RowHidden(i, nTab, nullptr, &nLastRow))
{
i = nLastRow;
continue;
@@ -2075,8 +2075,8 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
if (!pStyleSet)
return;
- const SvxSetItem* pSetItem = NULL;
- const SfxItemSet* pSet = NULL;
+ const SvxSetItem* pSetItem = nullptr;
+ const SfxItemSet* pSet = nullptr;
pSetItem = static_cast<const SvxSetItem*>( &pStyleSet->Get( ATTR_PAGE_HEADERSET ) );
pSet = &pSetItem->GetItemSet();
@@ -2201,7 +2201,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
bool bValid = ( (aRange.Parse(aPos, &aDocument, formula::FormulaGrammar::CONV_OOO ) & SCA_VALID) ||
(aRange.aStart.Parse(aPos, &aDocument, formula::FormulaGrammar::CONV_OOO) & SCA_VALID) );
- ScServerObject* pObj = NULL; // NULL = error
+ ScServerObject* pObj = nullptr; // NULL = error
if ( bValid )
pObj = new ScServerObject( this, rItem );
@@ -2214,7 +2214,7 @@ ScViewData* ScDocShell::GetViewData()
{
SfxViewShell* pCur = SfxViewShell::Current();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( pCur );
- return pViewSh ? &pViewSh->GetViewData() : NULL;
+ return pViewSh ? &pViewSh->GetViewData() : nullptr;
}
SCTAB ScDocShell::GetCurTab()
@@ -2231,7 +2231,7 @@ ScTabViewShell* ScDocShell::GetBestViewShell( bool bOnlyVisible )
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
// falsches Doc?
if( pViewSh && pViewSh->GetViewData().GetDocShell() != this )
- pViewSh = NULL;
+ pViewSh = nullptr;
if( !pViewSh )
{
// 1. ViewShell suchen
@@ -2253,12 +2253,12 @@ SfxBindings* ScDocShell::GetViewBindings()
if (pViewSh)
return &pViewSh->GetViewFrame()->GetBindings();
else
- return NULL;
+ return nullptr;
}
ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static
{
- ScDocShell* pFound = NULL;
+ ScDocShell* pFound = nullptr;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
sal_uInt16 nShellCnt = 0;
@@ -2299,7 +2299,7 @@ IMPL_LINK_TYPED( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
if ( !sOptions.isEmpty() )
pImpl->pRequest->AppendItem( SfxStringItem( SID_FILE_FILTEROPTIONS, sOptions ) );
}
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
const SfxInt16Item* pInt16Item(nullptr);
SfxItemSet* pSet = pMed->GetItemSet();
if (pSet && pSet->GetItemState(SID_VERSION, true, &pItem) == SfxItemState::SET)
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 6150dabfeac1..a2d7dd018549 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -193,7 +193,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
}
else if ( eMode == SC_DB_OLD )
{
- pData = NULL; // nichts gefunden
+ pData = nullptr; // nichts gefunden
nStartCol = nEndCol = nCol;
nStartRow = nEndRow = nRow;
nStartTab = nEndTab = nTab;
@@ -272,7 +272,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
}
else
{
- ScDBCollection* pUndoColl = NULL;
+ ScDBCollection* pUndoColl = nullptr;
OUString aNewName;
if (eMode==SC_DB_IMPORT)
@@ -282,7 +282,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
OUString aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT );
long nCount = 0;
- const ScDBData* pDummy = NULL;
+ const ScDBData* pDummy = nullptr;
ScDBCollection::NamedDBs& rDBs = pColl->getNamedDBs();
do
{
@@ -331,11 +331,11 @@ ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
{
ScDBCollection* pColl = aDocument.GetDBCollection();
if (!pColl)
- return NULL;
+ return nullptr;
ScDBData* pData = pColl->getAnonDBs().getByRange(rRange);
if (!pData)
- return NULL;
+ return nullptr;
if (!pData->HasHeader())
{
@@ -350,7 +350,7 @@ ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
ScDBData* ScDocShell::GetOldAutoDBRange()
{
ScDBData* pRet = pOldAutoDBRange;
- pOldAutoDBRange = NULL;
+ pOldAutoDBRange = nullptr;
return pRet; // has to be deleted by caller!
}
@@ -384,7 +384,7 @@ void ScDocShell::CancelAutoDBRange()
}
delete pOldAutoDBRange;
- pOldAutoDBRange = NULL;
+ pOldAutoDBRange = nullptr;
}
}
@@ -548,7 +548,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
aData.GetSize( nColSize, nRowSize );
if (bRecord && nColSize > 0 && nRowSize > 0)
{
- ScDBData* pUndoData = pDestData ? new ScDBData(*pDestData) : NULL;
+ ScDBData* pUndoData = pDestData ? new ScDBData(*pDestData) : nullptr;
SCTAB nDestTab = rParam.nTab;
ScArea aDestArea( rParam.nTab, rParam.nCol, rParam.nRow,
@@ -563,7 +563,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
// alte Outlines
ScOutlineTable* pTable = aDocument.GetOutlineTable( nDestTab );
- ScOutlineTable* pUndoTab = pTable ? new ScOutlineTable( *pTable ) : NULL;
+ ScOutlineTable* pUndoTab = pTable ? new ScOutlineTable( *pTable ) : nullptr;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, false, true );
@@ -604,7 +604,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- false, 0, NULL, pUndoData ) );
+ false, 0, nullptr, pUndoData ) );
}
}
@@ -781,7 +781,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
++nNewTab;
bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
- const ScMarkData* pCopyMark = NULL;
+ const ScMarkData* pCopyMark = nullptr;
if (!bCopyAll)
pCopyMark = &rMark;
@@ -1011,7 +1011,7 @@ IMPL_LINK_TYPED( ScDocShell, RefreshDBDataHdl, Timer*, pRefreshTimer, void )
{
ScRange aRange;
pDBData->GetArea( aRange );
- bool bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, NULL, true ); //! Api-Flag as parameter
+ bool bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, nullptr, true ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 04654b36ba69..1e05785e810d 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -472,7 +472,7 @@ void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoadi
if (rOpt.GetUseEnglishFuncName())
{
// switch native symbols to English.
- ScCompiler aComp(NULL, ScAddress());
+ ScCompiler aComp(nullptr, ScAddress());
ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH);
ScCompiler::SetNativeSymbols(xMap);
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 46468de4cfd7..35cd59f0306e 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -1068,9 +1068,9 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
const sal_Int32* pColLengths = aColLengths.getConstArray();
ScHorizontalCellIterator aIter( &aDocument, nTab, nFirstCol,
nDocRow, nLastCol, nDocRow);
- ScRefCellValue* pCell = NULL;
+ ScRefCellValue* pCell = nullptr;
bool bTest = true;
- while (bTest && ((pCell = aIter.GetNext( nDocCol, nDocRow)) != NULL))
+ while (bTest && ((pCell = aIter.GetNext( nDocCol, nDocRow)) != nullptr))
{
SCCOL nCol = nDocCol - nFirstCol;
switch (pColTypes[nCol])
diff --git a/sc/source/ui/docshell/docshimp.hxx b/sc/source/ui/docshell/docshimp.hxx
index a9068cfda859..9acec21110b7 100644
--- a/sc/source/ui/docshell/docshimp.hxx
+++ b/sc/source/ui/docshell/docshimp.hxx
@@ -32,9 +32,9 @@ struct DocShell_Impl
DocShell_Impl() :
bIgnoreLostRedliningWarning( false )
- , pFontList( NULL )
- , pDocInserter( NULL )
- , pRequest( NULL )
+ , pFontList( nullptr )
+ , pDocInserter( nullptr )
+ , pRequest( nullptr )
{}
~DocShell_Impl()
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index c442f1b84818..d2fa8d6f93b0 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -492,7 +492,7 @@ const OUString* ScExternalRefCache::getRealTableName(sal_uInt16 nFileId, const O
if (itrDoc == maDocs.end())
{
// specified document is not cached.
- return NULL;
+ return nullptr;
}
const DocItem& rDoc = itrDoc->second;
@@ -501,7 +501,7 @@ const OUString* ScExternalRefCache::getRealTableName(sal_uInt16 nFileId, const O
if (itrTabId == rDoc.maTableNameIndex.end())
{
// the specified table is not in cache.
- return NULL;
+ return nullptr;
}
return &rDoc.maTableNames[itrTabId->second].maRealName;
@@ -515,7 +515,7 @@ const OUString* ScExternalRefCache::getRealRangeName(sal_uInt16 nFileId, const O
if (itrDoc == maDocs.end())
{
// specified document is not cached.
- return NULL;
+ return nullptr;
}
const DocItem& rDoc = itrDoc->second;
@@ -523,7 +523,7 @@ const OUString* ScExternalRefCache::getRealRangeName(sal_uInt16 nFileId, const O
ScGlobal::pCharClass->uppercase(rRangeName));
if (itr == rDoc.maRealRangeNameMap.end())
// range name not found.
- return NULL;
+ return nullptr;
return &itr->second;
}
@@ -1276,7 +1276,7 @@ ScExternalRefCache::DocItem* ScExternalRefCache::getDocItem(sal_uInt16 nFileId)
if (!res.second)
// insertion failed.
- return NULL;
+ return nullptr;
itrDoc = res.first;
}
@@ -1309,7 +1309,7 @@ void ScExternalRefLink::Closed()
return SUCCESS;
OUString aFile, aFilter;
- sfx2::LinkManager::GetDisplayNames(this, NULL, &aFile, NULL, &aFilter);
+ sfx2::LinkManager::GetDisplayNames(this, nullptr, &aFile, nullptr, &aFilter);
ScExternalRefManager* pMgr = mpDoc->GetExternalRefManager();
if (!pMgr->isFileLoadable(aFile))
@@ -1388,7 +1388,7 @@ static FormulaToken* convertToToken( ScDocument* pHostDoc, ScDocument* pSrcDoc,
OSL_FAIL("attempted to convert an unknown cell type.");
}
- return NULL;
+ return nullptr;
}
template<class T>
@@ -1477,7 +1477,7 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray(
// future we can introduce a new stack variable type svMatrixList with
// a new token type that can store a 3D matrix value and convert a 3D
// range to it.
- return NULL;
+ return nullptr;
std::unique_ptr<ScRange> pUsedRange;
@@ -1570,7 +1570,7 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray(
}
if (!pUsedRange.get())
- return NULL;
+ return nullptr;
s.SetCol(pUsedRange->aStart.Col());
s.SetRow(pUsedRange->aStart.Row());
@@ -1766,7 +1766,7 @@ void putRangeDataIntoCache(
// Make sure to set this range 'cached', to prevent unnecessarily
// accessing the src document time and time again.
ScExternalRefCache::TableTypeRef pCacheTab =
- rRefCache.getCacheTable(nFileId, rTabName, true, NULL);
+ rRefCache.getCacheTable(nFileId, rTabName, true, nullptr);
if (pCacheTab)
pCacheTab->setCachedCellRange(
rCacheRange.aStart.Col(), rCacheRange.aStart.Row(), rCacheRange.aEnd.Col(), rCacheRange.aEnd.Row());
@@ -1888,7 +1888,7 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken(
// this data, but add it to the cached range to prevent accessing the
// source document time and time again.
ScExternalRefCache::TableTypeRef pCacheTab =
- maRefCache.getCacheTable(nFileId, rTabName, true, NULL);
+ maRefCache.getCacheTable(nFileId, rTabName, true, nullptr);
if (pCacheTab)
pCacheTab->setCachedCell(rCell.Col(), rCell.Row());
@@ -1998,7 +1998,7 @@ bool hasRangeName(ScDocument& rDoc, const OUString& rName)
ScRangeName* pExtNames = rDoc.GetRangeName();
OUString aUpperName = ScGlobal::pCharClass->uppercase(rName);
const ScRangeData* pRangeData = pExtNames->findByUpperName(aUpperName);
- return pRangeData != NULL;
+ return pRangeData != nullptr;
}
}
@@ -2276,9 +2276,9 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
{
const OUString* pFileName = getExternalFileName(nFileId);
if (!pFileName)
- return NULL;
+ return nullptr;
- ScDocument* pSrcDoc = NULL;
+ ScDocument* pSrcDoc = nullptr;
ScDocShell* pShell = static_cast<ScDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<ScDocShell>, false));
while (pShell)
{
@@ -2318,7 +2318,7 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
{
if (!mpDoc->IsExecuteLinkEnabled())
- return NULL;
+ return nullptr;
DocShellMap::iterator itrEnd = maDocShells.end();
DocShellMap::iterator itr = maDocShells.find(nFileId);
@@ -2346,7 +2346,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
const OUString* pFile = getExternalFileName(nFileId);
if (!pFile)
// no file name associated with this ID.
- return NULL;
+ return nullptr;
OUString aFilter;
SrcShell aSrcDoc;
@@ -2360,7 +2360,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
if (!aSrcDoc.maShell.Is())
{
// source document could not be loaded.
- return NULL;
+ return nullptr;
}
return &cacheNewDocShell(nFileId, aSrcDoc);
@@ -2370,7 +2370,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
{
const SrcFileData* pFileData = getExternalFileData(nFileId);
if (!pFileData)
- return NULL;
+ return nullptr;
// Always load the document by using the path created from the relative
// path. If the referenced document is not there, simply exit. The
@@ -2382,7 +2382,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
aFile = pFileData->maRealFileName;
if (!isFileLoadable(aFile))
- return NULL;
+ return nullptr;
OUString aOptions = pFileData->maFilterOptions;
if ( !pFileData->maFilterName.isEmpty() )
@@ -2428,7 +2428,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, pFilter, pSet));
if (pMedium->GetError() != ERRCODE_NONE)
- return NULL;
+ return nullptr;
// To load encrypted documents with password, user interaction needs to be enabled.
pMedium->UseInteractionHandler(mbUserInteractionEnabled);
@@ -2624,7 +2624,7 @@ sal_uInt16 ScExternalRefManager::getExternalFileId(const OUString& rFile)
const OUString* ScExternalRefManager::getExternalFileName(sal_uInt16 nFileId, bool bForceOriginal)
{
if (nFileId >= maSrcFiles.size())
- return NULL;
+ return nullptr;
if (bForceOriginal)
return &maSrcFiles[nFileId].maFileName;
@@ -2664,7 +2664,7 @@ bool ScExternalRefManager::hasExternalFile(const OUString& rFile) const
const ScExternalRefManager::SrcFileData* ScExternalRefManager::getExternalFileData(sal_uInt16 nFileId) const
{
if (nFileId >= maSrcFiles.size())
- return NULL;
+ return nullptr;
return &maSrcFiles[nFileId];
}
@@ -2710,7 +2710,7 @@ class RefCacheFiller : public sc::ColumnSpanSet::ColumnAction
public:
RefCacheFiller( svl::SharedStringPool& rStrPool, ScExternalRefCache& rRefCache, sal_uInt16 nFileId ) :
- mrStrPool(rStrPool), mrRefCache(rRefCache), mnFileId(nFileId), mpCurCol(NULL) {}
+ mrStrPool(rStrPool), mrRefCache(rRefCache), mnFileId(nFileId), mpCurCol(nullptr) {}
virtual void startColumn( ScColumn* pCol ) override
{
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 55bbaede553f..1f84bdcf1da6 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -88,8 +88,8 @@ ScImportExport::ScImportExport( ScDocument* p )
mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
mExportTextOptions()
{
- pUndoDoc = NULL;
- pExtOptions = NULL;
+ pUndoDoc = nullptr;
+ pExtOptions = nullptr;
}
// Insert am current cell without range(es)
@@ -98,13 +98,13 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
aRange( rPt ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
- bAll( false ), bSingle( true ), bUndo( pDocSh != NULL ),
+ bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
mExportTextOptions()
{
- pUndoDoc = NULL;
- pExtOptions = NULL;
+ pUndoDoc = nullptr;
+ pExtOptions = nullptr;
}
// ctor with a range is only used for export
@@ -114,13 +114,13 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
aRange( r ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
- bAll( false ), bSingle( false ), bUndo( pDocSh != NULL ),
+ bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
mExportTextOptions()
{
- pUndoDoc = NULL;
- pExtOptions = NULL;
+ pUndoDoc = nullptr;
+ pExtOptions = nullptr;
// Only one sheet (table) supported
aRange.aEnd.SetTab( aRange.aStart.Tab() );
}
@@ -131,13 +131,13 @@ ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
: pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
- bAll( false ), bSingle( true ), bUndo( pDocSh != NULL ),
+ bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
mExportTextOptions()
{
- pUndoDoc = NULL;
- pExtOptions = NULL;
+ pUndoDoc = nullptr;
+ pExtOptions = nullptr;
SCTAB nTab = ScDocShell::GetCurTab();
aRange.aStart.SetTab( nTab );
@@ -239,9 +239,9 @@ void ScImportExport::EndPaste(bool bAutoRowHeight)
ScMarkData aDestMark;
aDestMark.SetMarkArea(aRange);
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoPaste(pDocSh, aRange, aDestMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, NULL));
+ new ScUndoPaste(pDocSh, aRange, aDestMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, nullptr));
}
- pUndoDoc = NULL;
+ pUndoDoc = nullptr;
if( pDocSh )
{
if (!bHeight)
@@ -706,7 +706,7 @@ static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
OUString& rString, SylkVersion eVersion )
{
const sal_Unicode* pStartQuote = p;
- const sal_Unicode* pEndQuote = 0;
+ const sal_Unicode* pEndQuote = nullptr;
while( *(++p) )
{
if( *p == '"' )
@@ -719,7 +719,7 @@ static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
if (*(p+2) == ';')
{
p += 2; // escaped ';'
- pEndQuote = 0;
+ pEndQuote = nullptr;
}
else
break; // end field
@@ -730,7 +730,7 @@ static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
if (*(p+1) == '"')
{
++p; // escaped '"'
- pEndQuote = 0;
+ pEndQuote = nullptr;
}
else if (*(p+1) == ';')
break; // end field
@@ -1793,7 +1793,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
{
double fVal = rtl_math_uStringToDouble( p,
aLine.getStr() + aLine.getLength(),
- cDecSep, cGrpSep, NULL, NULL );
+ cDecSep, cGrpSep, nullptr, nullptr );
pDoc->SetValue( nCol, nRow, aRange.aStart.Tab(), fVal );
}
}
@@ -2217,8 +2217,8 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
virtual FltError ScImportRTF( SvStream&, const OUString&, ScDocument*, ScRange& ) override { return eERR_INTERN; }
virtual FltError ScImportHTML( SvStream&, const OUString&, ScDocument*, ScRange&, double, bool, SvNumberFormatter*, bool ) override { return eERR_INTERN; }
- virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) override { return NULL; }
- virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const OUString&, const ScRange&, bool ) override { return NULL; }
+ virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) override { return nullptr; }
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const OUString&, const ScRange&, bool ) override { return nullptr; }
virtual OUString GetHTMLRangeNameList( ScDocument*, const OUString& ) override { return OUString(); }
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) override { return eERR_INTERN; }
@@ -2228,7 +2228,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
const OUString&, OUString&, const OUString& ) override { return eERR_INTERN; }
virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override { return eERR_INTERN; }
- virtual ScOrcusFilters* GetOrcusFilters() override { return NULL; }
+ virtual ScOrcusFilters* GetOrcusFilters() override { return nullptr; }
};
extern "C" { static void SAL_CALL thisModule() {} }
@@ -2246,7 +2246,7 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
{
static ScFormatFilterPlugin *plugin;
- if (plugin != NULL)
+ if (plugin != nullptr)
return *plugin;
#ifndef DISABLE_DYNLOADING
@@ -2258,10 +2258,10 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
if (bLoaded)
{
oslGenericFunction fn = aModule.getFunctionSymbol( "ScFilterCreate" );
- if (fn != NULL)
+ if (fn != nullptr)
plugin = reinterpret_cast<FilterFn>(fn)();
}
- if (plugin == NULL)
+ if (plugin == nullptr)
plugin = new ScFormatFilterMissing();
#else
plugin = ScFilterCreate();
@@ -2281,7 +2281,7 @@ static inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr,
return pStr;
++pStr;
}
- return 0;
+ return nullptr;
}
OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
@@ -2334,9 +2334,9 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
// If blank is a separator it starts a field, if it
// is not and thus maybe leading before quote we
// are still at start of field regarding quotes.
- bFieldStart = (*p == ' ' || lcl_UnicodeStrChr( pSeps, *p) != NULL);
+ bFieldStart = (*p == ' ' || lcl_UnicodeStrChr( pSeps, *p) != nullptr);
else
- bFieldStart = (lcl_UnicodeStrChr( pSeps, *p) != NULL);
+ bFieldStart = (lcl_UnicodeStrChr( pSeps, *p) != nullptr);
}
}
else
@@ -2354,9 +2354,9 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
// actually want that or not, but congruent with what
// ScanNextFieldFromString() does.
if (bFieldStart)
- bFieldStart = (*p == ' ' || lcl_UnicodeStrChr( pSeps, *p) != NULL);
+ bFieldStart = (*p == ' ' || lcl_UnicodeStrChr( pSeps, *p) != nullptr);
else
- bFieldStart = (lcl_UnicodeStrChr( pSeps, *p) != NULL);
+ bFieldStart = (lcl_UnicodeStrChr( pSeps, *p) != nullptr);
}
}
// A quote character inside a field content does not start
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 71cb5da6a2d7..875f126b899d 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -84,7 +84,7 @@ bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool b
ScDocument& rDoc = rDocShell.GetDocument();
ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab, true );
- ScOutlineTable* pUndoTab = NULL;
+ ScOutlineTable* pUndoTab = nullptr;
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -154,7 +154,7 @@ bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool
ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab );
if (pTable)
{
- ScOutlineTable* pUndoTab = NULL;
+ ScOutlineTable* pUndoTab = nullptr;
if (bRecord)
pUndoTab = new ScOutlineTable( *pTable );
@@ -241,7 +241,7 @@ bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord )
SelectLevel( nTab, true, pTable->GetColArray().GetDepth(), false, false );
SelectLevel( nTab, false, pTable->GetRowArray().GetDepth(), false, false );
- rDoc.SetOutlineTable( nTab, NULL );
+ rDoc.SetOutlineTable( nTab, nullptr );
rDoc.UpdatePageBreaks( nTab );
@@ -272,8 +272,8 @@ bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord )
bRecord = false;
ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab );
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
if ( pTable )
{
@@ -298,7 +298,7 @@ bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord )
// einblenden
SelectLevel( nTab, true, pTable->GetColArray().GetDepth(), false, false );
SelectLevel( nTab, false, pTable->GetRowArray().GetDepth(), false, false );
- rDoc.SetOutlineTable( nTab, NULL );
+ rDoc.SetOutlineTable( nTab, nullptr );
}
rDoc.DoAutoOutline( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
@@ -363,7 +363,7 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
ScSubOutlineIterator aIter( &rArray ); // alle Eintraege
ScOutlineEntry* pEntry;
- while ((pEntry=aIter.GetNext()) != NULL)
+ while ((pEntry=aIter.GetNext()) != nullptr)
{
sal_uInt16 nThisLevel = aIter.LastLevel();
bool bShow = (nThisLevel < nLevel);
@@ -392,7 +392,7 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
{
// show several rows together, don't show filtered rows
SCROW nFilterEnd = i;
- bool bFiltered = rDoc.RowFiltered( i, nTab, NULL, &nFilterEnd );
+ bool bFiltered = rDoc.RowFiltered( i, nTab, nullptr, &nFilterEnd );
nFilterEnd = std::min( nThisEnd, nFilterEnd );
if ( !bShow || !bFiltered )
rDoc.ShowRows( i, nFilterEnd, nTab, bShow );
@@ -458,7 +458,7 @@ bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, bool bRecord )
nMax=0;
ScOutlineArray& rColArray = pTable->GetColArray();
ScSubOutlineIterator aColIter( &rColArray );
- while ((pEntry=aColIter.GetNext()) != NULL)
+ while ((pEntry=aColIter.GetNext()) != nullptr)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -479,7 +479,7 @@ bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, bool bRecord )
nMax=0;
ScOutlineArray& rRowArray = pTable->GetRowArray();
ScSubOutlineIterator aRowIter( &rRowArray );
- while ((pEntry=aRowIter.GetNext()) != NULL)
+ while ((pEntry=aRowIter.GetNext()) != nullptr)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -495,7 +495,7 @@ bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, bool bRecord )
{
// show several rows together, don't show filtered rows
SCROW nFilterEnd = i;
- bool bFiltered = rDoc.RowFiltered( i, nTab, NULL, &nFilterEnd );
+ bool bFiltered = rDoc.RowFiltered( i, nTab, nullptr, &nFilterEnd );
nFilterEnd = std::min( nMax, nFilterEnd );
if ( !bFiltered )
rDoc.ShowRows( i, nFilterEnd, nTab, true );
@@ -653,7 +653,7 @@ bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
{
// show several rows together, don't show filtered rows
SCROW nFilterEnd = i;
- bool bFiltered = rDoc.RowFiltered( i, nTab, NULL, &nFilterEnd );
+ bool bFiltered = rDoc.RowFiltered( i, nTab, nullptr, &nFilterEnd );
nFilterEnd = std::min( nEnd, nFilterEnd );
if ( !bFiltered )
rDoc.ShowRows( i, nFilterEnd, nTab, true );
@@ -662,7 +662,7 @@ bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
}
ScSubOutlineIterator aIter( &rArray, nLevel, nEntry );
- while ((pEntry=aIter.GetNext()) != NULL)
+ while ((pEntry=aIter.GetNext()) != nullptr)
{
if ( pEntry->IsHidden() )
{
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index 6c1e32333bf5..7a73ae639ac7 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.cxx
@@ -26,8 +26,8 @@
ScPrintRangeData::ScPrintRangeData()
{
nPagesX = nPagesY = 0;
- pPageEndX = NULL;
- pPageEndY = NULL;
+ pPageEndX = nullptr;
+ pPageEndY = nullptr;
bTopDown = bAutomatic = true;
nFirstPage = 1;
}
@@ -47,7 +47,7 @@ void ScPrintRangeData::SetPagesX( size_t nCount, const SCCOL* pData )
memcpy( pPageEndX, pData, nCount * sizeof(SCCOL) );
}
else
- pPageEndX = NULL;
+ pPageEndX = nullptr;
nPagesX = nCount;
}
@@ -60,7 +60,7 @@ void ScPrintRangeData::SetPagesY( size_t nCount, const SCROW* pData )
memcpy( pPageEndY, pData, nCount * sizeof(SCROW) );
}
else
- pPageEndY = NULL;
+ pPageEndY = nullptr;
nPagesY = nCount;
}
@@ -70,7 +70,7 @@ ScPageBreakData::ScPageBreakData(size_t nMax)
if (nMax)
pData = new ScPrintRangeData[nMax];
else
- pData = NULL;
+ pData = nullptr;
nAlloc = nMax;
}
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index be22512cb0fb..6cb3fa982890 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -116,7 +116,7 @@ void ScServerObject::Clear()
if (pDocSh)
{
ScDocShell* pTemp = pDocSh;
- pDocSh = NULL;
+ pDocSh = nullptr;
pTemp->GetDocument().EndListeningArea(aRange, false, &aForwarder);
pTemp->GetDocument().GetLinkManager()->RemoveServer( this );
@@ -204,7 +204,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocSh = NULL;
+ pDocSh = nullptr;
EndListening(*SfxGetpApp());
// don't access DocShell anymore for EndListening etc.
}
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index cfe790a21ee0..b6f7883cfba3 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -51,7 +51,7 @@ struct TableLink_Impl
VclPtr<vcl::Window> m_pOldParent;
Link<sfx2::SvBaseLink&,void> m_aEndEditLink;
- TableLink_Impl() : m_pDocSh( NULL ), m_pOldParent( NULL ) {}
+ TableLink_Impl() : m_pDocSh( nullptr ), m_pOldParent( nullptr ) {}
};
TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink);
@@ -123,17 +123,17 @@ void ScTableLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEnd
const OUString&, const css::uno::Any& )
{
sfx2::LinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument().GetLinkManager();
- if (pLinkManager!=NULL)
+ if (pLinkManager!=nullptr)
{
OUString aFile, aFilter;
- sfx2::LinkManager::GetDisplayNames(this, 0, &aFile, NULL, &aFilter);
+ sfx2::LinkManager::GetDisplayNames(this, nullptr, &aFile, nullptr, &aFilter);
// the file dialog returns the filter name with the application prefix
// -> remove prefix
ScDocumentLoader::RemoveAppPrefix( aFilter );
if (!bInCreate)
- Refresh( aFile, aFilter, NULL, GetRefreshDelay() ); // don't load twice
+ Refresh( aFile, aFilter, nullptr, GetRefreshDelay() ); // don't load twice
}
return SUCCESS;
}
@@ -210,7 +210,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
// Undo...
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
bool bFirst = true;
if (bAddUndo && bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -415,7 +415,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
IMPL_LINK_NOARG_TYPED(ScTableLink, RefreshHdl, Timer *, void)
{
- Refresh( aFileName, aFilterName, NULL, GetRefreshDelay() );
+ Refresh( aFileName, aFilterName, nullptr, GetRefreshDelay() );
}
IMPL_LINK_TYPED( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink&, rLink, void )
@@ -464,7 +464,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName,
// Filter-Detection
- const SfxFilter* pSfxFilter = NULL;
+ const SfxFilter* pSfxFilter = nullptr;
SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ );
if ( pMedium->GetError() == ERRCODE_NONE )
{
@@ -513,8 +513,8 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, const SfxF
ScDocumentLoader::ScDocumentLoader( const OUString& rFileName,
OUString& rFilterName, OUString& rOptions,
sal_uInt32 nRekCnt, bool bWithInteraction ) :
- pDocShell(0),
- pMedium(0)
+ pDocShell(nullptr),
+ pMedium(nullptr)
{
if ( rFilterName.isEmpty() )
GetFilterName( rFileName, rFilterName, rOptions, true, bWithInteraction );
@@ -562,15 +562,15 @@ void ScDocumentLoader::ReleaseDocRef()
// release reference without calling DoClose - caller must
// have another reference to the doc and call DoClose later
- pDocShell = NULL;
- pMedium = NULL;
+ pDocShell = nullptr;
+ pMedium = nullptr;
aRef.Clear();
}
}
ScDocument* ScDocumentLoader::GetDocument()
{
- return pDocShell ? &pDocShell->GetDocument() : 0;
+ return pDocShell ? &pDocShell->GetDocument() : nullptr;
}
bool ScDocumentLoader::IsError() const
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 2a302f4c4864..49069086436e 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -107,7 +107,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount();
- SdrObject* pSingleSelectedObj = NULL;
+ SdrObject* pSingleSelectedObj = nullptr;
if ( nMarkCount > 0 )
pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -228,8 +228,8 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if ( pObj->IsGroupObject() )
{
- SdrPageView* pPV = 0;
- SdrObject* pHit = 0;
+ SdrPageView* pPV = nullptr;
+ SdrObject* pHit = nullptr;
if ( pView->PickObj( pWin->PixelToLogic( pViewData->GetMousePosPixel() ), pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
@@ -249,7 +249,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
if( !pArgs )
{
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( pObj->GetObjIdentifier() == OBJ_CAPTION )
@@ -379,7 +379,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
ScDrawView* pView = pViewData->GetScDrawView();
bool bHasMarked = pView->AreObjectsMarked();
- const SdrObject* pObj = NULL;
+ const SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 67382ca32c01..6ee0f37ae564 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -382,7 +382,7 @@ void ScDrawShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
ScDrawView* pView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
rSet.Put(aNewAttr, false);
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
index b9fbb88e13d3..9e620e5099b4 100644
--- a/sc/source/ui/drawfunc/drawsh4.cxx
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -33,8 +33,8 @@
void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
{
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
ScDrawView* pDrView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -43,7 +43,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
if (pViewFrm->HasChildWindow(nId))
{
SfxChildWindow* pWnd = pViewFrm->GetChildWindow(nId);
- pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 65bae265db17..bdef1063be5f 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -487,7 +487,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName));
+ std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(nullptr, aName));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetCheckNameHdl(LINK(this, ScDrawShell, NameObjectHdl));
@@ -556,7 +556,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription));
+ std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(nullptr, aTitle, aDescription));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 80462cddc245..a6b69ebde95e 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -114,7 +114,7 @@ void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet )
ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) :
SfxShell(pData->GetViewShell()),
pViewData(pData),
- pClipEvtLstnr(NULL),
+ pClipEvtLstnr(nullptr),
bPastePossible(false)
{
SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() );
@@ -218,14 +218,14 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
SvxFontItem aNewItem( EE_CHAR_FONTINFO );
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
@@ -787,7 +787,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
}
bool bDone = true;
- bool bArgsInReq = ( pArgs != NULL );
+ bool bArgsInReq = ( pArgs != nullptr );
if ( !bArgsInReq )
{
@@ -796,7 +796,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
{
OutlinerView* pOutView = pView->IsTextEdit() ?
- pView->GetTextEditOutlinerView() : NULL;
+ pView->GetTextEditOutlinerView() : nullptr;
if ( pOutView )
pOutView->Paint( Rectangle() );
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index 7942caf032d6..9a97a6aed7af 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -201,8 +201,8 @@ void ScDrawTextObjectBar::ExecFormText(SfxRequest& rReq)
void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
{
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
ScDrawView* pDrView = pViewData->GetView()->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -211,7 +211,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
if (pViewFrm->HasChildWindow(nId))
{
SfxChildWindow* pWnd = pViewFrm->GetChildWindow(nId);
- pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index dcfaa8281380..780af9e0ba1d 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -185,7 +185,7 @@ SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if(pObj)
{
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 6e3272a33ffe..b53cf0f4948c 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -188,7 +188,7 @@ SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, c
{
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if( pObj )
{
Rectangle aRectangle( rRectangle );
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index aa8ff4fc65b0..0e0e9bfd0b6f 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -238,7 +238,7 @@ SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const Recta
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if(pObj)
{
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 5698732d94c8..c9ff32fd1aa8 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -220,7 +220,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rec
{
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if(pObj)
{
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index b8cc232ca08e..5318084771a1 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -133,7 +133,7 @@ bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
SdrHdl* pHdl = pView->PickHandle(aMDPos);
- if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
+ if ( pHdl != nullptr || pView->IsMarkedHit(aMDPos) )
{
pView->BegDragObj(aMDPos, nullptr, pHdl, 1);
bReturn = true;
@@ -187,7 +187,7 @@ bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
{
SdrHdl* pHdl=pView->PickHandle(aPnt);
- if ( pHdl != NULL )
+ if ( pHdl != nullptr )
{
pViewShell->SetActivePointer(pHdl->GetPointer());
}
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index 518f2548385c..d6bb3d58d402 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -173,7 +173,7 @@ SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, co
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if(pObj)
{
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 073508bb4aaf..56c519e2f85b 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -208,7 +208,7 @@ static bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const
if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // no RTTI
{
FuText* pText = static_cast<FuText*>(pPoor);
- pText->SetInEditMode( pObj, NULL, true, pInitialKey );
+ pText->SetInEditMode( pObj, nullptr, true, pInitialKey );
//! set cursor to end of text
}
bReturn = true;
@@ -276,7 +276,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
// consumed
bReturn = true;
}
- else if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
+ else if ( lcl_KeyEditMode( pObj, pViewShell, nullptr ) ) // start text edit for suitable object
bReturn = true;
}
}
@@ -293,7 +293,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
- if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
+ if ( lcl_KeyEditMode( pObj, pViewShell, nullptr ) ) // start text edit for suitable object
bReturn = true;
}
}
@@ -483,7 +483,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrHdlList& rHdlList = pView->GetHdlList();
SdrHdl* pHdl = rHdlList.GetFocusHdl();
- if(0L == pHdl)
+ if(nullptr == pHdl)
{
// only take action when move is allowed
if(pView->IsMoveAllowed())
@@ -540,7 +540,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrDragStat& rDragStat = pView->GetDragStat();
// start dragging
- pView->BegDragObj(aStartPoint, 0, pHdl, 0);
+ pView->BegDragObj(aStartPoint, nullptr, pHdl, 0);
if(pView->IsDragObj())
{
@@ -609,10 +609,10 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
pView->MarkPoint(*pHdl);
}
- if(0L == rHdlList.GetFocusHdl())
+ if(nullptr == rHdlList.GetFocusHdl())
{
// restore point with focus
- SdrHdl* pNewOne = 0L;
+ SdrHdl* pNewOne = nullptr;
for(size_t a = 0; !pNewOne && a < rHdlList.GetHdlCount(); ++a)
{
@@ -698,7 +698,7 @@ static bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, vcl::Window* pWi
MouseEvent aMEvt( rPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT );
SdrHitKind eHit = pView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt );
- if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL )
+ if ( eHit != SDRHIT_NONE && aVEvt.pObj != nullptr )
{
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject(
aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) )
@@ -722,12 +722,12 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
SdrObject* pObj;
SdrPageView* pPV;
- ScMacroInfo* pInfo = 0;
+ ScMacroInfo* pInfo = nullptr;
if ( pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
{
if ( pObj->IsGroupObject() )
{
- SdrObject* pHit = 0;
+ SdrObject* pHit = nullptr;
if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index f79472cbb53c..05bbdd21479e 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -663,7 +663,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xChartModel.is() && xInit.is() )
{
- uno::Reference< awt::XWindow > xDialogParentWindow(0);
+ uno::Reference< awt::XWindow > xDialogParentWindow(nullptr);
// initialize dialog
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index d0e5d0c76a60..2b09d57c0779 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -37,7 +37,7 @@ FuPoor::FuPoor(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
pWindow(pWin),
pDrDoc(pDoc),
aSfxRequest(rReq),
- pDialog(NULL),
+ pDialog(nullptr),
bIsInDragMode(false),
// remember MouseButton state
mnCode(0)
@@ -215,7 +215,7 @@ IMPL_LINK_NOARG_TYPED(FuPoor, DragHdl, void*, void)
{
SdrHdl* pHdl = pView->PickHandle(aMDPos);
- if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) )
+ if ( pHdl==nullptr && pView->IsMarkedHit(aMDPos) )
{
pWindow->ReleaseMouse();
bIsInDragMode = true;
@@ -240,7 +240,7 @@ bool FuPoor::IsDetectiveHit( const Point& rLogicPos )
{
sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
- if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, 0, false))
+ if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, nullptr, false))
{
bFound = true;
}
@@ -266,7 +266,7 @@ void FuPoor::StopDragTimer()
SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& /* rRectangle */)
{
// empty base implementation
- return 0L;
+ return nullptr;
}
void FuPoor::ImpForceQuadratic(Rectangle& rRect)
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 86885ac16f3b..8626daa97364 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -114,7 +114,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
SdrHdl* pHdl = pView->PickHandle(aMDPos);
- if ( pHdl!=NULL || pView->IsMarkedHit(aMDPos) )
+ if ( pHdl!=nullptr || pView->IsMarkedHit(aMDPos) )
{
// Determine if this is the tail of a SdrCaptionObj i.e.
// we need to disable the drag option on the tail of a note
@@ -183,7 +183,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
ScMacroInfo* pTmpInfo = ScDrawLayer::GetMacroInfo( pObj );
if ( !pTmpInfo || pTmpInfo->GetMacro().isEmpty() )
{
- SdrObject* pHit = NULL;
+ SdrObject* pHit = nullptr;
if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
@@ -229,7 +229,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
SdrViewEvent aVEvt;
if ( !bAlt &&
pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) != SDRHIT_NONE &&
- aVEvt.pObj != NULL )
+ aVEvt.pObj != nullptr )
{
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) ) // ImageMap
{
@@ -379,7 +379,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
bool bReturn = FuDraw::MouseButtonUp(rMEvt);
bool bOle = pViewShell && pViewShell->GetViewFrame()->GetFrame().IsInPlace();
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if (aDragTimer.IsActive() )
{
aDragTimer.Stop();
@@ -389,10 +389,10 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
bool bCopy = false;
- ScViewData* pViewData = ( pViewShell ? &pViewShell->GetViewData() : NULL );
- ScDocument* pDocument = ( pViewData ? pViewData->GetDocument() : NULL );
- SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : NULL );
- SdrPage* pPage = ( pPageView ? pPageView->GetPage() : NULL );
+ ScViewData* pViewData = ( pViewShell ? &pViewShell->GetViewData() : nullptr );
+ ScDocument* pDocument = ( pViewData ? pViewData->GetDocument() : nullptr );
+ SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : nullptr );
+ SdrPage* pPage = ( pPageView ? pPageView->GetPage() : nullptr );
::std::vector< OUString > aExcludedChartNames;
ScRangeListVector aProtectedChartRangesVector;
@@ -416,7 +416,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
for ( size_t i = 0; i < nMarkCount; ++i )
{
SdrMark* pMark = rSdrMarkList.GetMark( i );
- pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL );
+ pObj = ( pMark ? pMark->GetMarkedSdrObj() : nullptr );
if ( pObj )
{
ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, pDocument, pObj );
@@ -434,7 +434,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If a user wants to click on an object in front of a marked
* one, he releases the mouse button immediately
**************************************************************/
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK))
{
pView->UnmarkAllObj();
@@ -487,7 +487,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/**************************************************************************
* Ggf. OLE-Objekt beruecksichtigen
**************************************************************************/
- SfxInPlaceClient* pIPClient = pViewShell ? pViewShell->GetIPClient() : NULL;
+ SfxInPlaceClient* pIPClient = pViewShell ? pViewShell->GetIPClient() : nullptr;
if (pIPClient)
{
@@ -583,7 +583,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
if ( bCopy && pViewData && pDocument && pPage )
{
ScDocShell* pDocShell = pViewData->GetDocShell();
- ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr );
if ( pModelObj )
{
SCTAB nTab = pViewData->GetTabNo();
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index 82cb880c0ab9..6894c81cd528 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -60,7 +60,7 @@ bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
{
sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
- if (SdrObjectPrimitiveHit(*pObject, rPos, nHitLog, *pPV, 0, false))
+ if (SdrObjectPrimitiveHit(*pObject, rPos, nHitLog, *pPV, nullptr, false))
{
ScViewData& rViewData = pViewShell->GetViewData();
ScSplitPos ePos = pViewShell->FindWindow( pWindow );
@@ -121,7 +121,7 @@ bool FuSelection::IsNoteCaptionMarked() const
bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const
{
- SdrPageView* pPageView = pView ? pView->GetSdrPageView() : 0;
+ SdrPageView* pPageView = pView ? pView->GetSdrPageView() : nullptr;
if( pPageView )
{
const ScViewData& rViewData = pViewShell->GetViewData();
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 8f00c253d26c..64c2d79c368f 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -110,7 +110,7 @@ static void lcl_UpdateHyphenator( Outliner& rOutliner, SdrObject* pObj )
FuText::FuText(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq) :
FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq),
- pTextObj(NULL)
+ pTextObj(nullptr)
{
}
@@ -167,7 +167,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
const size_t nHdlNum = pView->GetHdlNum(pHdl);
- if (pHdl != NULL)
+ if (pHdl != nullptr)
{
if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl))
{
@@ -199,9 +199,9 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
SdrObject* pObj;
SdrPageView* pPV;
- if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
+ if ( pHdl != nullptr || pView->IsMarkedHit(aMDPos) )
{
- if (pHdl == NULL &&
+ if (pHdl == nullptr &&
// pView->TakeTextEditObject(aMDPos, pObj, pPV) )
pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKTEXTEDIT) )
{
@@ -284,7 +284,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
pHdl=pView->PickHandle(aMDPos);
- if (pHdl!=NULL)
+ if (pHdl!=nullptr)
{
pView->MarkPoint(*pHdl);
pHdl=pView->GetHdl(nHdlNum);
@@ -643,7 +643,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
}
}
- pTextObj = NULL;
+ pTextObj = nullptr;
if ( pObj )
{
@@ -725,7 +725,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
SdrObject* pObj = SdrObjFactory::MakeNewObject(
pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(),
- 0L, pDrDoc);
+ nullptr, pDrDoc);
if(pObj)
{
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 2c4e8ed7ffc4..f59e88955310 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -63,7 +63,7 @@ void FuText::StopEditMode(bool /*bTextDirection*/)
OSL_ENSURE( pDrawLayer && (pDrawLayer == pDrDoc), "FuText::StopEditMode - missing or different drawing layers" );
ScAddress aNotePos;
- ScPostIt* pNote = 0;
+ ScPostIt* pNote = nullptr;
if( const ScDrawObjData* pCaptData = ScDrawLayer::GetNoteCaptionData( pObject, rViewData.GetTabNo() ) )
{
aNotePos = pCaptData->maStart;
@@ -72,7 +72,7 @@ void FuText::StopEditMode(bool /*bTextDirection*/)
}
ScDocShell* pDocShell = rViewData.GetDocShell();
- ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : nullptr;
bool bNewNote = false;
if( pNote && pUndoMgr )
{
@@ -109,10 +109,10 @@ void FuText::StopEditMode(bool /*bTextDirection*/)
deletion by passing sal_True to this function. The return value changes
from SDRENDTEXTEDIT_DELETED to SDRENDTEXTEDIT_SHOULDBEDELETED in this
case. */
- /*SdrEndTextEditKind eResult =*/ pView->SdrEndTextEdit( pNote != 0 );
+ /*SdrEndTextEditKind eResult =*/ pView->SdrEndTextEdit( pNote != nullptr );
// or ScEndTextEdit (with drawview.hxx)
- pViewShell->SetDrawTextUndo( 0 );
+ pViewShell->SetDrawTextUndo( nullptr );
vcl::Cursor* pCur = pWindow->GetCursor();
if( pCur && pCur->IsVisible() )
@@ -148,7 +148,7 @@ void FuText::StopEditMode(bool /*bTextDirection*/)
rDoc.ReleaseNote(aNotePos);
}
// ScDocument::DeleteNote has deleted the note that pNote points to
- pNote = 0;
+ pNote = nullptr;
}
// finalize the undo list action
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 48bde978398b..6f28525abc73 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -228,7 +228,7 @@ void ScGraphicShell::GetCropGraphicState( SfxItemSet& rSet )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
- if( pObj && 0 != dynamic_cast<const SdrGrafObj*>( pObj) && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) )
+ if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) )
bEnable = true;
}
@@ -300,7 +300,7 @@ void ScGraphicShell::ExecuteChangePicture(SfxRequest& /*rReq*/)
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
- if( pObj && 0 != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
+ if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC));
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index a7281ad77115..d04cd4eb1c17 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -107,7 +107,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq )
const SfxPoolItem* pItem;
if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
- pItem = NULL;
+ pItem = nullptr;
if( pItem )
{
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 1dba9a5976c9..9cb5a305258f 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -97,7 +97,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
aInsertButton ( VclPtr<ImageButton>::Create( this, ResId( IMB_INSERT, *rResId.GetResMgr() ) ) ),
aFiFuncDesc ( VclPtr<FixedText>::Create( this, ResId( FI_FUNCDESC, *rResId.GetResMgr() ) ) ),
aOldSize (0,0),
- pFuncDesc (NULL)
+ pFuncDesc (nullptr)
{
FreeResource();
InitLRUList();
@@ -106,7 +106,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
aIdle.SetPriority(SchedulerPriority::LOWER);
aIdle.SetIdleHdl(LINK( this, ScFunctionDockWin, TimerHdl));
- if (pCW != NULL)
+ if (pCW != nullptr)
eSfxNewAlignment=GetAlignment();
else
eSfxNewAlignment=SfxChildAlignment::RIGHT;
@@ -876,7 +876,7 @@ void ScFunctionDockWin::DoEnter()
aString += pAllFuncList->GetSelectEntry();
}
EditView *pEdView=pHdl->GetActiveView();
- if(pEdView!=NULL) // @ Wegen Absturz bei Namen festlegen
+ if(pEdView!=nullptr) // @ Wegen Absturz bei Namen festlegen
{
if(nArgs>0)
{
@@ -1015,7 +1015,7 @@ IMPL_LINK_NOARG_TYPED(ScFunctionDockWin, TimerHdl, Idle *, void)
void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
{
OUString aStr;
- if(pInfo!=NULL)
+ if(pInfo!=nullptr)
{
if ( !pInfo->aExtraString.isEmpty() )
{
diff --git a/sc/source/ui/formdlg/formdata.cxx b/sc/source/ui/formdlg/formdata.cxx
index c97fa2bf2def..cea864d1330a 100644
--- a/sc/source/ui/formdlg/formdata.cxx
+++ b/sc/source/ui/formdlg/formdata.cxx
@@ -21,8 +21,8 @@
ScFormEditData::ScFormEditData()
: formula::FormEditData()
- , pInputHandler(NULL)
- , pScDocShell(NULL)
+ , pInputHandler(nullptr)
+ , pScDocShell(nullptr)
{
Reset();
}
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 0a26cd4d77f8..5e1c7e286ea7 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -58,7 +58,7 @@
using namespace formula;
using namespace com::sun::star;
-ScDocument* ScFormulaDlg::pDoc = NULL;
+ScDocument* ScFormulaDlg::pDoc = nullptr;
ScAddress ScFormulaDlg::aCursorPos;
// init/ shared functions for dialog
@@ -71,7 +71,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
m_aHelper.SetWindow(this);
ScModule* pScMod = SC_MOD();
pScMod->InputEnterHandler();
- ScTabViewShell* pScViewShell = NULL;
+ ScTabViewShell* pScViewShell = nullptr;
// title has to be from the view that opened the dialog,
// even if it's not the current view
@@ -91,7 +91,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
}
}
- if ( pDoc == NULL )
+ if ( pDoc == nullptr )
pDoc = pViewData->GetDocument();
m_xParser.set(ScServiceProvider::MakeInstance(SC_SERVICE_FORMULAPARS, static_cast<ScDocShell*>(pDoc->GetDocumentShell())),uno::UNO_QUERY);
uno::Reference< beans::XPropertySet> xSet(m_xParser,uno::UNO_QUERY);
@@ -104,7 +104,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
OSL_ENSURE( pInputHdl, "Missing input handler :-/" );
if ( pInputHdl )
- pInputHdl->NotifyChange( NULL );
+ pInputHdl->NotifyChange( nullptr );
ScFormulaReferenceHelper::enableInput( false );
ScFormulaReferenceHelper::EnableSpreadsheets();
@@ -189,7 +189,7 @@ void ScFormulaDlg::notifyChange()
ScInputHandler* pInputHdl = pScMod->GetInputHdl();
if ( pInputHdl )
- pInputHdl->NotifyChange( NULL );
+ pInputHdl->NotifyChange( nullptr );
}
void ScFormulaDlg::fill()
@@ -212,7 +212,7 @@ void ScFormulaDlg::fill()
ScTabViewShell* pTabViewShell;
ScInputHandler* pInputHdl = GetNextInputHandler(pData->GetDocShell(),&pTabViewShell);
- if ( pInputHdl == NULL ) //no more InputHandler for DocShell
+ if ( pInputHdl == nullptr ) //no more InputHandler for DocShell
{
disableOk();
pInputHdl = pScMod->GetInputHdl();
@@ -235,7 +235,7 @@ void ScFormulaDlg::fill()
Update();
// switch back, maybe new Doc has been opened
- pScMod->SetRefInputHdl(NULL);
+ pScMod->SetRefInputHdl(nullptr);
}
}
@@ -253,7 +253,7 @@ void ScFormulaDlg::dispose()
if (pData) // close dosen't destroy;
{
//set back reference input handler
- pScMod->SetRefInputHdl(NULL);
+ pScMod->SetRefInputHdl(nullptr);
StoreFormEditData(pData);
}
formula::FormulaDlg::dispose();
@@ -279,17 +279,17 @@ bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell, ScTabViewShell** ppViewSh)
{
- ScInputHandler* pHdl=NULL;
+ ScInputHandler* pHdl=nullptr;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell );
- while( pFrame && pHdl==NULL)
+ while( pFrame && pHdl==nullptr)
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( p );
- if(pViewSh!=NULL)
+ if(pViewSh!=nullptr)
{
pHdl=pViewSh->GetInputHandler();
- if(ppViewSh!=NULL) *ppViewSh=pViewSh;
+ if(ppViewSh!=nullptr) *ppViewSh=pViewSh;
}
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell );
}
@@ -441,7 +441,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
bool ScFormulaDlg::IsRefInputMode() const
{
const IFunctionDescription* pDesc = getCurrentFunctionDescription();
- bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL);
+ bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=nullptr);
return bRef;
}
@@ -552,11 +552,11 @@ void ScFormulaDlg::deleteFormData()
}
void ScFormulaDlg::clear()
{
- pDoc = NULL;
+ pDoc = nullptr;
//restore reference inputhandler
ScModule* pScMod = SC_MOD();
- pScMod->SetRefInputHdl(NULL);
+ pScMod->SetRefInputHdl(nullptr);
// force Enable() of edit line
ScTabViewShell* pScViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
@@ -571,7 +571,7 @@ void ScFormulaDlg::switchBack()
ScInputHandler* pHdl = pScMod->GetInputHdl();
if ( pHdl )
{
- pHdl->ViewShellGone(NULL); // -> get active view
+ pHdl->ViewShellGone(nullptr); // -> get active view
pHdl->ShowRefFrame();
}
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 9256f3152ffa..8dfea5162682 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -166,7 +166,7 @@ public:
virtual SvxTextForwarder* GetTextForwarder() override;
virtual SvxViewForwarder* GetViewForwarder() override;
- virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return NULL; }
+ virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return nullptr; }
private:
ScPreviewViewForwarder* mpViewForwarder;
@@ -189,7 +189,7 @@ public:
virtual SvxTextForwarder* GetTextForwarder() override;
virtual SvxViewForwarder* GetViewForwarder() override;
- virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return NULL; }
+ virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return nullptr; }
private:
ScPreviewViewForwarder* mpViewForwarder;
@@ -215,7 +215,7 @@ public:
virtual SvxTextForwarder* GetTextForwarder() override;
virtual SvxViewForwarder* GetViewForwarder() override;
- virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return NULL; }
+ virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return nullptr; }
virtual void UpdateData() override { }
private:
@@ -243,7 +243,7 @@ public:
virtual SvxTextForwarder* GetTextForwarder() override;
virtual SvxViewForwarder* GetViewForwarder() override;
- virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return NULL; }
+ virtual SvxEditViewForwarder* GetEditViewForwarder( bool /* bCreate */ ) override { return nullptr; }
virtual void UpdateData() override { }
private:
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index ed41525bbf60..29d6374f139d 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -50,7 +50,7 @@ public:
static void RegisterChildWindow (
bool bVisible = false,
- SfxModule* pModule = NULL,
+ SfxModule* pModule = nullptr,
SfxChildWindowFlags nFlags = SfxChildWindowFlags::NONE)
{
SfxChildWinFactory* pFactory = new SfxChildWinFactory(ChildWindowWrapper::CreateImpl, WindowID, CHILDWIN_NOPOS );
@@ -75,16 +75,16 @@ private:
static ScTabViewShell* getTabViewShell( SfxBindings *pBindings )
{
if( !pBindings )
- return NULL;
+ return nullptr;
SfxDispatcher* pDispacher = pBindings ->GetDispatcher();
if( !pDispacher )
- return NULL;
+ return nullptr;
SfxViewFrame* pFrame = pDispacher->GetFrame();
if( !pFrame )
- return NULL;
+ return nullptr;
SfxViewShell* pViewShell = pFrame->GetViewShell();
if( !pViewShell )
- return NULL;
+ return nullptr;
return dynamic_cast<ScTabViewShell*>( pViewShell );
}
};
diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx
index 0f0ee946d694..cbaf82614261 100644
--- a/sc/source/ui/inc/IAnyRefDialog.hxx
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -36,7 +36,7 @@ public:
virtual ~IAnyRefDialog(){}
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
- virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) = 0;
virtual void RefInputDone( bool bForced = false ) = 0;
virtual bool IsTableLocked() const = 0;
virtual bool IsRefInputMode() const = 0;
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 7b5e256d089e..64cae06eb11c 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -124,12 +124,12 @@ protected:
SvTreeListEntry* InsertChangeAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvTreeListEntry* pParent=NULL,bool bDelMaster = false,
+ SvTreeListEntry* pParent=nullptr,bool bDelMaster = false,
bool bDisabled = false,sal_uLong nPos = TREELIST_APPEND);
SvTreeListEntry* InsertFilteredAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvTreeListEntry* pParent = NULL,bool bDelMaster = false,
+ SvTreeListEntry* pParent = nullptr,bool bDelMaster = false,
bool bDisabled = false, sal_uLong nPos = TREELIST_APPEND);
SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 7889664ca3f7..dd5da2a6d6cb 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -82,11 +82,11 @@ public:
void Init();
void ShowReference(const OUString& rStr);
- void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr );
void HideReference( bool bDoneRefMode = true );
- void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr );
void RefInputDone( bool bForced = false );
- void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr );
inline void SetWindow(vcl::Window* _pWindow) { m_pWindow = _pWindow; }
bool DoClose( sal_uInt16 nId );
@@ -130,7 +130,7 @@ protected:
static void SetDispatcherLock( bool bLock );
- virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
virtual void RefInputDone( bool bForced = false ) override;
bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc );
@@ -149,8 +149,8 @@ public:
virtual void ShowReference(const OUString& rStr) override;
virtual void HideReference( bool bDoneRefMode = true ) override;
- virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
- virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
+ virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
+ virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
virtual void ViewShellChanged() override;
void SwitchToDocument();
@@ -177,10 +177,10 @@ private:
TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription );
template<class TParentWindow, class TResId, class TArg>
- ScRefHdlrImplBase( TParentWindow* pParent, TResId nResId, const TArg &rArg, SfxBindings *pB = NULL );
+ ScRefHdlrImplBase( TParentWindow* pParent, TResId nResId, const TArg &rArg, SfxBindings *pB = nullptr );
template<class TParentWindow, class TArg>
- ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB = NULL );
+ ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB = nullptr );
virtual ~ScRefHdlrImplBase();
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 84810ef2b1a7..3208f8502cf9 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -41,9 +41,9 @@ struct CellShell_Impl
SfxRequest* m_pRequest;
CellShell_Impl() :
- m_pClipEvtLstnr( NULL ),
- m_pLinkedDlg( NULL ),
- m_pRequest( NULL ) {}
+ m_pClipEvtLstnr( nullptr ),
+ m_pLinkedDlg( nullptr ),
+ m_pRequest( nullptr ) {}
};
class ScCellShell: public ScFormatShell
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx
index 5c77a0e832cd..4ca6a9f1a38c 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -117,7 +117,7 @@ protected:
public:
ScConditionFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
- const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL );
+ const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = nullptr );
virtual ~ScConditionFrmtEntry();
virtual void dispose() override;
@@ -145,7 +145,7 @@ class ScFormulaFrmtEntry : public ScCondFrmtEntry
DECL_LINK_TYPED( StyleSelectHdl, ListBox&, void );
public:
- ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* PDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL );
+ ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* PDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = nullptr );
virtual ~ScFormulaFrmtEntry();
virtual void dispose() override;
@@ -178,7 +178,7 @@ class ScColorScale2FrmtEntry : public ScCondFrmtEntry
DECL_LINK_TYPED( EntryTypeHdl, ListBox&, void );
public:
- ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL );
+ ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = nullptr );
virtual ~ScColorScale2FrmtEntry();
virtual void dispose() override;
virtual ScFormatEntry* GetEntry() const override;
@@ -213,7 +213,7 @@ class ScColorScale3FrmtEntry : public ScCondFrmtEntry
DECL_LINK_TYPED( EntryTypeHdl, ListBox&, void );
public:
- ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL );
+ ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = nullptr );
virtual ~ScColorScale3FrmtEntry();
virtual void dispose() override;
virtual ScFormatEntry* GetEntry() const override;
@@ -245,7 +245,7 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry
DECL_LINK_TYPED( OptionBtnHdl, Button*, void );
DECL_LINK_TYPED( DataBarTypeSelectHdl, ListBox&, void );
public:
- ScDataBarFrmtEntry( vcl::Window* pParemt, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat = NULL );
+ ScDataBarFrmtEntry( vcl::Window* pParemt, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat = nullptr );
virtual ~ScDataBarFrmtEntry();
virtual void dispose() override;
virtual ScFormatEntry* GetEntry() const override;
@@ -258,7 +258,7 @@ public:
class ScDateFrmtEntry : public ScCondFrmtEntry, public SfxListener
{
public:
- ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat = NULL );
+ ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat = nullptr );
virtual ~ScDateFrmtEntry();
virtual void dispose() override;
virtual ScFormatEntry* GetEntry() const override;
@@ -302,7 +302,7 @@ class ScIconSetFrmtEntry : public ScCondFrmtEntry
DECL_LINK_TYPED( IconSetTypeHdl, ListBox&, void );
public:
- ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat = NULL );
+ ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat = nullptr );
virtual ~ScIconSetFrmtEntry();
virtual void dispose() override;
virtual ScFormatEntry* GetEntry() const override;
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 9d28dfb31e25..ba8b6face8c6 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -126,7 +126,7 @@ public:
OUString GetEntryAltText( SvTreeListEntry* pEntry ) const override;
OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
- void ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry = NULL);
+ void ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry = nullptr);
bool SetNavigatorDlgFlag(bool isInNavigatoeDlg){ return bisInNavigatoeDlg=isInNavigatoeDlg;};
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index f5a1238a0a08..e21194815ef3 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -55,7 +55,7 @@ public:
SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
const ScRange* pAdvSource, bool bRecord );
void DoSubTotals( const ScSubTotalParam& rParam, bool bRecord = true,
- const ScSortParam* pForceNewSort = NULL );
+ const ScSortParam* pForceNewSort = nullptr );
void ToggleAutoFilter();
void HideAutoFilter();
@@ -86,11 +86,11 @@ public:
void UngroupDataPilot();
void DataPilotInput( const ScAddress& rPos, const OUString& rString );
- bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL );
+ bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = nullptr );
bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
bool HasSelectionForDrillDown( sal_uInt16& rOrientation );
- void SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName = NULL);
+ void SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName = nullptr);
void ShowDataPilotSourceData( ScDPObject& rDPObj,
const css::uno::Sequence< css::sheet::DataPilotFieldFilter >& rFilters );
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index a190472a3b73..0a465cbcf2d5 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -249,7 +249,7 @@ public:
void GetStatePageStyle( SfxViewShell& rCaller, SfxItemSet& rSet, SCTAB nCurTab );
void CompareDocument( ScDocument& rOtherDoc );
- void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false );
+ void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = nullptr, bool bInverseMap = false );
bool MergeSharedDocument( ScDocShell* pSharedDocShell );
ScChangeAction* GetChangeAction( const ScAddress& rPos );
@@ -277,7 +277,7 @@ public:
bool IsEditable() const;
bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
- void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
+ void UpdateAllRowHeights( const ScMarkData* pTabMark = nullptr );
void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
void RefreshPivotTables( const ScRange& rSource );
@@ -326,7 +326,7 @@ public:
void PostPaintGridAll();
void PostPaintExtras();
- bool IsPaintLocked() const { return pPaintLockData != NULL; }
+ bool IsPaintLocked() const { return pPaintLockData != nullptr; }
void PostDataChanged();
@@ -474,7 +474,7 @@ namespace HelperNotifyChanges
ScModelObj* pModelObj = ScModelObj::getImplementation(rDocShell.GetModel());
if (pModelObj && pModelObj->HasChangesListeners())
return pModelObj;
- return NULL;
+ return nullptr;
}
inline void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges,
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index e4030752386a..bff1e5c6781c 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -38,8 +38,8 @@ class ScDocument;
class ScDPFieldButton
{
public:
- ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX = NULL, const Fraction* pZoomY = NULL,
- ScDocument* pDoc = NULL);
+ ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX = nullptr, const Fraction* pZoomY = nullptr,
+ ScDocument* pDoc = nullptr);
~ScDPFieldButton();
void setText(const OUString& rText);
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index bf8312eb5abb..0705153de94c 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -71,11 +71,11 @@ public:
virtual bool SdrBeginTextEdit(
SdrObject* pObj,
- SdrPageView* pPV = 0L,
- vcl::Window* pWin = 0L,
+ SdrPageView* pPV = nullptr,
+ vcl::Window* pWin = nullptr,
bool bIsNewObj = false,
- SdrOutliner* pGivenOutliner = 0L,
- OutlinerView* pGivenOutlinerView = 0L,
+ SdrOutliner* pGivenOutliner = nullptr,
+ OutlinerView* pGivenOutlinerView = nullptr,
bool bDontDeleteOutliner = false,
bool bOnlyOneView = false,
bool bGrabFocus = true) override;
@@ -118,7 +118,7 @@ public:
/** Returns the selected object, if it is the caption object of a cell note.
@param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */
- SdrObject* GetMarkedNoteCaption( ScDrawObjData** ppCaptData = 0 );
+ SdrObject* GetMarkedNoteCaption( ScDrawObjData** ppCaptData = nullptr );
/** Locks/unlocks the specified layer in the draw page.
Unlocked layer is required to be able to edit the contained objects. */
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 92be94f60270..7efa75954fa2 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -87,8 +87,8 @@ public:
virtual void HideReference( bool bDoneRefMode = true ) override;
virtual void SetReference( const ScRange& rRef, ScDocument* pD ) override;
- virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
- virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
+ virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
+ virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
virtual void RefInputDone( bool bForced = false ) override;
virtual bool IsTableLocked() const override;
virtual bool IsRefInputMode() const override;
@@ -99,7 +99,7 @@ public:
virtual void ViewShellChanged() override;
protected:
- virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override;
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
static void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
static bool IsInputHdl(ScInputHandler* pHdl);
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
index 8e5879aad94c..bb9118207752 100644
--- a/sc/source/ui/inc/futext.hxx
+++ b/sc/source/ui/inc/futext.hxx
@@ -48,8 +48,8 @@ public:
virtual void ForcePointer(const MouseEvent* pMEvt) override;
- void SetInEditMode( SdrObject* pObj = NULL, const Point* pMousePixel = NULL,
- bool bCursorToEnd = false, const KeyEvent* pInitialKey = NULL );
+ void SetInEditMode( SdrObject* pObj = nullptr, const Point* pMousePixel = nullptr,
+ bool bCursorToEnd = false, const KeyEvent* pInitialKey = nullptr );
void StopEditMode(bool bTextDirection = false);
// Create default drawing objects via keyboard
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 4f82167ff775..ba0aabd6d4b6 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -267,15 +267,15 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, vcl::RenderContext& rRenderContext);
bool GetEditUrl( const Point& rPos,
- OUString* pName=0, OUString* pUrl=0, OUString* pTarget=0 );
+ OUString* pName=nullptr, OUString* pUrl=nullptr, OUString* pTarget=nullptr );
bool IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow );
- bool HitRangeFinder( const Point& rMouse, RfCorner& rCorner, sal_uInt16* pIndex = NULL,
- SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
+ bool HitRangeFinder( const Point& rMouse, RfCorner& rCorner, sal_uInt16* pIndex = nullptr,
+ SCsCOL* pAddX = nullptr, SCsROW* pAddY = nullptr );
- sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
- SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
+ sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = nullptr,
+ SCCOLROW* pBreak = nullptr, SCCOLROW* pPrev = nullptr );
/** The cell may be covered by text that overflows from a previous cell.
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 63f5fd218478..52986836d822 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -123,7 +123,7 @@ private:
private:
void UpdateActiveView();
- void SyncViews( EditView* pSourceView = NULL );
+ void SyncViews( EditView* pSourceView = nullptr );
/**
* @param cTyped typed character. If 0, look at existing document content
* for text or number.
@@ -166,7 +166,7 @@ public:
ScInputHandler();
virtual ~ScInputHandler();
- void SetMode( ScInputMode eNewMode, const OUString* pInitText = NULL );
+ void SetMode( ScInputMode eNewMode, const OUString* pInitText = nullptr );
bool IsInputMode() const { return (eMode != SC_INPUT_NONE); }
bool IsEditMode() const { return (eMode != SC_INPUT_NONE &&
eMode != SC_INPUT_TYPE); }
@@ -197,7 +197,7 @@ public:
void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
void NotifyChange( const ScInputHdlState* pState, bool bForce = false,
- ScTabViewShell* pSourceSh = NULL,
+ ScTabViewShell* pSourceSh = nullptr,
bool bStopEditing = true);
void UpdateCellAdjust( SvxCellHorJustify eJust );
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index d321c8b87bac..a1824a819e2d 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -32,7 +32,7 @@ class ScInsertContentsDlg : public ModalDialog
public:
ScInsertContentsDlg( vcl::Window* pParent,
InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
- const OUString* pStrTitle = NULL );
+ const OUString* pStrTitle = nullptr );
virtual ~ScInsertContentsDlg();
virtual void dispose() override;
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index 07a96810085e..ffa2548d0a18 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -51,8 +51,8 @@ public:
bool GetTablesFromFile() const { return m_pBtnFromFile->IsChecked(); }
bool GetTablesAsLink() const { return m_pBtnLink->IsChecked(); }
- const OUString* GetFirstTable( sal_uInt16* pN = NULL );
- const OUString* GetNextTable( sal_uInt16* pN = NULL );
+ const OUString* GetFirstTable( sal_uInt16* pN = nullptr );
+ const OUString* GetNextTable( sal_uInt16* pN = nullptr );
ScDocShell* GetDocShellTables() { return pDocShTables; }
bool IsTableBefore() const { return m_pBtnBefore->IsChecked(); }
SCTAB GetTableCount() const { return nTableCount;}
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 4aa8afd4aa46..b6b615227bb4 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -273,12 +273,12 @@ private:
static ScNavigatorSettings* GetNavigatorSettings();
bool GetViewData();
- void UpdateColumn ( const SCCOL* pCol = NULL );
- void UpdateRow ( const SCROW* pRow = NULL );
- void UpdateTable ( const SCTAB* pTab = NULL );
+ void UpdateColumn ( const SCCOL* pCol = nullptr );
+ void UpdateRow ( const SCROW* pRow = nullptr );
+ void UpdateTable ( const SCTAB* pTab = nullptr );
void UpdateAll ();
- void GetDocNames(const OUString* pSelEntry = NULL);
+ void GetDocNames(const OUString* pSelEntry = nullptr);
void SetListMode ( NavListMode eMode, bool bSetSize = true );
void ShowList ( bool bShow, bool bSetSize );
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 2dd5dfbb10d7..601a90bfa24d 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -262,8 +262,8 @@ public:
SCTAB nNewTab, long nNewScrX, long nNewScrY,
SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2,
double nPixelPerTwipsX, double nPixelPerTwipsY,
- const Fraction* pZoomX = NULL,
- const Fraction* pZoomY = NULL );
+ const Fraction* pZoomX = nullptr,
+ const Fraction* pZoomY = nullptr );
~ScOutputData();
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 7b7e96047cb9..9ba5a366b132 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -106,7 +106,7 @@ private:
//! Cache Number of really visible?
public:
- ScPageRowEntry() { nStartRow = nEndRow = 0; nPagesX = 0; pHidden = NULL; }
+ ScPageRowEntry() { nStartRow = nEndRow = 0; nPagesX = 0; pHidden = nullptr; }
~ScPageRowEntry() { delete[] pHidden; }
ScPageRowEntry(const ScPageRowEntry& r);
@@ -220,16 +220,16 @@ private:
public:
ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab,
long nPage = 0, long nDocP = 0,
- const ScRange* pArea = NULL,
- const ScPrintOptions* pOptions = NULL,
- ScPageBreakData* pData = NULL );
+ const ScRange* pArea = nullptr,
+ const ScPrintOptions* pOptions = nullptr,
+ ScPageBreakData* pData = nullptr );
// ctors for device other than printer - for preview and pdf:
ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
long nPage = 0, long nDocP = 0,
- const ScRange* pArea = NULL,
- const ScPrintOptions* pOptions = NULL );
+ const ScRange* pArea = nullptr,
+ const ScPrintOptions* pOptions = nullptr );
ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
const ScPrintState& rState,
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 8d41f081146f..e254d45e2d1c 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -30,8 +30,8 @@ class ScImportOptionsDlg : public ModalDialog
public:
ScImportOptionsDlg( vcl::Window* pParent,
bool bAscii = true,
- const ScImportOptions* pOptions = NULL,
- const OUString* pStrTitle = NULL,
+ const ScImportOptions* pOptions = nullptr,
+ const OUString* pStrTitle = nullptr,
bool bMultiByte = false,
bool bOnlyDbtoolsEncodings = false,
bool bImport = true );
diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx
index fb326f60cd8c..061c0c2517a0 100644
--- a/sc/source/ui/inc/spellparam.hxx
+++ b/sc/source/ui/inc/spellparam.hxx
@@ -55,7 +55,7 @@ public:
inline ScConversionType GetType() const { return meConvType; }
inline LanguageType GetSourceLang() const { return meSourceLang; }
inline LanguageType GetTargetLang() const { return meTargetLang; }
- inline const vcl::Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : 0; }
+ inline const vcl::Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : nullptr; }
inline sal_Int32 GetOptions() const { return mnOptions; }
inline bool IsInteractive() const { return mbIsInteractive; }
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index e5dedcc20710..d48d63228b86 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -40,7 +40,7 @@ public:
protected:
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr ) override;
private:
ScTabPageProtection( vcl::Window* pParent,
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 820aecd1512a..ddc89eec1f9b 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -204,8 +204,8 @@ private:
void PaintRangeFinderEntry (ScRangeFindData* pData, SCTAB nTab);
protected:
- void UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL,
- const SCROW* pPosY = NULL );
+ void UpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr,
+ const SCROW* pPosY = nullptr );
void HideTip();
void ShowRefTip();
@@ -350,7 +350,7 @@ public:
void ShowAllCursors();
void AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
- const ScSplitPos* pWhich = NULL );
+ const ScSplitPos* pWhich = nullptr );
SvxZoomType GetZoomType() const;
void SetZoomType( SvxZoomType eNew, bool bAll );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index a1621110d3e0..dc1d8350e5a0 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -352,7 +352,7 @@ public:
void InsertURL( const OUString& rName, const OUString& rURL, const OUString& rTarget,
sal_uInt16 nMode );
void InsertURLButton( const OUString& rName, const OUString& rURL, const OUString& rTarget,
- const Point* pInsPos = NULL );
+ const Point* pInsPos = nullptr );
void InsertURLField( const OUString& rName, const OUString& rURL, const OUString& rTarget );
bool SelectObject( const OUString& rName );
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index ea7177a9298b..9476ac151cf2 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -38,7 +38,7 @@ public:
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr ) override;
private:
ScTpCalcOptions( vcl::Window* pParent,
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 69e9a78f4274..d0842af95041 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -24,7 +24,7 @@ public:
virtual bool FillItemSet(SfxItemSet* rCoreAttrs) override;
virtual void Reset(const SfxItemSet* rCoreAttrs) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = NULL) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
virtual ~ScTpCompatOptions();
virtual void dispose() override;
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 335b1b0b05d8..9fd14379ee94 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -24,7 +24,7 @@ public:
virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
virtual void Reset(const SfxItemSet* rCoreSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = NULL) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
private:
explicit ScTpDefaultsOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet);
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 3c7ed8cae00a..0b0ed6c51b0a 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -39,7 +39,7 @@ public:
virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
virtual void Reset( const SfxItemSet* rCoreSet ) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = NULL) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
private:
explicit ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet);
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index f3192bbf5fd0..49e1b8ac08bc 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -44,7 +44,7 @@ protected:
virtual void ActivatePage() override;
virtual void DeactivatePage() override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
private:
VclPtr<PushButton> m_pBtnEdit;
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index b006c4411052..27b1334f6bc7 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -38,7 +38,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rCoreSet ) override;
virtual void Reset( const SfxItemSet* rCoreSet ) override;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
#endif
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 3f54ce4b1587..f777f74e5666 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -64,7 +64,7 @@ protected:
virtual void ActivatePage ( const SfxItemSet& rSet ) override;
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr) override;
private:
OUString aStrUndefined;
@@ -122,7 +122,7 @@ protected:
virtual void ActivatePage ( const SfxItemSet& rSet ) override;
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr) override;
private:
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index 37893831dfa5..e6d0ba17870b 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -36,7 +36,7 @@ public:
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr ) override;
virtual void DataChanged ( const DataChangedEvent& rDCEvt ) override;
virtual ~ScTablePage();
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 3e4a1b8d3c30..912de9102ce3 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -39,7 +39,7 @@ public:
virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) override;
virtual void Reset ( const SfxItemSet* rCoreAttrs ) override;
using SfxTabPage::DeactivatePage;
- virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage ( SfxItemSet* pSet = nullptr ) override;
private:
ScTpUserLists( vcl::Window* pParent,
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 149330b13275..2af7b8f22d54 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -78,7 +78,7 @@ public:
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
@@ -123,7 +123,7 @@ public:
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
void SetDocument(ScDocument* pPtr){pDoc = pPtr;}
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index f69b21c810c2..a29fd4c25838 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -61,7 +61,7 @@ private:
void InitDocShell(bool bLimitToPageSize);
static void StripRefs( ScDocument* pDoc, SCCOL nStartX, SCROW nStartY,
SCCOL nEndX, SCROW nEndY,
- ScDocument* pDestDoc=0,
+ ScDocument* pDestDoc=nullptr,
SCCOL nSubX=0, SCROW nSubY=0 );
static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
const ScRange& rBlock, bool bMetaFile );
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 3e73bf22163f..440234c8fe76 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -64,7 +64,7 @@ public:
virtual ~ScInputStatusItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScAddress& GetPos() const { return aCursorPos; }
@@ -144,7 +144,7 @@ public:
virtual ~ScSortItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberUd ) const override;
ScViewData* GetViewData () const { return pViewData; }
@@ -168,7 +168,7 @@ public:
virtual ~ScQueryItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
ScViewData* GetViewData () const { return pViewData; }
const ScQueryParam& GetQueryData() const;
@@ -196,7 +196,7 @@ public:
virtual ~ScSubTotalItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberUd ) const override;
ScViewData* GetViewData () const { return pViewData; }
@@ -216,7 +216,7 @@ public:
virtual ~ScUserListItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
void SetUserList ( const ScUserList& rUserList );
ScUserList* GetUserList () const { return pUserList; }
@@ -235,7 +235,7 @@ public:
virtual ~ScConsolidateItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScConsolidateParam& GetData() const { return theConsData; }
@@ -253,7 +253,7 @@ public:
virtual ~ScPivotItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScDPSaveData& GetData() const { return *pSaveData; }
const ScRange& GetDestRange() const { return aDestRange; }
@@ -275,7 +275,7 @@ public:
virtual ~ScSolveItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScSolveParam& GetData() const { return theSolveData; }
@@ -293,7 +293,7 @@ public:
virtual ~ScTabOpItem();
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const ScTabOpParam& GetData() const { return theTabOpData; }
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index d092d1f5f2ed..bd9440d13a0a 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -131,7 +131,7 @@ protected:
public:
TYPEINFO_OVERRIDE();
- ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal, SdrUndoAction* pDrawUndo = 0 );
+ ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal, SdrUndoAction* pDrawUndo = nullptr );
virtual ~ScDBFuncUndo();
void BeginUndo();
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index cefbb40e7a4e..1e29c5b8f274 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -188,7 +188,7 @@ public:
InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
bool bRedoIsFilled = true,
- const ScUndoPasteOptions* pOptions = NULL);
+ const ScUndoPasteOptions* pOptions = nullptr);
virtual ~ScUndoPaste();
virtual void Undo() override;
@@ -330,8 +330,8 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScDocument* pNewUndoDoc, bool bNewMulti,
const ScPatternAttr* pNewApply,
- const SvxBoxItem* pNewOuter = NULL,
- const SvxBoxInfoItem* pNewInner = NULL );
+ const SvxBoxItem* pNewOuter = nullptr,
+ const SvxBoxInfoItem* pNewInner = nullptr );
virtual ~ScUndoSelectionAttr();
virtual void Undo() override;
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 2b18611634d9..ab6ea1014ea2 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -97,7 +97,7 @@ public:
ScUndoEnterData(
ScDocShell* pNewDocShell, const ScAddress& rPos,
- ValuesType& rOldValues, const OUString& rNewStr, EditTextObject* pObj = NULL );
+ ValuesType& rOldValues, const OUString& rNewStr, EditTextObject* pObj = nullptr );
virtual ~ScUndoEnterData();
@@ -319,7 +319,7 @@ public:
TYPEINFO_OVERRIDE();
ScUndoDetective( ScDocShell* pNewDocShell,
SdrUndoAction* pDraw, const ScDetOpData* pOperation,
- ScDetOpList* pUndoList = NULL );
+ ScDetOpList* pUndoList = nullptr );
virtual ~ScUndoDetective();
virtual void Undo() override;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 2058a05f355c..c02a44d365c2 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -157,8 +157,8 @@ public:
ScDocShell* pNewDocShell,
::std::vector<SCTAB>* pOldTabs,
::std::vector<SCTAB>* pNewTabs,
- ::std::vector< OUString>* pOldNames = NULL,
- ::std::vector< OUString>* pNewNames = NULL );
+ ::std::vector< OUString>* pOldNames = nullptr,
+ ::std::vector< OUString>* pNewNames = nullptr );
virtual ~ScUndoMoveTab();
@@ -186,7 +186,7 @@ public:
ScDocShell* pNewDocShell,
::std::vector<SCTAB>* pOldTabs,
::std::vector<SCTAB>* pNewTabs,
- ::std::vector< OUString>* pNewNames = NULL );
+ ::std::vector< OUString>* pNewNames = nullptr );
virtual ~ScUndoCopyTab();
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 10e4cfe236bc..d39b99b12bac 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -72,7 +72,7 @@ public:
void SetRefInputStartPreHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPreHdl = pNewHdl; }
void SetRefInputDonePostHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePostHdl = pNewHdl; }
- ScRefHandlerHelper():m_pHandler(NULL), m_pSetReferenceHdl( NULL ), m_pSetActiveHdl(NULL), m_pRefInputStartPreHdl( NULL ), m_pRefInputStartPostHdl( NULL ), m_pRefInputDonePreHdl( NULL ), m_pRefInputDonePostHdl( NULL ){}
+ ScRefHandlerHelper():m_pHandler(nullptr), m_pSetReferenceHdl( nullptr ), m_pSetActiveHdl(nullptr), m_pRefInputStartPreHdl( nullptr ), m_pRefInputStartPostHdl( nullptr ), m_pRefInputDonePreHdl( nullptr ), m_pRefInputDonePostHdl( nullptr ){}
};
class ScValidationDlg;
@@ -136,7 +136,7 @@ public:
public:
ScRefButtonEx(vcl::Window* pParent, WinBits nStyle)
: ::formula::RefButton(pParent, nStyle)
- , m_pPage(NULL)
+ , m_pPage(nullptr)
{
}
virtual ~ScRefButtonEx();
@@ -181,7 +181,7 @@ class ScValidationDlg
bool LeaveRefStatus();
public:
- explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
+ explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = nullptr );
virtual ~ScValidationDlg() { disposeOnce(); }
virtual void dispose() override
{
@@ -219,7 +219,7 @@ public:
bool IsRefInputting(){ return m_bRefInputting; }
vcl::Window* get_refinput_shrink_parent() { return m_pHBox; }
- virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) override
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override
{
if( !CanInputStart( pEdit ) )
return;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 84bf390b170c..590d0d8300cb 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -83,7 +83,7 @@ public:
OUString GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
- const EditTextObject* pData = NULL );
+ const EditTextObject* pData = nullptr );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
const EditTextObject& rData, bool bTestSimple = false );
void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
@@ -98,8 +98,8 @@ public:
void EnterDataAtCursor( const OUString& rString ); //! Not used?
- SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, bool bIncludeObjects = false );
- SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = NULL, bool bCut = false, bool bApi = false,
+ SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = nullptr, bool bIncludeObjects = false );
+ SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = nullptr, bool bCut = false, bool bApi = false,
bool bIncludeObjects = false, bool bStopEdit = true );
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false,
bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true, bool bUseRangeForVBA = true );
@@ -128,11 +128,11 @@ public:
bool PasteDataFormat( SotClipboardFormatId nFormatId,
const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable,
- SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL,
+ SCCOL nPosX, SCROW nPosY, Point* pLogicPos = nullptr,
bool bLink = false, bool bAllowDialogs = false );
bool PasteFile( const Point&, const OUString&, bool bLink=false );
- bool PasteObject( const Point&, const css::uno::Reference < css::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const OUString& = OUString(), sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT );
+ bool PasteObject( const Point&, const css::uno::Reference < css::embed::XEmbeddedObject >&, const Size* = nullptr, const Graphic* = nullptr, const OUString& = OUString(), sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT );
bool PasteBitmapEx( const Point&, const BitmapEx& );
bool PasteMetaFile( const Point&, const GDIMetaFile& );
bool PasteGraphic( const Point& rPos, const Graphic& rGraphic,
@@ -143,7 +143,7 @@ public:
bool PasteLink( const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable );
void InsertBookmark( const OUString& rDescription, const OUString& rURL,
- SCCOL nPosX, SCROW nPosY, const OUString* pTarget = NULL,
+ SCCOL nPosX, SCROW nPosY, const OUString* pTarget = nullptr,
bool bTryReplace = false );
bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
@@ -198,23 +198,23 @@ public:
void SetWidthOrHeight(
bool bWidth, const std::vector<sc::ColRowSpan>& rRanges, ScSizeMode eMode,
- sal_uInt16 nSizeTwips, bool bRecord = true, bool bPaint = true, ScMarkData* pMarkData = NULL );
+ sal_uInt16 nSizeTwips, bool bRecord = true, bool bPaint = true, ScMarkData* pMarkData = nullptr );
void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
bool bRecord = true, bool bPaint = true );
- bool AdjustBlockHeight( bool bPaint = true, ScMarkData* pMarkData = NULL );
+ bool AdjustBlockHeight( bool bPaint = true, ScMarkData* pMarkData = nullptr );
bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint = true );
void ModifyCellSize( ScDirection eDir, bool bOptimal );
SC_DLLPUBLIC void
InsertPageBreak( bool bColumn, bool bRecord = true,
- const ScAddress* pPos = NULL,
+ const ScAddress* pPos = nullptr,
bool bSetModified = true );
SC_DLLPUBLIC void
DeletePageBreak( bool bColumn, bool bRecord = true,
- const ScAddress* pPos = NULL,
+ const ScAddress* pPos = nullptr,
bool bSetModified = true );
void RemoveManualBreaks();
@@ -257,7 +257,7 @@ public:
bool DeleteTables(SCTAB nTab, SCTAB nSheets);
bool RenameTable( const OUString& rName, SCTAB nTabNr );
- void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = NULL );
+ void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr );
void ImportTables( ScDocShell* pSrcShell,
SCTAB nCount, const SCTAB* pSrcTabs,
bool bLink,SCTAB nTab);
@@ -317,7 +317,7 @@ public:
void EditNote();
void ForgetFormatArea() { bFormatValid = false; }
- bool SelectionEditable( bool* pOnlyNotBecauseOfMatrix = NULL );
+ bool SelectionEditable( bool* pOnlyNotBecauseOfMatrix = nullptr );
SC_DLLPUBLIC void
DataFormPutData( SCROW nCurrentRow ,
@@ -325,7 +325,7 @@ public:
SCROW nEndRow , SCCOL nEndCol ,
std::vector<VclPtr<Edit> >& aEdits,
sal_uInt16 aColLength );
- void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = NULL );
+ void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = nullptr );
// Internal helper functions
protected:
static void UpdateLineAttrs( ::editeng::SvxBorderLine& rLine,
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 08aa8a7216e5..1eff56088626 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -58,7 +58,7 @@ ScRedlinData::ScRedlinData()
{
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
- pData=NULL;
+ pData=nullptr;
bDisabled=false;
bIsRejectable=false;
bIsAcceptable=false;
@@ -71,7 +71,7 @@ ScRedlinData::~ScRedlinData()
{
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
- pData=NULL;
+ pData=nullptr;
bDisabled=false;
bIsRejectable=false;
bIsAcceptable=false;
@@ -145,7 +145,7 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
UpdateView();
SvTreeListEntry* pEntry=pTheView->First();
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
pTheView->Select(pEntry);
}
@@ -161,7 +161,7 @@ void ScAcceptChgDlg::dispose()
ClearView();
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
Link<ScChangeTrack&,void> aLink;
pChanges->SetModifiedLink(aLink);
@@ -177,10 +177,10 @@ void ScAcceptChgDlg::dispose()
void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData)
{
pViewData=ptrViewData;
- if(pViewData!=NULL)
+ if(pViewData!=nullptr)
pDoc=ptrViewData->GetDocument();
else
- pDoc=NULL;
+ pDoc=nullptr;
bNoSelection=false;
bNeedsUpdate=false;
@@ -211,7 +211,7 @@ void ScAcceptChgDlg::Init()
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
pChanges->SetModifiedLink( LINK( this, ScAcceptChgDlg,ChgTrackModHdl));
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
@@ -223,7 +223,7 @@ void ScAcceptChgDlg::Init()
}
ScChangeViewSettings* pViewSettings=pDoc->GetChangeViewSettings();
- if ( pViewSettings!=NULL )
+ if ( pViewSettings!=nullptr )
aChangeViewSet = *pViewSettings;
// adjust TimeField for filter tabpage
aChangeViewSet.AdjustDateMode( *pDoc );
@@ -298,7 +298,7 @@ OUString* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType)
bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
{
- if(pScChangeAction==NULL) return false;
+ if(pScChangeAction==nullptr) return false;
bool bFlag = false;
@@ -352,9 +352,9 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pScChangeAction==NULL || pChanges==NULL) return NULL;
+ if(pScChangeAction==nullptr || pChanges==nullptr) return nullptr;
- SvTreeListEntry* pEntry=NULL;
+ SvTreeListEntry* pEntry=nullptr;
bool bFlag = false;
@@ -470,22 +470,22 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
}
}
- if(!bFlag&& bUseColor&& pParent==NULL)
+ if(!bFlag&& bUseColor&& pParent==nullptr)
{
pEntry = pTheView->InsertEntry(
aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, nPos);
}
- else if(bFlag&& bUseColor&& pParent!=NULL)
+ else if(bFlag&& bUseColor&& pParent!=nullptr)
{
pEntry = pTheView->InsertEntry(
aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, nPos);
SvTreeListEntry* pExpEntry=pParent;
- while(pExpEntry!=NULL && !pTheView->IsExpanded(pExpEntry))
+ while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
{
SvTreeListEntry* pTmpEntry=pTheView->GetParent(pExpEntry);
- if(pTmpEntry!=NULL) pTheView->Expand(pExpEntry);
+ if(pTmpEntry!=nullptr) pTheView->Expand(pExpEntry);
pExpEntry=pTmpEntry;
}
@@ -505,11 +505,11 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pScChangeAction==NULL || pChanges==NULL) return NULL;
+ if(pScChangeAction==nullptr || pChanges==nullptr) return nullptr;
bool bIsGenerated = pChanges->IsGenerated(pScChangeAction->GetActionNumber());
- SvTreeListEntry* pEntry=NULL;
+ SvTreeListEntry* pEntry=nullptr;
bool bFlag = false;
@@ -628,9 +628,9 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC
SvTreeListEntry* pParent, sal_uLong nSpecial)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- SvTreeListEntry* pEntry=NULL;
+ SvTreeListEntry* pEntry=nullptr;
- if(pScChangeAction==NULL || pChanges==NULL) return NULL;
+ if(pScChangeAction==nullptr || pChanges==nullptr) return nullptr;
bool bIsGenerated = pChanges->IsGenerated(pScChangeAction->GetActionNumber());
@@ -768,9 +768,9 @@ bool ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
void ScAcceptChgDlg::UpdateView()
{
bNeedsUpdate=false;
- SvTreeListEntry* pParent=NULL;
- ScChangeTrack* pChanges=NULL;
- const ScChangeAction* pScChangeAction=NULL;
+ SvTreeListEntry* pParent=nullptr;
+ ScChangeTrack* pChanges=nullptr;
+ const ScChangeAction* pScChangeAction=nullptr;
bAcceptEnableFlag=true;
bRejectEnableFlag=true;
SetPointer(Pointer(PointerStyle::Wait));
@@ -780,15 +780,15 @@ void ScAcceptChgDlg::UpdateView()
bUseColor = bFilterFlag;
- if(pDoc!=NULL)
+ if(pDoc!=nullptr)
{
pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
pScChangeAction=pChanges->GetFirst();
}
bool bTheFlag = false;
- while(pScChangeAction!=NULL)
+ while(pScChangeAction!=nullptr)
{
bHasFilterEntry=false;
switch(pScChangeAction->GetState())
@@ -803,23 +803,23 @@ void ScAcceptChgDlg::UpdateView()
pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
}
else
- pParent=NULL;
+ pParent=nullptr;
bTheFlag=true;
break;
case SC_CAS_ACCEPTED:
- pParent=NULL;
+ pParent=nullptr;
nAcceptCount++;
break;
case SC_CAS_REJECTED:
- pParent=NULL;
+ pParent=nullptr;
nRejectCount++;
break;
}
- if(pParent!=NULL && pScChangeAction->IsDialogParent())
+ if(pParent!=nullptr && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
pParent->EnableChildrenOnDemand();
@@ -846,21 +846,21 @@ void ScAcceptChgDlg::UpdateView()
if(nAcceptCount>0)
{
pParent=pTheView->InsertEntry(
- aStrAllAccepted, static_cast< RedlinData * >(NULL),
- static_cast< SvTreeListEntry * >(NULL));
+ aStrAllAccepted, static_cast< RedlinData * >(nullptr),
+ static_cast< SvTreeListEntry * >(nullptr));
pParent->EnableChildrenOnDemand();
}
if(nRejectCount>0)
{
pParent=pTheView->InsertEntry(
- aStrAllRejected, static_cast< RedlinData * >(NULL),
- static_cast< SvTreeListEntry * >(NULL));
+ aStrAllRejected, static_cast< RedlinData * >(nullptr),
+ static_cast< SvTreeListEntry * >(nullptr));
pParent->EnableChildrenOnDemand();
}
pTheView->SetUpdateMode(true);
SetPointer(Pointer(PointerStyle::Arrow));
SvTreeListEntry* pEntry=pTheView->First();
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
pTheView->Select(pEntry);
}
@@ -875,7 +875,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, RefHandle, SvxTPFilter*, void)
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId ));
- if(pWnd!=NULL)
+ if(pWnd!=nullptr)
{
sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
pViewFrm->ShowChildWindow(nAcceptId,false);
@@ -897,7 +897,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, RefInfoHandle, const OUString*, pResult, void)
ScSimpleRefDlgWrapper::SetAutoReOpen(true);
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
- if(pResult!=NULL)
+ if(pResult!=nullptr)
{
pTPFilter->SetRange(*pResult);
FilterHandle(pTPFilter);
@@ -905,7 +905,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, RefInfoHandle, const OUString*, pResult, void)
nId = ScSimpleRefDlgWrapper::GetChildWindowId();
ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId ));
- if(pWnd!=NULL)
+ if(pWnd!=nullptr)
{
vcl::Window* pWin=pWnd->GetWindow();
Size aWinSize=pWin->GetSizePixel();
@@ -925,7 +925,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, RefInfoHandle, const OUString*, pResult, void)
IMPL_LINK_TYPED( ScAcceptChgDlg, FilterHandle, SvxTPFilter*, pRef, void )
{
- if(pRef!=NULL)
+ if(pRef!=nullptr)
{
ClearView();
aRangeList.RemoveAll();
@@ -941,13 +941,13 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef, void )
bIgnoreMsg=true;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pRef!=NULL)
+ if(pRef!=nullptr)
{
SvTreeListEntry* pEntry=pTheView->FirstSelected();
- while(pEntry!=NULL)
+ while(pEntry!=nullptr)
{
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
ScChangeAction* pScChangeAction=
static_cast<ScChangeAction*>(pEntryData->pData);
@@ -977,13 +977,13 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef, void )
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
bIgnoreMsg=true;
- if(pRef!=NULL)
+ if(pRef!=nullptr)
{
SvTreeListEntry* pEntry=pTheView->FirstSelected();
- while(pEntry!=NULL)
+ while(pEntry!=nullptr)
{
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
ScChangeAction* pScChangeAction=
static_cast<ScChangeAction*>(pEntryData->pData);
@@ -1011,16 +1011,16 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef, void )
void ScAcceptChgDlg::RejectFiltered()
{
- if(pDoc==NULL) return;
+ if(pDoc==nullptr) return;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- const ScChangeAction* pScChangeAction=NULL;
+ const ScChangeAction* pScChangeAction=nullptr;
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
pScChangeAction=pChanges->GetLast();
}
- while(pScChangeAction!=NULL)
+ while(pScChangeAction!=nullptr)
{
if(pScChangeAction->IsDialogRoot())
if(IsValidAction(pScChangeAction))
@@ -1031,14 +1031,14 @@ void ScAcceptChgDlg::RejectFiltered()
}
void ScAcceptChgDlg::AcceptFiltered()
{
- if(pDoc==NULL) return;
+ if(pDoc==nullptr) return;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- const ScChangeAction* pScChangeAction=NULL;
+ const ScChangeAction* pScChangeAction=nullptr;
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
pScChangeAction=pChanges->GetLast();
- while(pScChangeAction!=NULL)
+ while(pScChangeAction!=nullptr)
{
if(pScChangeAction->IsDialogRoot())
if(IsValidAction(pScChangeAction))
@@ -1053,7 +1053,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, RejectAllHandle, SvxTPView*, void)
SetPointer(Pointer(PointerStyle::Wait));
bIgnoreMsg=true;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
if(pTPFilter->IsDate()||pTPFilter->IsAuthor()||pTPFilter->IsRange()||pTPFilter->IsComment())
RejectFiltered();
@@ -1081,7 +1081,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, void)
bIgnoreMsg=true;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
if(pTPFilter->IsDate()||pTPFilter->IsAuthor()||pTPFilter->IsRange()||pTPFilter->IsComment())
AcceptFiltered();
@@ -1114,7 +1114,7 @@ void ScAcceptChgDlg::GetDependents( const ScChangeAction* pScChangeAction,
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
SvTreeListEntry* pParent=pTheView->GetParent(pEntry);
- if(pParent!=NULL)
+ if(pParent!=nullptr)
{
ScRedlinData *pParentData=static_cast<ScRedlinData *>(pParent->GetUserData());
ScChangeAction* pParentAction=static_cast<ScChangeAction*>(pParentData->pData);
@@ -1149,7 +1149,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL
const_cast<ScChangeAction*>( pScChangeAction ) ) );
bParentInserted = true;
}
- SvTreeListEntry* pEntry=NULL;
+ SvTreeListEntry* pEntry=nullptr;
ScChangeActionMap::iterator itChangeAction = pActionMap->begin();
while( itChangeAction != pActionMap->end() )
@@ -1166,7 +1166,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL
dynamic_cast<const ScChangeActionContent*>( itChangeAction->second ),
pParent, RD_SPECIAL_CONTENT );
- if(pOriginal!=NULL)
+ if(pOriginal!=nullptr)
{
bTheTestFlag=false;
ScRedlinData *pParentData=static_cast<ScRedlinData *>(pOriginal->GetUserData());
@@ -1183,7 +1183,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL
pEntry = InsertChangeActionContent( dynamic_cast<const ScChangeActionContent*>( itChangeAction->second ),
pParent, RD_SPECIAL_NONE );
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
bTheTestFlag=false;
}
++itChangeAction;
@@ -1194,7 +1194,7 @@ bool ScAcceptChgDlg::InsertContentChildren(ScChangeActionMap* pActionMap,SvTreeL
pEntry=InsertChangeActionContent(static_cast<const ScChangeActionContent*>(
pScChangeAction),pParent,RD_SPECIAL_NONE);
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
bTheTestFlag=false;
ScRedlinData *pParentData=static_cast<ScRedlinData *>(pEntry->GetUserData());
@@ -1228,10 +1228,10 @@ bool ScAcceptChgDlg::InsertAcceptedORejected(SvTreeListEntry* pParent)
}
ScChangeAction* pScChangeAction=pChanges->GetFirst();
- while(pScChangeAction!=NULL)
+ while(pScChangeAction!=nullptr)
{
if(pScChangeAction->GetState()==eState &&
- InsertFilteredAction(pScChangeAction,eState,pParent)!=NULL)
+ InsertFilteredAction(pScChangeAction,eState,pParent)!=nullptr)
bTheTestFlag=false;
pScChangeAction=pScChangeAction->GetNext();
}
@@ -1248,7 +1248,7 @@ bool ScAcceptChgDlg::InsertChildren(ScChangeActionMap* pActionMap,SvTreeListEntr
{
SvTreeListEntry* pEntry=InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true );
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
bTheTestFlag=false;
@@ -1269,7 +1269,7 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
bool bTheTestFlag = true;
- SvTreeListEntry* pEntry=NULL;
+ SvTreeListEntry* pEntry=nullptr;
ScChangeActionMap::iterator itChangeAction;
for( itChangeAction = pActionMap->begin(); itChangeAction != pActionMap->end(); ++itChangeAction )
@@ -1280,7 +1280,7 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction
else
pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true );
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
pEntryData->bIsRejectable=false;
@@ -1302,7 +1302,7 @@ bool ScAcceptChgDlg::Expand(
{
bool bTheTestFlag = true;
- if(pChanges!=NULL &&pEntry!=NULL &&pScChangeAction!=NULL)
+ if(pChanges!=nullptr &&pEntry!=nullptr &&pScChangeAction!=nullptr)
{
ScChangeActionMap aActionMap;
@@ -1340,16 +1340,16 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
SetPointer(Pointer(PointerStyle::Wait));
- if(pTable!=NULL && pChanges!=NULL)
+ if(pTable!=nullptr && pChanges!=nullptr)
{
ScChangeActionMap aActionMap;
SvTreeListEntry* pEntry=pTheView->GetHdlEntry();
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
- ScChangeAction* pScChangeAction=NULL;
+ ScChangeAction* pScChangeAction=nullptr;
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
pScChangeAction=static_cast<ScChangeAction*>(pEntryData->pData);
if(pEntry->HasChildrenOnDemand())
@@ -1360,7 +1360,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
if (pChildEntry)
pTheView->RemoveEntry(pChildEntry);
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
pScChangeAction=static_cast<ScChangeAction*>(pEntryData->pData);
@@ -1393,7 +1393,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
{
bTheTestFlag=InsertAcceptedORejected(pEntry);
}
- if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,NULL,Color(COL_GRAY),pEntry);
+ if(bTheTestFlag) pTheView->InsertEntry(aStrNoEntry,nullptr,Color(COL_GRAY),pEntry);
}
}
@@ -1405,9 +1405,9 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction,
sal_uLong nEndAction, sal_uLong /* nPos */)
{
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
- SvTreeListEntry* pParent=NULL;
+ SvTreeListEntry* pParent=nullptr;
bAcceptEnableFlag=true;
bRejectEnableFlag=true;
SetPointer(Pointer(PointerStyle::Wait));
@@ -1423,7 +1423,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio
for(sal_uLong i=nStartAction;i<=nEndAction;i++)
{
const ScChangeAction* pScChangeAction=pChanges->GetAction(i);
- if(pScChangeAction==NULL) continue;
+ if(pScChangeAction==nullptr) continue;
switch(pScChangeAction->GetState())
{
@@ -1437,23 +1437,23 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio
pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
}
else
- pParent=NULL;
+ pParent=nullptr;
bTheFlag=true;
break;
case SC_CAS_ACCEPTED:
- pParent=NULL;
+ pParent=nullptr;
nAcceptCount++;
break;
case SC_CAS_REJECTED:
- pParent=NULL;
+ pParent=nullptr;
nRejectCount++;
break;
}
- if(pParent!=NULL && pScChangeAction->IsDialogParent())
+ if(pParent!=nullptr && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
pParent->EnableChildrenOnDemand();
@@ -1487,13 +1487,13 @@ void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction)
SvTreeListEntry* pEntry=pTheView->GetCurEntry();
- ScRedlinData *pEntryData=NULL;
+ ScRedlinData *pEntryData=nullptr;
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
sal_uLong nAction=0;
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
nAction=pEntryData->nActionNo;
if(nAction>=nStartAction && nAction<=nEndAction)
@@ -1502,11 +1502,11 @@ void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction)
// MUST do it backwards, don't delete parents before children and GPF
pEntry=pTheView->Last();
- while(pEntry!=NULL)
+ while(pEntry!=nullptr)
{
bool bRemove = false;
pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
nAction=pEntryData->nActionNo;
@@ -1532,13 +1532,13 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi
SvTreeListEntry* pEntry=pTheView->First();
- SvTreeListEntry* pNextEntry = (pEntry ? SvTreeListBox::NextSibling(pEntry) : NULL);
- SvTreeListEntry* pLastEntry=NULL;
- while(pEntry!=NULL)
+ SvTreeListEntry* pNextEntry = (pEntry ? SvTreeListBox::NextSibling(pEntry) : nullptr);
+ SvTreeListEntry* pLastEntry=nullptr;
+ while(pEntry!=nullptr)
{
bool bRemove = false;
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
ScChangeAction* pScChangeAction=
static_cast<ScChangeAction*>(pEntryData->pData);
@@ -1553,19 +1553,19 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi
nPos=pEntry->GetChildListPos();
pTheView->RemoveEntry(pEntry);
- if(pLastEntry==NULL) pLastEntry=pTheView->First();
- if(pLastEntry!=NULL)
+ if(pLastEntry==nullptr) pLastEntry=pTheView->First();
+ if(pLastEntry!=nullptr)
{
pNextEntry=pTheView->Next(pLastEntry);
- if(pNextEntry==NULL)
+ if(pNextEntry==nullptr)
{
pNextEntry=pLastEntry;
- pLastEntry=NULL;
+ pLastEntry=nullptr;
}
}
else
- pNextEntry=NULL;
+ pNextEntry=nullptr;
}
else
@@ -1627,7 +1627,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, ReOpenTimerHdl, Idle *, void)
{
ScSimpleRefDlgWrapper::SetAutoReOpen(true);
m_pAcceptChgCtr->ShowFilterPage();
- RefHandle(NULL);
+ RefHandle(nullptr);
}
IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, UpdateSelectionHdl, Idle *, void)
@@ -1690,7 +1690,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void)
aPopup.SetMenuFlags(MenuFlags::HideDisabledEntries);
SvTreeListEntry* pEntry=pTheView->GetCurEntry();
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
pTheView->Select(pEntry);
}
@@ -1715,14 +1715,14 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void)
aPopup.EnableItem(SC_CHANGES_COMMENT,false);
- if(pDoc->IsDocEditable() && pEntry!=NULL)
+ if(pDoc->IsDocEditable() && pEntry!=nullptr)
{
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
ScChangeAction* pScChangeAction=
static_cast<ScChangeAction*>(pEntryData->pData);
- if(pScChangeAction!=NULL && !pTheView->GetParent(pEntry))
+ if(pScChangeAction!=nullptr && !pTheView->GetParent(pEntry))
aPopup.EnableItem(SC_CHANGES_COMMENT);
}
}
@@ -1733,10 +1733,10 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void)
{
if(nCommand==SC_CHANGES_COMMENT)
{
- if(pEntry!=NULL)
+ if(pEntry!=nullptr)
{
ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData());
- if(pEntryData!=NULL)
+ if(pEntryData!=nullptr)
{
ScChangeAction* pScChangeAction=
static_cast<ScChangeAction*>(pEntryData->pData);
@@ -1767,7 +1767,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void)
void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
{
OUString aStr;
- if(pInfo!=NULL)
+ if(pInfo!=nullptr)
{
if ( !pInfo->aExtraString.isEmpty() )
{
@@ -1867,7 +1867,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ColCompareHdl, const SvSortData*, pSortData, sa
RedlinData *pLeftData=static_cast<RedlinData *>(pLeft->GetUserData());
RedlinData *pRightData=static_cast<RedlinData *>(pRight->GetUserData());
- if(pLeftData!=NULL && pRightData!=NULL)
+ if(pLeftData!=nullptr && pRightData!=nullptr)
{
if(pLeftData->aDateTime < pRightData->aDateTime)
nCompare = -1;
@@ -1881,7 +1881,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ColCompareHdl, const SvSortData*, pSortData, sa
ScRedlinData *pLeftData=static_cast<ScRedlinData *>(pLeft->GetUserData());
ScRedlinData *pRightData=static_cast<ScRedlinData *>(pRight->GetUserData());
- if(pLeftData!=NULL && pRightData!=NULL)
+ if(pLeftData!=nullptr && pRightData!=nullptr)
{
nCompare = 1;
@@ -1907,7 +1907,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ColCompareHdl, const SvSortData*, pSortData, sa
SvLBoxItem* pLeftItem = pTheView->GetEntryAtPos( pLeft, static_cast<sal_uInt16>(nSortCol));
SvLBoxItem* pRightItem = pTheView->GetEntryAtPos( pRight, static_cast<sal_uInt16>(nSortCol));
- if(pLeftItem != NULL && pRightItem != NULL)
+ if(pLeftItem != nullptr && pRightItem != nullptr)
{
sal_uInt16 nLeftKind = pLeftItem->GetType();
sal_uInt16 nRightKind = pRightItem->GetType();
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index dfce667e6912..690095acce51 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -46,14 +46,14 @@
ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings)
: m_pDlg(_pDlg)
- , pRefEdit (NULL)
- , pRefBtn (NULL)
- , m_pWindow(NULL)
+ , pRefEdit (nullptr)
+ , pRefBtn (nullptr)
+ , m_pWindow(nullptr)
, m_pBindings(_pBindings)
, m_nOldBorderWidth (0)
, nRefTab(0)
, mnOldEditWidthReq( -1 )
- , mpOldEditParent( NULL )
+ , mpOldEditParent( nullptr )
, mbOldDlgLayoutEnabled( false )
, mbOldEditParentLayoutEnabled( false )
, bHighlightRef( false )
@@ -103,7 +103,7 @@ void ScFormulaReferenceHelper::enableInput( bool bEnable )
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( p );
- if(pViewSh!=NULL)
+ if(pViewSh!=nullptr)
{
vcl::Window *pWin=pViewSh->GetWindow();
if(pWin)
@@ -211,7 +211,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference(const OUString& rStr)
sal_uInt16 nIndex=0;
- while(pToken!=NULL)
+ while(pToken!=nullptr)
{
bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
@@ -248,7 +248,7 @@ void ScFormulaReferenceHelper::HideReference( bool bDoneRefMode )
{
ScTabViewShell* pTabViewShell=pViewData->GetViewShell();
- if(pTabViewShell!=NULL)
+ if(pTabViewShell!=nullptr)
{
// bDoneRefMode is sal_False when called from before SetReference.
// In that case, RefMode was just started and must not be ended now.
@@ -416,8 +416,8 @@ void ScFormulaReferenceHelper::RefInputDone( bool bForced )
pResizeDialog->setOptimalLayoutSize();
}
- pRefEdit = NULL;
- pRefBtn = NULL;
+ pRefEdit = nullptr;
+ pRefBtn = nullptr;
}
}
@@ -492,7 +492,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
}
}
- Dialog* pResizeDialog = NULL;
+ Dialog* pResizeDialog = nullptr;
if (!mbOldDlgLayoutEnabled)
{
@@ -633,7 +633,7 @@ bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
}
// find parent view frame to close dialog
- SfxViewFrame* pMyViewFrm = NULL;
+ SfxViewFrame* pMyViewFrm = nullptr;
if ( m_pBindings )
{
SfxDispatcher* pMyDisp = m_pBindings->GetDispatcher();
@@ -693,7 +693,7 @@ void ScFormulaReferenceHelper::EnableSpreadsheets(bool bFlag, bool bChildren)
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( p );
- if(pViewSh!=NULL)
+ if(pViewSh!=nullptr)
{
vcl::Window *pWin=pViewSh->GetWindow();
if(pWin)
@@ -728,7 +728,7 @@ static void lcl_InvalidateWindows()
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell *>( p );
- if(pViewSh!=NULL)
+ if(pViewSh!=nullptr)
{
vcl::Window *pWin=pViewSh->GetWindow();
if(pWin)
@@ -764,7 +764,7 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef
m_bInRefMode( false ),
m_aHelper(this,pB),
pMyBindings( pB ),
- pActiveWin(NULL)
+ pActiveWin(nullptr)
{
m_aHelper.SetWindow(m_rWindow.get());
reverseUniqueHelpIdHack(*m_rWindow.get());
@@ -780,12 +780,12 @@ bool ScRefHandler::EnterRefMode()
SC_MOD()->InputEnterHandler();
- ScTabViewShell* pScViewShell = NULL;
+ ScTabViewShell* pScViewShell = nullptr;
// title has to be from the view that opened the dialog,
// even if it's not the current view
- SfxObjectShell* pParentDoc = NULL;
+ SfxObjectShell* pParentDoc = nullptr;
if ( pMyBindings )
{
SfxDispatcher* pMyDisp = pMyBindings->GetDispatcher();
@@ -811,7 +811,7 @@ bool ScRefHandler::EnterRefMode()
OSL_ENSURE( pInputHdl, "Missing input handler :-/" );
if ( pInputHdl )
- pInputHdl->NotifyChange( NULL );
+ pInputHdl->NotifyChange( nullptr );
ScFormulaReferenceHelper::enableInput( false );
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 18543180f249..8dd2cc9e2767 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -57,7 +57,7 @@
ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window* pParent)
: Window(pParent)
- , pCurData(NULL)
+ , pCurData(nullptr)
, aVD(*this)
, bFitWidth(false)
, mbRTL(false)
@@ -196,7 +196,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
bool bNumFormat = pCurData->GetIncludeValueFormat();
sal_uLong nNum;
double nVal;
- Color* pDummy = NULL;
+ Color* pDummy = nullptr;
sal_uInt16 nIndex = static_cast<sal_uInt16>(maArray.GetCellIndex(nCol, nRow, mbRTL));
switch (nIndex)
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index ae00e39adb4c..2d828dbeef9f 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -83,7 +83,7 @@ ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsLi
}
}
- return NULL;
+ return nullptr;
}
ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction )
@@ -97,7 +97,7 @@ ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList&
}
}
- return NULL;
+ return nullptr;
}
void ScConflictsListHelper::Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap )
@@ -191,7 +191,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
}
}
- return NULL;
+ return nullptr;
}
ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions )
@@ -380,10 +380,10 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
,maStrTitleDate ( ScResId( STR_TITLE_DATE ) )
,maStrUnknownUser ( ScResId( STR_UNKNOWN_USER_CONFLICT ) )
,mpViewData ( pViewData )
- ,mpOwnDoc ( NULL )
- ,mpOwnTrack ( NULL )
+ ,mpOwnDoc ( nullptr )
+ ,mpOwnTrack ( nullptr )
,mpSharedDoc ( pSharedDoc )
- ,mpSharedTrack ( NULL )
+ ,mpSharedTrack ( nullptr )
,mrConflictsList ( rConflictsList )
,maDialogSize ( GetSizePixel() )
,mbInSelectHdl ( false )
@@ -395,12 +395,12 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
get(m_pBtnKeepAllOthers, "keepallothers");
OSL_ENSURE( mpViewData, "ScConflictsDlg CTOR: mpViewData is null!" );
- mpOwnDoc = ( mpViewData ? mpViewData->GetDocument() : NULL );
+ mpOwnDoc = ( mpViewData ? mpViewData->GetDocument() : nullptr );
OSL_ENSURE( mpOwnDoc, "ScConflictsDlg CTOR: mpOwnDoc is null!" );
- mpOwnTrack = ( mpOwnDoc ? mpOwnDoc->GetChangeTrack() : NULL );
+ mpOwnTrack = ( mpOwnDoc ? mpOwnDoc->GetChangeTrack() : nullptr );
OSL_ENSURE( mpOwnTrack, "ScConflictsDlg CTOR: mpOwnTrack is null!" );
OSL_ENSURE( mpSharedDoc, "ScConflictsDlg CTOR: mpSharedDoc is null!" );
- mpSharedTrack = ( mpSharedDoc ? mpSharedDoc->GetChangeTrack() : NULL );
+ mpSharedTrack = ( mpSharedDoc ? mpSharedDoc->GetChangeTrack() : nullptr );
OSL_ENSURE( mpSharedTrack, "ScConflictsDlg CTOR: mpSharedTrack is null!" );
SetMinOutputSizePixel( maDialogSize );
@@ -434,7 +434,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
UpdateView();
SvTreeListEntry* pEntry = m_pLbConflicts->First();
- if ( pEntry != NULL )
+ if ( pEntry != nullptr )
{
m_pLbConflicts->Select( pEntry );
}
@@ -600,8 +600,8 @@ IMPL_LINK_NOARG_TYPED(ScConflictsDlg, UpdateSelectionHdl, Idle *, void)
void ScConflictsDlg::SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction )
{
- RedlinData* pUserData = static_cast< RedlinData* >( pRootEntry ? pRootEntry->GetUserData() : NULL );
- ScConflictsListEntry* pConflictEntry = static_cast< ScConflictsListEntry* >( pUserData ? pUserData->pData : NULL );
+ RedlinData* pUserData = static_cast< RedlinData* >( pRootEntry ? pRootEntry->GetUserData() : nullptr );
+ ScConflictsListEntry* pConflictEntry = static_cast< ScConflictsListEntry* >( pUserData ? pUserData->pData : nullptr );
if ( pConflictEntry )
{
pConflictEntry->meConflictAction = eConflictAction;
@@ -611,7 +611,7 @@ void ScConflictsDlg::SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictA
void ScConflictsDlg::KeepHandler( bool bMine )
{
SvTreeListEntry* pEntry = m_pLbConflicts->FirstSelected();
- SvTreeListEntry* pRootEntry = ( pEntry ? m_pLbConflicts->GetRootLevelParent( pEntry ) : NULL );
+ SvTreeListEntry* pRootEntry = ( pEntry ? m_pLbConflicts->GetRootLevelParent( pEntry ) : nullptr );
if ( !pRootEntry )
{
return;
@@ -630,7 +630,7 @@ void ScConflictsDlg::KeepHandler( bool bMine )
void ScConflictsDlg::KeepAllHandler( bool bMine )
{
SvTreeListEntry* pEntry = m_pLbConflicts->First();
- SvTreeListEntry* pRootEntry = ( pEntry ? m_pLbConflicts->GetRootLevelParent( pEntry ) : NULL );
+ SvTreeListEntry* pRootEntry = ( pEntry ? m_pLbConflicts->GetRootLevelParent( pEntry ) : nullptr );
if ( !pRootEntry )
{
return;
@@ -684,7 +684,7 @@ void ScConflictsDlg::UpdateView()
ScChangeActionList::const_iterator aEndShared = aItr->maSharedActions.end();
for ( ScChangeActionList::const_iterator aItrShared = aItr->maSharedActions.begin(); aItrShared != aEndShared; ++aItrShared )
{
- ScChangeAction* pAction = mpSharedTrack ? mpSharedTrack->GetAction(*aItrShared) : NULL;
+ ScChangeAction* pAction = mpSharedTrack ? mpSharedTrack->GetAction(*aItrShared) : nullptr;
if ( pAction )
{
// only display shared top content entries
@@ -698,14 +698,14 @@ void ScConflictsDlg::UpdateView()
}
OUString aString( GetActionString( pAction, mpSharedDoc ) );
- m_pLbConflicts->InsertEntry( aString, static_cast< RedlinData* >( NULL ), pRootEntry );
+ m_pLbConflicts->InsertEntry( aString, static_cast< RedlinData* >( nullptr ), pRootEntry );
}
}
ScChangeActionList::const_iterator aEndOwn = aItr->maOwnActions.end();
for ( ScChangeActionList::const_iterator aItrOwn = aItr->maOwnActions.begin(); aItrOwn != aEndOwn; ++aItrOwn )
{
- ScChangeAction* pAction = mpOwnTrack ? mpOwnTrack->GetAction(*aItrOwn) : NULL;
+ ScChangeAction* pAction = mpOwnTrack ? mpOwnTrack->GetAction(*aItrOwn) : nullptr;
if ( pAction )
{
// only display own top content entries
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 9fde83cf8d42..fed1d44a0feb 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -46,7 +46,7 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
- pEdActive ( NULL ),
+ pEdActive ( nullptr ),
bDlgLostFocus ( false )
{
get(pLbRange,"range");
@@ -458,11 +458,11 @@ void ScColRowNameRangesDlg::UpdateNames()
void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, bool bColName )
{
- ScRangePair* pPair = NULL;
+ ScRangePair* pPair = nullptr;
bool bFound = false;
- if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
+ if ( bColName && (pPair = xColNameRanges->Find( rRange )) != nullptr )
bFound = true;
- else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
+ else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != nullptr )
bFound = true;
if ( bFound )
@@ -501,7 +501,7 @@ bool ScColRowNameRangesDlg::IsRefInputMode() const
// passing the range lists to the document
IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, OkBtnHdl, Button*, void)
{
- AddBtnHdl( 0 );
+ AddBtnHdl( nullptr );
// assign RangeLists to the den references in the document
pDoc->GetColNameRangesRef() = xColNameRanges;
@@ -537,12 +537,12 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, AddBtnHdl, Button*, void)
theCurArea = aRange1;
AdjustColRowData( aRange2 );
ScRangePair* pPair;
- if ( ( pPair = xColNameRanges->Find( theCurArea ) ) != NULL )
+ if ( ( pPair = xColNameRanges->Find( theCurArea ) ) != nullptr )
{
xColNameRanges->Remove( pPair );
delete pPair;
}
- if ( ( pPair = xRowNameRanges->Find( theCurArea ) ) != NULL )
+ if ( ( pPair = xRowNameRanges->Find( theCurArea ) ) != nullptr )
{
xRowNameRanges->Remove( pPair );
delete pPair;
@@ -587,11 +587,11 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void)
return;
const ScRange& rRange = itr->second;
- ScRangePair* pPair = NULL;
+ ScRangePair* pPair = nullptr;
bool bFound = false;
- if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
+ if ( bColName && (pPair = xColNameRanges->Find( rRange )) != nullptr )
bFound = true;
- else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
+ else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != nullptr )
bFound = true;
if ( bFound )
{
@@ -805,7 +805,7 @@ IMPL_LINK_TYPED( ScColRowNameRangesDlg, GetFocusHdl, Control&, rCtrl, void )
else if( (&rCtrl == static_cast<Control*>(pEdAssign2)) || (&rCtrl == static_cast<Control*>(pRbAssign2)) )
pEdActive = pEdAssign2;
else
- pEdActive = NULL;
+ pEdActive = nullptr;
if( pEdActive )
pEdActive->SetSelection( Selection( 0, SELECTION_MAX ) );
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 86923ab3ce32..64dd5de5e165 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -173,8 +173,8 @@ ScDataFormDlg::ScDataFormDlg(vcl::Window* pParent, ScTabViewShell* pTabViewShell
}
else
{
- maFixedTexts.push_back( NULL );
- maEdits.push_back( NULL );
+ maFixedTexts.push_back( nullptr );
+ maEdits.push_back( nullptr );
}
if (maEdits[nIndex] != nullptr)
maEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) );
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index a254a0ee8aa8..c2da83919bc2 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -304,7 +304,7 @@ IMPL_LINK_NOARG_TYPED(ScFillSeriesDlg, OKHdl, Button*, void)
else if ( m_pBtnYear->IsChecked() ) theFillDateCmd = FILL_YEAR;
bool bAllOk = true;
- Edit* pEdWrong = NULL;
+ Edit* pEdWrong = nullptr;
if ( !CheckStartVal() )
{
bAllOk = false;
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 38425944bf5c..020066d7c99f 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -92,7 +92,7 @@ void ScHighlightChgDlg::Init()
OSL_ENSURE( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
m_pFilterCtr->ClearAuthors();
@@ -104,7 +104,7 @@ void ScHighlightChgDlg::Init()
ScChangeViewSettings* pViewSettings=pDoc->GetChangeViewSettings();
- if(pViewSettings!=NULL)
+ if(pViewSettings!=nullptr)
aChangeViewSet=*pViewSettings;
m_pHighlightBox->Check(aChangeViewSet.ShowChanges());
m_pFilterCtr->CheckDate(aChangeViewSet.HasDate());
@@ -185,7 +185,7 @@ bool ScHighlightChgDlg::IsRefInputMode() const
IMPL_LINK_TYPED( ScHighlightChgDlg, HighlightHandle, Button*, pCb, void )
{
- if(pCb!=NULL)
+ if(pCb!=nullptr)
{
if(m_pHighlightBox->IsChecked())
{
@@ -204,7 +204,7 @@ IMPL_LINK_TYPED( ScHighlightChgDlg, HighlightHandle, Button*, pCb, void )
IMPL_LINK_TYPED( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef, void )
{
- if(pRef!=NULL)
+ if(pRef!=nullptr)
{
SetDispatcherLock( true );
m_pEdAssign->Show();
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 410b27a8a538..a84d893b3b98 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -38,8 +38,8 @@ ScInsertTableDlg::ScInsertTableDlg( vcl::Window* pParent, ScViewData& rData, SCT
: ModalDialog(pParent, "InsertSheetDialog", "modules/scalc/ui/insertsheet.ui")
, rViewData(rData)
, rDoc(*rData.GetDocument())
- , pDocShTables(NULL)
- , pDocInserter(NULL)
+ , pDocShTables(nullptr)
+ , pDocInserter(nullptr)
, bMustClose(false)
, nSelTabIndex(0)
, nTableCount(nTabCount)
@@ -209,7 +209,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
const OUString* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
{
- const OUString* pStr = NULL;
+ const OUString* pStr = nullptr;
if ( m_pBtnNew->IsChecked() )
{
@@ -230,7 +230,7 @@ const OUString* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
const OUString* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
{
- const OUString* pStr = NULL;
+ const OUString* pStr = nullptr;
if ( !m_pBtnNew->IsChecked() && nSelTabIndex < m_pLbTables->GetSelectEntryCount() )
{
@@ -353,9 +353,9 @@ IMPL_LINK_TYPED( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pF
{
pDocShTables->DoClose();
aDocShTablesRef.Clear();
- pDocShTables = NULL;
+ pDocShTables = nullptr;
- FillTables_Impl( NULL );
+ FillTables_Impl( nullptr );
m_pFtPath->SetText( EMPTY_OUSTRING );
}
}
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 7baacc499b47..98b1958f8e1c 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -39,8 +39,8 @@
ScLinkedAreaDlg::ScLinkedAreaDlg(vcl::Window* pParent)
: ModalDialog(pParent, "ExternalDataDialog", "modules/scalc/ui/externaldata.ui")
- , pSourceShell(NULL)
- , pDocInserter(NULL)
+ , pSourceShell(nullptr)
+ , pDocInserter(nullptr)
{
get(m_pCbUrl, "url");
@@ -139,7 +139,7 @@ void ScLinkedAreaDlg::LoadDocument( const OUString& rFile, const OUString& rFilt
{
// unload old document
pSourceShell->DoClose();
- pSourceShell = NULL;
+ pSourceShell = nullptr;
aSourceRef.Clear();
}
@@ -252,7 +252,7 @@ IMPL_LINK_TYPED( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFi
else
{
pSourceShell->DoClose();
- pSourceShell = NULL;
+ pSourceShell = nullptr;
aSourceRef.Clear();
m_pCbUrl->SetText( EMPTY_OUSTRING );
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 4d25cdad020a..210830fa7188 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -217,7 +217,7 @@ void ScMoveTableDlg::Init()
void ScMoveTableDlg::InitDocListBox()
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
- ScDocShell* pScSh = NULL;
+ ScDocShell* pScSh = nullptr;
sal_uInt16 nSelPos = 0;
sal_uInt16 i = 0;
OUString aEntryName;
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index cd18e0a1911b..76eac3a7538b 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -186,7 +186,7 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Windo
, mpDocShell(pDocSh)
, mrDoc(pDocSh->GetDocument())
, mnCurTab(aCursorPos.Tab())
- , mpEdActive(NULL)
+ , mpEdActive(nullptr)
, mbDlgLostFocus(false)
, nScrollPos(0)
{
@@ -453,7 +453,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
m_pRbMax->Check();
OUString aCursorStr;
if ( !mrDoc.GetRangeAtBlock( ScRange(rCursorPos), &aCursorStr ) )
- aCursorStr = rCursorPos.Format(SCA_ABS, NULL, mrDoc.GetAddressConvention());
+ aCursorStr = rCursorPos.Format(SCA_ABS, nullptr, mrDoc.GetAddressConvention());
m_pEdObjectiveCell->SetRefString( aCursorStr );
if ( nImplCount > 0 )
maEngine = maImplNames[0]; // use first implementation
@@ -643,8 +643,8 @@ IMPL_LINK_TYPED( ScOptSolverDlg, BtnHdl, Button*, pBtn, void )
IMPL_LINK_TYPED( ScOptSolverDlg, GetFocusHdl, Control&, rCtrl, void )
{
- Edit* pEdit = NULL;
- mpEdActive = NULL;
+ Edit* pEdit = nullptr;
+ mpEdActive = nullptr;
if( &rCtrl == m_pEdObjectiveCell || &rCtrl == m_pRBObjectiveCell )
pEdit = mpEdActive = m_pEdObjectiveCell;
@@ -745,7 +745,7 @@ IMPL_LINK_TYPED( ScOptSolverDlg, CursorUpHdl, ScCursorRefEdit&, rEdit, void )
}
else
{
- formula::RefEdit* pFocus = NULL;
+ formula::RefEdit* pFocus = nullptr;
for ( sal_uInt16 nRow = 1; nRow < EDIT_ROW_COUNT; ++nRow ) // second row or below: move focus
{
if ( &rEdit == mpLeftEdit[nRow] )
@@ -774,7 +774,7 @@ IMPL_LINK_TYPED( ScOptSolverDlg, CursorDownHdl, ScCursorRefEdit&, rEdit, void )
}
else
{
- formula::RefEdit* pFocus = NULL;
+ formula::RefEdit* pFocus = nullptr;
for ( sal_uInt16 nRow = 0; nRow+1 < EDIT_ROW_COUNT; ++nRow ) // before last row: move focus
{
if ( &rEdit == mpLeftEdit[nRow] )
@@ -908,7 +908,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
ScRange aLeftRange;
if ( !ParseRef( aLeftRange, aConstrIter->aLeftStr, true ) )
{
- ShowError( true, NULL );
+ ShowError( true, nullptr );
return false;
}
@@ -924,7 +924,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
bIsRange = true; // same size as "left" range, resolve into single cells
else
{
- ShowError( true, NULL );
+ ShowError( true, nullptr );
return false;
}
}
@@ -937,7 +937,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
else if ( aConstraint.Operator != sheet::SolverConstraintOperator_INTEGER &&
aConstraint.Operator != sheet::SolverConstraintOperator_BINARY )
{
- ShowError( true, NULL );
+ ShowError( true, nullptr );
return false;
}
}
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index d8bd6b757d3f..8d38287f303e 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -28,9 +28,9 @@
ScRedComDialog::ScRedComDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet,
ScDocShell *pShell, ScChangeAction *pAction, bool bPrevNext)
- : pChangeAction(NULL)
- , pDocShell(NULL)
- , pDlg(NULL)
+ : pChangeAction(nullptr)
+ , pDocShell(nullptr)
+ , pDlg(nullptr)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
@@ -55,14 +55,14 @@ ScRedComDialog::~ScRedComDialog()
ScChangeAction *ScRedComDialog::FindPrev(ScChangeAction *pAction)
{
- if(pAction!=NULL && pDocShell !=NULL)
+ if(pAction!=nullptr && pDocShell !=nullptr)
{
ScDocument& rDoc = pDocShell->GetDocument();
ScChangeViewSettings* pSettings = rDoc.GetChangeViewSettings();
pAction=pAction->GetPrev();
- while(pAction!=NULL)
+ while(pAction!=nullptr)
{
if( pAction->GetState()==SC_CAS_VIRGIN &&
pAction->IsDialogRoot() &&
@@ -76,14 +76,14 @@ ScChangeAction *ScRedComDialog::FindPrev(ScChangeAction *pAction)
ScChangeAction *ScRedComDialog::FindNext(ScChangeAction *pAction)
{
- if(pAction!=NULL && pDocShell !=NULL)
+ if(pAction!=nullptr && pDocShell !=nullptr)
{
ScDocument& rDoc = pDocShell->GetDocument();
ScChangeViewSettings* pSettings = rDoc.GetChangeViewSettings();
pAction=pAction->GetNext();
- while(pAction!=NULL)
+ while(pAction!=nullptr)
{
if( pAction->GetState()==SC_CAS_VIRGIN &&
pAction->IsDialogRoot() &&
@@ -98,15 +98,15 @@ ScChangeAction *ScRedComDialog::FindNext(ScChangeAction *pAction)
void ScRedComDialog::ReInit(ScChangeAction *pAction)
{
pChangeAction=pAction;
- if(pChangeAction!=NULL && pDocShell !=NULL)
+ if(pChangeAction!=nullptr && pDocShell !=nullptr)
{
OUString aTitle;
pChangeAction->GetDescription( aTitle, &pDocShell->GetDocument());
pDlg->SetText(aTitle);
aComment=pChangeAction->GetComment();
- bool bNext=FindNext(pChangeAction)!=NULL;
- bool bPrev=FindPrev(pChangeAction)!=NULL;
+ bool bNext=FindNext(pChangeAction)!=nullptr;
+ bool bPrev=FindPrev(pChangeAction)!=nullptr;
pDlg->EnableTravel(bNext,bPrev);
OUString aAuthor = pChangeAction->GetUser();
@@ -127,7 +127,7 @@ short ScRedComDialog::Execute()
if(nRet== RET_OK )
{
- if ( pDocShell!=NULL && pDlg->GetNote() != aComment )
+ if ( pDocShell!=nullptr && pDlg->GetNote() != aComment )
pDocShell->SetChangeComment( pChangeAction, pDlg->GetNote());
}
@@ -136,7 +136,7 @@ short ScRedComDialog::Execute()
void ScRedComDialog::SelectCell()
{
- if(pChangeAction!=NULL)
+ if(pChangeAction!=nullptr)
{
const ScChangeAction* pAction=pChangeAction;
const ScBigRange& rRange = pAction->GetBigRange();
@@ -153,7 +153,7 @@ void ScRedComDialog::SelectCell()
IMPL_LINK_TYPED(ScRedComDialog, PrevHdl, AbstractSvxPostItDialog&, rDlgP, void )
{
- if (pDocShell!=NULL && rDlgP.GetNote() != aComment )
+ if (pDocShell!=nullptr && rDlgP.GetNote() != aComment )
pDocShell->SetChangeComment( pChangeAction, rDlgP.GetNote());
ReInit(FindPrev(pChangeAction));
@@ -162,7 +162,7 @@ IMPL_LINK_TYPED(ScRedComDialog, PrevHdl, AbstractSvxPostItDialog&, rDlgP, void )
IMPL_LINK_TYPED(ScRedComDialog, NextHdl, AbstractSvxPostItDialog&, rDlgP, void )
{
- if ( pDocShell!=NULL && rDlgP.GetNote() != aComment )
+ if ( pDocShell!=nullptr && rDlgP.GetNote() != aComment )
pDocShell->SetChangeComment( pChangeAction, rDlgP.GetNote());
ReInit(FindNext(pChangeAction));
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index 080e8c4eeed1..e7ccc2d025b0 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -34,7 +34,7 @@ ScRetypePassDlg::ScRetypePassDlg(vcl::Window* pParent) :
maTextHashGood(ScResId(STR_HASH_GOOD)),
maTextHashRegen(ScResId(STR_HASH_REGENERATED)),
- mpDocItem(static_cast<ScDocProtection*>(NULL)),
+ mpDocItem(static_cast<ScDocProtection*>(nullptr)),
mnCurScrollPos(0),
meDesiredHash(PASSHASH_SHA1)
{
@@ -270,7 +270,7 @@ IMPL_LINK_NOARG_TYPED(ScRetypePassDlg, OKHdl, Button*, void)
IMPL_LINK_TYPED( ScRetypePassDlg, RetypeBtnHdl, Button*, pBtn, void )
{
- ScPassHashProtectable* pProtected = NULL;
+ ScPassHashProtectable* pProtected = nullptr;
if (pBtn == mpBtnRetypeDoc)
{
// document protection.
@@ -283,7 +283,7 @@ IMPL_LINK_TYPED( ScRetypePassDlg, RetypeBtnHdl, Button*, pBtn, void )
while(aPos < maSheets.size() && pBtn != maSheets[aPos]->GetChild(2))
++aPos;
- pProtected = aPos < maSheets.size() ? maTableItems[aPos].mpProtect.get() : 0;
+ pProtected = aPos < maSheets.size() ? maTableItems[aPos].mpProtect.get() : nullptr;
}
if (!pProtected)
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index c3c54ea560f0..213b93a4cdf4 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -72,10 +72,10 @@ public:
ScShareDocumentDlg::ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewData )
: ModalDialog(pParent, "ShareDocumentDialog", "modules/scalc/ui/sharedocumentdlg.ui")
, mpViewData(pViewData)
- , mpDocShell(NULL)
+ , mpDocShell(nullptr)
{
OSL_ENSURE( mpViewData, "ScShareDocumentDlg CTOR: mpViewData is null!" );
- mpDocShell = ( mpViewData ? mpViewData->GetDocShell() : NULL );
+ mpDocShell = ( mpViewData ? mpViewData->GetDocShell() : nullptr );
OSL_ENSURE( mpDocShell, "ScShareDocumentDlg CTOR: mpDocShell is null!" );
get(m_pCbShare, "share");
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 50309ea5e219..efb13fba9973 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -205,7 +205,7 @@ IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, Button*, void)
{
bAutoReOpen=false;
OUString aResult=m_pEdAssign->GetText();
- aCloseHdl.Call(NULL);
+ aCloseHdl.Call(nullptr);
Link<const OUString&,void> aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
aUnoLink.Call( aResult );
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index bd7965b285cf..0b74046f7c81 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -110,7 +110,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent,
const uno::Sequence<beans::PropertyValue>& rProperties )
: ModalDialog(pParent, "SolverOptionsDialog",
"modules/scalc/ui/solveroptionsdialog.ui")
- , mpCheckButtonData(NULL)
+ , mpCheckButtonData(nullptr)
, maImplNames(rImplNames)
, maDescriptions(rDescriptions)
, maEngine(rEngine)
@@ -251,7 +251,7 @@ void ScSolverOptionsDialog::FillListBox()
mpCheckButtonData = new SvLBoxButtonData(m_pLbSettings);
SvTreeList* pModel = m_pLbSettings->GetModel();
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
for (sal_Int32 nPos=0; nPos<nCount; nPos++)
{
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index bf775e7233de..28df67176ec7 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -48,7 +48,7 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPa
, theVariableCell(aCursorPos)
, pDoc(pDocument)
, nCurTab(aCursorPos.Tab())
- , pEdActive(NULL)
+ , pEdActive(nullptr)
, bDlgLostFocus(false)
, errMsgInvalidVar(ScGlobal::GetRscString(STR_INVALIDVAR))
, errMsgInvalidForm(ScGlobal::GetRscString(STR_INVALIDFORM))
@@ -109,7 +109,7 @@ void ScSolverDlg::Init()
m_pEdVariableCell->SetLoseFocusHdl ( aLink );
m_pRBVariableCell->SetLoseFocusHdl ( aLink );
- OUString aStr(theFormulaCell.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()));
+ OUString aStr(theFormulaCell.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention()));
m_pEdFormulaCell->SetText( aStr );
m_pEdFormulaCell->GrabFocus();
@@ -257,8 +257,8 @@ IMPL_LINK_TYPED( ScSolverDlg, BtnHdl, Button*, pBtn, void )
IMPL_LINK_TYPED( ScSolverDlg, GetFocusHdl, Control&, rCtrl, void )
{
- Edit* pEdit = NULL;
- pEdActive = NULL;
+ Edit* pEdit = nullptr;
+ pEdActive = nullptr;
if( (&rCtrl == static_cast<Control*>(m_pEdFormulaCell)) || (&rCtrl == static_cast<Control*>(m_pRBFormulaCell)) )
pEdit = pEdActive = m_pEdFormulaCell;
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 60b1d6d9751d..a8993d851bd1 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -77,14 +77,14 @@ void ScTabBgColorDlg::GetSelectedColor( Color& rColor ) const
void ScTabBgColorDlg::FillColorValueSets_Impl()
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
XColorListRef pColorList;
sal_uInt16 nSelectedItem = 0;
OSL_ENSURE( pDocSh, "DocShell not found!" );
- if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem(SID_COLOR_TABLE) ) ) )
+ if ( pDocSh && ( nullptr != ( pItem = pDocSh->GetItem(SID_COLOR_TABLE) ) ) )
pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
if ( !pColorList.is() )
pColorList = XColorList::CreateStdColorList();
@@ -135,7 +135,7 @@ IMPL_LINK_NOARG_TYPED(ScTabBgColorDlg, TabBgColorOKHdl_Impl, Button*, void)
ScTabBgColorDlg::ScTabBgColorValueSet::ScTabBgColorValueSet(vcl::Window* pParent, WinBits nStyle)
: SvxColorValueSet(pParent, nStyle)
- , m_pTabBgColorDlg(NULL)
+ , m_pTabBgColorDlg(nullptr)
{
}
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 50d46e222422..d48918b5dac5 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -41,7 +41,7 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPare
, theFormulaCell(rCursorPos)
, pDoc(pDocument)
, nCurTab(theFormulaCell.Tab())
- , pEdActive(NULL)
+ , pEdActive(nullptr)
, bDlgLostFocus(false)
, errMsgNoFormula(ScResId(STR_NOFORMULASPECIFIED))
, errMsgNoColRow(ScResId(STR_NOCOLROW))
@@ -331,7 +331,7 @@ IMPL_LINK_TYPED( ScTabOpDlg, GetFocusHdl, Control&, rCtrl, void )
else if( (&rCtrl == static_cast<Control*>(m_pEdColCell)) || (&rCtrl == static_cast<Control*>(m_pRBColCell)) )
pEdActive = m_pEdColCell;
else
- pEdActive = NULL;
+ pEdActive = nullptr;
if( pEdActive )
pEdActive->SetSelection( Selection( 0, SELECTION_MAX ) );
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index fee5baaba4ba..7c813258f283 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -148,7 +148,7 @@ bool ScNameDefDlg::IsNameValid()
OUString aScope = m_pLbScope->GetSelectEntry();
OUString aName = m_pEdName->GetText();
- ScRangeName* pRangeName = NULL;
+ ScRangeName* pRangeName = nullptr;
if(aScope == maGlobalNameStr)
{
pRangeName = maRangeMap.find(OUString(STR_GLOBAL_RANGE_NAME))->second;
@@ -207,7 +207,7 @@ void ScNameDefDlg::AddPushed()
return;
}
- ScRangeName* pRangeName = NULL;
+ ScRangeName* pRangeName = nullptr;
if(aScope == maGlobalNameStr)
{
pRangeName = maRangeMap.find(OUString(STR_GLOBAL_RANGE_NAME))->second;
@@ -244,7 +244,7 @@ void ScNameDefDlg::AddPushed()
if ( 0 == pNewEntry->GetErrCode() )
{
if ( !pRangeName->insert( pNewEntry ) )
- pNewEntry = NULL;
+ pNewEntry = nullptr;
if (mbUndo)
{
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 655fce68b964..0a557a627586 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -62,7 +62,7 @@ ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent,
ShowTable();
SetSelectionMode(MULTIPLE_SELECTION);
SetScrolledHdl( LINK( this, ScRangeManagerTable, ScrollHdl ) );
- HeaderEndDragHdl(NULL);
+ HeaderEndDragHdl(nullptr);
}
void ScRangeManagerTable::Resize()
@@ -100,7 +100,7 @@ void ScRangeManagerTable::setColWidths()
rHeaderBar.SetItemSize( ITEMID_SCOPE, nTabSize);
static long aStaticTabs[] = {3, 0, nTabSize, 2*nTabSize };
SetTabs( &aStaticTabs[0], MAP_PIXEL );
- HeaderEndDragHdl(NULL);
+ HeaderEndDragHdl(nullptr);
}
ScRangeManagerTable::~ScRangeManagerTable()
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 0247cdffeb39..29535bd4b2f2 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -82,7 +82,7 @@ bool ScContentTree::bIsInDrag = false;
ScDocShell* ScContentTree::GetManualOrCurrent()
{
- ScDocShell* pSh = NULL;
+ ScDocShell* pSh = nullptr;
if ( !aManualDoc.isEmpty() )
{
SfxObjectShell* pObjSh = SfxObjectShell::GetFirst( checkSfxObjectShell<ScDocShell> );
@@ -116,7 +116,7 @@ ScContentTree::ScContentTree( vcl::Window* pParent, const ResId& rResId ) :
aEntryImages ( ScResId( RID_IMAGELIST_NAVCONT ) ),
nRootType ( ScContentId::ROOT ),
bHiddenDoc ( false ),
- pHiddenDocument ( NULL ),
+ pHiddenDocument ( nullptr ),
bisInNavigatoeDlg ( false )
{
sal_uInt16 i;
@@ -125,7 +125,7 @@ ScContentTree::ScContentTree( vcl::Window* pParent, const ResId& rResId ) :
pParentWindow = static_cast<ScNavigatorDlg*>(pParent);
- pRootNodes[ScContentId::ROOT] = NULL;
+ pRootNodes[ScContentId::ROOT] = nullptr;
for (i=1; i<(int)ScContentId::LAST; i++)
InitRoot((ScContentId)i);
@@ -133,7 +133,7 @@ ScContentTree::ScContentTree( vcl::Window* pParent, const ResId& rResId ) :
SetDoubleClickHdl( LINK( this, ScContentTree, ContentDoubleClickHdl ) );
- pTmpEntry= NULL;
+ pTmpEntry= nullptr;
m_bFirstPaint=true;
SetStyle( GetStyle() | WB_QUICK_SEARCH );
@@ -163,7 +163,7 @@ OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltT
case ScContentId::GRAPHIC:
case ScContentId::DRAWING:
{
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
ScDocument* pDoc = ( const_cast< ScContentTree* >(this) )->GetSourceDocument();
SdrIterMode eIter = ( nType == ScContentId::DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
@@ -222,7 +222,7 @@ void ScContentTree::InitRoot( ScContentId nType )
if ( nRootType != ScContentId::ROOT && nRootType != nType ) // ausgeblendet ?
{
- pRootNodes[nType] = NULL;
+ pRootNodes[nType] = nullptr;
return;
}
@@ -230,7 +230,7 @@ void ScContentTree::InitRoot( ScContentId nType )
OUString aName( ScResId( SCSTR_CONTENT_ROOT + (int)nType ) );
// wieder an die richtige Position:
sal_uInt16 nPos = nRootType != ScContentId::ROOT ? 0 : pPosList[nType]-1;
- SvTreeListEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, false, nPos );
+ SvTreeListEntry* pNew = InsertEntry( aName, rImage, rImage, nullptr, false, nPos );
pRootNodes[nType] = pNew;
}
@@ -454,7 +454,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
Expand( pEntry );
}
else
- ContentDoubleClickHdl(0); // select content as if double clicked
+ ContentDoubleClickHdl(nullptr); // select content as if double clicked
}
bUsed = true;
@@ -488,18 +488,18 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
vcl::Window* pWindow=reinterpret_cast<vcl::Window*>(GetParent(pEntry));
ScNavigatorDlg* pScNavigatorDlg = static_cast<ScNavigatorDlg*>(pWindow);
- ScTabViewShell* pScTabViewShell = NULL;
- ScDrawView* pScDrawView = NULL;
- if (pScNavigatorDlg!=NULL)
+ ScTabViewShell* pScTabViewShell = nullptr;
+ ScDrawView* pScDrawView = nullptr;
+ if (pScNavigatorDlg!=nullptr)
pScTabViewShell = ScNavigatorDlg::GetTabViewShell();
- if(pScTabViewShell !=NULL)
+ if(pScTabViewShell !=nullptr)
pScDrawView =pScTabViewShell->GetViewData().GetScDrawView();
- if(pScDrawView!=NULL)
+ if(pScDrawView!=nullptr)
{
pScDrawView->SelectCurrentViewObject(aText );
bool bHasMakredObject = false;
SvTreeListEntry* pParent = pRootNodes[nType];
- SvTreeListEntry* pBeginEntry = NULL;
+ SvTreeListEntry* pBeginEntry = nullptr;
if( pParent )
pBeginEntry = FirstChild(pParent);
while( pBeginEntry )
@@ -570,7 +570,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
// den StarView MouseMove-Handler, der Command() aufruft, umbringen.
// Deshalb Drag&Drop asynchron:
- Application::PostUserEvent( LINK( this, ScContentTree, ExecDragHdl ), NULL, true );
+ Application::PostUserEvent( LINK( this, ScContentTree, ExecDragHdl ), nullptr, true );
bDone = true;
break;
@@ -722,7 +722,7 @@ ScDocument* ScContentTree::GetSourceDocument()
return &pSh->GetDocument();
}
- return NULL;
+ return nullptr;
}
//Move along and draw "*" sign .
@@ -741,8 +741,8 @@ void ScContentTree::ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry )
if( pEntry )
{
SvTreeListEntry* pParent = pRootNodes[nType];
- SvTreeListEntry* pBeginEntry = NULL;
- SvTreeListEntry* pOldEntry = NULL;
+ SvTreeListEntry* pBeginEntry = nullptr;
+ SvTreeListEntry* pOldEntry = nullptr;
if( pParent )
pBeginEntry = FirstChild(pParent);
while( pBeginEntry )
@@ -964,19 +964,19 @@ void ScContentTree::GetDrawNames( ScContentId nType )
SvTreeListEntry* pChild=InsertEntry( aName, pParent );
if(pChild)
pChild->SetMarked(false);
- vcl::Window* pWindow=NULL;
- ScTabViewShell* pScTabViewShell=NULL;
- ScDrawView* pScDrawView=NULL;
- ScNavigatorDlg* pScNavigatorDlg=NULL;
+ vcl::Window* pWindow=nullptr;
+ ScTabViewShell* pScTabViewShell=nullptr;
+ ScDrawView* pScDrawView=nullptr;
+ ScNavigatorDlg* pScNavigatorDlg=nullptr;
if(pChild)
pWindow=reinterpret_cast<vcl::Window*>(GetParent(pChild));
if(pWindow)
pScNavigatorDlg = static_cast<ScNavigatorDlg*>(pWindow);
- if (pScNavigatorDlg!=NULL)
+ if (pScNavigatorDlg!=nullptr)
pScTabViewShell = ScNavigatorDlg::GetTabViewShell();
- if(pScTabViewShell !=NULL)
+ if(pScTabViewShell !=nullptr)
pScDrawView =pScTabViewShell->GetViewData().GetScDrawView();
- if(pScDrawView!=NULL)
+ if(pScDrawView!=nullptr)
{
bool bMarked =pScDrawView->GetObjectIsMarked(pObject);
pChild->SetMarked( bMarked );
@@ -1038,7 +1038,7 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return NULL;
+ return nullptr;
sal_uLong nFound = 0;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
@@ -1057,7 +1057,7 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
}
OSL_FAIL("link not found");
- return NULL;
+ return nullptr;
}
static OUString lcl_NoteString( const ScPostIt& rNote )
@@ -1249,7 +1249,7 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const OUString& rName, ScCo
pTransferObj->SetDragSourceObj( pObject, nTab );
pTransferObj->SetDragSourceFlags( SC_DROP_NAVIGATOR );
- SC_MOD()->SetDragObject( NULL, pTransferObj );
+ SC_MOD()->SetDragObject( nullptr, pTransferObj );
pWin->ReleaseMouse();
pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -1283,7 +1283,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_u
pTransferObj->SetDragSource( pSrcShell, aMark );
pTransferObj->SetDragSourceFlags( nFlags );
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
pWin->ReleaseMouse();
pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -1291,7 +1291,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_u
void ScContentTree::DoDrag()
{
- ScDocumentLoader* pDocLoader = NULL;
+ ScDocumentLoader* pDocLoader = nullptr;
bIsInDrag = true;
ScModule* pScMod = SC_MOD();
@@ -1309,7 +1309,7 @@ void ScContentTree::DoDrag()
{
OUString aText( GetEntryText( pEntry ) );
- ScDocument* pLocalDoc = NULL; // fuer URL-Drop
+ ScDocument* pLocalDoc = nullptr; // fuer URL-Drop
OUString aDocName;
if (bHiddenDoc)
aDocName = aHiddenName;
@@ -1375,7 +1375,7 @@ void ScContentTree::DoDrag()
break;
case SC_DROPMODE_COPY:
{
- ScDocShell* pSrcShell = NULL;
+ ScDocShell* pSrcShell = nullptr;
if ( bHiddenDoc )
{
OUString aFilter, aOptions;
@@ -1468,7 +1468,7 @@ bool ScContentTree::LoadFile( const OUString& rUrl )
Refresh(); // Inhalte aus geladenem Dokument holen
- pHiddenDocument = NULL;
+ pHiddenDocument = nullptr;
pParentWindow->GetDocNames( &aHiddenTitle ); // Liste fuellen
}
@@ -1639,7 +1639,7 @@ void ScContentTree::ApplyNavigatorSettings()
// select
if( nRootSel == nEntry )
{
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
if( bExp && (nChildSel != SC_CONTENT_NOCHILD) )
pEntry = GetEntry( pRootNodes[ nEntry ], nChildSel );
Select( pEntry ? pEntry : pRootNodes[ nEntry ] );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 0b564f1c93bd..2c1f1608cd7f 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -564,8 +564,8 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
aStrDisplay ( ScResId( STR_DISPLAY ) ),
aStrActiveWin( ScResId( STR_ACTIVEWIN ) ),
pContextWin ( pCW ),
- pMarkArea ( NULL ),
- pViewData ( NULL ),
+ pMarkArea ( nullptr ),
+ pViewData ( nullptr ),
nListModeHeight( 0 ),
nInitListHeight( 0 ),
eListMode ( NAV_LMODE_NONE ),
@@ -662,7 +662,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
aTbxCmd->SetAccessibleRelationLabeledBy(aTbxCmd.get());
aLbDocuments->SetAccessibleName(aStrActiveWin);
- if (pContextWin == NULL)
+ if (pContextWin == nullptr)
{
// When the context window is missing then the navigator is
// displayed in the sidebar and has the whole deck to fill.
@@ -706,7 +706,7 @@ void ScNavigatorDlg::dispose()
void ScNavigatorDlg::Resizing( Size& rNewSize ) // Size = Outputsize?
{
- FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
+ FloatingWindow* pFloat = pContextWin!=nullptr ? pContextWin->GetFloatingWindow() : nullptr;
if ( pFloat )
{
Size aMinOut = pFloat->GetMinOutputSizePixel();
@@ -810,7 +810,7 @@ void ScNavigatorDlg::DoResize()
aLbDocuments->SetSizePixel( aDocSize );
bool bListMode = (eListMode != NAV_LMODE_NONE);
- if (pContextWin != NULL)
+ if (pContextWin != nullptr)
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
if ( pFloat && bListMode )
@@ -1001,15 +1001,15 @@ ScNavigatorSettings* ScNavigatorDlg::GetNavigatorSettings()
// be forgotten when the view is closed.
ScTabViewShell* pViewSh = GetTabViewShell();
- return pViewSh ? pViewSh->GetNavigatorSettings() : NULL;
+ return pViewSh ? pViewSh->GetNavigatorSettings() : nullptr;
}
bool ScNavigatorDlg::GetViewData()
{
ScTabViewShell* pViewSh = GetTabViewShell();
- pViewData = pViewSh ? &pViewSh->GetViewData() : NULL;
+ pViewData = pViewSh ? &pViewSh->GetViewData() : nullptr;
- return ( pViewData != NULL );
+ return ( pViewData != nullptr );
}
void ScNavigatorDlg::UpdateColumn( const SCCOL* pCol )
@@ -1107,7 +1107,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, bool bSetSize )
void ScNavigatorDlg::ShowList( bool bShow, bool bSetSize )
{
- FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
+ FloatingWindow* pFloat = pContextWin!=nullptr ? pContextWin->GetFloatingWindow() : nullptr;
Size aSize = GetParent()->GetOutputSizePixel();
if ( bShow )
@@ -1142,7 +1142,7 @@ void ScNavigatorDlg::ShowList( bool bShow, bool bSetSize )
else
{
SfxNavigator* pNav = dynamic_cast<SfxNavigator*>(GetParent());
- if (pNav != NULL)
+ if (pNav != nullptr)
{
Size aFloating = pNav->GetFloatingSize();
aFloating.Height() = aSize.Height();
@@ -1153,7 +1153,7 @@ void ScNavigatorDlg::ShowList( bool bShow, bool bSetSize )
void ScNavigatorDlg::ShowScenarios( bool bShow, bool bSetSize )
{
- FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL;
+ FloatingWindow* pFloat = pContextWin!=nullptr ? pContextWin->GetFloatingWindow() : nullptr;
Size aSize = GetParent()->GetOutputSizePixel();
if ( bShow )
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 322a154c9965..501c2c1107d7 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -161,7 +161,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt )
const ScScenarioListBox::ScenarioEntry* ScScenarioListBox::GetSelectedEntry() const
{
size_t nPos = GetSelectEntryPos();
- return (nPos < maEntries.size()) ? &maEntries[ nPos ] : 0;
+ return (nPos < maEntries.size()) ? &maEntries[ nPos ] : nullptr;
}
void ScScenarioListBox::ExecuteScenarioSlot( sal_uInt16 nSlotId )
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index 078829c159b6..b854ae1f0f07 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -68,7 +68,7 @@ bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
void ScTpDefaultsOptions::Reset(const SfxItemSet* rCoreSet)
{
ScDefaultsOptions aOpt;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCDEFAULTSOPTIONS, false , &pItem))
aOpt = static_cast<const ScTpDefaultsItem*>(pItem)->GetDefaultsOptions();
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 789555d2ad0a..70f913983fd2 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -308,7 +308,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet)
{
ScFormulaOptions aOpt;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCFORMULAOPTIONS, false , &pItem))
aOpt = static_cast<const ScTpFormulaItem*>(pItem)->GetFormulaOptions();
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 47db07a3a697..9a4ff48aeea8 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -55,9 +55,9 @@ ScTpUserLists::ScTpUserLists( vcl::Window* pParent,
aStrCopyFrom ( ScGlobal::GetRscString( STR_COPYFROM ) ),
aStrCopyErr ( ScGlobal::GetRscString( STR_COPYERR ) ),
nWhichUserLists ( GetWhich( SID_SCUSERLISTS ) ),
- pUserLists ( NULL ),
- pDoc ( NULL ),
- pViewData ( NULL ),
+ pUserLists ( nullptr ),
+ pDoc ( nullptr ),
+ pViewData ( nullptr ),
pRangeUtil ( new ScRangeUtil ),
bModifyMode ( false ),
bCancelMode ( false ),
@@ -222,13 +222,13 @@ bool ScTpUserLists::FillItemSet( SfxItemSet* rCoreAttrs )
ScUserList* pCoreList = rUserListItem.GetUserList();
bool bDataModified = false;
- if ( (pUserLists == NULL) && (pCoreList == NULL) )
+ if ( (pUserLists == nullptr) && (pCoreList == nullptr) )
{
bDataModified = false;
}
- else if ( pUserLists != NULL )
+ else if ( pUserLists != nullptr )
{
- if ( pCoreList != NULL )
+ if ( pCoreList != nullptr )
bDataModified = (*pUserLists != *pCoreList);
else
bDataModified = true;
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 740702a5d2e2..64550727f236 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -40,7 +40,7 @@
ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent,
const SfxItemSet& rArgSet ) :
SfxTabPage(pParent, "TpViewPage", "modules/scalc/ui/tpviewpage.ui", &rArgSet),
- pLocalOptions(0)
+ pLocalOptions(nullptr)
{
get(pGridLB,"grid");
get(pColorFT,"color_label");
@@ -373,7 +373,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( vcl::Window* pParent,
SfxTabPage( pParent, "ScGeneralPage",
"modules/scalc/ui/scgeneralpage.ui", &rArgSet),
aUnitArr( ScResId(SCSTR_UNIT )),
- pDoc(NULL)
+ pDoc(nullptr)
{
get( m_pUnitLB, "unitlb");
get( m_pTabMF, "tabmf");
@@ -458,7 +458,7 @@ VclPtr<SfxTabPage> ScTpLayoutOptions::Create( vcl::Window* pParent,
VclPtrInstance<ScTpLayoutOptions> pNew( pParent, *rCoreSet );
ScDocShell* pDocSh = dynamic_cast< ScDocShell *>( SfxObjectShell::Current() );
- if(pDocSh!=NULL)
+ if(pDocSh!=nullptr)
pNew->SetDocument(&pDocSh->GetDocument());
return pNew;
}
@@ -596,7 +596,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet )
ScLkUpdMode nSet=LM_UNKNOWN;
- if(pDoc!=NULL)
+ if(pDoc!=nullptr)
{
nSet=pDoc->GetLinkMode();
}
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index ec32d3fd4c33..07e270c9b72f 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -93,8 +93,8 @@ static void printAddressFlags(sal_uInt16 nFlag)
ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent )
: ScAnyRefDlg(pB, pCW, pParent, "PrintAreasDialog", "modules/scalc/ui/printareasdialog.ui")
, bDlgLostFocus(false)
- , pDoc(NULL)
- , pViewData(NULL)
+ , pDoc(nullptr)
+ , pViewData(nullptr)
, nCurTab(0)
{
get(pLbPrintArea,"lbprintarea");
@@ -367,11 +367,11 @@ bool ScPrintAreasDlg::Impl_CheckRefStrings()
bool bRepeatRowOk = aStrRepeatRow.isEmpty();
if ( !bRepeatRowOk )
- bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, NULL);
+ bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, nullptr);
bool bRepeatColOk = aStrRepeatCol.isEmpty();
if ( !bRepeatColOk )
- bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, NULL);
+ bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, nullptr);
// Fehlermeldungen
@@ -379,7 +379,7 @@ bool ScPrintAreasDlg::Impl_CheckRefStrings()
if ( !bOk )
{
- Edit* pEd = NULL;
+ Edit* pEd = nullptr;
if ( !bPrintAreaOk ) pEd = pEdPrintArea;
else if ( !bRepeatRowOk ) pEd = pEdRepeatRow;
@@ -543,7 +543,7 @@ IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_SelectHdl, ListBox&, rLb, void )
{
ListBox* pLb = &rLb;
const sal_Int32 nSelPos = pLb->GetSelectEntryPos();
- Edit* pEd = NULL;
+ Edit* pEd = nullptr;
// list box positions of specific entries, default to "repeat row/column" list boxes
sal_Int32 nAllSheetPos = SC_AREASDLG_RR_NONE;
@@ -576,7 +576,7 @@ IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_SelectHdl, ListBox&, rLb, void )
IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_ModifyHdl, Edit&, rEd, void )
{
- ListBox* pLb = NULL;
+ ListBox* pLb = nullptr;
// list box positions of specific entries, default to "repeat row/column" list boxes
sal_Int32 nUserDefPos = SC_AREASDLG_RR_USER;
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index b2383f2b7943..14ddddbf1df4 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -64,8 +64,8 @@ ScHFEditHeaderDlg::ScHFEditHeaderDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"HeaderDialog", "modules/scalc/ui/headerdialog.ui" )
{
- AddTabPage( "headerright", ScRightHeaderEditPage::Create, NULL );
- AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, NULL );
+ AddTabPage( "headerright", ScRightHeaderEditPage::Create, nullptr );
+ AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, nullptr );
}
ScHFEditFooterDlg::ScHFEditFooterDlg( SfxViewFrame* pFrameP,
@@ -75,8 +75,8 @@ ScHFEditFooterDlg::ScHFEditFooterDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"FooterDialog", "modules/scalc/ui/footerdialog.ui" )
{
- AddTabPage( "footerright", ScRightFooterEditPage::Create, NULL );
- AddTabPage( "footerleft", ScLeftFooterEditPage::Create, NULL );
+ AddTabPage( "footerright", ScRightFooterEditPage::Create, nullptr );
+ AddTabPage( "footerleft", ScLeftFooterEditPage::Create, nullptr );
}
ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg( SfxViewFrame* pFrameP,
@@ -86,7 +86,7 @@ ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"LeftHeaderDialog", "modules/scalc/ui/leftheaderdialog.ui" )
{
- AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, NULL );
+ AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, nullptr );
}
ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg( SfxViewFrame* pFrameP,
@@ -96,7 +96,7 @@ ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"RightHeaderDialog", "modules/scalc/ui/rightheaderdialog.ui" )
{
- AddTabPage( "headerright", ScRightHeaderEditPage::Create, NULL );
+ AddTabPage( "headerright", ScRightHeaderEditPage::Create, nullptr );
}
ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg( SfxViewFrame* pFrameP,
@@ -106,7 +106,7 @@ ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"LeftFooterDialog", "modules/scalc/ui/leftfooterdialog.ui" )
{
- AddTabPage( "footerleft", ScLeftFooterEditPage::Create, NULL );
+ AddTabPage( "footerleft", ScLeftFooterEditPage::Create, nullptr );
}
ScHFEditRightFooterDlg::ScHFEditRightFooterDlg( SfxViewFrame* pFrameP,
@@ -116,7 +116,7 @@ ScHFEditRightFooterDlg::ScHFEditRightFooterDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"RightFooterDialog", "modules/scalc/ui/rightfooterdialog.ui" )
{
- AddTabPage( "footerright", ScRightFooterEditPage::Create, NULL );
+ AddTabPage( "footerright", ScRightFooterEditPage::Create, nullptr );
}
ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg( SfxViewFrame* pFrameP,
@@ -126,9 +126,9 @@ ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"SharedHeaderDialog", "modules/scalc/ui/sharedheaderdialog.ui" )
{
- AddTabPage( "header", ScRightHeaderEditPage::Create, NULL );
- AddTabPage( "footerright", ScRightFooterEditPage::Create, NULL );
- AddTabPage( "footerleft", ScLeftFooterEditPage::Create, NULL );
+ AddTabPage( "header", ScRightHeaderEditPage::Create, nullptr );
+ AddTabPage( "footerright", ScRightFooterEditPage::Create, nullptr );
+ AddTabPage( "footerleft", ScLeftFooterEditPage::Create, nullptr );
}
ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg( SfxViewFrame* pFrameP,
@@ -138,9 +138,9 @@ ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"SharedFooterDialog", "modules/scalc/ui/sharedfooterdialog.ui" )
{
- AddTabPage( "headerright", ScRightHeaderEditPage::Create, NULL );
- AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, NULL );
- AddTabPage( "footer", ScRightFooterEditPage::Create, NULL );
+ AddTabPage( "headerright", ScRightHeaderEditPage::Create, nullptr );
+ AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, nullptr );
+ AddTabPage( "footer", ScRightFooterEditPage::Create, nullptr );
}
ScHFEditAllDlg::ScHFEditAllDlg( SfxViewFrame* pFrameP,
@@ -150,10 +150,10 @@ ScHFEditAllDlg::ScHFEditAllDlg( SfxViewFrame* pFrameP,
: ScHFEditDlg( pFrameP, pParent, rCoreSet, rPageStyle,
"AllHeaderFooterDialog", "modules/scalc/ui/allheaderfooterdialog.ui" )
{
- AddTabPage( "headerright", ScRightHeaderEditPage::Create, NULL );
- AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, NULL );
- AddTabPage( "footerright", ScRightFooterEditPage::Create, NULL );
- AddTabPage( "footerleft", ScLeftFooterEditPage::Create, NULL );
+ AddTabPage( "headerright", ScRightHeaderEditPage::Create, nullptr );
+ AddTabPage( "headerleft", ScLeftHeaderEditPage::Create, nullptr );
+ AddTabPage( "footerright", ScRightFooterEditPage::Create, nullptr );
+ AddTabPage( "footerleft", ScLeftFooterEditPage::Create, nullptr );
}
ScHFEditActiveDlg::ScHFEditActiveDlg( SfxViewFrame* pFrameP,
@@ -172,8 +172,8 @@ ScHFEditActiveDlg::ScHFEditActiveDlg( SfxViewFrame* pFrameP,
if ( bRightPage )
{
- AddTabPage( "header", ScRightHeaderEditPage::Create, NULL );
- AddTabPage( "footer", ScRightFooterEditPage::Create, NULL );
+ AddTabPage( "header", ScRightHeaderEditPage::Create, nullptr );
+ AddTabPage( "footer", ScRightFooterEditPage::Create, nullptr );
}
else
{
@@ -181,15 +181,15 @@ ScHFEditActiveDlg::ScHFEditActiveDlg( SfxViewFrame* pFrameP,
bool bShareHeader = IS_SHARE_HEADER(rCoreSet);
if ( bShareHeader )
- AddTabPage( "header", ScRightHeaderEditPage::Create, NULL );
+ AddTabPage( "header", ScRightHeaderEditPage::Create, nullptr );
else
- AddTabPage( "header", ScLeftHeaderEditPage::Create, NULL );
+ AddTabPage( "header", ScLeftHeaderEditPage::Create, nullptr );
bool bShareFooter = IS_SHARE_FOOTER(rCoreSet);
if ( bShareFooter )
- AddTabPage( "footer", ScRightFooterEditPage::Create, NULL );
+ AddTabPage( "footer", ScRightFooterEditPage::Create, nullptr );
else
- AddTabPage( "footer", ScLeftFooterEditPage::Create, NULL );
+ AddTabPage( "footer", ScLeftFooterEditPage::Create, nullptr );
}
}
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index d33cea554748..2b2192f71af8 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -51,7 +51,7 @@
// STATIC DATA -----------------------------------------------------------
-static VclPtr<ScEditWindow> pActiveEdWnd = NULL;
+static VclPtr<ScEditWindow> pActiveEdWnd = nullptr;
// class ScHFEditPage
@@ -193,7 +193,7 @@ void ScHFEditPage::SetNumType(SvxNumType eNumType)
void ScHFEditPage::Reset( const SfxItemSet* rCoreSet )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if ( rCoreSet->HasItem(nWhich, &pItem) )
{
const ScPageHFItem& rItem = static_cast<const ScPageHFItem&>(*pItem);
@@ -253,8 +253,8 @@ void ScHFEditPage::InitPreDefinedList()
{
SvtUserOptions aUserOpt;
- Color* pTxtColour = NULL;
- Color* pFldColour = NULL;
+ Color* pTxtColour = nullptr;
+ Color* pFldColour = nullptr;
// Get the all field values at the outset.
OUString aPageFieldValue(m_pWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 716e5238debd..614da79e5395 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -47,7 +47,7 @@ ScHFPage::ScHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSe
ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
ATTR_PAGE, ATTR_PAGE, 0 ),
nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ),
- pStyleDlg ( NULL )
+ pStyleDlg ( nullptr )
{
get(m_pBtnEdit, "buttonEdit");
@@ -91,7 +91,7 @@ void ScHFPage::dispose()
void ScHFPage::Reset( const SfxItemSet* rSet )
{
SvxHFPage::Reset( rSet );
- TurnOnHdl( 0 );
+ TurnOnHdl( nullptr );
}
bool ScHFPage::FillItemSet( SfxItemSet* rOutSet )
@@ -163,7 +163,7 @@ IMPL_LINK_NOARG_TYPED(ScHFPage, BtnHdl, Button*, void)
// the GrabFocus from the Edit-Dialog under OS/2 doesn't work.(Bug #41805#).
// With the new StarView, this workaround should be again considered!
- Application::PostUserEvent( LINK( this, ScHFPage, HFEditHdl ), NULL, true );
+ Application::PostUserEvent( LINK( this, ScHFPage, HFEditHdl ), nullptr, true );
}
IMPL_LINK_NOARG_TYPED(ScHFPage, HFEditHdl, void*, void)
@@ -207,17 +207,17 @@ IMPL_LINK_NOARG_TYPED(ScHFPage, HFEditHdl, void*, void)
{
aText = ScGlobal::GetRscString( STR_PAGEHEADER );
if ( bRightPage )
- pDlg->SetTabPage( ScRightHeaderEditPage::Create( pDlg->get_content_area(), &aDataSet ), NULL, nSettingsId );
+ pDlg->SetTabPage( ScRightHeaderEditPage::Create( pDlg->get_content_area(), &aDataSet ), nullptr, nSettingsId );
else
- pDlg->SetTabPage( ScLeftHeaderEditPage::Create( pDlg->get_content_area(), &aDataSet ), NULL, nSettingsId );
+ pDlg->SetTabPage( ScLeftHeaderEditPage::Create( pDlg->get_content_area(), &aDataSet ), nullptr, nSettingsId );
}
else
{
aText = ScGlobal::GetRscString( STR_PAGEFOOTER );
if ( bRightPage )
- pDlg->SetTabPage( ScRightFooterEditPage::Create( pDlg->get_content_area(), &aDataSet ), NULL, nSettingsId );
+ pDlg->SetTabPage( ScRightFooterEditPage::Create( pDlg->get_content_area(), &aDataSet ), nullptr, nSettingsId );
else
- pDlg->SetTabPage( ScLeftFooterEditPage::Create( pDlg->get_content_area(), &aDataSet ), NULL, nSettingsId );
+ pDlg->SetTabPage( ScLeftFooterEditPage::Create( pDlg->get_content_area(), &aDataSet ), nullptr, nSettingsId );
}
SvxNumType eNumType = static_cast<const SvxPageItem&>(aDataSet.Get(ATTR_PAGE)).GetNumType();
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 24932223c6f1..b5f8bf87e401 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -48,7 +48,7 @@
#include <memory>
// STATIC DATA -----------------------------------------------------------
-static VclPtr<ScEditWindow> pActiveEdWnd = NULL;
+static VclPtr<ScEditWindow> pActiveEdWnd = nullptr;
ScEditWindow* GetScEditWindow ()
{
@@ -72,7 +72,7 @@ static void lcl_GetFieldData( ScHeaderFieldData& rData )
ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLocation eLoc )
: Control( pParent, nBits ),
eLocation(eLoc),
- pAcc(NULL)
+ pAcc(nullptr)
{
EnableRTL(false);
@@ -198,7 +198,7 @@ void ScEditWindow::SetCharAttributes()
if ( pDocSh && pViewSh )
{
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(true);
+ if(pTabViewSh!=nullptr) pTabViewSh->SetInFormatDialog(true);
SfxItemSet aSet( pEdView->GetAttribs() );
@@ -216,7 +216,7 @@ void ScEditWindow::SetCharAttributes()
pEdView->SetAttribs( aSet );
}
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(false);
+ if(pTabViewSh!=nullptr) pTabViewSh->SetInFormatDialog(false);
}
}
@@ -291,7 +291,7 @@ void ScEditWindow::GetFocus()
pAcc->GotFocus();
}
else
- pAcc = NULL;
+ pAcc = nullptr;
Control::GetFocus();
}
@@ -304,7 +304,7 @@ void ScEditWindow::LoseFocus()
pAcc->LostFocus();
}
else
- pAcc = NULL;
+ pAcc = nullptr;
Control::LoseFocus();
}
@@ -338,7 +338,7 @@ css::uno::Reference< css::accessibility::XAccessible > ScEditWindow::CreateAcces
}
ScExtIButton::ScExtIButton(vcl::Window* pParent, WinBits nBits )
- : ImageButton(pParent,nBits), pPopupMenu(NULL)
+ : ImageButton(pParent,nBits), pPopupMenu(nullptr)
{
nSelected=0;
aIdle.SetPriority(SchedulerPriority::LOWEST);
@@ -382,7 +382,7 @@ void ScExtIButton::StartPopup()
nSelected=0;
aSelectedIdent.clear();
- if(pPopupMenu!=NULL)
+ if(pPopupMenu!=nullptr)
{
SetPressed( true );
EndSelection();
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 7f308af58276..f7eddeb31822 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -176,7 +176,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet )
sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,*rCoreSet);
m_pBtnPageNo->Check( nPage != 0 );
m_pEdPageNo->SetValue( (nPage != 0) ? nPage : 1 );
- PageNoHdl( NULL );
+ PageNoHdl( nullptr );
// object representation:
m_pBtnCharts->Check( GET_SHOW( SID_SCATTR_PAGE_CHARTS, *rCoreSet ) );
@@ -226,7 +226,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet )
m_pEdScaleAll->SetValue( 100 );
}
- PageDirHdl( NULL );
+ PageDirHdl( nullptr );
ScaleHdl( *m_pLbScaleMode.get() );
// remember for FillItemSet
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 6f8a5e6a4e94..4def79cbe17b 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -232,12 +232,12 @@ VclPtr<vcl::Window> AlignmentPropertyPanel::Create (
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw lang::IllegalArgumentException("no parent Window given to AlignmentPropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw lang::IllegalArgumentException("no parent Window given to AlignmentPropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw lang::IllegalArgumentException("no XFrame given to AlignmentPropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw lang::IllegalArgumentException("no SfxBindings given to AlignmentPropertyPanel::Create", NULL, 2);
+ throw lang::IllegalArgumentException("no XFrame given to AlignmentPropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw lang::IllegalArgumentException("no SfxBindings given to AlignmentPropertyPanel::Create", nullptr, 2);
return VclPtr<AlignmentPropertyPanel>::Create(
pParent, rxFrame, pBindings);
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 7d44922d0c1e..f4f78f1ed37a 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -233,12 +233,12 @@ VclPtr<vcl::Window> CellAppearancePropertyPanel::Create (
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw lang::IllegalArgumentException("no parent Window given to CellAppearancePropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw lang::IllegalArgumentException("no parent Window given to CellAppearancePropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw lang::IllegalArgumentException("no XFrame given to CellAppearancePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw lang::IllegalArgumentException("no SfxBindings given to CellAppearancePropertyPanel::Create", NULL, 2);
+ throw lang::IllegalArgumentException("no XFrame given to CellAppearancePropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw lang::IllegalArgumentException("no SfxBindings given to CellAppearancePropertyPanel::Create", nullptr, 2);
return VclPtr<CellAppearancePropertyPanel>::Create(
pParent, rxFrame, pBindings);
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index 7bcb01f535fd..866f47df3be2 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -50,7 +50,7 @@ CellBorderStyleControl::CellBorderStyleControl(vcl::Window* pParent, CellAppeara
maTBBorder3(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER3))),
maFL1(VclPtr<FixedLine>::Create(this, ScResId(FL_1))),
maFL2(VclPtr<FixedLine>::Create(this, ScResId(FL_2))),
- mpImageList(0)
+ mpImageList(nullptr)
{
Initialize();
FreeResource();
@@ -150,8 +150,8 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void)
sal_uInt16 nId = pToolBox->GetCurItemId();
SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
- editeng::SvxBorderLine theDefLine(NULL, 1);
- editeng::SvxBorderLine *pLeft = 0, *pRight = 0, *pTop = 0, *pBottom = 0;
+ editeng::SvxBorderLine theDefLine(nullptr, 1);
+ editeng::SvxBorderLine *pLeft = nullptr, *pRight = nullptr, *pTop = nullptr, *pBottom = nullptr;
sal_uInt8 nValidFlags = 0;
switch ( nId )
{
@@ -160,8 +160,8 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void)
nValidFlags |= FRM_VALID_ALL;
SvxLineItem aLineItem1( SID_ATTR_BORDER_DIAG_BLTR );
SvxLineItem aLineItem2( SID_ATTR_BORDER_DIAG_TLBR );
- aLineItem1.SetLine( NULL ); //modify
- aLineItem2.SetLine( NULL ); //modify
+ aLineItem1.SetLine( nullptr ); //modify
+ aLineItem2.SetLine( nullptr ); //modify
mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, &aLineItem1, 0L);
mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, &aLineItem2, 0L);
}
@@ -209,11 +209,11 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void)
{
SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
- editeng::SvxBorderLine theDefLine(NULL, 1);
- editeng::SvxBorderLine *pLeft = 0,
- *pRight = 0,
- *pTop = 0,
- *pBottom = 0;
+ editeng::SvxBorderLine theDefLine(nullptr, 1);
+ editeng::SvxBorderLine *pLeft = nullptr,
+ *pRight = nullptr,
+ *pTop = nullptr,
+ *pBottom = nullptr;
sal_uInt8 nValidFlags = 0;
switch ( nId )
{
@@ -269,14 +269,14 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void)
}
else if(nId == TBI_BORDER2_BLTR)
{
- editeng::SvxBorderLine aTmp( NULL, 1 );
+ editeng::SvxBorderLine aTmp( nullptr, 1 );
SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_BLTR );
aLineItem.SetLine( &aTmp );
mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, &aLineItem, 0L);
}
else if(nId == TBI_BORDER2_TLBR)
{
- editeng::SvxBorderLine aTmp( NULL, 1 );
+ editeng::SvxBorderLine aTmp( nullptr, 1 );
SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_TLBR );
aLineItem.SetLine( &aTmp );
mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, &aLineItem, 0L);
@@ -301,31 +301,31 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void)
switch ( nId )
{
case TBI_BORDER3_S1:
- pBottom.reset(new editeng::SvxBorderLine(NULL, DEF_LINE_WIDTH_2 ));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr, DEF_LINE_WIDTH_2 ));
nValidFlags |= FRM_VALID_BOTTOM;
break;
case TBI_BORDER3_S2:
- pBottom.reset(new editeng::SvxBorderLine(NULL));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr));
pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
nValidFlags |= FRM_VALID_BOTTOM;
break;
case TBI_BORDER3_S3:
- pBottom.reset(new editeng::SvxBorderLine(NULL, DEF_LINE_WIDTH_2 ));
- pTop.reset(new editeng::SvxBorderLine(NULL, 1));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr, DEF_LINE_WIDTH_2 ));
+ pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
break;
case TBI_BORDER3_S4:
- pBottom.reset(new editeng::SvxBorderLine(NULL));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr));
pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
- pTop.reset(new editeng::SvxBorderLine(NULL, 1));
+ pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
break;
}
aBorderOuter.SetLine( pTop.get(), SvxBoxItemLine::TOP );
aBorderOuter.SetLine( pBottom.get(), SvxBoxItemLine::BOTTOM );
- aBorderOuter.SetLine( NULL, SvxBoxItemLine::LEFT );
- aBorderOuter.SetLine( NULL, SvxBoxItemLine::RIGHT );
+ aBorderOuter.SetLine( nullptr, SvxBoxItemLine::LEFT );
+ aBorderOuter.SetLine( nullptr, SvxBoxItemLine::RIGHT );
aBorderInner.SetValid( SvxBoxInfoItemValidFlags::TOP, 0 != (nValidFlags&FRM_VALID_TOP ));
aBorderInner.SetValid( SvxBoxInfoItemValidFlags::BOTTOM, 0 != (nValidFlags&FRM_VALID_BOTTOM ));
diff --git a/sc/source/ui/sidebar/CellBorderUpdater.cxx b/sc/source/ui/sidebar/CellBorderUpdater.cxx
index 83f1ee8a3d6f..a7c3d5c13684 100644
--- a/sc/source/ui/sidebar/CellBorderUpdater.cxx
+++ b/sc/source/ui/sidebar/CellBorderUpdater.cxx
@@ -53,7 +53,7 @@ void CellBorderUpdater::UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool
else if( aBmpEx.IsTransparent() )
pMskAcc = ( aMsk = aBmpEx.GetMask() ).AcquireWriteAccess();
else
- pMskAcc = NULL;
+ pMskAcc = nullptr;
pBmpAcc->SetLineColor( ::Application::GetSettings().GetStyleSettings().GetFieldTextColor() ) ;
pBmpAcc->SetFillColor( COL_BLACK);
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index dadc65d63f40..6040969e8de2 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -25,7 +25,7 @@ namespace sc { namespace sidebar {
CellLineStyleValueSet::CellLineStyleValueSet( vcl::Window* pParent, const ResId& rResId)
: ValueSet( pParent, rResId ),
- pVDev(NULL),
+ pVDev(nullptr),
nSelItem(0)
{
SetColCount();
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index e3e7569eb0af..b4e89076cf1b 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -158,12 +158,12 @@ VclPtr<vcl::Window> NumberFormatPropertyPanel::Create (
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw lang::IllegalArgumentException("no parent Window given to NumberFormatPropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw lang::IllegalArgumentException("no parent Window given to NumberFormatPropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw lang::IllegalArgumentException("no XFrame given to NumberFormatPropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw lang::IllegalArgumentException("no SfxBindings given to NumberFormatPropertyPanel::Create", NULL, 2);
+ throw lang::IllegalArgumentException("no XFrame given to NumberFormatPropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw lang::IllegalArgumentException("no SfxBindings given to NumberFormatPropertyPanel::Create", nullptr, 2);
return VclPtr<NumberFormatPropertyPanel>::Create(
pParent, rxFrame, pBindings);
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 7857685aa1c2..1e634954aa77 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -71,18 +71,18 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
- if ( ! xParentWindow.is() || pParentWindow==NULL)
+ if ( ! xParentWindow.is() || pParentWindow==nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without ParentWindow",
- NULL);
+ nullptr);
if ( ! xFrame.is())
throw RuntimeException(
"PanelFactory::createUIElement called without Frame",
- NULL);
- if (pBindings == NULL)
+ nullptr);
+ if (pBindings == nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without SfxBindings",
- NULL);
+ nullptr);
sal_Int32 nMinimumSize = -1;
VclPtr<vcl::Window> pPanel;
@@ -118,7 +118,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
{
throw lang::WrappedTargetRuntimeException(
OUString("ScPanelFactory::createUIElement exception"),
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
return xElement;
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index b8678f376c1a..da50ea4ac2ed 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -134,7 +134,7 @@ static ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScArea
return static_cast<ScAreaLink*>(pBase); // found
}
}
- return NULL; // not found
+ return nullptr; // not found
}
void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc )
@@ -163,7 +163,7 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc )
ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocument* pDoc )
{
- ScAreaLinkSaveCollection* pColl = NULL;
+ ScAreaLinkSaveCollection* pColl = nullptr;
sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager();
if (pLinkManager)
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index f782f7e7aa24..a7c209634fda 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -35,14 +35,14 @@
#include <refupdatecontext.hxx>
ScRefUndoData::ScRefUndoData( const ScDocument* pDoc ) :
- pDBCollection(NULL),
- pRangeName(NULL),
+ pDBCollection(nullptr),
+ pRangeName(nullptr),
pPrintRanges(pDoc->CreatePrintRangeSaver()),
- pDPCollection(NULL),
- pDetOpList(NULL),
- pChartListenerCollection(NULL),
- pAreaLinks(NULL),
- pUnoRefs(NULL)
+ pDPCollection(nullptr),
+ pDetOpList(nullptr),
+ pChartListenerCollection(nullptr),
+ pAreaLinks(nullptr),
+ pUnoRefs(nullptr)
{
const ScDBCollection* pOldDBColl = pDoc->GetDBCollection();
if (pOldDBColl && !pOldDBColl->empty())
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 909e78ca549c..127c8168f54c 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -44,7 +44,7 @@ TYPEINIT1(ScUndoWrapper, SfxUndoAction);
ScSimpleUndo::ScSimpleUndo( ScDocShell* pDocSh ) :
pDocShell( pDocSh ),
- pDetectiveUndo( NULL )
+ pDetectiveUndo( nullptr )
{
}
@@ -443,7 +443,7 @@ void ScMoveUndo::UndoRef()
{
ScDocument& rDoc = pDocShell->GetDocument();
ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1);
- pRefUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::FORMULA, false, &rDoc, NULL, false );
+ pRefUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::FORMULA, false, &rDoc, nullptr, false );
if (pRefUndoData)
pRefUndoData->DoUndo( &rDoc, (eMode == SC_UNDO_REFFIRST) );
// HACK: ScDragDropUndo is the only one with REFFIRST.
@@ -579,7 +579,7 @@ ScUndoWrapper::~ScUndoWrapper()
void ScUndoWrapper::ForgetWrappedUndo()
{
- pWrappedUndo = NULL; // don't delete in dtor - pointer must be stored outside
+ pWrappedUndo = nullptr; // don't delete in dtor - pointer must be stored outside
}
OUString ScUndoWrapper::GetComment() const
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 42e541b2b3e1..55f5e1ad2d87 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -95,7 +95,7 @@ ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell,
pScenarios( pNewScenarios ),
eCmd( eNewCmd ),
bPartOfPaste( bNewPartOfPaste ),
- pPasteUndo( NULL )
+ pPasteUndo( nullptr )
{
if (eCmd == INS_INSROWS_BEFORE || eCmd == INS_INSROWS_AFTER) // whole row?
{
@@ -836,7 +836,7 @@ void ScUndoCut::Redo()
void ScUndoCut::Repeat(SfxRepeatTarget& rTarget)
{
if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr)
- static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->CutToClip( NULL, true );
+ static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->CutToClip( nullptr, true );
}
bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
@@ -856,7 +856,7 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, const ScRangeList& rRanges,
pRedoDoc( pNewRedoDoc ),
nFlags( nNewFlags ),
pRefUndoData( pRefData ),
- pRefRedoData( NULL ),
+ pRefRedoData( nullptr ),
bRedoFilled( bRedoIsFilled )
{
if ( pRefUndoData )
@@ -1407,7 +1407,7 @@ void ScUndoDragDrop::Redo()
bool bIncludeFiltered = bCut;
// TODO: restore old note captions instead of cloning new captions...
- rDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS, NULL, pClipDoc.get(), true, false, bIncludeFiltered );
+ rDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS, nullptr, pClipDoc.get(), true, false, bIncludeFiltered );
if (bCut)
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
@@ -2000,7 +2000,7 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
- pWhich( NULL )
+ pWhich( nullptr )
{
OSL_ENSURE( pW, "ScUndoClearItems: Which-Pointer ist 0" );
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 7abfac0ccb07..4539c96f62cc 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -51,7 +51,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
nNewSize( nNewSizeTwips ),
bWidth( bNewWidth ),
eMode( eNewMode ),
- pDrawUndo( NULL )
+ pDrawUndo( nullptr )
{
pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 475cf1d280e8..08504a597f45 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -87,7 +87,7 @@ ScUndoDeleteContents::ScUndoDeleteContents(
aRange ( rRange ),
aMarkData ( rMark ),
pUndoDoc ( std::move(pNewUndoDoc) ),
- pDrawUndo ( NULL ),
+ pDrawUndo ( nullptr ),
nFlags ( nNewFlags ),
bMulti ( bNewMulti ) // unnecessary
{
@@ -373,8 +373,8 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell,
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
pApplyPattern = const_cast<ScPatternAttr*>(static_cast<const ScPatternAttr*>( &pPool->Put( *pNewApply ) ));
- pLineOuter = pNewOuter ? const_cast<SvxBoxItem*>(static_cast<const SvxBoxItem*>( &pPool->Put( *pNewOuter ) )) : NULL;
- pLineInner = pNewInner ? const_cast<SvxBoxInfoItem*>(static_cast<const SvxBoxInfoItem*>( &pPool->Put( *pNewInner ) )) : NULL;
+ pLineOuter = pNewOuter ? const_cast<SvxBoxItem*>(static_cast<const SvxBoxItem*>( &pPool->Put( *pNewOuter ) )) : nullptr;
+ pLineInner = pNewInner ? const_cast<SvxBoxInfoItem*>(static_cast<const SvxBoxInfoItem*>( &pPool->Put( *pNewInner ) )) : nullptr;
}
ScUndoSelectionAttr::~ScUndoSelectionAttr()
@@ -452,14 +452,14 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
if (bUndo)
{
if (pItem->GetOldData())
- rDoc.SetEditText(aPos, *pItem->GetOldData(), NULL);
+ rDoc.SetEditText(aPos, *pItem->GetOldData(), nullptr);
else
rDoc.SetEmptyCell(aPos);
}
else
{
if (pItem->GetNewData())
- rDoc.SetEditText(aPos, *pItem->GetNewData(), NULL);
+ rDoc.SetEditText(aPos, *pItem->GetNewData(), nullptr);
else
rDoc.SetEmptyCell(aPos);
}
@@ -998,7 +998,7 @@ void ScUndoReplace::Undo()
InsertDeleteFlags nUndoFlags = (pSearchItem->GetPattern()) ? InsertDeleteFlags::ATTRIB : InsertDeleteFlags::CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
- nUndoFlags, false, &rDoc, NULL, false ); // without row flags
+ nUndoFlags, false, &rDoc, nullptr, false ); // without row flags
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetPattern() &&
@@ -1370,7 +1370,7 @@ ScUndoRefreshLink::ScUndoRefreshLink( ScDocShell* pNewDocShell,
ScDocument* pNewUndoDoc )
: ScSimpleUndo( pNewDocShell ),
pUndoDoc( pNewUndoDoc ),
- pRedoDoc( NULL )
+ pRedoDoc( nullptr )
{
}
@@ -1489,7 +1489,7 @@ static ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const OUSt
}
OSL_FAIL("ScAreaLink not found");
- return NULL;
+ return nullptr;
}
ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell,
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 205d90285751..6909e64c1ccf 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -86,8 +86,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
nCol( nNewCol ),
nRow( nNewRow ),
nTab( nNewTab ),
- pOldEditData( static_cast<EditTextObject*>(NULL) ),
- pNewEditData( static_cast<EditTextObject*>(NULL) ),
+ pOldEditData( static_cast<EditTextObject*>(nullptr) ),
+ pNewEditData( static_cast<EditTextObject*>(nullptr) ),
bIsAutomatic( bAutomatic )
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
@@ -125,7 +125,7 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
rDoc.SetPattern( nCol, nRow, nTab, *pWhichPattern, true );
if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT && pEditData)
- rDoc.SetEditText(aPos, *pEditData, NULL);
+ rDoc.SetEditText(aPos, *pEditData, nullptr);
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -295,7 +295,7 @@ void ScUndoEnterData::Redo()
ScAddress aPos = maPos;
aPos.SetTab(nTab);
// edit text wil be cloned.
- rDoc.SetEditText(aPos, *mpNewEditData, NULL);
+ rDoc.SetEditText(aPos, *mpNewEditData, nullptr);
}
else
rDoc.SetString(maPos.Col(), maPos.Row(), nTab, maNewString);
@@ -871,7 +871,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
nAction ( 0 ),
pDrawUndo ( pDraw )
{
- bIsDelete = ( pOperation == NULL );
+ bIsDelete = ( pOperation == nullptr );
if (!bIsDelete)
{
nAction = (sal_uInt16) pOperation->GetOperation();
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index e35a15880b39..82e0a4c1ab40 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -741,7 +741,7 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
const ScRange* pOld, bool bSize, const ScRange* pAdvSrc ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
- pDrawUndo( NULL ),
+ pDrawUndo( nullptr ),
nTab( nNewTab ),
aQueryParam( rParam ),
pUndoDoc( pNewUndoDoc ),
@@ -892,7 +892,7 @@ void ScUndoQuery::Redo()
if ( bIsAdvanced )
pViewShell->Query( aQueryParam, &aAdvSource, false );
else
- pViewShell->Query( aQueryParam, NULL, false );
+ pViewShell->Query( aQueryParam, nullptr, false );
EndRedo();
}
@@ -930,7 +930,7 @@ void ScUndoAutoFilter::DoChange( bool bUndo )
bool bNewFilter = bUndo ? !bFilterSet : bFilterSet;
ScDocument& rDoc = pDocShell->GetDocument();
- ScDBData* pDBData=NULL;
+ ScDBData* pDBData=nullptr;
if (aDBName == STR_DB_LOCAL_NONAME)
{
SCTAB nTab = aOriginalRange.aStart.Tab();
@@ -1096,7 +1096,7 @@ void ScUndoImportData::Undo()
SCTAB nTable;
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
- ScDBData* pCurrentData = NULL;
+ ScDBData* pCurrentData = nullptr;
if (pUndoDBData && pRedoDBData)
{
pRedoDBData->GetArea( nTable, nCol1, nRow1, nCol2, nRow2 );
@@ -1181,7 +1181,7 @@ void ScUndoImportData::Redo()
SCTAB nTable;
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
- ScDBData* pCurrentData = NULL;
+ ScDBData* pCurrentData = nullptr;
if (pUndoDBData && pRedoDBData)
{
pUndoDBData->GetArea( nTable, nCol1, nRow1, nCol2, nRow2 );
@@ -1431,8 +1431,8 @@ ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell,
ScSimpleUndo( pNewDocShell ),
pOldUndoDoc( pOldDoc ),
pNewUndoDoc( pNewDoc ),
- pOldDPObject( NULL ),
- pNewDPObject( NULL ),
+ pOldDPObject( nullptr ),
+ pNewDPObject( nullptr ),
bAllowMove( bMove )
{
if (pOldObj)
@@ -1555,7 +1555,7 @@ void ScUndoDataPilot::Redo()
ScDocument& rDoc = pDocShell->GetDocument();
- ScDPObject* pSourceObj = NULL;
+ ScDPObject* pSourceObj = nullptr;
if ( pOldDPObject )
{
// find object to modify
@@ -1812,7 +1812,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
pRedoDoc( pNewRedoDoc ),
nFlags( nNewFlags ),
pRefUndoData( pRefData ),
- pRefRedoData( NULL ),
+ pRefRedoData( nullptr ),
bRedoFilled( bRedoIsFilled )
{
// pFill1,pFill2,pFill3 are there so the ctor calls for simple paste (without cutting)
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index b46825de8bdc..4665a46a03d1 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -38,7 +38,7 @@ ScUndoDraw::~ScUndoDraw()
void ScUndoDraw::ForgetDrawUndo()
{
- pDrawUndo = NULL; // do not delete (DrawUndo has to be remembered from outside)
+ pDrawUndo = nullptr; // do not delete (DrawUndo has to be remembered from outside)
}
OUString ScUndoDraw::GetComment() const
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index aaa8137c08e3..9d80fb1aa64f 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -29,7 +29,7 @@ SdrUndoAction* GetSdrUndoAction( ScDocument* pDoc )
if (pLayer)
return pLayer->GetCalcUndo(); // must exist
else
- return NULL;
+ return nullptr;
}
void DoSdrUndoAction( SdrUndoAction* pUndoAction, ScDocument* pDoc )
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index f275cdc783f5..f3878487f050 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -95,7 +95,7 @@ ScUndoAddRangeData::~ScUndoAddRangeData()
void ScUndoAddRangeData::Undo()
{
ScDocument& rDoc = pDocShell->GetDocument();
- ScRangeName* pRangeName = NULL;
+ ScRangeName* pRangeName = nullptr;
if (mnTab == -1)
{
pRangeName = rDoc.GetRangeName();
@@ -112,7 +112,7 @@ void ScUndoAddRangeData::Undo()
void ScUndoAddRangeData::Redo()
{
ScDocument& rDoc = pDocShell->GetDocument();
- ScRangeName* pRangeName = NULL;
+ ScRangeName* pRangeName = nullptr;
if (mnTab == -1)
{
pRangeName = rDoc.GetRangeName();
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index acdac407b085..7ca1aa485f2a 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -42,7 +42,7 @@ void UndoSort::Execute( bool bUndo )
sc::ReorderParam aParam = maParam;
if (bUndo)
aParam.reverse();
- rDoc.Reorder(aParam, NULL);
+ rDoc.Reorder(aParam, nullptr);
if (maParam.mbHasHeaders)
{
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 6e9c5f61b902..a9a7102e91f7 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -35,7 +35,7 @@ TYPEINIT1(ScUndoApplyPageStyle, ScSimpleUndo);
// modify style (cell or page style)
ScStyleSaveData::ScStyleSaveData() :
- pItems( NULL )
+ pItems( nullptr )
{
}
@@ -46,7 +46,7 @@ ScStyleSaveData::ScStyleSaveData( const ScStyleSaveData& rOther ) :
if (rOther.pItems)
pItems = new SfxItemSet( *rOther.pItems );
else
- pItems = NULL;
+ pItems = nullptr;
}
ScStyleSaveData::~ScStyleSaveData()
@@ -63,7 +63,7 @@ ScStyleSaveData& ScStyleSaveData::operator=( const ScStyleSaveData& rOther )
if (rOther.pItems)
pItems = new SfxItemSet( *rOther.pItems );
else
- pItems = NULL;
+ pItems = nullptr;
return *this;
}
@@ -127,7 +127,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
bool bDelete = aNewName.isEmpty(); // no new name -> delete style
bool bNew = ( rName.isEmpty() && !bDelete ); // creating new style
- SfxStyleSheetBase* pStyle = NULL;
+ SfxStyleSheetBase* pStyle = nullptr;
if ( !rName.isEmpty() )
{
// find old style to modify
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 46862b68463f..ccfa2ee44234 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -81,7 +81,7 @@ ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
const OUString& rNewName) :
ScSimpleUndo( pNewDocShell ),
sNewName( rNewName ),
- pDrawUndo( NULL ),
+ pDrawUndo( nullptr ),
nTab( nTabNum ),
bAppend( bApp )
{
@@ -173,7 +173,7 @@ ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
std::vector<OUString>& newNameList) :
ScSimpleUndo( pNewDocShell ),
- pDrawUndo( NULL ),
+ pDrawUndo( nullptr ),
aNameList( newNameList ),
nTab( nTabNum )
{
@@ -592,7 +592,7 @@ ScUndoCopyTab::ScUndoCopyTab(
mpOldTabs(pOldTabs),
mpNewTabs(pNewTabs),
mpNewNames(pNewNames),
- pDrawUndo( NULL )
+ pDrawUndo( nullptr )
{
pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
@@ -803,7 +803,7 @@ ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
aComment( rC ),
aColor( rCol ),
nFlags( nF ),
- pDrawUndo( NULL )
+ pDrawUndo( nullptr )
{
pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
}
@@ -882,8 +882,8 @@ ScUndoImportTab::ScUndoImportTab( ScDocShell* pShell,
ScSimpleUndo( pShell ),
nTab( nNewTab ),
nCount( nNewCount ),
- pRedoDoc( NULL ),
- pDrawUndo( NULL )
+ pRedoDoc( nullptr ),
+ pDrawUndo( nullptr )
{
pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
}
@@ -1206,7 +1206,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
else
{
// remove protection.
- rDoc.SetDocProtection(NULL);
+ rDoc.SetDocProtection(nullptr);
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1274,7 +1274,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
else
{
// remove protection.
- rDoc.SetTabProtection(mnTab, NULL);
+ rDoc.SetTabProtection(mnTab, nullptr);
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1494,7 +1494,7 @@ SdrObject* ScUndoRenameObject::GetObject()
}
}
OSL_FAIL("Object not found");
- return NULL;
+ return nullptr;
}
void ScUndoRenameObject::Undo()
diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
index d46429204041..f4686de887e9 100644
--- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
+++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
@@ -69,7 +69,7 @@ void SAL_CALL ScChartRangeSelectionListener::disposing( const lang::EventObject&
// ____ WeakComponentImplHelperBase ____
void SAL_CALL ScChartRangeSelectionListener::disposing()
{
- m_pViewShell = 0;
+ m_pViewShell = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 9a8a759adf9c..12b41b92cbb0 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -53,7 +53,7 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // invalid
+ pDocShell = nullptr; // invalid
}
}
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index ab104f4a9ab0..c6230719b34c 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -186,7 +186,7 @@ ScAutoFormatObj* ScAutoFormatsObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
if (nIndex < ScGlobal::GetOrCreateAutoFormat()->size())
return new ScAutoFormatObj(nIndex);
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
ScAutoFormatObj* ScAutoFormatsObj::GetObjectByName_Impl(const OUString& aName)
@@ -196,7 +196,7 @@ ScAutoFormatObj* ScAutoFormatsObj::GetObjectByName_Impl(const OUString& aName)
if (lcl_FindAutoFormatIndex(
*ScGlobal::GetOrCreateAutoFormat(), aString, nIndex ))
return GetObjectByIndex_Impl(nIndex);
- return NULL;
+ return nullptr;
}
// container::XNameContainer
@@ -420,7 +420,7 @@ const uno::Sequence<sal_Int8>& ScAutoFormatObj::getUnoTunnelId()
ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScAutoFormatObj* pRet = NULL;
+ ScAutoFormatObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScAutoFormatObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -439,7 +439,7 @@ ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
if ( IsInserted() && nIndex < SC_AF_FIELD_COUNT )
return new ScAutoFormatFieldObj( nFormatIndex, nIndex );
- return NULL;
+ return nullptr;
}
// container::XEnumerationAccess
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 417a96e9f7d0..f5036f1b8f6d 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -98,7 +98,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
if (!pServiceManager)
- return NULL;
+ return nullptr;
uno::Reference<lang::XSingleServiceFactory> xFactory;
OUString aImpl(OUString::createFromAscii(pImplName));
@@ -160,7 +160,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory(
ScDocument_getSupportedServiceNames() ));
}
- void* pRet = NULL;
+ void* pRet = nullptr;
if (xFactory.is())
{
xFactory->acquire();
@@ -501,7 +501,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
sal_uInt16 nCount = (sal_uInt16) std::min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX );
const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
- std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : NULL);
+ std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : nullptr);
for (sal_uInt16 i=0; i<nCount; i++)
pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen?
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 145ed0c048e2..6bb18847787a 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -935,12 +935,12 @@ const ::editeng::SvxBorderLine* lcl_getBorderLine(
{
// Convert from 1/100mm to Twips.
if (!SvxBoxItem::LineToSvxLine( rStruct, rLine, true))
- return NULL;
+ return nullptr;
if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() )
return &rLine;
else
- return NULL;
+ return nullptr;
}
}
@@ -1047,7 +1047,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
{
ScDocument& rDoc = pDocShell->GetDocument();
bool bUndo(rDoc.IsUndoEnabled());
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
size_t nCount = rRanges.size();
@@ -1117,7 +1117,7 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
return false;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bUndo )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1215,7 +1215,7 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste(
&rDocShell, ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab),
- aDestMark, pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
+ aDestMark, pUndoDoc, nullptr, InsertDeleteFlags::CONTENTS, nullptr, false));
}
if (!bHeight)
@@ -1256,7 +1256,7 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
return false;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bUndo )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1316,7 +1316,7 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), aDestMark,
- pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
+ pUndoDoc, nullptr, InsertDeleteFlags::CONTENTS, nullptr, false));
}
if (!bHeight)
@@ -1389,12 +1389,12 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
- pValueListener( NULL ),
- pCurrentFlat( NULL ),
- pCurrentDeep( NULL ),
- pCurrentDataSet( NULL ),
- pNoDfltCurrentDataSet( NULL ),
- pMarkData( NULL ),
+ pValueListener( nullptr ),
+ pCurrentFlat( nullptr ),
+ pCurrentDeep( nullptr ),
+ pCurrentDataSet( nullptr ),
+ pNoDfltCurrentDataSet( nullptr ),
+ pMarkData( nullptr ),
nObjectId( 0 ),
bChartColAsHdr( false ),
bChartRowAsHdr( false ),
@@ -1426,12 +1426,12 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) :
pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
- pValueListener( NULL ),
- pCurrentFlat( NULL ),
- pCurrentDeep( NULL ),
- pCurrentDataSet( NULL ),
- pNoDfltCurrentDataSet( NULL ),
- pMarkData( NULL ),
+ pValueListener( nullptr ),
+ pCurrentFlat( nullptr ),
+ pCurrentDeep( nullptr ),
+ pCurrentDataSet( nullptr ),
+ pNoDfltCurrentDataSet( nullptr ),
+ pMarkData( nullptr ),
aRanges( rR ),
nObjectId( 0 ),
bChartColAsHdr( false ),
@@ -1482,10 +1482,10 @@ void ScCellRangesBase::ForgetCurrentAttrs()
delete pCurrentDeep;
delete pCurrentDataSet;
delete pNoDfltCurrentDataSet;
- pCurrentFlat = NULL;
- pCurrentDeep = NULL;
- pCurrentDataSet = NULL;
- pNoDfltCurrentDataSet = NULL;
+ pCurrentFlat = nullptr;
+ pCurrentDeep = nullptr;
+ pCurrentDataSet = nullptr;
+ pNoDfltCurrentDataSet = nullptr;
// #i62483# pMarkData can remain unchanged, is deleted only if the range changes (RefChanged)
}
@@ -1493,7 +1493,7 @@ void ScCellRangesBase::ForgetCurrentAttrs()
void ScCellRangesBase::ForgetMarkData()
{
delete pMarkData;
- pMarkData = NULL;
+ pMarkData = nullptr;
}
const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat()
@@ -1602,7 +1602,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( nId == SFX_HINT_DYING )
{
ForgetCurrentAttrs();
- pDocShell = NULL; // invalid
+ pDocShell = nullptr; // invalid
if ( !aValueListeners.empty() )
{
@@ -1693,7 +1693,7 @@ ScDocument* ScCellRangesBase::GetDocument() const
if (pDocShell)
return &pDocShell->GetDocument();
else
- return NULL;
+ return nullptr;
}
void ScCellRangesBase::InitInsertRange(ScDocShell* pDocSh, const ScRange& rR)
@@ -3069,7 +3069,7 @@ ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const
return aArr.CreateMemChart();
}
- return NULL;
+ return nullptr;
}
uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
@@ -3473,7 +3473,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
SCCOL nCol = 0, nLastCol;
while (nCol <= MAXCOL)
{
- if (rDoc.ColHidden(nCol, nTab, NULL, &nLastCol))
+ if (rDoc.ColHidden(nCol, nTab, nullptr, &nLastCol))
// hidden columns. Unselect them.
aMarkData.SetMultiMarkArea(ScRange(nCol, 0, nTab, nLastCol, MAXROW, nTab), false);
@@ -3483,7 +3483,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
SCROW nRow = 0, nLastRow;
while (nRow <= MAXROW)
{
- if (rDoc.RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (rDoc.RowHidden(nRow, nTab, nullptr, &nLastRow))
// These rows are hidden. Unselect them.
aMarkData.SetMultiMarkArea(ScRange(0, nRow, nTab, MAXCOL, nLastRow, nTab), false);
@@ -3495,7 +3495,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCells()
@@ -3530,7 +3530,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentCells(
@@ -3610,7 +3610,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaCells(
@@ -3665,7 +3665,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
@@ -3749,7 +3749,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnDifferences(
@@ -3837,7 +3837,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependents(
@@ -3896,7 +3896,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
// XSearchable
@@ -4000,7 +4000,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findFirst(
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return Find_Impl( xDesc, NULL );
+ return Find_Impl( xDesc, nullptr );
}
uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
@@ -4022,7 +4022,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
}
}
}
- return NULL;
+ return nullptr;
}
// XReplaceable
@@ -4073,7 +4073,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
SCROW nRow = 0;
OUString aUndoStr;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -4143,7 +4143,7 @@ const uno::Sequence<sal_Int8>& ScCellRangesBase::getUnoTunnelId()
ScCellRangesBase* ScCellRangesBase::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScCellRangesBase* pRet = NULL;
+ ScCellRangesBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellRangesBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -4241,7 +4241,7 @@ ScCellRangeObj* ScCellRangesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
return new ScCellRangeObj( pDocSh, aRange );
}
- return NULL; // keine DocShell oder falscher Index
+ return nullptr; // keine DocShell oder falscher Index
}
uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddresses()
@@ -4281,7 +4281,7 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
return new ScCellsObj( pDocSh, rRanges );
- return NULL;
+ return nullptr;
}
OUString SAL_CALL ScCellRangesObj::getRangeAddressesAsString()
@@ -4777,7 +4777,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( ScDocument
SfxObjectShell* pObjSh = pDoc->GetDocumentShell();
if ( pObjSh && dynamic_cast<const ScDocShell*>( pObjSh) != nullptr )
return new ScCellRangeObj( static_cast<ScDocShell*>(pObjSh), rR );
- return NULL;
+ return nullptr;
}
ScCellRangeObj::ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR) :
@@ -5018,7 +5018,7 @@ uno::Reference<table::XTableColumns> SAL_CALL ScCellRangeObj::getColumns() throw
aRange.aStart.Col(), aRange.aEnd.Col() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::RuntimeException, std::exception)
@@ -5030,7 +5030,7 @@ uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::
aRange.aStart.Row(), aRange.aEnd.Row() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
// XAddressableCellRange
@@ -5054,7 +5054,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScCellRangeObj::getSpreadsheet()
return new ScTableSheetObj( pDocSh, aRange.aStart.Tab() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
// XArrayFormulaRange
@@ -5106,7 +5106,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
throw uno::RuntimeException();
}
- pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, NULL, rFormula, true, true, rFormulaNmsp, eGrammar );
+ pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, nullptr, rFormula, true, true, rFormulaNmsp, eGrammar );
}
else
{
@@ -5183,7 +5183,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula
// Actually GRAM_PODF_A1 is a don't-care here because of the token
// array being set, it fits with other API compatibility grammars
// though.
- pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
else
{
@@ -5349,7 +5349,7 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
}
if (!bError)
- pDocSh->GetDocFunc().TabOp( aRange, NULL, aParam, true, true );
+ pDocSh->GetDocFunc().TabOp( aRange, nullptr, aParam, true, true );
}
}
@@ -5454,7 +5454,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
}
if (!bError)
- pDocSh->GetDocFunc().FillSeries( aRange, NULL, eDir, eCmd, eDateCmd,
+ pDocSh->GetDocFunc().FillSeries( aRange, nullptr, eDir, eCmd, eDateCmd,
MAXDOUBLE, fStep, fEndValue, true, true );
}
}
@@ -5499,7 +5499,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
bError = true;
if (!bError)
- pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, nCount, true, true );
+ pDocSh->GetDocFunc().FillAuto( aSourceRange, nullptr, eDir, nCount, true, true );
}
}
@@ -5518,7 +5518,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const OUString& aName )
{
ScAutoFormat::const_iterator itBeg = pAutoFormat->begin();
size_t nIndex = std::distance(itBeg, it);
- pDocSh->GetDocFunc().AutoFormat(aRange, NULL, nIndex, true, true);
+ pDocSh->GetDocFunc().AutoFormat(aRange, nullptr, nIndex, true, true);
}
else
throw lang::IllegalArgumentException();
@@ -5707,7 +5707,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
//! if created by createFilterDescriptorByObject ???
ScDBDocFunc aFunc(*pDocSh);
- aFunc.Query( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.Query( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5768,12 +5768,12 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
else
{
delete pNew;
- return NULL; // ungueltig -> null
+ return nullptr; // ungueltig -> null
}
}
OSL_FAIL("kein Dokument oder kein Bereich");
- return NULL;
+ return nullptr;
}
// XSubTotalSource
@@ -5854,7 +5854,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5881,7 +5881,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException, std
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5925,7 +5925,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.DoImport( nTab, aParam, NULL, true ); //! Api-Flag as parameter
+ aFunc.DoImport( nTab, aParam, nullptr, true ); //! Api-Flag as parameter
}
}
@@ -5938,7 +5938,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getCellFormatRa
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScCellFormatsObj( pDocSh, aRange );
- return NULL;
+ return nullptr;
}
// XUniqueCellFormatRangesSupplier
@@ -5950,7 +5950,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getUniqueCellFo
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScUniqueCellFormatsObj( pDocSh, aRange );
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Range-Properties
@@ -6619,7 +6619,7 @@ uno::Reference<sheet::XSheetAnnotation> SAL_CALL ScCellObj::getAnnotation()
return new ScAnnotationObj( pDocSh, aCellPos );
OSL_FAIL("getAnnotation ohne DocShell");
- return NULL;
+ return nullptr;
}
// XFieldTypesSupplier
@@ -6635,14 +6635,14 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellObj::getTextFields(
return new ScCellFieldsObj(xContent, pDocSh, aCellPos);
}
- return NULL;
+ return nullptr;
}
uno::Reference<container::XNameAccess> SAL_CALL ScCellObj::getTextFieldMasters()
throw(uno::RuntimeException, std::exception)
{
// sowas gibts nicht im Calc (?)
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Zell-Properties
@@ -6928,7 +6928,7 @@ uno::Reference<table::XTableCharts> SAL_CALL ScTableSheetObj::getCharts() throw(
return new ScChartsObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTables()
@@ -6940,7 +6940,7 @@ uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTa
return new ScDataPilotTablesObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw(uno::RuntimeException, std::exception)
@@ -6952,7 +6952,7 @@ uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw
return new ScScenariosObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotations()
@@ -6965,7 +6965,7 @@ uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotation
return new ScAnnotationsObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<table::XCellRange> SAL_CALL ScTableSheetObj::getCellRangeByName(
@@ -6986,7 +6986,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursor()
SCTAB nTab = GetTab_Impl();
return new ScCellCursorObj( pDocSh, ScRange( 0,0,nTab, MAXCOL,MAXROW,nTab ) );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorByRange(
@@ -7005,7 +7005,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
return new ScCellCursorObj( pDocSh, *rRanges[ 0 ] );
}
}
- return NULL;
+ return nullptr;
}
// XSheetCellRange
@@ -7180,7 +7180,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScTableSheetObj::getDrawPage()
// Das DrawPage-Objekt meldet sich als Listener am SdrModel an
// und sollte von dort alle Aktionen mitbekommen
}
- return NULL;
+ return nullptr;
}
// XCellMovement
@@ -7211,7 +7211,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
- pDocSh->GetDocFunc().InsertCells( aScRange, NULL, eCmd, true, true );
+ pDocSh->GetDocFunc().InsertCells( aScRange, nullptr, eCmd, true, true );
}
}
}
@@ -7242,7 +7242,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
- pDocSh->GetDocFunc().DeleteCells( aScRange, NULL, eCmd, true, true );
+ pDocSh->GetDocFunc().DeleteCells( aScRange, nullptr, eCmd, true, true );
}
}
}
@@ -7302,7 +7302,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges )
rDoc.CreatePrintRangeSaver())); // create new ranges
// #i120105# ownership of old ranges has changed, mark as consumed
- pOldRanges = 0;
+ pOldRanges = nullptr;
}
ScPrintFunc(pDocSh, pDocSh->GetPrinter(), nTab).UpdatePages();
@@ -7358,7 +7358,7 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- ScPrintRangeSaver* pOldRanges = NULL;
+ ScPrintRangeSaver* pOldRanges = nullptr;
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
@@ -7391,7 +7391,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce
{
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- return ( rDoc.GetRepeatColRange(nTab) != NULL );
+ return ( rDoc.GetRepeatColRange(nTab) != nullptr );
}
return false;
}
@@ -7417,7 +7417,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns
}
}
else
- rDoc.SetRepeatColRange( nTab, NULL ); // abschalten
+ rDoc.SetRepeatColRange( nTab, nullptr ); // abschalten
PrintAreaUndo_Impl( pOldRanges ); // Undo, Umbrueche, Modified etc.
@@ -7472,7 +7472,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti
{
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- return ( rDoc.GetRepeatRowRange(nTab) != NULL );
+ return ( rDoc.GetRepeatRowRange(nTab) != nullptr );
}
return false;
}
@@ -7498,7 +7498,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
}
}
else
- rDoc.SetRepeatRowRange( nTab, NULL ); // abschalten
+ rDoc.SetRepeatRowRange( nTab, nullptr ); // abschalten
PrintAreaUndo_Impl( pOldRanges ); // Undo, Umbrueche, Modified etc.
@@ -8098,7 +8098,7 @@ uno::Reference<container::XNameReplace> SAL_CALL ScTableSheetObj::getEvents() th
if ( pDocSh )
return new ScSheetEventsObj( pDocSh, GetTab_Impl() );
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Sheet-Properties
@@ -8662,7 +8662,7 @@ const uno::Sequence<sal_Int8>& ScTableSheetObj::getUnoTunnelId()
ScTableSheetObj* ScTableSheetObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScTableSheetObj* pRet = NULL;
+ ScTableSheetObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableSheetObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -9049,7 +9049,7 @@ void ScCellsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9061,7 +9061,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellsObj::createEnumeration()
SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellsEnumeration( pDocShell, aRanges );
- return NULL;
+ return nullptr;
}
uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException, std::exception)
@@ -9087,7 +9087,7 @@ sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException, std::ex
ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR) :
pDocShell( pDocSh ),
aRanges( rR ),
- pMark( NULL ),
+ pMark( nullptr ),
bAtEnd( false )
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -9168,7 +9168,7 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
pRefHint->GetDx(), pRefHint->GetDy(), pRefHint->GetDz() );
delete pMark; // aus verschobenen Bereichen neu erzeugen
- pMark = NULL;
+ pMark = nullptr;
if (!bAtEnd) // aPos anpassen
{
@@ -9187,7 +9187,7 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9242,7 +9242,7 @@ void ScCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9250,7 +9250,7 @@ ScCellRangeObj* ScCellFormatsObj::GetObjectByIndex_Impl(long nIndex) const
{
//! direkt auf die AttrArrays zugreifen !!!!
- ScCellRangeObj* pRet = NULL;
+ ScCellRangeObj* pRet = nullptr;
if (pDocShell)
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -9334,13 +9334,13 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellFormatsObj::createEnumera
SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellFormatsEnumeration( pDocShell, aTotalRange );
- return NULL;
+ return nullptr;
}
ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rRange) :
pDocShell( pDocSh ),
nTab( rRange.aStart.Tab() ),
- pIter( NULL ),
+ pIter( nullptr ),
bAtEnd( false ),
bDirty( false )
{
@@ -9390,7 +9390,7 @@ void ScCellFormatsEnumeration::Advance_Impl()
ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl()
{
- ScCellRangeObj* pRet = NULL;
+ ScCellRangeObj* pRet = nullptr;
if (pDocShell && !bAtEnd)
{
if ( aNext.aStart == aNext.aEnd )
@@ -9413,9 +9413,9 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
delete pIter;
- pIter = NULL;
+ pIter = nullptr;
}
else if ( nId == SFX_HINT_DATACHANGED )
{
@@ -9475,7 +9475,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9704,7 +9704,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScUniqueCellFormatsObj::createE
SolarMutexGuard aGuard;
if (pDocShell)
return new ScUniqueCellFormatsEnumeration( pDocShell, aRangeLists );
- return NULL;
+ return nullptr;
}
ScUniqueCellFormatsEnumeration::ScUniqueCellFormatsEnumeration(ScDocShell* pDocSh, const ScMyRangeLists& rRangeLists) :
@@ -9733,7 +9733,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
{
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index fb4746c0ce0d..0ef1b0e2707f 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -140,7 +140,7 @@ OUString lcl_createTableNumberList( const ::std::list< SCTAB > & rTableList )
uno::Reference< frame::XModel > lcl_GetXModel( ScDocument * pDoc )
{
uno::Reference< frame::XModel > xModel;
- SfxObjectShell * pObjSh( pDoc ? pDoc->GetDocumentShell() : 0 );
+ SfxObjectShell * pObjSh( pDoc ? pDoc->GetDocumentShell() : nullptr );
if( pObjSh )
xModel.set( pObjSh->GetModel());
return xModel;
@@ -1587,7 +1587,7 @@ ScChart2DataProvider::createDataSource(
if( nOldIndex < aSeqVector.size() )
{
pDS->AddLabeledSequence( aSeqVector[nOldIndex] );
- aSeqVector[nOldIndex] = 0;
+ aSeqVector[nOldIndex] = nullptr;
}
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 58fc2584e4c6..f5a09a4b94ce 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -84,7 +84,7 @@ static SdrOle2Obj* lcl_FindChartObj( ScDocShell* pDocShell, SCTAB nTab, const OU
}
}
}
- return NULL;
+ return nullptr;
}
ScChartsObj::ScChartsObj(ScDocShell* pDocSh, SCTAB nT) :
@@ -109,7 +109,7 @@ void ScChartsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -150,14 +150,14 @@ ScChartObj* ScChartsObj::GetObjectByIndex_Impl(long nIndex) const
if (!aName.isEmpty())
return new ScChartObj( pDocShell, nTab, aName );
- return NULL;
+ return nullptr;
}
ScChartObj* ScChartsObj::GetObjectByName_Impl(const OUString& aName) const
{
if ( lcl_FindChartObj( pDocShell, nTab, aName ) )
return new ScChartObj( pDocShell, nTab, aName );
- return NULL;
+ return nullptr;
}
// XTableCharts
@@ -437,7 +437,7 @@ sal_Bool SAL_CALL ScChartsObj::hasByName( const OUString& aName )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return ( lcl_FindChartObj( pDocShell, nTab, aName ) != NULL );
+ return ( lcl_FindChartObj( pDocShell, nTab, aName ) != nullptr );
}
ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN)
@@ -470,7 +470,7 @@ void ScChartObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -528,7 +528,7 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool&
}
if( !bFound )
{
- rRanges = 0;
+ rRanges = nullptr;
rColHeaders = false;
rRowHeaders = false;
}
@@ -770,7 +770,7 @@ uno::Reference<lang::XComponent> SAL_CALL ScChartObj::getEmbeddedObject() throw(
return uno::Reference < lang::XComponent > ( pObject->GetObjRef()->getComponent(), uno::UNO_QUERY );
}
- return NULL;
+ return nullptr;
}
// XNamed
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index e561ddfa1158..ef9542e5ea83 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -327,7 +327,7 @@ void ScCondFormatsObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- mpDocShell = NULL; // ungueltig geworden
+ mpDocShell = nullptr; // ungueltig geworden
}
}
@@ -477,7 +477,7 @@ void ScCondFormatObj::createEntry(const sal_Int32 nType, const sal_Int32 nPos)
if (nPos > sal_Int32(pFormat->size()))
throw lang::IllegalArgumentException();
- ScFormatEntry* pNewEntry = NULL;
+ ScFormatEntry* pNewEntry = nullptr;
ScDocument* pDoc = &mpDocShell->GetDocument();
switch (nType)
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index e4ff166f8e79..ff102347e5b7 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -104,7 +104,7 @@ void ScDocumentConfiguration::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index b5e43b94e4cc..8958182dbaf6 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -248,7 +248,7 @@ static ScDPObject* lcl_GetDPObject( ScDocShell* pDocShell, SCTAB nTab, const OUS
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
static OUString lcl_CreatePivotName( ScDocShell* pDocShell )
@@ -302,7 +302,7 @@ void ScDataPilotTablesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -334,14 +334,14 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd
}
}
}
- return NULL;
+ return nullptr;
}
ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByName_Impl(const OUString& rName)
{
if (hasByName(rName))
return new ScDataPilotTableObj( pDocShell, nTab, rName );
- return 0;
+ return nullptr;
}
Reference<XDataPilotDescriptor> SAL_CALL ScDataPilotTablesObj::createDataPilotDescriptor()
@@ -350,7 +350,7 @@ Reference<XDataPilotDescriptor> SAL_CALL ScDataPilotTablesObj::createDataPilotDe
SolarMutexGuard aGuard;
if (pDocShell)
return new ScDataPilotDescriptor(pDocShell);
- return NULL;
+ return nullptr;
}
static bool lcl_IsDuplicated(const Reference<XPropertySet>& rDimProps)
@@ -647,7 +647,7 @@ void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1045,7 +1045,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutFi
}
}
}
- return 0;
+ return nullptr;
}
// XUnoTunnel
@@ -1074,7 +1074,7 @@ const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId()
ScDataPilotDescriptorBase* ScDataPilotDescriptorBase::getImplementation(const Reference<XDataPilotDescriptor>& rObj )
{
- ScDataPilotDescriptorBase* pRet = NULL;
+ ScDataPilotDescriptorBase* pRet = nullptr;
Reference<lang::XUnoTunnel> xUT(rObj, UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScDataPilotDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1379,7 +1379,7 @@ void ScDataPilotTableObj::Refreshed_Impl()
ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
ScDataPilotDescriptorBase( pDocSh ),
- mpDPObject(new ScDPObject(pDocSh ? &pDocSh->GetDocument() : NULL) )
+ mpDPObject(new ScDPObject(pDocSh ? &pDocSh->GetDocument() : nullptr) )
{
ScDPSaveData aSaveData;
// set defaults like in ScPivotParam constructor
@@ -1388,7 +1388,7 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
aSaveData.SetIgnoreEmptyRows( false );
aSaveData.SetRepeatIfEmpty( false );
mpDPObject->SetSaveData(aSaveData);
- ScSheetSourceDesc aSheetDesc(pDocSh ? &pDocSh->GetDocument() : NULL);
+ ScSheetSourceDesc aSheetDesc(pDocSh ? &pDocSh->GetDocument() : nullptr);
mpDPObject->SetSheetDesc(aSheetDesc);
mpDPObject->GetSource();
}
@@ -1501,7 +1501,7 @@ ScDPSaveDimension* ScDataPilotChildObjBase::GetDPDimension( ScDPObject** ppDPObj
}
}
}
- return 0;
+ return nullptr;
}
sal_Int32 ScDataPilotChildObjBase::GetMemberCount() const
@@ -1693,7 +1693,7 @@ ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByIndex_Impl( sal_Int32 nInd
if (lcl_GetFieldDataByIndex( pObj->GetSource(), maOrient, nIndex, aFieldId ))
return new ScDataPilotFieldObj( mrParent, aFieldId, maOrient );
}
- return 0;
+ return nullptr;
}
ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -1704,7 +1704,7 @@ ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByName_Impl(const OUString&
if (lcl_GetFieldDataByName( pDPObj, aName, aFieldId ))
return new ScDataPilotFieldObj( mrParent, aFieldId, maOrient );
}
- return 0;
+ return nullptr;
}
// XEnumerationAccess
@@ -1787,7 +1787,7 @@ sal_Bool SAL_CALL ScDataPilotFieldsObj::hasByName( const OUString& aName )
{
SolarMutexGuard aGuard;
- return GetObjectByName_Impl(aName) != NULL;
+ return GetObjectByName_Impl(aName) != nullptr;
}
ScDataPilotFieldObj::ScDataPilotFieldObj(
@@ -1835,7 +1835,7 @@ void SAL_CALL ScDataPilotFieldObj::setName(const OUString& rName)
throw (RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
ScDPSaveDimension* pDim = GetDPDimension( &pDPObj );
if( pDim && !pDim->IsDataLayout() )
{
@@ -1895,7 +1895,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
{
if (!cppu::any2bool(aValue))
- setAutoShowInfo(NULL);
+ setAutoShowInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
@@ -1906,7 +1906,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
{
if (!cppu::any2bool(aValue))
- setLayoutInfo(NULL);
+ setLayoutInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
@@ -1917,7 +1917,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASREFERENCE )
{
if (!cppu::any2bool(aValue))
- setReference(NULL);
+ setReference(nullptr);
}
else if ( aNameString == SC_UNONAME_REFERENCE )
{
@@ -1928,7 +1928,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASSORTINFO )
{
if (!cppu::any2bool(aValue))
- setSortInfo(NULL);
+ setSortInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_SORTINFO )
{
@@ -1939,7 +1939,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_ISGROUP )
{
if (!cppu::any2bool(aValue))
- setGroupInfo(NULL);
+ setGroupInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_GROUPINFO )
{
@@ -1976,7 +1976,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString == SC_UNONAME_USESELPAGE )
aRet <<= false;
else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
- aRet <<= (getAutoShowInfo() != NULL);
+ aRet <<= (getAutoShowInfo() != nullptr);
else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
const DataPilotFieldAutoShowInfo* pInfo = getAutoShowInfo();
@@ -1984,7 +1984,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldAutoShowInfo(*pInfo);
}
else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
- aRet <<= (getLayoutInfo() != NULL);
+ aRet <<= (getLayoutInfo() != nullptr);
else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
const DataPilotFieldLayoutInfo* pInfo = getLayoutInfo();
@@ -1992,7 +1992,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldLayoutInfo(*pInfo);
}
else if ( aNameString == SC_UNONAME_HASREFERENCE )
- aRet <<= (getReference() != NULL);
+ aRet <<= (getReference() != nullptr);
else if ( aNameString == SC_UNONAME_REFERENCE )
{
const DataPilotFieldReference* pRef = getReference();
@@ -2000,7 +2000,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldReference(*pRef);
}
else if ( aNameString == SC_UNONAME_HASSORTINFO )
- aRet <<= (getSortInfo() != NULL);
+ aRet <<= (getSortInfo() != nullptr);
else if ( aNameString == SC_UNONAME_SORTINFO )
{
const DataPilotFieldSortInfo* pInfo = getSortInfo();
@@ -2047,7 +2047,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
if (maOrient.hasValue() && (eNew == maOrient.get< DataPilotFieldOrientation >()))
return;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -2060,7 +2060,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
(eNew == DataPilotFieldOrientation_DATA) )
{
- ScDPSaveDimension* pNewDim = 0;
+ ScDPSaveDimension* pNewDim = nullptr;
// look for existing duplicate with orientation "hidden"
@@ -2118,14 +2118,14 @@ GeneralFunction ScDataPilotFieldObj::getFunction() const
void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( pDim->GetOrientation() != DataPilotFieldOrientation_DATA )
{
// for non-data fields, property Function is the subtotals
if ( eNewFunc == GeneralFunction_NONE )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
{
sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc );
@@ -2162,7 +2162,7 @@ Sequence< GeneralFunction > ScDataPilotFieldObj::getSubtotals() const
void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubtotals )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( pDim->GetOrientation() != DataPilotFieldOrientation_DATA )
@@ -2172,7 +2172,7 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
{
// count 1: all values are allowed (including NONE and AUTO)
if( rSubtotals[ 0 ] == GeneralFunction_NONE )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
{
sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] );
@@ -2196,7 +2196,7 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
}
// set values from vector to ScDPSaveDimension
if ( aSubt.empty() )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
pDim->SetSubTotals( static_cast< long >( aSubt.size() ), &aSubt.front() );
}
@@ -2213,7 +2213,7 @@ OUString ScDataPilotFieldObj::getCurrentPage()
void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetCurrentPage( &rPage );
@@ -2224,7 +2224,7 @@ void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
void ScDataPilotFieldObj::setUseCurrentPage( bool bUse )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( bUse )
@@ -2235,7 +2235,7 @@ void ScDataPilotFieldObj::setUseCurrentPage( bool bUse )
pDim->SetCurrentPage( &aPage );
}
else
- pDim->SetCurrentPage( 0 );
+ pDim->SetCurrentPage( nullptr );
SetDPObject( pDPObj );
}
}
@@ -2244,13 +2244,13 @@ const DataPilotFieldAutoShowInfo* ScDataPilotFieldObj::getAutoShowInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetAutoShowInfo() : 0;
+ return pDim ? pDim->GetAutoShowInfo() : nullptr;
}
void ScDataPilotFieldObj::setAutoShowInfo( const DataPilotFieldAutoShowInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetAutoShowInfo( pInfo );
@@ -2262,13 +2262,13 @@ const DataPilotFieldLayoutInfo* ScDataPilotFieldObj::getLayoutInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetLayoutInfo() : 0;
+ return pDim ? pDim->GetLayoutInfo() : nullptr;
}
void ScDataPilotFieldObj::setLayoutInfo( const DataPilotFieldLayoutInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetLayoutInfo( pInfo );
@@ -2280,13 +2280,13 @@ const DataPilotFieldReference* ScDataPilotFieldObj::getReference()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetReferenceValue() : 0;
+ return pDim ? pDim->GetReferenceValue() : nullptr;
}
void ScDataPilotFieldObj::setReference( const DataPilotFieldReference* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetReferenceValue( pInfo );
@@ -2298,13 +2298,13 @@ const DataPilotFieldSortInfo* ScDataPilotFieldObj::getSortInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetSortInfo() : 0;
+ return pDim ? pDim->GetSortInfo() : nullptr;
}
void ScDataPilotFieldObj::setSortInfo( const DataPilotFieldSortInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetSortInfo( pInfo );
@@ -2322,7 +2322,7 @@ bool ScDataPilotFieldObj::getShowEmpty() const
void ScDataPilotFieldObj::setShowEmpty( bool bShow )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetShowEmpty( bShow );
@@ -2340,7 +2340,7 @@ bool ScDataPilotFieldObj::getRepeatItemLabels() const
void ScDataPilotFieldObj::setRepeatItemLabels( bool bShow )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetRepeatItemLabels( bShow );
@@ -2351,7 +2351,7 @@ void ScDataPilotFieldObj::setRepeatItemLabels( bool bShow )
bool ScDataPilotFieldObj::hasGroupInfo()
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
return pDimData->GetNamedGroupDim( pDim->GetName() ) || pDimData->GetNumGroupDim( pDim->GetName() );
@@ -2362,7 +2362,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
{
SolarMutexGuard aGuard;
DataPilotFieldGroupInfo aInfo;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
@@ -2420,7 +2420,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( /*ScDPSaveDimension* pDim =*/ GetDPDimension( &pDPObj ) )
{
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -2501,7 +2501,7 @@ void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
}
else // null passed as argument
{
- pSaveData->SetDimensionData( 0 );
+ pSaveData->SetDimensionData( nullptr );
}
pDPObj->SetSaveData( *pSaveData );
@@ -2537,7 +2537,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
if( !rItems.hasElements() )
throw IllegalArgumentException();
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
OUString aDimName = pDim->GetName();
@@ -2582,11 +2582,11 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
}
}
- ScDPSaveGroupDimension* pNewGroupDim = 0;
+ ScDPSaveGroupDimension* pNewGroupDim = nullptr;
if ( !pGroupDimension )
{
// create a new group dimension
- sNewDim = pDimData->CreateGroupDimName( aBaseDimName, *pDPObj, false, NULL );
+ sNewDim = pDimData->CreateGroupDimName( aBaseDimName, *pDPObj, false, nullptr );
pNewGroupDim = new ScDPSaveGroupDimension( aBaseDimName, sNewDim );
pGroupDimension = pNewGroupDim; // make changes to the new dim if none existed
@@ -2658,7 +2658,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
delete pNewGroupDim; // AddGroupDimension copies the object
// don't access pGroupDimension after here
}
- pGroupDimension = pNewGroupDim = NULL;
+ pGroupDimension = pNewGroupDim = nullptr;
// set orientation
ScDPSaveDimension* pSaveDimension = aSaveData.GetDimensionByName( aGroupDimName );
@@ -2714,7 +2714,7 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
throw IllegalArgumentException();
OUString aGroupDimName;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
ScDPNumGroupInfo aInfo;
@@ -2776,7 +2776,7 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
else if( (nDateParts & rInfo.GroupBy) == 0 ) // do nothing if date field exists already
{
// create new named group dimension for additional date groups
- aGroupDimName = rDimData.CreateDateGroupDimName( rInfo.GroupBy, *pDPObj, true, 0 );
+ aGroupDimName = rDimData.CreateDateGroupDimName( rInfo.GroupBy, *pDPObj, true, nullptr );
ScDPSaveGroupDimension aGroupDim( aSrcDimName, aGroupDimName, aInfo, rInfo.GroupBy );
rDimData.AddGroupDimension( aGroupDim );
@@ -3237,7 +3237,7 @@ ScDataPilotItemsObj::~ScDataPilotItemsObj()
ScDataPilotItemObj* ScDataPilotItemsObj::GetObjectByIndex_Impl( sal_Int32 nIndex ) const
{
return ((0 <= nIndex) && (nIndex < GetMemberCount())) ?
- new ScDataPilotItemObj( mrParent, maFieldId, nIndex ) : 0;
+ new ScDataPilotItemObj( mrParent, maFieldId, nIndex ) : nullptr;
}
// XNameAccess
@@ -3390,7 +3390,7 @@ void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyNam
RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
Reference<XNameAccess> xMembers = GetMembers();
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 2c98dc3f81b7..5a38f7dd0289 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -525,8 +525,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns(
}
else
{
- aParam.pSubTotals[nPos] = NULL;
- aParam.pFunctions[nPos] = NULL;
+ aParam.pSubTotals[nPos] = nullptr;
+ aParam.pFunctions[nPos] = nullptr;
}
}
//! sonst Exception oder so? (zuviele Spalten)
@@ -549,7 +549,7 @@ ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 n
{
if ( nIndex < getCount() )
return new ScSubTotalFieldObj( this, nIndex );
- return NULL;
+ return nullptr;
}
void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException, std::exception)
@@ -604,8 +604,8 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
}
else
{
- aParam.pSubTotals[nPos] = NULL;
- aParam.pFunctions[nPos] = NULL;
+ aParam.pSubTotals[nPos] = nullptr;
+ aParam.pFunctions[nPos] = nullptr;
}
}
else // too many fields / columns
@@ -779,7 +779,7 @@ const uno::Sequence<sal_Int8>& ScSubTotalDescriptorBase::getUnoTunnelId()
ScSubTotalDescriptorBase* ScSubTotalDescriptorBase::getImplementation(const uno::Reference<sheet::XSubTotalDescriptor>& rObj)
{
- ScSubTotalDescriptorBase* pRet = NULL;
+ ScSubTotalDescriptorBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScSubTotalDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -997,7 +997,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocSh = NULL; // invalid
+ pDocSh = nullptr; // invalid
}
}
}
@@ -1651,7 +1651,7 @@ void ScDatabaseRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
else if ( dynamic_cast<const ScDBRangeRefreshedHint*>(&rHint) )
{
ScDBData* pDBData = GetDBData_Impl();
@@ -1667,7 +1667,7 @@ void ScDatabaseRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
{
- ScDBData* pRet = NULL;
+ ScDBData* pRet = nullptr;
if (pDocShell)
{
if (bIsUnnamed)
@@ -1919,7 +1919,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException, std::ex
SCCOL nDummyCol;
SCROW nDummyRow;
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
- bContinue = aFunc.DoImport( nTab, aImportParam, NULL, true ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( nTab, aImportParam, nullptr, true ); //! Api-Flag as parameter
}
// interne Operationen (sort, query, subtotal) nur, wenn kein Fehler
@@ -1985,7 +1985,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScDatabaseRangeObj::getReferredCells(
else
return new ScCellRangeObj( pDocShell, aRange );
}
- return NULL;
+ return nullptr;
}
// XPropertySet
@@ -2048,7 +2048,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
aNewData.SetAdvancedQuerySource(&aRange);
}
else
- aNewData.SetAdvancedQuerySource(NULL);
+ aNewData.SetAdvancedQuerySource(nullptr);
}
else if (aString == SC_UNONAME_FLTCRT )
{
@@ -2226,7 +2226,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -2235,15 +2235,15 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(size_t nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (!pNames)
- return NULL;
+ return nullptr;
const ScDBCollection::NamedDBs& rDBs = pNames->getNamedDBs();
if (rDBs.empty() || nIndex >= rDBs.size())
- return NULL;
+ return nullptr;
ScDBCollection::NamedDBs::const_iterator itr = rDBs.begin();
::std::advance(itr, nIndex); // boundary check is done above.
@@ -2257,7 +2257,7 @@ ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByName_Impl(const OUString& aN
OUString aString(aName);
return new ScDatabaseRangeObj( pDocShell, aString );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScDatabaseRangesObj::addNewByName( const OUString& aName,
@@ -2397,7 +2397,7 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const OUString& aName )
{
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (pNames)
- return pNames->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aName)) != NULL;
+ return pNames->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aName)) != nullptr;
}
return false;
}
@@ -2423,7 +2423,7 @@ void ScUnnamedDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 9e3b939c03d1..f7a02ce8aedd 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -93,7 +93,7 @@ void ScDocDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
@@ -279,7 +279,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const OUString
// check if pool default is set
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- if ( pPool->GetPoolDefaultItem( nWID ) != NULL )
+ if ( pPool->GetPoolDefaultItem( nWID ) != nullptr )
eRet = beans::PropertyState_DIRECT_VALUE;
}
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 4fc02fabc82d..f04281e47c26 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -84,7 +84,7 @@ void ScDispatchProviderInterceptor::Notify( SfxBroadcaster&, const SfxHint& rHin
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
// XDispatchProvider
@@ -181,9 +181,9 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject&
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xMyDispatch = NULL;
+ m_xMyDispatch = nullptr;
}
- m_xIntercepted = NULL;
+ m_xIntercepted = nullptr;
}
ScDispatch::ScDispatch(ScTabViewShell* pViewSh) :
@@ -211,7 +211,7 @@ void ScDispatch::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
// XDispatch
@@ -380,7 +380,7 @@ void SAL_CALL ScDispatch::disposing( const css::lang::EventObject& rSource )
for ( size_t n=0; n<aDataSourceListeners.size(); n++ )
aDataSourceListeners[n]->disposing( aEvent );
- pViewShell = NULL;
+ pViewShell = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 69a5cb3133ae..36ba321ce0e7 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -368,8 +368,8 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
SfxBaseModel( pDocSh ),
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
- pPrintFuncCache( NULL ),
- pPrinterOptions( NULL ),
+ pPrintFuncCache( nullptr ),
+ pPrinterOptions( nullptr ),
maChangesListeners( m_aMutex )
{
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
@@ -410,7 +410,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
}
// beim setDelegator darf die zusaetzliche Ref nicht mehr existieren
- xFormatter = NULL;
+ xFormatter = nullptr;
if (xNumberAgg.is())
xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
@@ -423,7 +423,7 @@ ScDocument* ScModelObj::GetDocument() const
{
if (pDocShell)
return &pDocShell->GetDocument();
- return NULL;
+ return nullptr;
}
SfxObjectShell* ScModelObj::GetEmbeddedObject() const
@@ -453,7 +453,7 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
{
if (pDocShell)
return pDocShell->GetSheetSaveData();
- return NULL;
+ return nullptr;
}
void ScModelObj::RepaintRange( const ScRange& rRange )
@@ -724,7 +724,7 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy
if (( pShell = dynamic_cast<ScEditShell*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )) )
xTransferable = pShell->GetEditView()->GetTransferable();
- else if ( 0 != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
+ else if ( nullptr != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
{
ScDrawView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
@@ -1034,14 +1034,14 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // has become invalid
+ pDocShell = nullptr; // has become invalid
if (xNumberAgg.is())
{
SvNumberFormatsSupplierObj* pNumFmt =
SvNumberFormatsSupplierObj::getImplementation(
uno::Reference<util::XNumberFormatsSupplier>(xNumberAgg, uno::UNO_QUERY) );
if ( pNumFmt )
- pNumFmt->SetNumberFormatter( NULL );
+ pNumFmt->SetNumberFormatter( nullptr );
}
DELETEZ( pPrintFuncCache ); // must be deleted because it has a pointer to the DocShell
@@ -1100,7 +1100,7 @@ uno::Reference<sheet::XSpreadsheets> SAL_CALL ScModelObj::getSheets() throw(uno:
SolarMutexGuard aGuard;
if (pDocShell)
return new ScTableSheetsObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XStyleFamiliesSupplier
@@ -1111,14 +1111,14 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getStyleFamilies()
SolarMutexGuard aGuard;
if (pDocShell)
return new ScStyleFamiliesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XRenderable
static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyValue>& rOptions )
{
- OutputDevice* pRet = NULL;
+ OutputDevice* pRet = nullptr;
const beans::PropertyValue* pPropArray = rOptions.getConstArray();
long nPropCount = rOptions.getLength();
for (long i = 0; i < nPropCount; i++)
@@ -1285,7 +1285,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
if ( pSelObj && pSelObj->GetDocShell() == pDocShell )
{
- bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
+ bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != nullptr );
bool bCursor = pSelObj->IsCursorOnly();
const ScRangeList& rRanges = pSelObj->GetRangeList();
@@ -1506,7 +1506,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1524,7 +1524,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, nullptr );
ScRange aCellRange;
bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
@@ -1592,7 +1592,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScDocument& rDoc = pDocShell->GetDocument();
- FmFormView* pDrawView = NULL;
+ FmFormView* pDrawView = nullptr;
ScDrawLayer* pModel = rDoc.GetDrawLayer();
@@ -1604,7 +1604,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1654,7 +1654,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, nullptr );
// resolve the hyperlinks for PDF export
@@ -1761,7 +1761,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
SolarMutexGuard aGuard;
if (pDocShell)
return new ScLinkTargetTypesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XActionLockable
@@ -1926,7 +1926,7 @@ uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(un
return new ScDrawPagesObj(pDocShell);
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return NULL;
+ return nullptr;
}
// XGoalSeek
@@ -2307,7 +2307,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
}
else if ( aString == SC_UNO_HASDRAWPAGES )
{
- ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != 0) );
+ ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != nullptr) );
}
else if ( aString == SC_UNO_BASICLIBRARIES )
{
@@ -2446,7 +2446,7 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create(
try
{
- xRet = arguments == 0
+ xRet = arguments == nullptr
? SvxFmMSFactory::createInstance(aServiceSpecifier)
: SvxFmMSFactory::createInstanceWithArguments(
aServiceSpecifier, *arguments);
@@ -2475,7 +2475,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
throw(uno::Exception, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return create(aServiceSpecifier, 0);
+ return create(aServiceSpecifier, nullptr);
}
uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstanceWithArguments(
@@ -2593,7 +2593,7 @@ const uno::Sequence<sal_Int8>& ScModelObj::getUnoTunnelId()
ScModelObj* ScModelObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScModelObj* pRet = NULL;
+ ScModelObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScModelObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -2958,7 +2958,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -2978,7 +2978,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int
}
}
}
- return NULL;
+ return nullptr;
}
// XDrawPages
@@ -3070,7 +3070,7 @@ void ScTableSheetsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3081,7 +3081,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
return new ScTableSheetObj( pDocShell, static_cast<SCTAB>(nIndex) );
- return NULL;
+ return nullptr;
}
ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3092,7 +3092,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) c
if ( pDocShell->GetDocument().GetTable( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nIndex );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int16 nPosition )
@@ -3482,7 +3482,7 @@ void ScTableColumnsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3494,7 +3494,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) con
if ( pDocShell && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3505,7 +3505,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3518,7 +3518,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
{
ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
(SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSCOLS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSCOLS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3534,7 +3534,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
{
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELCOLS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELCOLS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3750,7 +3750,7 @@ void ScTableRowsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3762,7 +3762,7 @@ ScTableRowObj* ScTableRowsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nRow <= nEndRow )
return new ScTableRowObj( pDocShell, nRow, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3775,7 +3775,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
{
ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSROWS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSROWS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3791,7 +3791,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
{
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELROWS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELROWS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3972,7 +3972,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString == SC_UNONAME_CELLVIS )
{
SCROW nLastRow;
- bool bVis = !rDoc.RowHidden(nStartRow, nTab, NULL, &nLastRow);
+ bool bVis = !rDoc.RowHidden(nStartRow, nTab, nullptr, &nLastRow);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
else if ( aNameString == SC_UNONAME_CELLFILT )
@@ -4025,7 +4025,7 @@ void ScSpreadsheetSettingsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4035,7 +4035,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettingsObj::getPr
throw(uno::RuntimeException, std::exception)
{
//! muss noch
- return NULL;
+ return nullptr;
}
void SAL_CALL ScSpreadsheetSettingsObj::setPropertyValue(
@@ -4079,7 +4079,7 @@ void ScAnnotationsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4101,7 +4101,7 @@ ScAnnotationObj* ScAnnotationsObj::GetObjectByIndex_Impl( sal_Int32 nIndex ) con
if ( GetAddressByIndex_Impl( nIndex, aPos ) )
return new ScAnnotationObj( pDocShell, aPos );
}
- return NULL;
+ return nullptr;
}
// XSheetAnnotations
@@ -4115,7 +4115,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
{
OSL_ENSURE( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
- pDocShell->GetDocFunc().ReplaceNote( aPos, rText, 0, 0, true );
+ pDocShell->GetDocFunc().ReplaceNote( aPos, rText, nullptr, nullptr, true );
}
}
@@ -4213,7 +4213,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4246,7 +4246,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 );
- return NULL; // kein Dokument oder falscher Index
+ return nullptr; // kein Dokument oder falscher Index
}
ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
@@ -4255,7 +4255,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nTab+nIndex+1 );
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
void SAL_CALL ScScenariosObj::addNewByName( const OUString& aName,
diff --git a/sc/source/ui/unoobj/drdefuno.cxx b/sc/source/ui/unoobj/drdefuno.cxx
index 8aa5ca94af51..fcfbfc3fb91e 100644
--- a/sc/source/ui/unoobj/drdefuno.cxx
+++ b/sc/source/ui/unoobj/drdefuno.cxx
@@ -24,7 +24,7 @@
using namespace ::com::sun::star;
ScDrawDefaultsObj::ScDrawDefaultsObj(ScDocShell* pDocSh) :
- SvxUnoDrawPool( NULL ),
+ SvxUnoDrawPool( nullptr ),
pDocShell( pDocSh )
{
// SvxUnoDrawPool is initialized without model,
@@ -46,13 +46,13 @@ void ScDrawDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
SfxItemPool* ScDrawDefaultsObj::getModelPool( bool bReadOnly ) throw()
{
- SfxItemPool* pRet = NULL;
+ SfxItemPool* pRet = nullptr;
try
{
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index 892708d78fb1..219d74b7b559 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -110,8 +110,8 @@ ScEditEngineDefaulter* ScCellEditSource::GetEditEngine()
ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddress& rP) :
pDocShell( pDocSh ),
aCellPos( rP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
bDataValid( false )
{
if (pDocShell)
@@ -137,7 +137,7 @@ SvxEditSource* ScAnnotationEditSource::Clone() const
SdrObject* ScAnnotationEditSource::GetCaptionObj()
{
ScPostIt* pNote = pDocShell->GetDocument().GetNote(aCellPos);
- return pNote ? pNote->GetOrCreateCaption( aCellPos ) : 0;
+ return pNote ? pNote->GetOrCreateCaption( aCellPos ) : nullptr;
}
SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
@@ -205,7 +205,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index 01e42c44a982..4edcceb92672 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -49,7 +49,7 @@ void ScSheetEventsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- mpDocShell = NULL;
+ mpDocShell = nullptr;
}
}
@@ -109,7 +109,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
if (!aScript.isEmpty())
aNewEvents.SetScript( nEvent, &aScript );
else
- aNewEvents.SetScript( nEvent, NULL ); // reset
+ aNewEvents.SetScript( nEvent, nullptr ); // reset
mpDocShell->GetDocument().SetSheetEvents( mnTab, &aNewEvents );
mpDocShell->SetDocumentModified();
@@ -125,7 +125,7 @@ uno::Any SAL_CALL ScSheetEventsObj::getByName( const OUString& aName )
if (nEvent == ScSheetEventId::NOTFOUND)
throw container::NoSuchElementException();
- const OUString* pScript = NULL;
+ const OUString* pScript = nullptr;
if (mpDocShell)
{
const ScSheetEvents* pEvents = mpDocShell->GetDocument().GetSheetEvents(mnTab);
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 69336affb287..bcb87b94998f 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -180,7 +180,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
if ( xInputStream.is() )
pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream ));
- std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream.get(), SC_IMPORTFILE));
+ std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( nullptr, aPrivDatName, pInStream.get(), SC_IMPORTFILE));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -199,7 +199,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
{
// HTML import.
std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg(
- pFact->CreateScTextImportOptionsDlg(NULL));
+ pFact->CreateScTextImportOptionsDlg(nullptr));
if (pDlg->Execute() == RET_OK)
{
@@ -281,7 +281,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding);
- std::unique_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(NULL,
+ std::unique_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(nullptr,
bAscii, &aOptions, &aTitle, bMultiByte, bDBEnc,
!bExport));
OSL_ENSURE(pDlg, "Dialog create fail!");
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 02cf321ed616..4a66d9f712f3 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -245,7 +245,7 @@ void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry
ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
- return nIndex < aEntries.size() ? aEntries[nIndex] : NULL;
+ return nIndex < aEntries.size() ? aEntries[nIndex] : nullptr;
}
void SAL_CALL ScTableConditionalFormat::addNew(
@@ -492,7 +492,7 @@ const uno::Sequence<sal_Int8>& ScTableConditionalFormat::getUnoTunnelId()
ScTableConditionalFormat* ScTableConditionalFormat::getImplementation(const uno::Reference<sheet::XSheetConditionalEntries>& rObj)
{
- ScTableConditionalFormat* pRet = NULL;
+ ScTableConditionalFormat* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableConditionalFormat*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1017,7 +1017,7 @@ const uno::Sequence<sal_Int8>& ScTableValidationObj::getUnoTunnelId()
ScTableValidationObj* ScTableValidationObj::getImplementation(const uno::Reference<beans::XPropertySet>& rObj)
{
- ScTableValidationObj* pRet = NULL;
+ ScTableValidationObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableValidationObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index c6fe2d438d9b..708543bd58e3 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -64,7 +64,7 @@ void ScForbiddenCharsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 84ed978b6295..5dc09a3d9c66 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -80,7 +80,7 @@ ScDocument* ScTempDocSource::CreateDocument()
ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) :
rCache( rDocCache ),
- pTempDoc( NULL )
+ pTempDoc( nullptr )
{
if ( rCache.IsInUse() )
pTempDoc = CreateDocument();
@@ -109,7 +109,7 @@ ScDocument* ScTempDocSource::GetDocument()
}
ScTempDocCache::ScTempDocCache() :
- pDoc( NULL ),
+ pDoc( nullptr ),
bInUse( false )
{
}
@@ -130,7 +130,7 @@ void ScTempDocCache::Clear()
{
OSL_ENSURE( !bInUse, "ScTempDocCache::Clear: bInUse" );
delete pDoc;
- pDoc = NULL;
+ pDoc = nullptr;
}
// copy results from one document into another
@@ -167,14 +167,14 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewRange );
- pDestDoc->CopyFromClip( aNewRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA, NULL, pClipDoc, false );
+ pDestDoc->CopyFromClip( aNewRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA, nullptr, pClipDoc, false );
delete pClipDoc;
return true;
}
ScFunctionAccess::ScFunctionAccess() :
- pOptions( NULL ),
+ pOptions( nullptr ),
aPropertyMap( ScDocOptionsHelper::GetPropertyMap() ),
mbArray( true ), // default according to behaviour of older Office versions
mbValid( true )
@@ -620,7 +620,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
// call GetMatrix before GetErrCode because GetMatrix always recalculates
// if there is no matrix result
- const ScMatrix* pMat = (mbArray && pFormula) ? pFormula->GetMatrix() : 0;
+ const ScMatrix* pMat = (mbArray && pFormula) ? pFormula->GetMatrix() : nullptr;
sal_uInt16 nErrCode = pFormula ? pFormula->GetErrCode() : errIllegalArgument;
if ( nErrCode == 0 )
{
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 5d2694e75757..d4d388b0c320 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -97,7 +97,7 @@ void ScSheetLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -124,7 +124,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
// XNamed
@@ -149,7 +149,7 @@ void SAL_CALL ScSheetLinkObj::refresh()
SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
- pLink->Refresh( pLink->GetFileName(), pLink->GetFilterName(), NULL, pLink->GetRefreshDelay() );
+ pLink->Refresh( pLink->GetFileName(), pLink->GetFilterName(), nullptr, pLink->GetRefreshDelay() );
}
void SAL_CALL ScSheetLinkObj::addRefreshListener(
@@ -330,7 +330,7 @@ void ScSheetLinkObj::setFilter(const OUString& Filter)
if (pLink)
{
OUString aFilterStr(Filter);
- pLink->Refresh( aFileName, aFilterStr, NULL, pLink->GetRefreshDelay() );
+ pLink->Refresh( aFileName, aFilterStr, nullptr, pLink->GetRefreshDelay() );
}
}
@@ -392,7 +392,7 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -401,7 +401,7 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
typedef std::unordered_set<OUString, OUStringHash> StrSetType;
StrSetType aNames;
@@ -423,7 +423,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
}
}
- return NULL; // kein Dokument oder Index zu gross
+ return nullptr; // kein Dokument oder Index zu gross
}
ScSheetLinkObj* ScSheetLinksObj::GetObjectByName_Impl(const OUString& aName)
@@ -446,7 +446,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByName_Impl(const OUString& aName)
}
}
- return NULL;
+ return nullptr;
}
// XEnumerationAccess
@@ -593,7 +593,7 @@ static ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, size_t nPos )
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, size_t nP) :
@@ -621,7 +621,7 @@ void ScAreaLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -657,7 +657,7 @@ void ScAreaLinkObj::Modify_Impl( const OUString* pNewFile, const OUString* pNewF
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument().GetLinkManager();
pLinkManager->Remove( pLink );
- pLink = NULL; // bei Remove geloescht
+ pLink = nullptr; // bei Remove geloescht
bool bFitBlock = true; // verschieben, wenn durch Update Groesse geaendert
if (pNewFile)
@@ -827,7 +827,7 @@ OUString ScAreaLinkObj::getFileName() const
void ScAreaLinkObj::setFileName(const OUString& rNewName)
{
SolarMutexGuard aGuard;
- Modify_Impl( &rNewName, NULL, NULL, NULL, NULL );
+ Modify_Impl( &rNewName, nullptr, nullptr, nullptr, nullptr );
}
OUString ScAreaLinkObj::getFilter() const
@@ -843,7 +843,7 @@ OUString ScAreaLinkObj::getFilter() const
void ScAreaLinkObj::setFilter(const OUString& Filter)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, &Filter, NULL, NULL, NULL );
+ Modify_Impl( nullptr, &Filter, nullptr, nullptr, nullptr );
}
OUString ScAreaLinkObj::getFilterOptions() const
@@ -859,7 +859,7 @@ OUString ScAreaLinkObj::getFilterOptions() const
void ScAreaLinkObj::setFilterOptions(const OUString& FilterOptions)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, &FilterOptions, NULL, NULL );
+ Modify_Impl( nullptr, nullptr, &FilterOptions, nullptr, nullptr );
}
sal_Int32 ScAreaLinkObj::getRefreshDelay() const
@@ -894,7 +894,7 @@ void SAL_CALL ScAreaLinkObj::setSourceArea( const OUString& aSourceArea )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, NULL, &aSourceArea, NULL );
+ Modify_Impl( nullptr, nullptr, nullptr, &aSourceArea, nullptr );
}
table::CellRangeAddress SAL_CALL ScAreaLinkObj::getDestArea() throw(uno::RuntimeException, std::exception)
@@ -911,7 +911,7 @@ void SAL_CALL ScAreaLinkObj::setDestArea( const table::CellRangeAddress& aDestAr
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, NULL, NULL, &aDestArea );
+ Modify_Impl( nullptr, nullptr, nullptr, nullptr, &aDestArea );
}
ScAreaLinksObj::ScAreaLinksObj(ScDocShell* pDocSh) :
@@ -935,7 +935,7 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -946,7 +946,7 @@ ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < getCount() )
return new ScAreaLinkObj( pDocShell, (size_t)nIndex );
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestPos,
@@ -1065,7 +1065,7 @@ void ScDDELinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -1260,7 +1260,7 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1274,7 +1274,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell->GetDocument().GetDdeLinkData( (size_t)nIndex, aAppl, aTopic, aItem ) )
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
- return NULL;
+ return nullptr;
}
ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const OUString& aName)
@@ -1293,7 +1293,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const OUString& aName)
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
}
- return NULL;
+ return nullptr;
}
// XEnumerationAccess
@@ -1620,7 +1620,7 @@ sal_Bool SAL_CALL ScExternalDocLinkObj::hasByName(const OUString &aName)
// #i116940# be consistent with getByName: allow only table names which have a cache already
ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false);
- return (pTable.get() != NULL);
+ return (pTable.get() != nullptr);
}
sal_Int32 SAL_CALL ScExternalDocLinkObj::getCount()
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index f4e328217f0a..2e390f68d068 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -104,14 +104,14 @@ void ScNamedRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
// Helper functions
ScRangeData* ScNamedRangeObj::GetRangeData_Impl()
{
- ScRangeData* pRet = NULL;
+ ScRangeData* pRet = nullptr;
if (pDocShell)
{
ScRangeName* pNames;
@@ -189,7 +189,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
if (pNewType)
nType = *pNewType;
- ScRangeData* pNew = NULL;
+ ScRangeData* pNew = nullptr;
if (pNewTokens)
pNew = new ScRangeData( &rDoc, aInsName, *pNewTokens, aPos, nType );
else
@@ -206,7 +206,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
}
else
{
- pNew = NULL; //! uno::Exception/Error or something
+ pNew = nullptr; //! uno::Exception/Error or something
delete pNewRanges;
}
}
@@ -225,7 +225,7 @@ void SAL_CALL ScNamedRangeObj::setName( const OUString& aNewName )
OUString aNewStr(aNewName);
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( &aNewStr, NULL, NULL, NULL, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( &aNewStr, nullptr, nullptr, nullptr, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
if ( aName != aNewStr ) // some error occurred...
throw uno::RuntimeException(); // no other exceptions specified
@@ -248,7 +248,7 @@ void SAL_CALL ScNamedRangeObj::setContent( const OUString& aContent )
SolarMutexGuard aGuard;
OUString aContStr(aContent);
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, &aContStr, NULL, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, &aContStr, nullptr, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
}
table::CellAddress SAL_CALL ScNamedRangeObj::getReferencePosition()
@@ -283,7 +283,7 @@ void SAL_CALL ScNamedRangeObj::setReferencePosition( const table::CellAddress& a
SolarMutexGuard aGuard;
ScAddress aPos( (SCCOL)aReferencePosition.Column, (SCROW)aReferencePosition.Row, aReferencePosition.Sheet );
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, NULL, &aPos, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, nullptr, &aPos, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
}
sal_Int32 SAL_CALL ScNamedRangeObj::getType() throw(uno::RuntimeException, std::exception)
@@ -315,7 +315,7 @@ void SAL_CALL ScNamedRangeObj::setType( sal_Int32 nUnoType )
if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER;
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, NULL, NULL, &nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, nullptr, nullptr, &nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );
}
// XFormulaTokens
@@ -344,7 +344,7 @@ void SAL_CALL ScNamedRangeObj::setTokens( const uno::Sequence<sheet::FormulaToke
ScTokenArray aTokenArray;
(void)ScTokenConversion::ConvertToTokenArray( pDocShell->GetDocument(), aTokenArray, rTokens );
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, &aTokenArray, NULL, NULL, NULL, formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, &aTokenArray, nullptr, nullptr, nullptr, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -365,7 +365,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScNamedRangeObj::getReferredCells()
else
return new ScCellRangeObj( pDocShell, aRange );
}
- return NULL;
+ return nullptr;
}
// beans::XPropertySet
@@ -489,7 +489,7 @@ void ScNamedRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
}
@@ -527,7 +527,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName,
}
else
{
- pNew = NULL;
+ pNew = nullptr;
delete pNewRanges;
}
}
@@ -832,11 +832,11 @@ ScGlobalNamedRangesObj::~ScGlobalNamedRangesObj()
ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
ScRangeName* pNames = pDocShell->GetDocument().GetRangeName();
if (!pNames)
- return NULL;
+ return nullptr;
ScRangeName::const_iterator itr = pNames->begin(), itrEnd = pNames->end();
sal_uInt16 nPos = 0;
@@ -849,14 +849,14 @@ ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex
}
++nPos;
}
- return NULL;
+ return nullptr;
}
ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByName_Impl(const OUString& aName)
{
if ( pDocShell && hasByName(aName) )
return new ScNamedRangeObj(this, pDocShell, aName);
- return NULL;
+ return nullptr;
}
ScRangeName* ScGlobalNamedRangesObj::GetRangeName_Impl()
@@ -885,24 +885,24 @@ ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByName_Impl(const OUString& aNa
{
if ( pDocShell && hasByName( aName ) )
return new ScNamedRangeObj( this, pDocShell, aName, mxSheet);
- return NULL;
+ return nullptr;
}
ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByIndex_Impl( sal_uInt16 nIndex )
{
if (!pDocShell)
- return NULL;
+ return nullptr;
OUString aName = mxSheet->getName();
ScDocument& rDoc = pDocShell->GetDocument();
SCTAB nTab;
if (!rDoc.GetTable(aName, nTab))
- return NULL;
+ return nullptr;
ScRangeName* pNames = rDoc.GetRangeName( nTab );
if (!pNames)
- return NULL;
+ return nullptr;
ScRangeName::const_iterator itr = pNames->begin(), itrEnd = pNames->end();
sal_uInt16 nPos = 0;
@@ -915,7 +915,7 @@ ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByIndex_Impl( sal_uInt16 nIndex
}
++nPos;
}
- return NULL;
+ return nullptr;
}
ScRangeName* ScLocalNamedRangesObj::GetRangeName_Impl()
@@ -953,14 +953,14 @@ void ScLabelRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
// Helper functions
ScRangePair* ScLabelRangeObj::GetData_Impl()
{
- ScRangePair* pRet = NULL;
+ ScRangePair* pRet = nullptr;
if (pDocShell)
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -1030,7 +1030,7 @@ void SAL_CALL ScLabelRangeObj::setLabelArea( const table::CellRangeAddress& aLab
SolarMutexGuard aGuard;
ScRange aLabelRange;
ScUnoConversion::FillScRange( aLabelRange, aLabelArea );
- Modify_Impl( &aLabelRange, NULL );
+ Modify_Impl( &aLabelRange, nullptr );
}
table::CellRangeAddress SAL_CALL ScLabelRangeObj::getDataArea()
@@ -1050,7 +1050,7 @@ void SAL_CALL ScLabelRangeObj::setDataArea( const table::CellRangeAddress& aData
SolarMutexGuard aGuard;
ScRange aDataRange;
ScUnoConversion::FillScRange( aDataRange, aDataArea );
- Modify_Impl( NULL, &aDataRange );
+ Modify_Impl( nullptr, &aDataRange );
}
ScLabelRangesObj::ScLabelRangesObj(ScDocShell* pDocSh, bool bCol) :
@@ -1075,7 +1075,7 @@ void ScLabelRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
}
@@ -1094,7 +1094,7 @@ ScLabelRangeObj* ScLabelRangesObj::GetObjectByIndex_Impl(size_t nIndex)
return new ScLabelRangeObj( pDocShell, bColumn, pData->GetRange(0) );
}
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScLabelRangesObj::addNew( const table::CellRangeAddress& aLabelArea,
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index 73b15fd6824b..ad2f39948878 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -58,7 +58,7 @@ SC_SIMPLE_SERVICE_INFO( ScAnnotationObj, "ScAnnotationObj", "com.sun.star.sheet.
ScAnnotationObj::ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos) :
pDocShell( pDocSh ),
aCellPos( rPos ),
- pUnoText( NULL )
+ pUnoText( nullptr )
{
pDocShell->GetDocument().AddUnoObject(*this);
@@ -88,7 +88,7 @@ void ScAnnotationObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -104,7 +104,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScAnnotationObj::getParent() throw(uno:
if (pDocShell)
return static_cast<cppu::OWeakObject*>(new ScCellObj( pDocShell, aCellPos ));
- return NULL;
+ return nullptr;
}
void SAL_CALL ScAnnotationObj::setParent( const uno::Reference<uno::XInterface>& /* Parent */ )
@@ -249,6 +249,6 @@ SvxUnoText& ScAnnotationObj::GetUnoText()
const ScPostIt* ScAnnotationObj::ImplGetNote() const
{
- return pDocShell ? pDocShell->GetDocument().GetNote(aCellPos) : 0;
+ return pDocShell ? pDocShell->GetDocument().GetNote(aCellPos) : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index 5315b098b0d6..b158b0e7a2df 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -179,7 +179,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue(
}
ScDocOptionsObj::ScDocOptionsObj( const ScDocOptions& rOpt ) :
- ScModelObj( NULL ),
+ ScModelObj( nullptr ),
aOptions( rOpt )
{
}
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 12a11be841e0..eac13bb4dff8 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -261,7 +261,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
// No stream, no detection.
return OUString();
- const char* pSearchFilterName = NULL;
+ const char* pSearchFilterName = nullptr;
if (aTypeName == "calc_Lotus")
{
if (!detectThisFormat(*pStream, pLotus) && !detectThisFormat(*pStream, pLotusNew) && !detectThisFormat(*pStream, pLotus2))
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 7cefcd509960..bf51c6a0fdc8 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -435,7 +435,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
{
case SC_SERVICE_SHEET:
// noch nicht eingefuegt - DocShell=Null
- xRet.set(static_cast<sheet::XSpreadsheet*>(new ScTableSheetObj(NULL,0)));
+ xRet.set(static_cast<sheet::XSpreadsheet*>(new ScTableSheetObj(nullptr,0)));
break;
case SC_SERVICE_URLFIELD:
case SC_SERVICE_PAGEFIELD:
@@ -449,14 +449,14 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
{
uno::Reference<text::XTextRange> xNullContent;
xRet.set(static_cast<text::XTextField*>(
- new ScEditFieldObj(xNullContent, NULL, getFieldType(nType), ESelection())));
+ new ScEditFieldObj(xNullContent, nullptr, getFieldType(nType), ESelection())));
}
break;
case SC_SERVICE_CELLSTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PARA, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PARA, OUString() )));
break;
case SC_SERVICE_PAGESTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PAGE, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PAGE, OUString() )));
break;
case SC_SERVICE_AUTOFORMAT:
xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index c7e87878f209..019f576376be 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -67,7 +67,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
{
static const SvEventDescription aMacroDescriptionsImpl[] =
{
- { 0, NULL }
+ { 0, nullptr }
};
return aMacroDescriptionsImpl;
}
@@ -77,7 +77,7 @@ ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate
if( pShape )
if( SdrObject* pObj = pShape->GetSdrObject() )
return ScDrawLayer::GetMacroInfo( pObj, bCreate );
- return 0;
+ return nullptr;
}
namespace
@@ -90,8 +90,8 @@ namespace
}
ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
- pShapePropertySet(NULL),
- pShapePropertyState(NULL),
+ pShapePropertySet(nullptr),
+ pShapePropertyState(nullptr),
bIsTextShape(false),
bIsNoteCaption(false),
bInitializedNotifier(false)
@@ -105,13 +105,13 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
if (mxShapeAgg.is())
{
- xShape = NULL; // during setDelegator, mxShapeAgg must be the only ref
+ xShape = nullptr; // during setDelegator, mxShapeAgg must be the only ref
mxShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
xShape.set(uno::Reference<drawing::XShape>( mxShapeAgg, uno::UNO_QUERY ));
- bIsTextShape = ( SvxUnoTextBase::getImplementation( mxShapeAgg ) != NULL );
+ bIsTextShape = ( SvxUnoTextBase::getImplementation( mxShapeAgg ) != nullptr );
}
{
@@ -1309,7 +1309,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScShapeObj::getParent() throw (uno::R
}
}
- return 0;
+ return nullptr;
}
void SAL_CALL ScShapeObj::setParent( const uno::Reference< uno::XInterface >& ) throw (lang::NoSupportException, uno::RuntimeException, std::exception)
@@ -1354,7 +1354,7 @@ SdrObject* ScShapeObj::GetSdrObject() const throw()
return pShape->GetSdrObject();
}
- return NULL;
+ return nullptr;
}
#define SC_EVENTACC_ONCLICK "OnClick"
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index 08bcccba422c..edc4809ed342 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -235,7 +235,7 @@ const uno::Sequence<sal_Int8>& ScCellSearchObj::getUnoTunnelId()
ScCellSearchObj* ScCellSearchObj::getImplementation(const uno::Reference<util::XSearchDescriptor>& rObj)
{
- ScCellSearchObj* pRet = NULL;
+ ScCellSearchObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellSearchObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index c0d33728dbe6..6dd6b5701a47 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -416,7 +416,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -432,7 +432,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) cons
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
}
OSL_FAIL("getStyleFamilyByType: keine DocShell oder falscher Typ");
- return NULL;
+ return nullptr;
}
ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const
@@ -440,7 +440,7 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) c
if ( nIndex < SC_STYLE_FAMILY_COUNT )
return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]);
- return NULL; // ungueltiger Index
+ return nullptr; // ungueltiger Index
}
ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName) const
@@ -454,7 +454,7 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
}
// no assertion - called directly from getByName
- return NULL;
+ return nullptr;
}
// container::XIndexAccess
@@ -633,7 +633,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -656,7 +656,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex)
}
}
}
- return NULL;
+ return nullptr;
}
ScStyleObj* ScStyleFamilyObj::GetObjectByName_Impl(const OUString& aName)
@@ -670,7 +670,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByName_Impl(const OUString& aName)
if ( pStylePool->Find( aString, eFamily ) )
return new ScStyleObj( pDocShell, eFamily, aString );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::Any& aElement )
@@ -1011,7 +1011,7 @@ const uno::Sequence<sal_Int8>& ScStyleObj::getUnoTunnelId()
ScStyleObj* ScStyleObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScStyleObj* pRet = NULL;
+ ScStyleObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScStyleObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1025,7 +1025,7 @@ void ScStyleObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1037,7 +1037,7 @@ SfxStyleSheetBase* ScStyleObj::GetStyle_Impl()
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
return pStylePool->Find( aStyleName, eFamily );
}
- return NULL;
+ return nullptr;
}
// style::XStyle
@@ -1183,7 +1183,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
{
- const SfxItemPropertySimpleEntry* pEntry = NULL;
+ const SfxItemPropertySimpleEntry* pEntry = nullptr;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
@@ -1207,8 +1207,8 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
}
}
- rpResultEntry = NULL;
- return NULL;
+ rpResultEntry = nullptr;
+ return nullptr;
}
beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPropertyName )
@@ -1217,7 +1217,7 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPro
SolarMutexGuard aGuard;
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
@@ -1278,7 +1278,7 @@ void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName )
if ( !pEntry )
throw beans::UnknownPropertyException();
- SetOnePropertyValue( aPropertyName, pEntry, NULL );
+ SetOnePropertyValue( aPropertyName, pEntry, nullptr );
}
uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName )
@@ -1288,7 +1288,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName
SolarMutexGuard aGuard;
uno::Any aAny;
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pStyleSet && pResultEntry )
@@ -1506,7 +1506,7 @@ void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>&
for (sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( pNames[i] );
- SetOnePropertyValue( pNames[i], pEntry, NULL );
+ SetOnePropertyValue( pNames[i], pEntry, nullptr );
}
}
}
@@ -1883,7 +1883,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName )
}
else
{
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index d4032eb5fd6b..17da342e3ab8 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -85,7 +85,7 @@ void ScLinkTargetTypesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
// container::XNameAccess
@@ -154,7 +154,7 @@ void ScLinkTargetTypeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
// document::XLinkTargetSupplier
@@ -185,7 +185,7 @@ uno::Reference< container::XNameAccess > SAL_CALL ScLinkTargetTypeObj::getLinks
// beans::XPropertySet as ElementType in container::XNameAccess.
if ( xCollection.is() )
return new ScLinkTargetsObj( xCollection );
- return NULL;
+ return nullptr;
}
// beans::XPropertySet
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index ac01ca7d63cf..736e96140b3f 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -176,11 +176,11 @@ rtl::Reference<ScHeaderFooterContentObj> ScHeaderFooterContentObj::getImplementa
ScHeaderFooterTextData::ScHeaderFooterTextData(
rtl::Reference<ScHeaderFooterContentObj> const & rContent, sal_uInt16 nP, const EditTextObject* pTextObj) :
- mpTextObj(pTextObj ? pTextObj->Clone() : NULL),
+ mpTextObj(pTextObj ? pTextObj->Clone() : nullptr),
rContentObj( rContent ),
nPart( nP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
bDataValid(false)
{
}
@@ -517,7 +517,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScHeaderFooterTextObj::getTextFi
throw(uno::RuntimeException, std::exception)
{
// sowas gibts nicht im Calc (?)
- return NULL;
+ return nullptr;
}
// XTextRangeMover
@@ -649,7 +649,7 @@ const uno::Sequence<sal_Int8>& ScCellTextCursor::getUnoTunnelId()
ScCellTextCursor* ScCellTextCursor::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScCellTextCursor* pRet = NULL;
+ ScCellTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -744,7 +744,7 @@ const uno::Sequence<sal_Int8>& ScHeaderFooterTextCursor::getUnoTunnelId()
ScHeaderFooterTextCursor* ScHeaderFooterTextCursor::getImplementation(
const uno::Reference<uno::XInterface>& rObj)
{
- ScHeaderFooterTextCursor* pRet = NULL;
+ ScHeaderFooterTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScHeaderFooterTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -837,7 +837,7 @@ const uno::Sequence<sal_Int8>& ScDrawTextCursor::getUnoTunnelId()
ScDrawTextCursor* ScDrawTextCursor::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScDrawTextCursor* pRet = NULL;
+ ScDrawTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScDrawTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -850,7 +850,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM );
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); // TRUE: become owner of pool
+ pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true); // TRUE: become owner of pool
pForwarder = new SvxEditEngineForwarder( *pEditEngine );
pOriginalSource = new ScSimpleEditSource( pForwarder );
}
@@ -890,9 +890,9 @@ EditTextObject* ScEditEngineTextObj::CreateTextObject()
ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) :
pDocShell( pDocSh ),
aCellPos( rP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
- pOriginalSource( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
+ pOriginalSource( nullptr ),
bDataValid( false ),
bInUpdate( false ),
bDirty( false ),
@@ -948,7 +948,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true);
+ pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
}
// currently, GetPortions doesn't work if UpdateMode is sal_False,
// this will be fixed (in EditEngine) by src600
@@ -1002,7 +1002,7 @@ void ScCellTextData::UpdateData()
{
if ( bDoUpdate )
{
- OSL_ENSURE(pEditEngine != NULL, "no EditEngine for UpdateData()");
+ OSL_ENSURE(pEditEngine != nullptr, "no EditEngine for UpdateData()");
if ( pDocShell && pEditEngine )
{
// during the own UpdateData call, bDataValid must not be reset,
@@ -1032,7 +1032,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // invalid now
+ pDocShell = nullptr; // invalid now
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 81cecbdaa3c2..6e769d03bd61 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -82,7 +82,7 @@ void ScFormulaParserObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- mpDocShell = NULL;
+ mpDocShell = nullptr;
}
// XFormulaParser
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 1eed0551b3d5..e9a385f2823d 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -138,7 +138,7 @@ void ScViewPaneBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
uno::Any SAL_CALL ScViewPaneBase::queryInterface( const uno::Type& rType )
@@ -296,7 +296,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells()
return new ScCellRangeObj( pDocSh, aRange );
}
- return NULL;
+ return nullptr;
}
namespace
@@ -313,7 +313,7 @@ namespace
_rpWindow = _pViewShell->GetWindowByPos( eWhich );
_rpSdrView = _pViewShell->GetSdrView();
_rpFormShell = _pViewShell->GetFormShell();
- return ( _rpFormShell != NULL ) && ( _rpSdrView != NULL )&& ( _rpWindow != NULL );
+ return ( _rpFormShell != nullptr ) && ( _rpSdrView != nullptr )&& ( _rpWindow != nullptr );
}
}
@@ -324,9 +324,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFor
uno::Reference< form::runtime::XFormController > xController;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
xController = FmFormShell::GetFormController( _Form, *pSdrView, *pWindow );
@@ -339,7 +339,7 @@ sal_Bool SAL_CALL ScViewPaneBase::isFormDesignMode( ) throw (uno::RuntimeExcept
bool bIsFormDesignMode( true );
- FmFormShell* pFormShell( pViewShell ? pViewShell->GetFormShell() : NULL );
+ FmFormShell* pFormShell( pViewShell ? pViewShell->GetFormShell() : nullptr );
if ( pFormShell )
bIsFormDesignMode = pFormShell->IsDesignMode();
@@ -350,9 +350,9 @@ void SAL_CALL ScViewPaneBase::setFormDesignMode( sal_Bool _DesignMode ) throw (u
{
SolarMutexGuard aGuard;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
pFormShell->SetDesignMode( _DesignMode );
}
@@ -367,9 +367,9 @@ uno::Reference<awt::XControl> SAL_CALL ScViewPaneBase::getControl(
uno::Reference<awt::XControl> xRet;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
pFormShell->GetFormControl( xModel, *pSdrView, *pWindow, xRet );
@@ -807,7 +807,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
long nCount = xShapeColl->getCount();
if (nCount)
{
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
bool bAllMarked(true);
for ( long i = 0; i < nCount; i++ )
{
@@ -865,7 +865,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection()
{
SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
- ScCellRangesBase* pObj = NULL;
+ ScCellRangesBase* pObj = nullptr;
if (pViewSh)
{
// Ist auf dem Drawing-Layer etwas selektiert?
@@ -1067,7 +1067,7 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
@@ -1081,7 +1081,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
SCTAB nTab = rViewData.GetTabNo();
return new ScTableSheetObj( rViewData.GetDocShell(), nTab );
}
- return NULL;
+ return nullptr;
}
// support expand (but not replace) the active sheet
@@ -1129,7 +1129,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
ScDocument* pDoc = rData.GetDocument();
if (pDoc && pDoc->GetDrawLayer())
{
- SdrPage* pDrawPage = NULL;
+ SdrPage* pDrawPage = nullptr;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
@@ -1149,7 +1149,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
for (size_t i = 0; i < nCount && !bFound; ++i)
{
SdrObject* pObj = pDrawPage->GetObj(i);
- if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), 0, false))
+ if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), nullptr, false))
{
xTarget.set(pObj->getUnoShape(), uno::UNO_QUERY);
bFound = true;
@@ -1955,7 +1955,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName
vcl::Window* pActiveWin = rViewData.GetActiveWin();
if ( pActiveWin )
{
- Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL );
+ Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr );
aRet <<= AWTRectangle( aRect );
}
}
@@ -2205,7 +2205,7 @@ const uno::Sequence<sal_Int8>& ScTabViewObj::getUnoTunnelId()
ScTabViewObj* ScTabViewObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScTabViewObj* pRet = NULL;
+ ScTabViewObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTabViewObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -2339,7 +2339,7 @@ void ScPreviewObj::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* p = dynamic_cast<const SfxSimpleHint*>(&rHint);
if (p && p->GetId() == SFX_HINT_DYING)
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
uno::Sequence<sal_Int32> ScPreviewObj::getSelectedSheets()
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 557764cd4a88..e6f583b8ac39 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -162,10 +162,10 @@ implnCopy( const uno::Reference< frame::XModel>& xModel )
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
{
- pViewShell->CopyToClip(NULL,false,false,true);
+ pViewShell->CopyToClip(nullptr,false,false,true);
// mark the copied transfer object so it is used in ScVbaRange::Insert
- ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( nullptr );
if (pClipObj)
pClipObj->SetUseInApi( true );
}
@@ -177,10 +177,10 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
{
- pViewShell->CutToClip( NULL, true );
+ pViewShell->CutToClip( nullptr, true );
// mark the copied transfer object so it is used in ScVbaRange::Insert
- ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( nullptr );
if (pClipObj)
pClipObj->SetUseInApi( true );
}
@@ -199,7 +199,7 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, InsertDele
if (pWin)
{
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
- ScDocument* pDoc = NULL;
+ ScDocument* pDoc = nullptr;
if ( pOwnClip )
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
@@ -216,7 +216,7 @@ getDocShell( const css::uno::Reference< css::frame::XModel>& xModel )
{
uno::Reference< uno::XInterface > xIf( xModel, uno::UNO_QUERY_THROW );
ScModelObj* pModel = dynamic_cast< ScModelObj* >( xIf.get() );
- ScDocShell* pDocShell = NULL;
+ ScDocShell* pDocShell = nullptr;
if ( pModel )
pDocShell = static_cast<ScDocShell*>(pModel->GetEmbeddedObject());
return pDocShell;
@@ -229,7 +229,7 @@ getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel )
ScDocShell* pDocShell = getDocShell( xModel );
if ( pDocShell )
return pDocShell->GetBestViewShell();
- return NULL;
+ return nullptr;
}
ScTabViewShell*
@@ -245,7 +245,7 @@ getViewFrame( const uno::Reference< frame::XModel >& xModel )
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
return pViewShell->GetViewFrame();
- return NULL;
+ return nullptr;
}
uno::Reference< XHelperInterface >
@@ -371,7 +371,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
SfxItemSet*
ScVbaCellRangeAccess::GetDataSet( ScCellRangesBase* pRangeObj )
{
- return pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : 0;
+ return pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : nullptr;
}
} // namespace excel
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index ef3f6ea6652f..d60d9378017b 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1085,7 +1085,7 @@ uno::Reference< excel::XRange > lclCreateVbaRange(
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
return new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), rxContext, xRanges );
}
- return 0;
+ return nullptr;
}
} // namespace
@@ -1235,7 +1235,7 @@ ScVbaApplication::getDisplayFormulaBar()
reqList.Put( sfxFormBar );
pViewShell->GetState( reqList );
- const SfxPoolItem *pItem=0;
+ const SfxPoolItem *pItem=nullptr;
if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SfxItemState::SET )
bRes = static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index 2ff217c96f24..1c51d1e503a0 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -74,7 +74,7 @@ ScVbaChartObject::setShape() throw ( script::BasicErrorException )
{
throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), ERRCODE_BASIC_METHOD_FAILED, OUString() );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 812ff0363fef..0a9435d331ed 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -94,7 +94,7 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException
// c++ hackery
uno::Reference< uno::XInterface > xIf( xDrawPageSupplier, uno::UNO_QUERY_THROW );
ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() );
- ScDocShell* pDocShell = NULL;
+ ScDocShell* pDocShell = nullptr;
if ( !pUno )
throw uno::RuntimeException("Failed to obtain the impl class from the drawpage" );
pDocShell = pUno->GetDocShell();
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 1957fc075c2a..c37b1d6d3be5 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -102,7 +102,7 @@ uno::Reference< awt::XWindow > lclGetWindowForController( const uno::Reference<
catch( uno::Exception& )
{
}
- return 0;
+ return nullptr;
}
} // namespace
@@ -181,7 +181,7 @@ ScVbaEventListener::ScVbaEventListener( ScVbaEventsHelper& rVbaEvents, const uno
mrVbaEvents( rVbaEvents ),
mxModel( rxModel ),
mpDocShell( pDocShell ),
- mpActiveWindow( 0 ),
+ mpActiveWindow( nullptr ),
mbWindowResized( false ),
mbBorderChanged( false ),
mbDisposed( !rxModel.is() )
@@ -246,7 +246,7 @@ void ScVbaEventListener::stopControllerListening( const uno::Reference< frame::X
{
maControllers.erase( pWindow );
if( pWindow == mpActiveWindow )
- mpActiveWindow = 0;
+ mpActiveWindow = nullptr;
}
}
@@ -305,7 +305,7 @@ void SAL_CALL ScVbaEventListener::windowDeactivated( const lang::EventObject& rE
if( pWindow && (pWindow == mpActiveWindow) )
processWindowActivateEvent( pWindow, false );
// forget pointer to the active window
- mpActiveWindow = 0;
+ mpActiveWindow = nullptr;
}
}
@@ -522,7 +522,7 @@ ScVbaEventsHelper::ScVbaEventsHelper( const uno::Sequence< uno::Any >& rArgs, co
mbOpened( false )
{
mpDocShell = dynamic_cast< ScDocShell* >( mpShell ); // mpShell from base class
- mpDoc = mpDocShell ? &mpDocShell->GetDocument() : 0;
+ mpDoc = mpDocShell ? &mpDocShell->GetDocument() : nullptr;
if( !mxModel.is() || !mpDocShell || !mpDoc )
return;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 3af7792cb81f..a66198916a71 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -51,7 +51,7 @@ ScVbaFont::ScVbaFont(
SfxItemSet*
ScVbaFont::GetDataSet()
{
- return mpRangeObj ? excel::ScVbaCellRangeAccess::GetDataSet( mpRangeObj ) : 0;
+ return mpRangeObj ? excel::ScVbaCellRangeAccess::GetDataSet( mpRangeObj ) : nullptr;
}
ScVbaFont::~ScVbaFont()
diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx
index eef3261c3465..7a8032a2dfe2 100644
--- a/sc/source/ui/vba/vbafont.hxx
+++ b/sc/source/ui/vba/vbafont.hxx
@@ -42,7 +42,7 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const ScVbaPalette& dPalette,
const css::uno::Reference< css::beans::XPropertySet >& xPropertySet,
- ScCellRangeObj* pRangeObj = 0, bool bFormControl = false ) throw ( css::uno::RuntimeException );
+ ScCellRangeObj* pRangeObj = nullptr, bool bFormControl = false ) throw ( css::uno::RuntimeException );
virtual ~ScVbaFont();// {}
// Attributes
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx
index ca05bd0894f9..5f64f19a8a62 100644
--- a/sc/source/ui/vba/vbainterior.hxx
+++ b/sc/source/ui/vba/vbainterior.hxx
@@ -57,7 +57,7 @@ protected:
void SetMixedColor();
public:
ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = NULL) throw ( css::lang::IllegalArgumentException);
+ const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = nullptr) throw ( css::lang::IllegalArgumentException);
virtual ~ScVbaInterior(){}
diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx
index a16b417a1a5b..3f5ef8b0eed6 100644
--- a/sc/source/ui/vba/vbapalette.hxx
+++ b/sc/source/ui/vba/vbapalette.hxx
@@ -34,7 +34,7 @@ class ScVbaPalette
private:
SfxObjectShell* m_pShell;
public:
- explicit ScVbaPalette( SfxObjectShell* pShell = 0 ) : m_pShell( pShell ) {}
+ explicit ScVbaPalette( SfxObjectShell* pShell = nullptr ) : m_pShell( pShell ) {}
explicit ScVbaPalette( const css::uno::Reference< css::frame::XModel >& rxModel );
// if no palette available e.g. because the document doesn't have a
// palette defined then a default palette will be returned.
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 28e8d132ff39..ce399b394a01 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1199,7 +1199,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang
ScRangeName* pRangeName = rDoc.GetRangeName(nCurTab);
if (pRangeName)
{
- bool bLocalName = pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != NULL;
+ bool bLocalName = pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != nullptr;
// TODO: Handle local names correctly.
(void)bLocalName;
}
@@ -2007,7 +2007,7 @@ ScVbaRange::setFormulaArray(const uno::Any& rFormula) throw (uno::RuntimeExcepti
ScTokenArray aTokenArray;
(void)ScTokenConversion::ConvertToTokenArray( getScDocument(), aTokenArray, aTokens );
- getScDocShell()->GetDocFunc().EnterMatrix( *getScRangeList()[0], NULL, &aTokenArray, OUString(), true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ getScDocShell()->GetDocFunc().EnterMatrix( *getScRangeList()[0], nullptr, &aTokenArray, OUString(), true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
OUString
@@ -2122,7 +2122,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
xProps.set(mxRanges, ::uno::UNO_QUERY );
ScVbaPalette aPalette( rDoc.GetDocumentShell() );
- ScCellRangeObj* pRangeObj = NULL;
+ ScCellRangeObj* pRangeObj = nullptr;
try
{
pRangeObj = getCellRangeObj();
@@ -2953,7 +2953,7 @@ ScVbaRange::getComment() throw (uno::RuntimeException, std::exception)
// comment defined
uno::Reference< excel::XComment > xComment( new ScVbaComment( this, mxContext, getUnoModel(), mxRange ) );
if ( xComment->Text( uno::Any(), uno::Any(), uno::Any() ).isEmpty() )
- return NULL;
+ return nullptr;
return xComment;
}
@@ -4244,7 +4244,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
// Helper functions for AutoFilter
static ScDBData* lcl_GetDBData_Impl( ScDocShell* pDocShell, sal_Int16 nSheet )
{
- ScDBData* pRet = NULL;
+ ScDBData* pRet = nullptr;
if (pDocShell)
{
pRet = pDocShell->GetDocument().GetAnonymousDBData(nSheet);
@@ -4260,7 +4260,7 @@ static void lcl_SelectAll( ScDocShell* pDocShell, ScQueryParam& aParam )
if ( pViewData )
{
OSL_TRACE("Pushing out SelectAll query");
- pViewData->GetView()->Query( aParam, NULL, true );
+ pViewData->GetView()->Query( aParam, nullptr, true );
}
}
}
@@ -4412,7 +4412,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
RangeHelper multiCellRange( mxRange );
autoFiltAddress = multiCellRange.getCellRangeAddressable()->getRangeAddress();
// #163530# Filter box shows only entry of first row
- ScDocument* pDocument = ( pShell ? &pShell->GetDocument() : NULL );
+ ScDocument* pDocument = ( pShell ? &pShell->GetDocument() : nullptr );
if ( pDocument )
{
SCCOL nStartCol = autoFiltAddress.StartColumn;
@@ -4444,7 +4444,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
// set header (autofilter always need column headers)
uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
bool bHasColHeader = false;
- ScDocument* pDoc = pShell ? &pShell->GetDocument() : NULL;
+ ScDocument* pDoc = pShell ? &pShell->GetDocument() : nullptr;
if (pDoc)
{
bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) );
@@ -4662,7 +4662,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
// Paste from clipboard only if the clipboard content was copied via VBA, and not already pasted via VBA again.
// "Insert" behavior should not depend on random clipboard content previously copied by the user.
- ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( nullptr );
if ( pClipObj && pClipObj->GetUseInApi() )
{
// After the insert ( this range ) actually has moved
@@ -4935,7 +4935,7 @@ ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeExceptio
void SAL_CALL
ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& ActivePrinter, const uno::Any& PrintToFile, const uno::Any& Collate, const uno::Any& PrToFileName ) throw (uno::RuntimeException, std::exception)
{
- ScDocShell* pShell = NULL;
+ ScDocShell* pShell = nullptr;
sal_Int32 nItems = m_Areas->getCount();
uno::Sequence< table::CellRangeAddress > printAreas( nItems );
@@ -5078,7 +5078,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
}
double fEndValue = MAXDOUBLE;
ScDocShell* pDocSh = getDocShellFromRange( mxRange );
- pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd,
+ pDocSh->GetDocFunc().FillAuto( aSourceRange, nullptr, eDir, eCmd, eDateCmd,
nCount, fStep, fEndValue, true, true );
}
sal_Bool SAL_CALL
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 582bb9797d45..27e11885f920 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -107,7 +107,7 @@ void SAL_CALL ScVbaButtonCharacters::setText( const OUString& rText ) throw (uno
uno::Reference< excel::XFont > SAL_CALL ScVbaButtonCharacters::getFont() throw (uno::RuntimeException, std::exception)
{
- return new ScVbaFont( this, mxContext, maPalette, mxPropSet, 0, true );
+ return new ScVbaFont( this, mxContext, maPalette, mxPropSet, nullptr, true );
}
void SAL_CALL ScVbaButtonCharacters::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ ) throw (uno::RuntimeException, std::exception)
@@ -437,7 +437,7 @@ void SAL_CALL ScVbaButton::setCaption( const OUString& rCaption ) throw (uno::Ru
uno::Reference< excel::XFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException, std::exception)
{
- return new ScVbaFont( this, mxContext, maPalette, mxControlProps, 0, true );
+ return new ScVbaFont( this, mxContext, maPalette, mxControlProps, nullptr, true );
}
void SAL_CALL ScVbaButton::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ ) throw (uno::RuntimeException, std::exception)
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 747aad67543d..f3f1c7e7221d 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -47,7 +47,7 @@ uno::Reference< excel::XCharacters > SAL_CALL
ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException, std::exception)
{
ScDocShell* pDocShell = excel::getDocShell( m_xModel );
- ScDocument* pDoc = pDocShell ? &pDocShell->GetDocument() : NULL;
+ ScDocument* pDoc = pDocShell ? &pDocShell->GetDocument() : nullptr;
if ( !pDoc )
throw uno::RuntimeException("Failed to access document from shell" );
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 13ad4ed2173a..2fb6e1843fd9 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -511,7 +511,7 @@ void ScVbaWorksheets::PrintPreview( const css::uno::Any& /*EnableChanges*/ ) thr
// need test, print preview current active sheet
// !! TODO !! get view shell from controller
ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
pViewFrame = pViewShell->GetViewFrame();
if ( pViewFrame )
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index 8314107b1213..cefd3fa790b2 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -147,7 +147,7 @@ ScVbaWSFunction::invoke(const OUString& FunctionName, const uno::Sequence< uno::
bool bAsArray = true;
// special handing for some functions that don't work correctly in FunctionAccess
- ScCompiler aCompiler( 0, ScAddress() );
+ ScCompiler aCompiler( nullptr, ScAddress() );
OpCode eOpCode = aCompiler.GetEnglishOpCode( FunctionName.toAsciiUpperCase() );
switch( eOpCode )
{
@@ -265,7 +265,7 @@ ScVbaWSFunction::hasMethod(const OUString& Name) throw(uno::RuntimeException, s
// the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized.
// but the function name used in WorksheetFunction is a programmatic name (seems English).
// So m_xNameAccess->hasByName( Name ) may fail to find name when a function name has a localized name.
- ScCompiler aCompiler( NULL, ScAddress() );
+ ScCompiler aCompiler( nullptr, ScAddress() );
if( aCompiler.IsEnglishSymbol( Name ) )
bIsFound = true;
}
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 735e2c7e8527..94952800fa03 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -182,7 +182,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_SERIES: // fill block
case SID_OPENDLG_TABOP: // multiple-cell operations, are at least 2 cells marked?
- if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
+ if (pDoc->GetChangeTrack()!=nullptr &&nWhich ==SID_OPENDLG_TABOP)
bDisable = true;
else
bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
@@ -406,7 +406,7 @@ static bool lcl_TestFormat( SvxClipboardFormatItem& rFormats, const Transferable
void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFormatItem& rFormats )
{
vcl::Window* pWin = GetViewData()->GetActiveWin();
- bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != nullptr );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
@@ -438,7 +438,7 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFormatItem& rFormats
static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
{
bool bPossible = false;
- if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) )
+ if ( ScTransferObj::GetOwnClipboard( nullptr ) || ScDrawTransferObj::GetOwnClipboard( nullptr ) )
bPossible = true;
else
{
@@ -876,7 +876,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (pDoc->GetChangeTrack()!=NULL || GetViewData()->IsMultiMarked())
+ else if (pDoc->GetChangeTrack()!=nullptr || GetViewData()->IsMultiMarked())
{
rSet.DisableItem( nWhich );
}
@@ -1030,7 +1030,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_OPENDLG_CONSOLIDATE:
case SCITEM_CONSOLIDATEDATA:
{
- if(pDoc->GetChangeTrack()!=NULL)
+ if(pDoc->GetChangeTrack()!=nullptr)
rSet.DisableItem( nWhich);
}
break;
@@ -1070,11 +1070,11 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pDoc && pData && pDoc->IsTabProtected( pData->GetTabNo() ) )
{
bool bVisible = false;
- SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : NULL );
+ SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : nullptr );
if ( pViewFrame && pViewFrame->HasChildWindow( nWhich ) )
{
SfxChildWindow* pChild = pViewFrame->GetChildWindow( nWhich );
- vcl::Window* pWin = ( pChild ? pChild->GetWindow() : NULL );
+ vcl::Window* pWin = ( pChild ? pChild->GetWindow() : nullptr );
if ( pWin && pWin->IsVisible() )
{
bVisible = true;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 27eb61498720..4c332daaeeca 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -750,7 +750,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
OUString aPara;
- Color* pColor=0;
+ Color* pColor=nullptr;
switch( eFillDir )
{
@@ -1746,7 +1746,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -2314,7 +2314,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
OUString aChars, aFontName;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 578f47e45bbf..c2c19baa525e 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -549,7 +549,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_FILTER with arguments?");
pTabViewShell->Query( static_cast<const ScQueryItem&>(
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, true );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), nullptr, true );
rReq.Done();
}
else
@@ -570,7 +570,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_SPECIAL_FILTER with arguments?");
pTabViewShell->Query( static_cast<const ScQueryItem&>(
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, true );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), nullptr, true );
rReq.Done();
}
else
@@ -608,7 +608,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (rQueryItem.GetAdvancedQuerySource(aAdvSource))
pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, true );
else
- pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, true );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), nullptr, true );
rReq.Done( *pReqArgs );
}
}
@@ -624,7 +624,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).bDoQuery = false;
aParam.bDuplicate = true;
- pTabViewShell->Query( aParam, NULL, true );
+ pTabViewShell->Query( aParam, nullptr, true );
rReq.Done();
}
break;
@@ -844,7 +844,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
}
// cell range picker
- SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg(NULL, &aArgSet, pTabViewShell);
+ SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg(nullptr, &aArgSet, pTabViewShell);
assert(pDlg); //Dialog create fail!
short nResult = pDlg->Execute();
@@ -976,7 +976,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(
- NULL, OUString(), &aStream, SC_TEXTTOCOLUMNS));
+ nullptr, OUString(), &aStream, SC_TEXTTOCOLUMNS));
OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
if ( pDlg->Execute() == RET_OK )
@@ -1031,7 +1031,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
// or filter,sort,subtotal (also without import)
bool bOk = false;
ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
- if (pDBData && rDoc.GetChangeTrack() == NULL)
+ if (pDBData && rDoc.GetChangeTrack() == nullptr)
{
if ( pDBData->HasImportParam() )
bOk = !pDBData->HasImportSelection();
@@ -1068,7 +1068,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
{
//! move ReadOnly check to idl flags
- if ( pDocSh->IsReadOnly() || rDoc.GetChangeTrack()!=NULL ||
+ if ( pDocSh->IsReadOnly() || rDoc.GetChangeTrack()!=nullptr ||
GetViewData()->IsMultiMarked() )
{
rSet.DisableItem( nWhich );
@@ -1081,7 +1081,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
// only imported data without selection
ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (!pDBData || !pDBData->HasImportParam() || pDBData->HasImportSelection() ||
- rDoc.GetChangeTrack()!=NULL)
+ rDoc.GetChangeTrack()!=nullptr)
{
rSet.DisableItem( nWhich );
}
@@ -1094,7 +1094,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
rSet.Put(SfxVisibilityItem(nWhich, false));
else
// get state (BoolItem) from SfxViewFrame
- pTabViewShell->GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ pTabViewShell->GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
}
break;
case SID_SBA_BRW_INSERT:
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 934295b1c6d2..d2fd259467b8 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -219,7 +219,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_INPUTLINE_BLOCK:
case FID_INPUTLINE_MATRIX:
{
- if( pReqArgs == 0 ) //XXX temporary HACK to avoid GPF
+ if( pReqArgs == nullptr ) //XXX temporary HACK to avoid GPF
break;
const ScInputStatusItem* pStatusItem
@@ -259,7 +259,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxPoolItem* aArgs[2];
aArgs[0] = &aItem;
- aArgs[1] = NULL;
+ aArgs[1] = nullptr;
rBindings.Execute( SID_ENTER_STRING, aArgs );
}
else
@@ -273,7 +273,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if (nSlot == FID_INPUTLINE_BLOCK)
{
- pTabViewShell->EnterBlock( aString, NULL );
+ pTabViewShell->EnterBlock( aString, nullptr );
rReq.Done();
}
else
@@ -316,7 +316,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_CELL_FORMAT:
{
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
// set cell attribute without dialog:
@@ -331,7 +331,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- const SfxPoolItem* pAttr = NULL;
+ const SfxPoolItem* pAttr = nullptr;
sal_uInt16 nWhich = 0;
for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ )
@@ -345,7 +345,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
rReq.Done();
}
- else if ( pReqArgs == NULL )
+ else if ( pReqArgs == nullptr )
{
pTabViewShell->ExecuteCellFormatDlg( rReq );
}
@@ -466,7 +466,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
while ( !bValid && i <= MAXTAB + 2 );
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
OUString aArgName;
OUString aArgComment;
@@ -729,7 +729,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_MERGE_TOGGLE:
{
bCenter = true;
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
if( rBindings.QueryState( nSlot, pItem ) >= SfxItemState::DEFAULT )
bMerge = !static_cast< SfxBoolItem* >( pItem )->GetValue();
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 0cd2a9fd64f7..5fe24c6716c3 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -40,7 +40,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
bool bSel = false;
bool bKeep = false;
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
@@ -208,7 +208,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
SCsCOLROW nRepeat = 1;
const SfxItemSet* pReqArgs = rReq.GetArgs();
// get repetition
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
@@ -396,7 +396,7 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
bool bSel = false;
bool bKeep = false;
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_2, &pItem))
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index d56a18a8a1ea..027bf58b0cd3 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -235,7 +235,7 @@ sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) const
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCROW nLastRow = -1;
- if (pDoc->RowHidden(nEntryNo, nTab, NULL, &nLastRow))
+ if (pDoc->RowHidden(nEntryNo, nTab, nullptr, &nLastRow))
return 0;
else
return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index f9c3c4b7f099..c1de01ee4a33 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -78,7 +78,7 @@ void ScDBFunc::GotoDBArea( const OUString& rDBName )
ScDBData* ScDBFunc::GetDBData( bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel )
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
- ScDBData* pData = NULL;
+ ScDBData* pData = nullptr;
ScRange aRange;
ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED )
@@ -154,7 +154,7 @@ ScDBData* ScDBFunc::GetDBData( bool bMark, ScGetDBMode eMode, ScGetDBSelection e
eMode, SC_DBSEL_KEEP );
if (!pData)
- return NULL;
+ return nullptr;
if (bMark)
{
@@ -171,7 +171,7 @@ ScDBData* ScDBFunc::GetAnonymousDBData()
ScRange aRange;
ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
- return NULL;
+ return nullptr;
// Expand to used data area if not explicitly marked.
const ScMarkData& rMarkData = GetViewData().GetMarkData();
@@ -340,7 +340,7 @@ void ScDBFunc::ToggleAutoFilter()
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).bDoQuery = false;
aParam.bDuplicate = true;
- Query( aParam, NULL, true );
+ Query( aParam, nullptr, true );
pDocSh->GetUndoManager()->LeaveListAction();
@@ -451,7 +451,7 @@ bool ScDBFunc::ImportData( const ScImportParam& rParam, bool bRecord )
}
ScDBDocFunc aDBDocFunc( *GetViewData().GetDocShell() );
- return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, NULL, bRecord );
+ return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, nullptr, bRecord );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 4e48e43275bf..02bc6c82e5bb 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -147,7 +147,7 @@ void ScDBFunc::TestRemoveOutline( bool& rCol, bool& rRow )
{
ScOutlineArray& rArray = pTable->GetColArray();
ScSubOutlineIterator aColIter( &rArray );
- while ((pEntry=aColIter.GetNext()) != NULL && !bColFound)
+ while ((pEntry=aColIter.GetNext()) != nullptr && !bColFound)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -162,7 +162,7 @@ void ScDBFunc::TestRemoveOutline( bool& rCol, bool& rRow )
{
ScOutlineArray& rArray = pTable->GetRowArray();
ScSubOutlineIterator aRowIter( &rArray );
- while ((pEntry=aRowIter.GetNext()) != NULL && !bRowFound)
+ while ((pEntry=aRowIter.GetNext()) != nullptr && !bRowFound)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -277,7 +277,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
ScOutlineArray& rColArray = pTable->GetColArray();
ScSubOutlineIterator aColIter( &rColArray );
- while ((pEntry=aColIter.GetNext()) != NULL && !bEnable)
+ while ((pEntry=aColIter.GetNext()) != nullptr && !bEnable)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -299,7 +299,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
ScOutlineArray& rRowArray = pTable->GetRowArray();
ScSubOutlineIterator aRowIter( &rRowArray );
- while ((pEntry=aRowIter.GetNext()) != NULL)
+ while ((pEntry=aRowIter.GetNext()) != nullptr)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -409,10 +409,10 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
ScDocShellModificator aModificator( *pDocSh );
ScSubTotalParam aNewParam( rParam ); // change end of range
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord) // record old data
{
@@ -616,7 +616,7 @@ bool ScDBFunc::MakePivotTable(
else
aObj.SetSaveData( rData );
- bool bAllowMove = (pDPObj != NULL); // allow re-positioning when editing existing table
+ bool bAllowMove = (pDPObj != nullptr); // allow re-positioning when editing existing table
ScDBDocFunc aFunc( *pDocSh );
bool bSuccess = aFunc.DataPilotUpdate(pDPObj, &aObj, true, false, bAllowMove);
@@ -1111,12 +1111,12 @@ void ScDBFunc::GroupDataPilot()
}
}
- ScDPSaveGroupDimension* pNewGroupDim = NULL;
+ ScDPSaveGroupDimension* pNewGroupDim = nullptr;
if ( !pGroupDimension )
{
// create a new group dimension
OUString aGroupDimName =
- pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, NULL);
+ pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, nullptr);
pNewGroupDim = new ScDPSaveGroupDimension( aBaseDimName, aGroupDimName );
pGroupDimension = pNewGroupDim; // make changes to the new dim if none existed
@@ -1174,7 +1174,7 @@ void ScDBFunc::GroupDataPilot()
delete pNewGroupDim; // AddGroupDimension copies the object
// don't access pGroupDimension after here
}
- pGroupDimension = pNewGroupDim = NULL;
+ pGroupDimension = pNewGroupDim = nullptr;
// set orientation
ScDPSaveDimension* pSaveDimension = aData.GetDimensionByName( aGroupDimName );
@@ -1588,7 +1588,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
static void lcl_MoveToEnd( ScDPSaveDimension& rDim, const OUString& rItemName )
{
- ScDPSaveMember* pNewMember = NULL;
+ ScDPSaveMember* pNewMember = nullptr;
const ScDPSaveMember* pOldMember = rDim.GetExistingMemberByName( rItemName );
if ( pOldMember )
pNewMember = new ScDPSaveMember( *pOldMember );
@@ -1908,7 +1908,7 @@ void ScDBFunc::SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName
// add the new dimension with the same orientation, at the end
ScDPSaveDimension* pNewDim = aData.GetDimensionByName( *pNewDimensionName );
- ScDPSaveDimension* pDuplicated = NULL;
+ ScDPSaveDimension* pDuplicated = nullptr;
if ( pNewDim->GetOrientation() == sheet::DataPilotFieldOrientation_DATA )
{
// Need to duplicate the dimension, create column/row in addition to data:
@@ -2105,10 +2105,10 @@ void ScDBFunc::RepeatDB( bool bRecord )
//! undo only needed data ?
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord)
{
@@ -2174,7 +2174,7 @@ void ScDBFunc::RepeatDB( bool bRecord )
Query( aQueryParam, &aAdvSource, false );
}
else
- Query( aQueryParam, NULL, false );
+ Query( aQueryParam, nullptr, false );
// if not inplace the sheet may have changed
if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -2194,8 +2194,8 @@ void ScDBFunc::RepeatDB( bool bRecord )
SCROW nDummyRow, nNewEndRow;
pDBData->GetArea( nDummyTab, nDummyCol,nDummyRow, nDummyCol,nNewEndRow );
- const ScRange* pOld = NULL;
- const ScRange* pNew = NULL;
+ const ScRange* pOld = nullptr;
+ const ScRange* pNew = nullptr;
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 668337aac0da..ea4a83fa0d37 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -45,7 +45,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
for (SCROW nRow = nStartRow; nRow <= nEndRow-1; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (pDoc->RowHidden(nRow, nTab, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 43bf80d1206f..85228549b314 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -40,8 +40,8 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) :
pDev( pOut ),
pDoc( pData->GetDocument() ),
nTab( pData->GetTabNo() ),
- pDropMarker( NULL ),
- pDropMarkObj( NULL ),
+ pDropMarker( nullptr ),
+ pDropMarkObj( nullptr ),
bInConstruct( true )
{
// #i73602# Use default from the configuration
@@ -202,7 +202,7 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
Graphic aGraphic;
TargetList aTargetList;
ScIMapInfo* pIMapInfo = ScDrawLayer::GetIMapInfo( pObj );
- const ImageMap* pImageMap = NULL;
+ const ImageMap* pImageMap = nullptr;
if ( pIMapInfo )
pImageMap = &pIMapInfo->GetImageMap();
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 2100793ffdf8..000d36480e79 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -113,7 +113,7 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
}
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
@@ -133,7 +133,7 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
pTransferObj->SetDrawPersist( &aDragShellRef ); // keep persist for ole objects alive
pTransferObj->SetDragSource( this ); // copies selection
- SC_MOD()->SetDragObject( NULL, pTransferObj ); // for internal D&D
+ SC_MOD()->SetDragObject( nullptr, pTransferObj ); // for internal D&D
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -371,7 +371,7 @@ void ScDrawView::DoCopy()
copyChartRefDataToClipDoc(pDoc, &rClipDoc, aRanges);
}
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
@@ -394,7 +394,7 @@ void ScDrawView::DoCopy()
}
pTransferObj->CopyToClipboard( pViewData->GetActiveWin() ); // system clipboard
- SC_MOD()->SetClipObject( NULL, pTransferObj ); // internal clipboard
+ SC_MOD()->SetClipObject( nullptr, pTransferObj ); // internal clipboard
}
uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
@@ -406,7 +406,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
// update ScGlobal::xDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 0ff91a2e2a57..a4827144b7f5 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -123,7 +123,7 @@ void ScDrawView::ImplClearCalcDropMarker()
if(pDropMarker)
{
delete pDropMarker;
- pDropMarker = 0L;
+ pDropMarker = nullptr;
}
}
@@ -378,8 +378,8 @@ void ScDrawView::MarkListHasChanged()
// Select Ole object?
- SdrOle2Obj* pOle2Obj = NULL;
- SdrGrafObj* pGrafObj = NULL;
+ SdrOle2Obj* pOle2Obj = nullptr;
+ SdrGrafObj* pGrafObj = nullptr;
const SdrMarkList& rMarkList = GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount();
@@ -592,7 +592,7 @@ void ScDrawView::ModelHasChanged()
{
// SdrObjEditView::ModelHasChanged will end text edit in this case,
// so make sure the EditEngine's undo manager is no longer used.
- pViewData->GetViewShell()->SetDrawTextUndo(NULL);
+ pViewData->GetViewShell()->SetDrawTextUndo(nullptr);
SetCreateMode(); // don't leave FuText in a funny state
}
@@ -649,7 +649,7 @@ SdrObject* ScDrawView::GetObjectByName(const OUString& rName)
}
}
}
- return 0;
+ return nullptr;
}
//realize multi-selection of objects
@@ -657,7 +657,7 @@ SdrObject* ScDrawView::GetObjectByName(const OUString& rName)
bool ScDrawView::SelectCurrentViewObject( const OUString& rName )
{
sal_uInt16 nObjectTab = 0;
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
bool bUnMark = false;
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pShell)
@@ -712,7 +712,7 @@ bool ScDrawView::SelectObject( const OUString& rName )
UnmarkAll();
SCTAB nObjectTab = 0;
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pShell)
@@ -765,7 +765,7 @@ bool ScDrawView::SelectObject( const OUString& rName )
MarkObj( pFound, pPV );
}
- return ( pFound != NULL );
+ return ( pFound != nullptr );
}
//If object is marked , return true , else return false .
@@ -806,7 +806,7 @@ SdrObject* ScDrawView::GetMarkedNoteCaption( ScDrawObjData** ppCaptData )
return pObj;
}
}
- return 0;
+ return nullptr;
}
void ScDrawView::LockCalcLayer( SdrLayerID nLayer, bool bLock )
@@ -828,13 +828,13 @@ void ScDrawView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin )
void ScDrawView::DeleteMarked()
{
// try to delete a note caption object with its cell note in the Calc document
- ScDrawObjData* pCaptData = 0;
+ ScDrawObjData* pCaptData = nullptr;
if( SdrObject* pCaptObj = GetMarkedNoteCaption( &pCaptData ) )
{
(void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
- ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
+ ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : nullptr;
+ ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : nullptr;
bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
@@ -870,7 +870,7 @@ SdrEndTextEditKind ScDrawView::ScEndTextEdit()
SdrEndTextEditKind eKind = SdrEndTextEdit();
if ( bIsTextEdit && pViewData )
- pViewData->GetViewShell()->SetDrawTextUndo(NULL); // the "normal" undo manager
+ pViewData->GetViewShell()->SetDrawTextUndo(nullptr); // the "normal" undo manager
return eKind;
}
@@ -943,7 +943,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
// support enhanced text edit for draw objects
SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const
{
- return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0;
+ return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : nullptr;
}
// #i123922# helper to apply a Graphic to an existing SdrObject
@@ -980,7 +980,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
return &rHitObject;
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 79a1f1092175..2a795a1b7ea2 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -94,7 +94,7 @@ void ScEditShell::InitInterface_Impl()
ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) :
pEditView (pView),
pViewData (pData),
- pClipEvtLstnr (NULL),
+ pClipEvtLstnr (nullptr),
bPastePossible (false),
bIsInsertMode (true)
{
@@ -386,14 +386,14 @@ void ScEditShell::Execute( SfxRequest& rReq )
SvxFontItem aNewItem( EE_CHAR_FONTINFO );
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
@@ -796,7 +796,7 @@ const SvxURLField* ScEditShell::GetURLField()
}
}
- return NULL;
+ return nullptr;
}
IMPL_LINK_TYPED( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
@@ -1265,7 +1265,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- pViewFrm->GetSlotState( nWhich, NULL, &rSet );
+ pViewFrm->GetSlotState( nWhich, nullptr, &rSet );
nWhich = aIter.NextWhich();
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index f10a078d1789..0ca101c976f0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -196,7 +196,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
SCTAB nCurTab = GetViewData()->GetTabNo();
OUString aPageStyle = pDoc->GetPageStyle( nCurTab );
SfxStyleSheet* pStyleSheet = pStylePool ? static_cast<SfxStyleSheet*>(pStylePool->
- Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : NULL;
+ Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : nullptr;
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );
@@ -213,7 +213,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_UPDATE_BY_EXAMPLE:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
@@ -230,7 +230,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_HIDE:
case SID_STYLE_SHOW:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
@@ -325,7 +325,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScPatternAttr aAttr( *rDoc.GetSelectionPattern( aPreviewMark ) );
if ( ScStyleSheet* pPreviewStyle = rDoc.GetPreviewCellStyle() )
aAttr.SetStyleSheet( pPreviewStyle );
- rDoc.SetPreviewCellStyle(NULL);
+ rDoc.SetPreviewCellStyle(nullptr);
SfxItemSet aItemSet( GetPool() );
@@ -348,7 +348,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
|| (nSlotId == SID_STYLE_NEW_BY_EXAMPLE)
|| (nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE) )
{
- SfxStyleSheetBase* pStyleSheet = NULL;
+ SfxStyleSheetBase* pStyleSheet = nullptr;
bool bStyleToMarked = false;
bool bListAction = false;
@@ -382,10 +382,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem ))
aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
- const SfxPoolItem* pRefItem=NULL;
+ const SfxPoolItem* pRefItem=nullptr;
if (pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE, true, &pRefItem ))
{
- if(pRefItem!=NULL)
+ if(pRefItem!=nullptr)
aRefName = static_cast<const SfxStringItem*>(pRefItem)->GetValue();
}
@@ -549,7 +549,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// create/replace style sheet by attributes
// at cursor position:
- const ScPatternAttr* pAttrItem = NULL;
+ const ScPatternAttr* pAttrItem = nullptr;
// The query if marked, was always wrong here,
// so now no more, and just from the cursor.
@@ -585,7 +585,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// when a new style is present and is used in the selection,
// then the parent can not be adopted:
if ( pStyleSheet && pSheetInUse && pStyleSheet == pSheetInUse )
- pSheetInUse = NULL;
+ pSheetInUse = nullptr;
// if already present, first remove ...
if ( pStyleSheet )
@@ -663,7 +663,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
case SID_STYLE_DELETE:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet )
{
if ( rDoc.RemovePageStyleInUse( pStyleSheet->GetName() ) )
@@ -684,7 +684,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_HIDE:
case SID_STYLE_SHOW:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet )
{
pStyleSheet->SetHidden( nSlotId == SID_STYLE_HIDE );
@@ -697,10 +697,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet && !pScMod->GetIsWaterCan() )
{
- ScUndoApplyPageStyle* pUndoAction = 0;
+ ScUndoApplyPageStyle* pUndoAction = nullptr;
SCTAB nTabCount = rDoc.GetTableCount();
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
@@ -853,7 +853,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// -> Use NULL if a modal dialog is open, to enable the Dialog's
// default parent handling.
if ( Application::IsInModalMode() )
- pParent = NULL;
+ pParent = nullptr;
else
pParent = pTabViewShell->GetDialogParent();
}
@@ -884,7 +884,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate(
bNumFormatChanged, rNewSet, aOldSet ) )
- rDoc.InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
+ rDoc.InvalidateTextWidth( nullptr, nullptr, bNumFormatChanged );
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
@@ -1270,7 +1270,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
default:
if( pSet )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pSet->GetItemState(GetPool().GetWhich(nSlot), true, &pItem ) == SfxItemState::SET )
{
@@ -1341,7 +1341,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
const SfxItemSet* pSet = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- SfxAllItemSet* pNewSet = 0;
+ SfxAllItemSet* pNewSet = nullptr;
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1489,9 +1489,9 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
*/
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- const SfxPoolItem* pItem = NULL;
- const SvxHorJustifyItem* pHorJustify = NULL;
- const SvxVerJustifyItem* pVerJustify = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ const SvxHorJustifyItem* pHorJustify = nullptr;
+ const SvxVerJustifyItem* pVerJustify = nullptr;
SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
@@ -1629,7 +1629,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_ENDPREVIEW_FONT:
{
- pDoc->SetPreviewFont(NULL);
+ pDoc->SetPreviewFont(nullptr);
pTabViewShell->UpdateSelectionArea( pDoc->GetPreviewSelection() );
break;
}
@@ -1759,7 +1759,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
table::BorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( NULL, false );
+ pTabViewShell->SetSelectionFrameLines( nullptr, false );
}
}
break;
@@ -1807,7 +1807,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
Get( ATTR_BORDER );
// Evaluate border items from controller:
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pNewAttrs->GetItemState( ATTR_BORDER, true, &pItem )
== SfxItemState::SET )
@@ -1844,8 +1844,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
else
{
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetLine( NULL, SvxBoxInfoItemLine::HORI );
- aBoxInfoItem.SetLine( NULL, SvxBoxInfoItemLine::VERT );
+ aBoxInfoItem.SetLine( nullptr, SvxBoxInfoItemLine::HORI );
+ aBoxInfoItem.SetLine( nullptr, SvxBoxInfoItemLine::VERT );
pNewSet->Put( aBoxInfoItem );
}
@@ -1860,7 +1860,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
const ScPatternAttr* pOldAttrs = pTabViewShell->GetSelectionPattern();
std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(pOldAttrs->GetItemSet()));
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(SID_ATTR_BORDER_DIAG_TLBR == nSlot)
{
@@ -1977,7 +1977,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
// handled together because both need the cell border information for decisions
Color aCol = 0;
- editeng::SvxBorderLine aLine(0,0,0,false);
+ editeng::SvxBorderLine aLine(nullptr,0,0,false);
bool bCol = false;
bool bColDisable = false, bStyleDisable = false;
SvxBoxItem aBoxItem(ATTR_BORDER);
@@ -2201,8 +2201,8 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
// horizontal alignment
- const SvxHorJustifyItem* pHorJustify = NULL;
- const SvxVerJustifyItem* pVerJustify = NULL;
+ const SvxHorJustifyItem* pHorJustify = nullptr;
+ const SvxVerJustifyItem* pVerJustify = nullptr;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
sal_uInt16 nWhich = 0;
bool bJustifyStd = false;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 9d6639b3be99..94b0be9c5cdd 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -370,7 +370,7 @@ void ScFilterFloatingWindow::dispose()
vcl::Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
{
// redirect keyinput in the child window
- return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : NULL; // will be the FilterBox
+ return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : nullptr; // will be the FilterBox
}
static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
@@ -395,7 +395,7 @@ static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, ScViewData*
ScDocument& rDoc = *pViewData->GetDocument();
ScAddress aCellPos( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() );
ScPostIt* pNote = rDoc.GetNote( aCellPos );
- SdrObject* pObj = pNote ? pNote->GetCaption() : 0;
+ SdrObject* pObj = pNote ? pNote->GetCaption() : nullptr;
if( pObj && pObj->GetLogicRect().IsInside( rPos ) && ScDrawLayer::IsNoteCaption( pObj ) )
{
const ScProtectionAttr* pProtAttr = static_cast< const ScProtectionAttr* > (rDoc.GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION ) );
@@ -454,7 +454,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
mpOODragRect(),
mpOOHeader(),
mpOOShrink(),
- mpAutoFillRect(static_cast<Rectangle*>(NULL)),
+ mpAutoFillRect(static_cast<Rectangle*>(nullptr)),
pViewData( pData ),
eWhich( eWhichPos ),
mpNoteMarker(),
@@ -468,7 +468,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
nDPField( 0 ),
- pDragDPObj( NULL ),
+ pDragDPObj( nullptr ),
nRFIndex( 0 ),
nRFAddX( 0 ),
nRFAddY( 0 ),
@@ -619,7 +619,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelecti
pDim->SetCurrentPage( &aName );
}
else
- pDim->SetCurrentPage( NULL );
+ pDim->SetCurrentPage( nullptr );
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSaveData( aSaveData );
@@ -910,7 +910,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
}
}
- pViewData->GetView()->Query(aParam, NULL, true);
+ pViewData->GetView()->Query(aParam, nullptr, true);
pDBData->SetQueryParam(aParam);
}
@@ -1514,7 +1514,7 @@ void ScGridWindow::ExecFilter( sal_uLong nSel,
pViewData->GetViewShell()->UpdateInputHandler();
}
- pViewData->GetView()->Query( aParam, NULL, true );
+ pViewData->GetView()->Query( aParam, nullptr, true );
pDBData->SetQueryParam( aParam ); // save
}
else // "Too many conditions"
@@ -2472,7 +2472,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBuf.append('#');
aBuf.append(aExtInfo.maTabName);
aBuf.append('.');
- OUString aRefCalcA1(aTempAddr.Format(SCA_ABS, NULL, formula::FormulaGrammar::CONV_OOO));
+ OUString aRefCalcA1(aTempAddr.Format(SCA_ABS, nullptr, formula::FormulaGrammar::CONV_OOO));
aBuf.append(aRefCalcA1);
ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
}
@@ -2944,7 +2944,7 @@ static void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, vcl:
{
SCCOL nCol = pViewData->GetCurX();
SCROW nRow = pViewData->GetCurY();
- Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, true );
+ Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true );
aEditArea.Right() = aEditArea.Left();
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
@@ -3583,7 +3583,7 @@ static bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDra
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
- if(pDoc->GetChangeTrack()!=NULL)
+ if(pDoc->GetChangeTrack()!=nullptr)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
@@ -3721,8 +3721,8 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
Window::PointerState aState = GetPointerState();
// check for datapilot item sorting
- ScDPObject* pDPObj = NULL;
- if ( pThisDoc == pSourceDoc && ( pDPObj = pThisDoc->GetDPAtCursor( nNewDragX, nNewDragY, nTab ) ) != NULL )
+ ScDPObject* pDPObj = nullptr;
+ if ( pThisDoc == pSourceDoc && ( pDPObj = pThisDoc->GetDPAtCursor( nNewDragX, nNewDragY, nTab ) ) != nullptr )
{
// drop on DataPilot table: sort or nothing
@@ -3847,7 +3847,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
const ScDragData& rData = SC_MOD()->GetDragData();
if ( rEvt.mbLeaving )
{
- DrawMarkDropObj( NULL );
+ DrawMarkDropObj( nullptr );
if ( rData.pCellTransfer )
return AcceptPrivateDrop( rEvt ); // hide drop marker for internal D&D
else
@@ -3920,7 +3920,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
}
}
if (!nRet)
- DrawMarkDropObj( NULL );
+ DrawMarkDropObj( nullptr );
if (!nRet)
{
@@ -4249,7 +4249,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
if ( nThisTab == nSourceTab )
@@ -4302,7 +4302,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, true /*bRecord*/, true /*bApi*/ );
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, nullptr, eCmd, true /*bRecord*/, true /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -4388,7 +4388,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4448,7 +4448,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4481,7 +4481,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
- DrawMarkDropObj( NULL ); // drawing layer
+ DrawMarkDropObj( nullptr ); // drawing layer
ScModule* pScMod = SC_MOD();
const ScDragData& rData = pScMod->GetDragData();
@@ -4699,7 +4699,7 @@ void ScGridWindow::UpdateEditViewPos()
else
{
// bForceToTop = sal_True for editing
- Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, true );
+ Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true );
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
Rectangle aRect = pView->GetOutputArea();
@@ -5333,10 +5333,10 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
OUString* pName, OUString* pUrl, OUString* pTarget )
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- ScInputHandler* pInputHdl = NULL;
+ ScInputHandler* pInputHdl = nullptr;
if (pViewSh)
pInputHdl = pViewSh->GetInputHandler();
- EditView* pView = (pInputHdl && pInputHdl->IsInputMode()) ? pInputHdl->GetTableView() : NULL;
+ EditView* pView = (pInputHdl && pInputHdl->IsInputMode()) ? pInputHdl->GetTableView() : nullptr;
if (pView)
return extractURLInfo(pView->GetFieldUnderMousePointer(), pName, pUrl, pTarget);
@@ -5608,7 +5608,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
return false;
ScDocument* pDoc = pViewData->GetDocument();
- ScDPCollection* pDPs = NULL;
+ ScDPCollection* pDPs = nullptr;
if (pDoc->HasPivotTable())
pDPs = pDoc->GetDPCollection();
@@ -5764,10 +5764,10 @@ void ScGridWindow::SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector
const std::vector<editeng::MisspellRanges>* ScGridWindow::GetAutoSpellData( SCCOL nPosX, SCROW nPosY )
{
if (!mpSpellCheckCxt)
- return NULL;
+ return nullptr;
if (!maVisibleRange.isInside(nPosX, nPosY))
- return NULL;
+ return nullptr;
return mpSpellCheckCxt->getMisspellRanges(nPosX, nPosY);
}
@@ -5943,7 +5943,7 @@ void ScGridWindow::UpdateCopySourceOverlay()
*
* @param pLogicRects - if not 0, then don't invoke the callback, just collect the rectangles in the pointed vector.
*/
-static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = 0)
+static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = nullptr)
{
if (!pDrawLayer->isTiledRendering())
return;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index cfa402f302bb..f0b07687998d 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -1063,7 +1063,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp )
else if (!bHide)
aNewRanges = aPagebreakDrag.Format(SCA_VALID);
- pViewFunc->SetPrintRanges( rDoc.IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, false );
+ pViewFunc->SetPrintRanges( rDoc.IsPrintEntireSheet( nTab ), &aNewRanges, nullptr, nullptr, false );
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 2937507e1e68..97d149c24f34 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -325,7 +325,7 @@ SdrObject* ScGridWindow::GetEditObject()
return pDrView->GetTextEditObject();
}
- return NULL;
+ return nullptr;
}
void ScGridWindow::UpdateStatusPosSize()
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 51ae5fdc8397..e15cb1e1b0c1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -572,7 +572,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
aOutputData.SetPagebreakMode( pViewData->GetView()->GetPageBreakData() );
}
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
bool bEditMode = pViewData->HasEditView(eWhich);
if ( bEditMode && pViewData->GetRefTabNo() == nTab )
{
@@ -630,7 +630,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
OutputDevice* pContentDev = &rDevice; // device for document content, used by overlay manager
- SdrPaintWindow* pTargetPaintWindow = 0; // #i74769# work with SdrPaintWindow directly
+ SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with SdrPaintWindow directly
{
// init redraw
@@ -782,7 +782,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
SCTAB nTabCount = rDoc.GetTableCount();
const std::vector<ScHighlightEntry> &rHigh = pViewData->GetView()->GetHighlightRanges();
bool bHasScenario = ( nTab+1<nTabCount && rDoc.IsScenario(nTab+1) && !rDoc.IsScenario(nTab) );
- bool bHasChange = ( rDoc.GetChangeTrack() != NULL );
+ bool bHasChange = ( rDoc.GetChangeTrack() != nullptr );
if ( bHasChange || bHasScenario || !rHigh.empty() )
{
@@ -1320,7 +1320,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo
SCSIZE nArrY;
SCSIZE nQuery;
SCTAB nTab = pViewData->GetTabNo();
- ScDBData* pDBData = NULL;
+ ScDBData* pDBData = nullptr;
std::unique_ptr<ScQueryParam> pQueryParam;
RowInfo* pRowInfo = rTabInfo.mpRowInfo;
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 2e044cb7e048..2d853957135f 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -71,9 +71,9 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
ScChangeViewSettings* pSettings = pDoc->GetChangeViewSettings();
if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
{
- const ScChangeAction* pFound = NULL;
- const ScChangeAction* pFoundContent = NULL;
- const ScChangeAction* pFoundMove = NULL;
+ const ScChangeAction* pFound = nullptr;
+ const ScChangeAction* pFoundContent = nullptr;
+ const ScChangeAction* pFoundMove = nullptr;
long nModified = 0;
const ScChangeAction* pAction = pTrack->GetFirst();
while (pAction)
@@ -190,9 +190,9 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
bool bVSplit = pViewData->GetVSplitMode() != SC_SPLIT_NONE;
vcl::Window* pLeft = pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT );
- vcl::Window* pRight = bHSplit ? pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ) : 0;
- vcl::Window* pBottom = bVSplit ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMLEFT ) : 0;
- vcl::Window* pDiagonal = (bHSplit && bVSplit) ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMRIGHT ) : 0;
+ vcl::Window* pRight = bHSplit ? pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ) : nullptr;
+ vcl::Window* pBottom = bVSplit ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMLEFT ) : nullptr;
+ vcl::Window* pDiagonal = (bHSplit && bVSplit) ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMRIGHT ) : nullptr;
OSL_ENSURE( pLeft, "ScGridWindow::ShowNoteMarker - missing top-left grid window" );
/* If caption is shown from right or bottom windows, adjust
@@ -302,7 +302,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
MouseEvent aMEvt( aPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT );
SdrHitKind eHit = pDrView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt );
- if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL )
+ if ( eHit != SDRHIT_NONE && aVEvt.pObj != nullptr )
{
// URL for IMapObject below Pointer is help text
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) )
@@ -340,14 +340,14 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
else
{
- SdrObject* pObj = 0;
- SdrPageView* pPV = 0;
+ SdrObject* pObj = nullptr;
+ SdrPageView* pPV = nullptr;
Point aMDPos = PixelToLogic( aPosPixel );
if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
{
if ( pObj->IsGroupObject() )
{
- SdrObject* pHit = 0;
+ SdrObject* pHit = nullptr;
if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
@@ -377,7 +377,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( aHelpText.isEmpty() ) // Text-URL
{
OUString aUrl;
- if ( GetEditUrl( aPosPixel, NULL, &aUrl ) )
+ if ( GetEditUrl( aPosPixel, nullptr, &aUrl ) )
{
aHelpText = INetURLObject::decode( aUrl,
INetURLObject::DECODE_UNAMBIGUOUS );
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index 423fb2314a60..9a1ffa400291 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -38,7 +38,7 @@ const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg )
if ( pDlg )
return pDlg->GetEditingObject();
else
- return NULL;
+ return nullptr;
}
const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg )
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 24ae12da2063..2af819f9094f 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -47,8 +47,8 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
aMapMode( rMap ),
bLeft( bLeftEdge ),
bByKeyboard( bKeyboard ),
- pModel( NULL ),
- pObject( NULL ),
+ pModel( nullptr ),
+ pObject( nullptr ),
bVisible( false )
{
Size aSizePixel = pWindow->GetOutputSizePixel();
@@ -77,7 +77,7 @@ IMPL_LINK_NOARG_TYPED(ScNoteMarker, TimeHdl, Timer *, void)
{
SvtPathOptions aPathOpt;
OUString aPath = aPathOpt.GetPalettePath();
- pModel = new SdrModel(aPath, NULL, NULL, false, false);
+ pModel = new SdrModel(aPath, nullptr, nullptr, false, false);
pModel->SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = pModel->GetItemPool();
rPool.SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 90cc0a40a75d..e80cfd346c56 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -45,7 +45,7 @@ ScOutlineWindow::ScOutlineWindow( vcl::Window* pParent, ScOutlineMode eMode, ScV
mbHoriz( eMode == SC_OUTLINE_HOR ),
mbMirrorEntries( false ), // updated in SetHeaderSize
mbMirrorLevels( false ), // updated in SetHeaderSize
- mpSymbols( NULL ),
+ mpSymbols( nullptr ),
maLineColor( COL_BLACK ),
mnHeaderSize( 0 ),
mnHeaderPos( 0 ),
@@ -162,14 +162,14 @@ void ScOutlineWindow::InitSettings()
const ScOutlineArray* ScOutlineWindow::GetOutlineArray() const
{
const ScOutlineTable* pTable = GetDoc().GetOutlineTable( GetTab() );
- if ( !pTable ) return NULL;
+ if ( !pTable ) return nullptr;
return mbHoriz ? &pTable->GetColArray() : &pTable->GetRowArray();
}
const ScOutlineEntry* ScOutlineWindow::GetOutlineEntry( size_t nLevel, size_t nEntry ) const
{
const ScOutlineArray* pArray = GetOutlineArray();
- return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : NULL;
+ return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : nullptr;
}
bool ScOutlineWindow::IsHidden( SCCOLROW nColRowIndex ) const
@@ -304,7 +304,7 @@ bool ScOutlineWindow::GetEntryPos(
// do not cover previous collapsed image
bool bDoNoCover = !bHidden && nEntry;
- const ScOutlineEntry* pPrevEntry = bDoNoCover ? GetOutlineEntry(nLevel, nEntry - 1) : NULL;
+ const ScOutlineEntry* pPrevEntry = bDoNoCover ? GetOutlineEntry(nLevel, nEntry - 1) : nullptr;
if (pPrevEntry)
{
SCCOLROW nPrevEnd = pPrevEntry->GetEnd();
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 83c879875e21..12970ceb0dee 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -163,9 +163,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
eType( eNewType ),
mnPPTX( nPixelPerTwipsX ),
mnPPTY( nPixelPerTwipsY ),
- pEditObj( NULL ),
- pViewShell( NULL ),
- pDrawView( NULL ),
+ pEditObj( nullptr ),
+ pViewShell( nullptr ),
+ pDrawView( nullptr ),
bEditMode( false ),
nEditCol( 0 ),
nEditRow( 0 ),
@@ -176,9 +176,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
mbUseStyleColor( false ),
mbForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ),
mbSyntaxMode( false ),
- pValueColor( NULL ),
- pTextColor( NULL ),
- pFormulaColor( NULL ),
+ pValueColor( nullptr ),
+ pTextColor( nullptr ),
+ pFormulaColor( nullptr ),
aGridColor( COL_BLACK ),
mbShowNullValues( true ),
mbShowFormulas( false ),
@@ -187,8 +187,8 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
bSnapPixel( false ),
bAnyRotated( false ),
bAnyClipped( false ),
- mpTargetPaintWindow(NULL), // #i74769# use SdrPaintWindow direct
- mpSpellCheckCxt(NULL)
+ mpTargetPaintWindow(nullptr), // #i74769# use SdrPaintWindow direct
+ mpSpellCheckCxt(nullptr)
{
if (pZoomX)
aZoomX = *pZoomX;
@@ -494,7 +494,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
for (SCROW i = nYplus1; i <= MAXROW; ++i)
{
if (i > nHiddenEndRow)
- bHiddenRow = mpDoc->RowHidden(i, nTab, NULL, &nHiddenEndRow);
+ bHiddenRow = mpDoc->RowHidden(i, nTab, nullptr, &nHiddenEndRow);
/* TODO: optimize the row break thing for large hidden
* segments where HasRowBreak() has to be called
* nevertheless for each row, as a row break is drawn also
@@ -944,23 +944,23 @@ void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const Sv
if (!pOldColor || *pOldColor != *pColor)
pOldColor = pColor;
- pOldBackground = NULL;
+ pOldBackground = nullptr;
}
else if(pBackground)
{
pOldBackground = pBackground;
- pOldColor = NULL;
+ pOldColor = nullptr;
}
if(pDataBarInfo)
pOldDataBarInfo = pDataBarInfo;
else
- pOldDataBarInfo = NULL;
+ pOldDataBarInfo = nullptr;
if(pIconSetInfo)
pOldIconSetInfo = pIconSetInfo;
else
- pOldIconSetInfo = NULL;
+ pOldIconSetInfo = nullptr;
}
}
@@ -1031,11 +1031,11 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
aRect = rRenderContext.PixelToLogic(aRect); // internal data in pixels, but we'll be drawing in logic units
- const SvxBrushItem* pOldBackground = NULL;
+ const SvxBrushItem* pOldBackground = nullptr;
const SvxBrushItem* pBackground;
- const Color* pOldColor = NULL;
- const ScDataBarInfo* pOldDataBarInfo = NULL;
- const ScIconSetInfo* pOldIconSetInfo = NULL;
+ const Color* pOldColor = nullptr;
+ const ScDataBarInfo* pOldDataBarInfo = nullptr;
+ const ScIconSetInfo* pOldIconSetInfo = nullptr;
SCCOL nMergedCells = 1;
SCCOL nOldMerged = 0;
@@ -1063,7 +1063,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
pBackground = ScGlobal::GetEmptyBrushItem();
}
else
- pBackground = NULL;
+ pBackground = nullptr;
}
else
pBackground = pInfo->pBackground;
@@ -1111,7 +1111,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, NULL, NULL, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, NULL, pOldDataBarInfo, NULL, pOldIconSetInfo);
+ drawCells(rRenderContext, nullptr, nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo);
nArrY += nSkip;
}
@@ -1358,7 +1358,7 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
bUseSingleColor = true;
}
- const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0;
+ const Color* pForceColor = bUseSingleColor ? &aSingleColor : nullptr;
if (bAnyRotated)
DrawRotatedFrame(rRenderContext, pForceColor); // removes the lines that must not be painted here
@@ -1454,7 +1454,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
bool bTopLine )
{
if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT )
- return NULL;
+ return nullptr;
bool bFound = false;
while (!bFound)
@@ -1465,7 +1465,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( nCol < MAXCOL )
++nCol;
else
- return NULL; // couldn't find it
+ return nullptr; // couldn't find it
}
else
{
@@ -1473,7 +1473,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( nCol > 0 )
--nCol;
else
- return NULL; // couldn't find it
+ return nullptr; // couldn't find it
}
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
@@ -1489,12 +1489,12 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( ValidRow(nRow) )
pThisBottom = static_cast<const SvxBoxItem*>(pDoc->GetAttr( nCol, nRow, nTab, ATTR_BORDER ))->GetBottom();
else
- pThisBottom = NULL;
+ pThisBottom = nullptr;
const ::editeng::SvxBorderLine* pNextTop;
if ( nRow < MAXROW )
pNextTop = static_cast<const SvxBoxItem*>(pDoc->GetAttr( nCol, nRow+1, nTab, ATTR_BORDER ))->GetTop();
else
- pNextTop = NULL;
+ pNextTop = nullptr;
if ( ScHasPriority( pThisBottom, pNextTop ) )
return pThisBottom;
@@ -1863,7 +1863,7 @@ drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
mpDoc->InitDrawLayer(mpDoc->GetDocumentShell());
ScDrawLayer* pDrawLayer = mpDoc->GetDrawLayer();
if (!pDrawLayer)
- return NULL;
+ return nullptr;
basegfx::B2DRange aViewRange;
SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index d40483a16624..e6f57ddf58b6 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -184,15 +184,15 @@ private:
ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) :
pOutput ( pData ),
- pPattern ( NULL ),
- pCondSet ( NULL ),
+ pPattern ( nullptr ),
+ pCondSet ( nullptr ),
nAscentPixel(0),
eAttrOrient ( SVX_ORIENTATION_STANDARD ),
eAttrHorJust( SVX_HOR_JUSTIFY_STANDARD ),
eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
eAttrHorJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
- pMargin ( NULL ),
+ pMargin ( nullptr ),
nIndent ( 0 ),
bRotated ( false ),
nOriginalWidth( 0 ),
@@ -311,7 +311,7 @@ void ScDrawStringsVars::SetPattern(
eColorMode = SC_AUTOCOL_PRINT;
if ( bPixelToLogic )
- pPattern->GetFont( aFont, eColorMode, pFmtDevice, NULL, pCondSet, nScript,
+ pPattern->GetFont( aFont, eColorMode, pFmtDevice, nullptr, pCondSet, nScript,
&aBackConfigColor, &aTextConfigColor );
else
pPattern->GetFont( aFont, eColorMode, pFmtDevice, &pOutput->aZoomY, pCondSet, nScript,
@@ -1110,7 +1110,7 @@ bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScRefCellValue& rCell )
{
rCell.assign(*mpDoc, ScAddress(nCol, nRow, nTabP));
- if (!rCell.isEmpty() && IsEmptyCellText(NULL, nCol, nRow))
+ if (!rCell.isEmpty() && IsEmptyCellText(nullptr, nCol, nRow))
rCell.clear();
}
@@ -1121,7 +1121,7 @@ bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
// where a note is empty as well as a cell that's hidden by protection settings
ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, nTab));
- if (!aCell.isEmpty() && !IsEmptyCellText(NULL, nX, nY))
+ if (!aCell.isEmpty() && !IsEmptyCellText(nullptr, nX, nY))
return false;
const ScPatternAttr* pPattern = mpDoc->GetPattern( nX, nY, nTab );
@@ -1463,10 +1463,10 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
OutputAreaParam aAreaParam;
bool bCellIsValue = false;
long nNeededWidth = 0;
- const ScPatternAttr* pPattern = NULL;
- const SfxItemSet* pCondSet = NULL;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const SfxItemSet* pCondSet = nullptr;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
SvtScriptType nOldScript = SvtScriptType::NONE;
// alternative pattern instances in case we need to modify the pattern
@@ -1679,7 +1679,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
if ( bFormulaCell )
lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.mpFormula);
if ( aVars.SetText(aCell) )
- pOldPattern = NULL;
+ pOldPattern = nullptr;
bNeedEdit = aVars.HasEditCharacters() || (bFormulaCell && aCell.mpFormula->IsMultilineResult());
}
long nTotalMargin = 0;
@@ -1758,7 +1758,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
}
- pOldPattern = NULL;
+ pOldPattern = nullptr;
}
}
}
@@ -2335,15 +2335,15 @@ ScOutputData::DrawEditParam::DrawEditParam(const ScPatternAttr* pPattern, const
mbAsianVertical(false),
mbPixelToLogic(false),
mbHyphenatorSet(false),
- mpEngine(NULL),
+ mpEngine(nullptr),
mpPattern(pPattern),
mpCondSet(pCondSet),
- mpPreviewFontSet(NULL),
- mpOldPattern(NULL),
- mpOldCondSet(NULL),
- mpOldPreviewFontSet(NULL),
- mpThisRowInfo(NULL),
- mpMisspellRanges(NULL)
+ mpPreviewFontSet(nullptr),
+ mpOldPattern(nullptr),
+ mpOldCondSet(nullptr),
+ mpOldPreviewFontSet(nullptr),
+ mpThisRowInfo(nullptr),
+ mpMisspellRanges(nullptr)
{}
bool ScOutputData::DrawEditParam::readCellContent(
@@ -3035,7 +3035,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -3087,7 +3087,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// horizontal alignment
if (rParam.adjustHorAlignment(rParam.mpEngine))
// reset adjustment for the next cell
- rParam.mpOldPattern = NULL;
+ rParam.mpOldPattern = nullptr;
}
if (rParam.meVerJust==SVX_VER_JUSTIFY_BOTTOM ||
@@ -3165,7 +3165,7 @@ void ScOutputData::ShowClipMarks( DrawEditParam& rParam, long nEngineHeight, con
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4009,7 +4009,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4356,7 +4356,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
!rParam.mbAsianVertical && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4450,9 +4450,9 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
{
std::unique_ptr<ScFieldEditEngine> pEngine;
bool bHyphenatorSet = false;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
- const SfxItemSet* pOldPreviewFontSet = NULL;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
+ const SfxItemSet* pOldPreviewFontSet = nullptr;
ScRefCellValue aCell;
long nInitPosX = nScrX;
@@ -4530,8 +4530,8 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
bDoCell = false;
- const ScPatternAttr* pPattern = NULL;
- const SfxItemSet* pCondSet = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const SfxItemSet* pCondSet = nullptr;
if (bDoCell)
{
if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 &&
@@ -4654,8 +4654,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
bool bHyphenatorSet = false;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
ScRefCellValue aCell;
long nInitPosX = nScrX;
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 496cc5adfa65..42eeeace7160 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -119,7 +119,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
{
// #i74769# work with SdrPaintWindow directly
pLocalDrawView->EndDrawLayers(*mpTargetPaintWindow, true);
- mpTargetPaintWindow = 0;
+ mpTargetPaintWindow = nullptr;
}
}
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 556cd2f42935..4c4024d187f9 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -40,7 +40,7 @@ ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
SfxPrinter* pPrinter = pDocSh->GetPrinter();
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aRange );
@@ -84,7 +84,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
return; // initialize only once
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aRange );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index d1f4a3f2baf8..a2cc775db2a7 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -98,8 +98,8 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
aDate( Date::SYSTEM ),
aTime( tools::Time::SYSTEM ),
nTotalPages( 0 ),
- pLocationData( NULL ),
- pDrawView( NULL ),
+ pLocationData( nullptr ),
+ pDrawView( nullptr ),
pDocShell( pDocSh ),
pViewShell( pViewSh ),
bInGetState( false ),
@@ -165,7 +165,7 @@ void ScPreview::UpdateDrawView() // nTab must be right
{
// convert the displayed Page of drawView (see below) does not work?!?
delete pDrawView;
- pDrawView = NULL;
+ pDrawView = nullptr;
}
if ( !pDrawView ) // New Drawing?
@@ -182,7 +182,7 @@ void ScPreview::UpdateDrawView() // nTab must be right
else if ( pDrawView )
{
delete pDrawView; // for this Chart is not needed
- pDrawView = NULL;
+ pDrawView = nullptr;
}
}
@@ -264,7 +264,7 @@ void ScPreview::CalcPages()
long nAttrPage = i > 0 ? nFirstAttr[i-1] : 1;
long nThisStart = nTotalPages;
- ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, NULL, &aOptions );
+ ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, nullptr, &aOptions );
long nThisTab = aPrintFunc.GetTotalPages();
if (!aPrintFunc.HasPrintRange())
mbHasEmptyRangeTable = true;
@@ -353,7 +353,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
- bool bDoPrint = ( pFillLocation == NULL );
+ bool bDoPrint = ( pFillLocation == nullptr );
bool bValidPage = ( nPageNo < nTotalPages );
ScModule* pScMod = SC_MOD();
@@ -392,7 +392,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
if (bStateValid)
pPrintFunc = new ScPrintFunc( this, pDocShell, aState, &aOptions );
else
- pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
+ pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions );
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
@@ -630,7 +630,7 @@ void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle&
if (bPageMargin)
GetLocationData(); // fill location data for column positions
- DoPrint( NULL );
+ DoPrint( nullptr );
pViewShell->UpdateScrollBars();
bInPaint = bWasInPaint;
@@ -897,7 +897,7 @@ void ScPreview::DoInvalidate()
// The Invalidate must come behind asynchronously
if (bInGetState)
- Application::PostUserEvent( LINK( this, ScPreview, InvalidateHdl ), NULL, true );
+ Application::PostUserEvent( LINK( this, ScPreview, InvalidateHdl ), nullptr, true );
else
StaticInvalidate(); // Immediately
}
@@ -1185,7 +1185,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
}
else if( bHeaderRulerMove && bHeaderRulerChange )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET )
{
const SfxItemSet& pHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
@@ -1200,7 +1200,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
}
else if( bFooterRulerMove && bFooterRulerChange )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET )
{
const SfxItemSet& pFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
@@ -1318,7 +1318,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
if (bStateValid)
pPrintFunc = new ScPrintFunc( this, pDocShell, aState, &aOptions );
else
- pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
+ pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions );
nLeftMargin = (long)( pPrintFunc->GetLeftMargin() * HMM_PER_TWIPS - aOffset.X() );
nRightMargin = (long)( pPrintFunc->GetRightMargin() * HMM_PER_TWIPS );
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index b0e407c223e0..aa65184d4aca 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -60,8 +60,8 @@ ScPreviewTableInfo::ScPreviewTableInfo() :
nTab(0),
nCols(0),
nRows(0),
- pColInfo(NULL),
- pRowInfo(NULL)
+ pColInfo(nullptr),
+ pRowInfo(nullptr)
{
}
@@ -115,7 +115,7 @@ void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea )
SetColInfo( nNewCount, pNewInfo );
}
else
- SetColInfo( 0, NULL ); // all invisible
+ SetColInfo( 0, nullptr ); // all invisible
}
}
@@ -142,7 +142,7 @@ void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea )
SetRowInfo( nNewCount, pNewInfo );
}
else
- SetRowInfo( 0, NULL ); // all invisible
+ SetRowInfo( 0, nullptr ); // all invisible
}
}
}
@@ -276,7 +276,7 @@ static ScPreviewLocationEntry* lcl_GetEntryByAddress(
return it.get();
}
- return NULL;
+ return nullptr;
}
Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const
@@ -592,7 +592,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
rInfo.SetColInfo( nColCount, pColInfo );
}
else
- rInfo.SetColInfo( 0, NULL );
+ rInfo.SetColInfo( 0, nullptr );
// get row info
@@ -659,7 +659,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
rInfo.SetRowInfo( nRowCount, pRowInfo );
}
else
- rInfo.SetRowInfo( 0, NULL );
+ rInfo.SetRowInfo( 0, nullptr );
// limit to visible area
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index b31044a42176..73b90360f6de 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -151,10 +151,10 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
SfxViewShell* pOldSh ) :
SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS ),
pDocShell( static_cast<ScDocShell*>(pViewFrame->GetObjectShell()) ),
- mpFrameWindow(NULL),
+ mpFrameWindow(nullptr),
nSourceDesignMode( TRISTATE_INDET ),
nMaxVertPos(0),
- pAccessibilityBroadcaster( NULL )
+ pAccessibilityBroadcaster( nullptr )
{
Construct( &pViewFrame->GetWindow() );
@@ -196,7 +196,7 @@ ScPreviewShell::~ScPreviewShell()
EndListening(*SfxGetpApp());
EndListening(*pDocShell);
- SetWindow(0);
+ SetWindow(nullptr);
pPreview.disposeAndClear();
pHorScroll.disposeAndClear();
pVerScroll.disposeAndClear();
@@ -550,7 +550,7 @@ void ScPreviewShell::Activate(bool bMDI)
// InputHdl is now mostly Null, no moreasssertion!
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if ( pInputHdl )
- pInputHdl->NotifyChange( NULL );
+ pInputHdl->NotifyChange( nullptr );
}
}
@@ -645,7 +645,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(NULL, aSet));
+ std::unique_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(nullptr, aSet));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetLimits( 20, 400 );
pDlg->HideButton( ZoomButtonId::OPTIMAL );
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 8512061f164e..ac16552460d1 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -90,7 +90,7 @@ ScPageRowEntry::ScPageRowEntry(const ScPageRowEntry& r)
memcpy( pHidden, r.pHidden, nPagesX * sizeof(bool) );
}
else
- pHidden = NULL;
+ pHidden = nullptr;
}
const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
@@ -106,7 +106,7 @@ const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
memcpy( pHidden, r.pHidden, nPagesX * sizeof(bool) );
}
else
- pHidden = NULL;
+ pHidden = nullptr;
return *this;
}
@@ -117,7 +117,7 @@ void ScPageRowEntry::SetPagesX(size_t nNew)
{
OSL_FAIL("SetPagesX nicht nach SetHidden");
delete[] pHidden;
- pHidden = NULL;
+ pHidden = nullptr;
}
nPagesX = nNew;
}
@@ -177,12 +177,12 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
// else, EditEngine outputs different text heights
pDev->SetMapMode(MAP_PIXEL);
- pBorderItem = NULL;
- pBackgroundItem = NULL;
- pShadowItem = NULL;
+ pBorderItem = nullptr;
+ pBackgroundItem = nullptr;
+ pShadowItem = nullptr;
- pEditEngine = NULL;
- pEditDefaults = NULL;
+ pEditEngine = nullptr;
+ pEditDefaults = nullptr;
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
@@ -193,7 +193,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
else
{
OSL_FAIL("Seitenvorlage nicht gefunden" );
- pParamSet = NULL;
+ pParamSet = nullptr;
}
if (!bState)
@@ -205,7 +205,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
InitParam(pOptions);
- pPageData = NULL; // is only needed for initialisation
+ pPageData = nullptr; // is only needed for initialisation
}
ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab,
@@ -214,7 +214,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
ScPageBreakData* pData )
: pDocShell ( pShell ),
pPrinter ( pNewPrinter ),
- pDrawView ( NULL ),
+ pDrawView ( nullptr ),
nPrintTab ( nTab ),
nPageStart ( nPage ),
nDocPages ( nDocP ),
@@ -240,8 +240,8 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
long nPage, long nDocP, const ScRange* pArea,
const ScPrintOptions* pOptions )
: pDocShell ( pShell ),
- pPrinter ( NULL ),
- pDrawView ( NULL ),
+ pPrinter ( nullptr ),
+ pDrawView ( nullptr ),
nPrintTab ( nTab ),
nPageStart ( nPage ),
nDocPages ( nDocP ),
@@ -256,7 +256,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
nPagesX(0),
nPagesY(0),
nTotalY(0),
- pPageData ( NULL )
+ pPageData ( nullptr )
{
pDev = pOutDev;
Construct( pOptions );
@@ -265,9 +265,9 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
const ScPrintState& rState, const ScPrintOptions* pOptions )
: pDocShell ( pShell ),
- pPrinter ( NULL ),
- pDrawView ( NULL ),
- pUserArea ( NULL ),
+ pPrinter ( nullptr ),
+ pDrawView ( nullptr ),
+ pUserArea ( nullptr ),
bSourceRangeValid ( false ),
bPrintCurrentTable ( false ),
bMultiArea ( false ),
@@ -275,7 +275,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
nPagesX(0),
nPagesY(0),
nTotalY(0),
- pPageData ( NULL )
+ pPageData ( nullptr )
{
pDev = pOutDev;
@@ -596,12 +596,12 @@ static void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
{
// nDistance must be initialized differently before
- if ( pHFSet == NULL )
+ if ( pHFSet == nullptr )
{
rParam.bEnable = false;
- rParam.pBorder = NULL;
- rParam.pBack = NULL;
- rParam.pShadow = NULL;
+ rParam.pBorder = nullptr;
+ rParam.pBack = nullptr;
+ rParam.pShadow = nullptr;
}
else
{
@@ -823,7 +823,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aHdr.pRight = static_cast<const ScPageHFItem*>( &pParamSet->Get(ATTR_PAGE_HEADERRIGHT) );
const SvxSetItem* pHeaderSetItem;
- const SfxItemSet* pHeaderSet = NULL;
+ const SfxItemSet* pHeaderSet = nullptr;
if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, false,
reinterpret_cast<const SfxPoolItem**>(&pHeaderSetItem) ) == SfxItemState::SET )
{
@@ -839,7 +839,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aFtr.pRight = static_cast<const ScPageHFItem*>( &pParamSet->Get(ATTR_PAGE_FOOTERRIGHT) );
const SvxSetItem* pFooterSetItem;
- const SfxItemSet* pFooterSet = NULL;
+ const SfxItemSet* pFooterSet = nullptr;
if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, false,
reinterpret_cast<const SfxPoolItem**>(&pFooterSetItem) ) == SfxItemState::SET )
{
@@ -853,9 +853,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// TabPage "Table"
- const SfxUInt16Item* pScaleItem = NULL;
- const ScPageScaleToItem* pScaleToItem = NULL;
- const SfxUInt16Item* pScaleToPagesItem = NULL;
+ const SfxUInt16Item* pScaleItem = nullptr;
+ const ScPageScaleToItem* pScaleToItem = nullptr;
+ const SfxUInt16Item* pScaleToPagesItem = nullptr;
SfxItemState eState;
eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false,
@@ -1187,7 +1187,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu
const double Abitmap( k1/k2 * aSize.Width()*aSize.Height() );
aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0),
- NULL, GraphicManagerDrawFlags::STANDARD,
+ nullptr, GraphicManagerDrawFlags::STANDARD,
::std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
}
else
@@ -1223,7 +1223,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
if (pBorderData)
if ( !pBorderData->GetTop() && !pBorderData->GetBottom() && !pBorderData->GetLeft() &&
!pBorderData->GetRight() )
- pBorderData = NULL;
+ pBorderData = nullptr;
if (!pBorderData && !pBackground && !pShadow)
return; // nothing to do
@@ -2522,7 +2522,7 @@ long ScPrintFunc::CountNotePages()
long nNoteAdd;
do
{
- nNoteAdd = PrintNotes( nPages, nNoteNr, false, NULL );
+ nNoteAdd = PrintNotes( nPages, nNoteNr, false, nullptr );
if (nNoteAdd)
{
nNoteNr += nNoteAdd;
@@ -2705,7 +2705,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
bool bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
nNoteAdd = PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
- ( bPageSelected ? pLocationData : NULL ) );
+ ( bPageSelected ? pLocationData : nullptr ) );
if ( nNoteAdd )
{
nNoteNr += nNoteAdd;
@@ -2731,7 +2731,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // calculate zoom
{
sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
- const ScRange* pThisRange = NULL;
+ const ScRange* pThisRange = nullptr;
if ( nRangeNo != RANGENO_NORANGE || nRangeNo < nRCount )
pThisRange = pDoc->GetPrintRange( nPrintTab, nRangeNo );
if ( pThisRange )
@@ -3069,7 +3069,7 @@ void ScPrintFunc::CalcPages() // calculates aPageRect and pages fr
}
SCROW nLastRow = -1;
- if (!pDoc->RowHidden(nRow, nPrintTab, NULL, &nLastRow))
+ if (!pDoc->RowHidden(nRow, nPrintTab, nullptr, &nLastRow))
{
bVisRow = true;
nLastVisibleRow = nLastRow;
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 4c986dd94f2f..565d989d9ba1 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -140,7 +140,7 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP,
: SfxChildWindow(pParentP, nId)
{
- ScTabViewShell* pViewShell = NULL;
+ ScTabViewShell* pViewShell = nullptr;
SfxDispatcher* pDisp = p->GetDispatcher();
if ( pDisp )
{
@@ -151,14 +151,14 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP,
OSL_ENSURE( pViewShell, "missing view shell :-(" );
- if(pInfo!=NULL && bScSimpleRefFlag)
+ if(pInfo!=nullptr && bScSimpleRefFlag)
{
pInfo->aPos.X()=nScSimpleRefX;
pInfo->aPos.Y()=nScSimpleRefY;
pInfo->aSize.Height()=nScSimpleRefHeight;
pInfo->aSize.Width()=nScSimpleRefWidth;
}
- SetWindow(NULL);
+ SetWindow(nullptr);
if(bAutoReOpen && pViewShell)
SetWindow( pViewShell->CreateRefDialog( p, this, pInfo, pParentP, WID_SIMPLE_REF) );
@@ -244,7 +244,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( vcl::Window* pParentP,
static_cast<ScAcceptChgDlg*>(GetWindow())->Initialize( pInfo );
}
else
- SetWindow( NULL );
+ SetWindow( nullptr );
if (pViewShell && !GetWindow())
pViewShell->GetViewFrame()->SetChildWindow( nId, false );
}
@@ -275,7 +275,7 @@ namespace
if( SfxViewShell* pViewSh = pFrm->GetViewShell() )
return dynamic_cast<ScTabViewShell*>( pViewSh );
- return NULL;
+ return nullptr;
}
}
@@ -286,7 +286,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window* pParent
: SfxChildWindow(pParentP, nId),
m_bVisibleLock( false ),
m_bFreeWindowLock( false ),
- m_pSavedWndParent( NULL )
+ m_pSavedWndParent( nullptr )
{
SetWantsFocus( false );
VclPtr<ScValidationDlg> pDlg = ScValidationDlg::Find1AliveObject( pParentP );
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index dea6e14a6d1b..97475e8ee6fd 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -94,7 +94,7 @@ ScExtTabSettingsCont& ScExtTabSettingsCont::operator=( const ScExtTabSettingsCon
const ScExtTabSettings* ScExtTabSettingsCont::GetTabSettings( SCTAB nTab ) const
{
ScExtTabSettingsMap::const_iterator aIt = maMap.find( nTab );
- return (aIt == maMap.end()) ? 0 : aIt->second.get();
+ return (aIt == maMap.end()) ? nullptr : aIt->second.get();
}
ScExtTabSettings& ScExtTabSettingsCont::GetOrCreateTabSettings( SCTAB nTab )
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index acbb0f3c95d7..a9b4a20ff2b6 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -48,7 +48,7 @@ static bool bDidSwitch = false;
// View (Gridwin / keyboard)
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
- pEngine( NULL ),
+ pEngine( nullptr ),
bAnchor( false ),
bStarted( false )
{
@@ -206,7 +206,7 @@ void ScViewFunctionSet::BeginDrag()
if ( pWindow->IsTracking() )
pWindow->EndTracking( TrackingEventFlags::Cancel ); // abort selecting
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
pTransferObj->StartDrag( pWindow, nDragActions );
return; // dragging started
diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx
index 66c218e679b5..a01df2221058 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -66,7 +66,7 @@ const std::vector<editeng::MisspellRanges>* SpellCheckContext::getMisspellRanges
{
CellMapType::const_iterator it = maMisspellCells.find(CellPos(nCol,nRow));
if (it == maMisspellCells.end())
- return NULL;
+ return nullptr;
return &it->second;
}
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index 033bcd207394..5ee00f9bde01 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -42,10 +42,10 @@ SFX_IMPL_CHILDWINDOW_WITHID( ScSpellDialogChildWindow, SID_SPELL_DIALOG )
ScSpellDialogChildWindow::ScSpellDialogChildWindow( vcl::Window* pParentP, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
svx::SpellDialogChildWindow( pParentP, nId, pBindings, pInfo ),
- mpViewShell( 0 ),
- mpViewData( 0 ),
- mpDocShell( 0 ),
- mpDoc( 0 ),
+ mpViewShell( nullptr ),
+ mpViewData( nullptr ),
+ mpDocShell( nullptr ),
+ mpDoc( nullptr ),
mbNeedNextObj( false ),
mbOldIdleEnabled(true)
{
@@ -140,7 +140,7 @@ void ScSpellDialogChildWindow::Reset()
mpDocShell->SetDocumentModified();
}
- mpViewData->SetSpellingView( 0 );
+ mpViewData->SetSpellingView( nullptr );
mpViewShell->KillEditView( true );
mpDocShell->PostPaintGridAll();
mpViewShell->UpdateInputHandler();
@@ -151,10 +151,10 @@ void ScSpellDialogChildWindow::Reset()
mxRedoDoc.reset();
mxOldSel.reset();
mxOldRangeList.reset();
- mpViewShell = 0;
- mpViewData = 0;
- mpDocShell = 0;
- mpDoc = 0;
+ mpViewShell = nullptr;
+ mpViewData = nullptr;
+ mpDocShell = nullptr;
+ mpDoc = nullptr;
mbNeedNextObj = false;
mbOldIdleEnabled = true;
}
@@ -163,7 +163,7 @@ void ScSpellDialogChildWindow::Init()
{
if( mpViewShell )
return;
- if( (mpViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() )) == 0 )
+ if( (mpViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() )) == nullptr )
return;
mpViewData = &mpViewShell->GetViewData();
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 9b9f4c2572e1..871de86d2c0e 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -79,8 +79,8 @@ bool ScConversionEngineBase::FindNextConversionCell()
{
ScMarkData& rMark = mrViewData.GetMarkData();
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
- const ScPatternAttr* pPattern = NULL;
- const ScPatternAttr* pLastPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const ScPatternAttr* pLastPattern = nullptr;
std::unique_ptr<SfxItemSet> pEditDefaults(new SfxItemSet(GetEmptyItemSet()));
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index ca8c67e62e4e..e10a0a129728 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -478,7 +478,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
pTransferObj->SetDragSource( pDocSh, aTabMark );
vcl::Window* pWindow = pViewData->GetActiveWin();
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 46cbafea8d08..e8a1918844d3 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -194,11 +194,11 @@ bool lcl_HasRowOutline( const ScViewData& rViewData )
ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
pFrameWin( pParent ),
aViewData( &rDocSh, pViewShell ),
- pSelEngine( NULL ),
+ pSelEngine( nullptr ),
aFunctionSet( &aViewData ),
- pHdrSelEng( NULL ),
+ pHdrSelEng( nullptr ),
aHdrFunc( &aViewData ),
- pDrawView( NULL ),
+ pDrawView( nullptr ),
aVScrollTop( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ) ),
aVScrollBottom( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ) ),
aHScrollLeft( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ) ),
@@ -206,11 +206,11 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, false ) ),
aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, true ) ),
aScrollBarBox( VclPtr<ScrollBarBox>::Create( pFrameWin, WB_SIZEABLE ) ),
- mpInputHintWindow( NULL ),
- pPageBreakData( NULL ),
- pBrushDocument( NULL ),
- pDrawBrushSet( NULL ),
- pTimerWindow( NULL ),
+ mpInputHintWindow( nullptr ),
+ pPageBreakData( nullptr ),
+ pBrushDocument( nullptr ),
+ pDrawBrushSet( nullptr ),
+ pTimerWindow( nullptr ),
nTipVisible( 0 ),
nPrevDragPos( 0 ),
meBlockMode(None),
@@ -266,7 +266,7 @@ void ScTabView::SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt )
void ScTabView::ResetTimer()
{
aScrollTimer.Stop();
- pTimerWindow = NULL;
+ pTimerWindow = nullptr;
}
IMPL_LINK_NOARG_TYPED(ScTabView, TimerHdl, Timer *, void)
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 68744a0c21cc..2d4dbe59ebdf 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -80,7 +80,7 @@ void moveCursorByProtRule(
{
SCCOL nNewUnhiddenCol = rCol + 1;
SCCOL nEndCol = 0;
- while(pDoc->ColHidden(nNewUnhiddenCol, nTab, NULL, &nEndCol))
+ while(pDoc->ColHidden(nNewUnhiddenCol, nTab, nullptr, &nEndCol))
{
if(nNewUnhiddenCol >= MAXCOL)
return;
@@ -121,7 +121,7 @@ void moveCursorByProtRule(
{
SCROW nNewUnhiddenRow = rRow + 1;
SCROW nEndRow = 0;
- while(pDoc->RowHidden(nNewUnhiddenRow, nTab, NULL, &nEndRow))
+ while(pDoc->RowHidden(nNewUnhiddenRow, nTab, nullptr, &nEndRow))
{
if(nNewUnhiddenRow >= MAXROW)
return;
@@ -501,7 +501,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
SCsROW nCurYOffset = 0;
SCsROW nBlockStartYOffset = 0;
bool bBlockStartMerged = false;
- const ScMergeAttr* pMergeAttr = NULL;
+ const ScMergeAttr* pMergeAttr = nullptr;
ScDocument* pDocument = aViewData.GetDocument();
// The following block checks whether or not the "BlockStart" (anchor)
@@ -802,7 +802,7 @@ void ScTabView::SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, S
do
{
SCROW nLastRow = -1;
- bSkipCell = pDoc->RowHidden(rCurY, nTab, NULL, &nLastRow) || pDoc->IsVerOverlapped( rCurX, rCurY, nTab );
+ bSkipCell = pDoc->RowHidden(rCurY, nTab, nullptr, &nLastRow) || pDoc->IsVerOverlapped( rCurX, rCurY, nTab );
if (bSkipProtected && !bSkipCell)
bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED);
if (bSkipUnprotected && !bSkipCell)
@@ -1426,7 +1426,7 @@ void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId )
void ScTabView::UpdatePageBreakData( bool bForcePaint )
{
- ScPageBreakData* pNewData = NULL;
+ ScPageBreakData* pNewData = nullptr;
if (aViewData.IsPagebreakMode())
{
@@ -1439,7 +1439,7 @@ void ScTabView::UpdatePageBreakData( bool bForcePaint )
nCount = 1;
pNewData = new ScPageBreakData(nCount);
- ScPrintFunc aPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab, 0,0,NULL, NULL, pNewData );
+ ScPrintFunc aPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab, 0,0,nullptr, nullptr, pNewData );
// ScPrintFunc fills the PageBreakData in ctor
if ( nCount > 1 )
{
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index c864d2d053d2..8e6d1432f30a 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -323,7 +323,7 @@ void ScTabView::CheckSelectionTransfer()
// remove own selection
pOld->ForgetView();
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
TransferableHelper::ClearSelection( GetActiveWin() ); // may delete pOld
}
// else: selection from outside: leave unchanged
@@ -449,7 +449,7 @@ void ScTabView::CursorPosChanged()
// Broadcast, so that other Views of the document also switch
ScDocument* pDoc = aViewData.GetDocument();
- bool bDP = NULL != pDoc->GetDPAtCursor(
+ bool bDP = nullptr != pDoc->GetDPAtCursor(
aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() );
aViewData.GetViewShell()->SetPivotShell(bDP);
@@ -659,7 +659,7 @@ void ScTabView::TestHintWindow()
bool ScTabView::HasHintWindow() const
{
- return mpInputHintWindow.get() != NULL;
+ return mpInputHintWindow.get() != nullptr;
}
void ScTabView::RemoveHintWindow()
@@ -696,7 +696,7 @@ static vcl::Window* lcl_GetCareWin(SfxViewFrame* pViewFrm)
}
}
- return NULL;
+ return nullptr;
}
// adjust screen with respect to cursor position
@@ -1734,7 +1734,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId();
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId );
- IAnyRefDialog* pRefDlg = pChildWnd ? dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()) : NULL;
+ IAnyRefDialog* pRefDlg = pChildWnd ? dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()) : nullptr;
if (pRefDlg)
{
pRefDlg->ViewShellChanged();
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index a91af4d4c39c..cca6f0bac2e6 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -76,7 +76,7 @@ void ScTabView::Init()
aScrollTimer.SetTimeoutHdl( LINK( this, ScTabView, TimerHdl ) );
for (i=0; i<4; i++)
- pGridWin[i] = NULL;
+ pGridWin[i] = nullptr;
pGridWin[SC_SPLIT_BOTTOMLEFT] = VclPtr<ScGridWindow>::Create( pFrameWin, &aViewData, SC_SPLIT_BOTTOMLEFT );
pSelEngine = new ScViewSelectionEngine( pGridWin[SC_SPLIT_BOTTOMLEFT], this,
@@ -87,12 +87,12 @@ void ScTabView::Init()
pColBar[SC_SPLIT_LEFT] = VclPtr<ScColBar>::Create( pFrameWin, &aViewData, SC_SPLIT_LEFT,
&aHdrFunc, pHdrSelEng );
- pColBar[SC_SPLIT_RIGHT] = NULL;
+ pColBar[SC_SPLIT_RIGHT] = nullptr;
pRowBar[SC_SPLIT_BOTTOM] = VclPtr<ScRowBar>::Create( pFrameWin, &aViewData, SC_SPLIT_BOTTOM,
&aHdrFunc, pHdrSelEng );
- pRowBar[SC_SPLIT_TOP] = NULL;
+ pRowBar[SC_SPLIT_TOP] = nullptr;
for (i=0; i<2; i++)
- pColOutline[i] = pRowOutline[i] = NULL;
+ pColOutline[i] = pRowOutline[i] = nullptr;
pHSplitter = VclPtr<ScTabSplitter>::Create( pFrameWin, WinBits( WB_HSCROLL ), &aViewData );
pVSplitter = VclPtr<ScTabSplitter>::Create( pFrameWin, WinBits( WB_VSCROLL ), &aViewData );
@@ -130,8 +130,8 @@ void ScTabView::Init()
// UpdateShow kommt beim Resize, oder bei Kopie einer bestehenden View aus dem ctor
- pDrawActual = NULL;
- pDrawOld = NULL;
+ pDrawActual = nullptr;
+ pDrawOld = nullptr;
// DrawView darf nicht im TabView - ctor angelegt werden,
// wenn die ViewShell noch nicht konstruiert ist...
@@ -150,7 +150,7 @@ ScTabView::~ScTabView()
if ( pOld && pOld->GetView() == this )
{
pOld->ForgetView();
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
TransferableHelper::ClearSelection( GetActiveWin() ); // may delete pOld
}
@@ -219,7 +219,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
if (pGridWin[i])
{
if ( SC_SPLIT_BOTTOMLEFT != (ScSplitPos)i )
- pDrawView->AddWindowToPaintView(pGridWin[i], 0);
+ pDrawView->AddWindowToPaintView(pGridWin[i], nullptr);
}
pDrawView->RecalcScale();
for (i=0; i<4; i++)
@@ -254,7 +254,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
{
if (pDrawView)
{
- pDrawView->AddWindowToPaintView(pWin, 0);
+ pDrawView->AddWindowToPaintView(pWin, nullptr);
pWin->DrawLayerCreated();
}
@@ -602,7 +602,7 @@ void ScTabView::SetBrushDocument( ScDocument* pNew, bool bLock )
delete pDrawBrushSet;
pBrushDocument = pNew;
- pDrawBrushSet = NULL;
+ pDrawBrushSet = nullptr;
bLockPaintBrush = bLock;
@@ -614,7 +614,7 @@ void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, bool bLock )
delete pBrushDocument;
delete pDrawBrushSet;
- pBrushDocument = NULL;
+ pBrushDocument = nullptr;
pDrawBrushSet = pNew;
bLockPaintBrush = bLock;
@@ -626,7 +626,7 @@ void ScTabView::ResetBrushDocument()
{
if ( HasPaintBrush() )
{
- SetBrushDocument( NULL, false );
+ SetBrushDocument( nullptr, false );
SetActivePointer( Pointer( PointerStyle::Arrow ) ); // switch pointers also when ended with escape key
}
}
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 0f3b1d177edc..6aa2bb3c5b89 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -241,7 +241,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->GetDrawFuncPtr()->Deactivate();
pTabView->SetDrawFuncOldPtr(pTabView->GetDrawFuncPtr());
- pTabView->SetDrawFuncPtr(NULL);
+ pTabView->SetDrawFuncPtr(nullptr);
}
SfxRequest aNewReq(rReq);
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index d4badd8cd2d5..957fa3fdfc94 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -199,11 +199,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, true, &pItem ) == SfxItemState::SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SetPrintRanges( false, &aPrintStr, NULL, NULL, bAdd );
+ SetPrintRanges( false, &aPrintStr, nullptr, nullptr, bAdd );
}
else
{
- SetPrintRanges( false, NULL, NULL, NULL, bAdd ); // from selection
+ SetPrintRanges( false, nullptr, nullptr, nullptr, bAdd ); // from selection
rReq.Done();
}
}
@@ -214,7 +214,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// Clear currently defined print range if any, and reset it to
// print entire sheet which is the default.
OUString aEmpty;
- SetPrintRanges(true, &aEmpty, NULL, NULL, false);
+ SetPrintRanges(true, &aEmpty, nullptr, nullptr, false);
rReq.Done();
}
break;
@@ -472,7 +472,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
OUString aStrDocName( static_cast<const SfxStringItem&>(pReqArgs->
Get(nSlot)).GetValue() );
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
ScDocShell* pDocSh = static_cast<ScDocShell*>(SfxObjectShell::GetFirst());
bool bFound = false;
@@ -483,7 +483,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( pDocSh->GetTitle() == aStrDocName )
{
pViewFrame = SfxViewFrame::GetFirst( pDocSh );
- bFound = ( NULL != pViewFrame );
+ bFound = ( nullptr != pViewFrame );
}
pDocSh = static_cast<ScDocShell*>(SfxObjectShell::GetNext( *pDocSh ));
@@ -623,7 +623,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- bool bSet = ( pWnd == NULL );
+ bool bSet = ( pWnd == nullptr );
const SfxPoolItem* pItem;
if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET )
bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
@@ -748,7 +748,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOMSLIDER:
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem) == SfxItemState::SET )
{
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 15c4194706b8..faa12b474655 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -137,7 +137,7 @@ void ScTabViewShell::Activate(bool bMDI)
ScInputHandler* pOldHdl=pWin->GetInputHandler();
SfxViewShell* pSh = SfxViewShell::GetFirst( true, checkSfxViewShell<ScTabViewShell> );
- while ( pSh!=NULL && pOldHdl!=NULL)
+ while ( pSh!=nullptr && pOldHdl!=nullptr)
{
if (static_cast<ScTabViewShell*>(pSh)->GetInputHandler() == pOldHdl)
{
@@ -225,7 +225,7 @@ void ScTabViewShell::Deactivate(bool bMDI)
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
Link<ScChangeTrack&,void> aLink;
pChanges->SetModifiedLink(aLink);
@@ -248,10 +248,10 @@ void ScTabViewShell::Deactivate(bool bMDI)
GetViewData().GetDocShell()->UpdateOle(&GetViewData(), true);
if ( pHdl )
- pHdl->NotifyChange( NULL, true ); // timer-delayed due to document switching
+ pHdl->NotifyChange( nullptr, true ); // timer-delayed due to document switching
if (pScActiveViewShell == this)
- pScActiveViewShell = NULL;
+ pScActiveViewShell = nullptr;
bDontSwitch = bOldDontSwitch;
}
@@ -824,14 +824,14 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, bool bForce)
{
if (svx::checkForSelectedCustomShapes(
GetScDrawView(), true /* bOnlyExtruded */ )) {
- if (pExtrusionBarShell == 0)
+ if (pExtrusionBarShell == nullptr)
pExtrusionBarShell = new svx::ExtrusionBar(this);
AddSubShell( *pExtrusionBarShell );
}
sal_uInt32 nCheckStatus = 0;
if (svx::checkForSelectedFontWork(
GetScDrawView(), nCheckStatus )) {
- if (pFontworkBarShell == 0)
+ if (pFontworkBarShell == nullptr)
pFontworkBarShell = new svx::FontworkBar(this);
AddSubShell( *pFontworkBarShell );
}
@@ -994,7 +994,7 @@ SfxShell* ScTabViewShell::GetMySubShell() const
pSub = const_cast<ScTabViewShell*>(this)->GetSubShell(++nPos);
}
- return NULL; // none from mine present
+ return nullptr; // none from mine present
}
bool ScTabViewShell::IsDrawTextShell() const
@@ -1062,8 +1062,8 @@ VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage( vcl::Window *pParent,
void ScTabViewShell::StopEditShell()
{
- if ( pEditShell != NULL && !bDontSwitch )
- SetEditShell(NULL, false );
+ if ( pEditShell != nullptr && !bDontSwitch )
+ SetEditShell(nullptr, false );
}
// close handler to ensure function of dialog:
@@ -1086,7 +1086,7 @@ IMPL_LINK_NOARG_TYPED(ScTabViewShell, SimpleRefClose, const OUString*, void)
static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
{
- ScTabViewObj* pRet = NULL;
+ ScTabViewObj* pRet = nullptr;
SfxViewFrame* pViewFrame = rShell.GetViewFrame();
if (pViewFrame)
{
@@ -1634,26 +1634,26 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
nDrawSfxId(0),
nCtrlSfxId(USHRT_MAX),
nFormSfxId(USHRT_MAX),
- pDrawShell(NULL),
- pDrawTextShell(NULL),
- pEditShell(NULL),
- pPivotShell(NULL),
- pAuditingShell(NULL),
- pDrawFormShell(NULL),
- pCellShell(NULL),
- pOleObjectShell(NULL),
- pChartShell(NULL),
- pGraphicShell(NULL),
- pMediaShell(NULL),
- pPageBreakShell(NULL),
- pExtrusionBarShell(NULL),
- pFontworkBarShell(NULL),
- pFormShell(NULL),
- pInputHandler(NULL),
- pCurFrameLine(NULL),
+ pDrawShell(nullptr),
+ pDrawTextShell(nullptr),
+ pEditShell(nullptr),
+ pPivotShell(nullptr),
+ pAuditingShell(nullptr),
+ pDrawFormShell(nullptr),
+ pCellShell(nullptr),
+ pOleObjectShell(nullptr),
+ pChartShell(nullptr),
+ pGraphicShell(nullptr),
+ pMediaShell(nullptr),
+ pPageBreakShell(nullptr),
+ pExtrusionBarShell(nullptr),
+ pFontworkBarShell(nullptr),
+ pFormShell(nullptr),
+ pInputHandler(nullptr),
+ pCurFrameLine(nullptr),
aTarget(this),
- pDialogDPObject(NULL),
- pNavSettings(NULL),
+ pDialogDPObject(nullptr),
+ pNavSettings(nullptr),
bActiveDrawSh(false),
bActiveDrawTextSh(false),
bActivePivotSh(false),
@@ -1669,11 +1669,11 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
bInFormatDialog(false),
bPrintSelected(false),
bReadOnly(false),
- pScSbxObject(NULL),
+ pScSbxObject(nullptr),
bChartAreaValid(false),
bForceFocusOnCurCell(false),
nCurRefDlgId(0),
- pAccessibilityBroadcaster(NULL),
+ pAccessibilityBroadcaster(nullptr),
mbInSwitch(false)
{
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
@@ -1729,7 +1729,7 @@ ScTabViewShell::~ScTabViewShell()
SC_MOD()->ViewShellGone(this);
RemoveSubShell(); // all
- SetWindow(0);
+ SetWindow(nullptr);
// all to NULL, in case the TabView-dtor tries to access them
//! (should not really! ??!?!)
@@ -1766,7 +1766,7 @@ void ScTabViewShell::SetDialogDPObject( const ScDPObject* pObj )
if (pObj)
pDialogDPObject = new ScDPObject( *pObj );
else
- pDialogDPObject = NULL;
+ pDialogDPObject = nullptr;
}
void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index 7485f116f513..2f61df7ecf9e 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -35,7 +35,7 @@ void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine
else if ( pCurFrameLine )
{
delete pCurFrameLine;
- pCurFrameLine = NULL;
+ pCurFrameLine = nullptr;
}
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index d8bbc2f34b45..f0711a953bdc 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -122,7 +122,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
case SID_IMAP_EXEC:
{
SdrView* pDrView = GetSdrView();
- SdrMark* pMark = pDrView ? pDrView->GetMarkedObjectList().GetMark(0) : 0;
+ SdrMark* pMark = pDrView ? pDrView->GetMarkedObjectList().GetMark(0) : nullptr;
if ( pMark )
{
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index f6ac626e1679..9c451be934ee 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -223,7 +223,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_CURRENTCELL:
{
ScAddress aScAddress( GetViewData().GetCurX(), GetViewData().GetCurY(), 0 );
- OUString aAddr(aScAddress.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()));
+ OUString aAddr(aScAddress.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention()));
SfxStringItem aPosItem( SID_CURRENTCELL, aAddr );
rSet.Put( aPosItem );
@@ -371,7 +371,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_AUTO_OUTLINE:
{
- if (pDoc->GetChangeTrack()!=NULL || GetViewData().IsMultiMarked())
+ if (pDoc->GetChangeTrack()!=nullptr || GetViewData().IsMultiMarked())
{
rSet.DisableItem( nWhich );
}
@@ -382,7 +382,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
SCTAB nOlTab = GetViewData().GetTabNo();
ScOutlineTable* pOlTable = pDoc->GetOutlineTable( nOlTab );
- if (pOlTable == NULL)
+ if (pOlTable == nullptr)
rSet.DisableItem( nWhich );
}
break;
@@ -401,7 +401,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_CHG_SHOW:
{
- if ( pDoc->GetChangeTrack() == NULL || ( pDocShell && pDocShell->IsDocShared() ) )
+ if ( pDoc->GetChangeTrack() == nullptr || ( pDocShell && pDocShell->IsDocShared() ) )
rSet.DisableItem( nWhich );
}
break;
@@ -409,7 +409,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
rSet.Put(SfxBoolItem(FID_CHG_ACCEPT,
pThisFrame->HasChildWindow(FID_CHG_ACCEPT)));
- if(pDoc->GetChangeTrack()==NULL)
+ if(pDoc->GetChangeTrack()==nullptr)
{
if ( !pThisFrame->HasChildWindow(FID_CHG_ACCEPT) )
{
@@ -528,7 +528,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,true,&pItem)==SfxItemState::SET)
{
@@ -602,7 +602,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
if ( pHdl )
{
OUString aString;
- const EditTextObject* pObject = NULL;
+ const EditTextObject* pObject = nullptr;
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
CellType eType;
@@ -675,7 +675,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
// if using the view's local input handler, this view can always be set
// as current view inside NotifyChange.
- ScTabViewShell* pSourceSh = pInputHandler ? this : NULL;
+ ScTabViewShell* pSourceSh = pInputHandler ? this : nullptr;
pHdl->NotifyChange( &aState, bForce, pSourceSh, bStopEditing );
}
@@ -719,7 +719,7 @@ void ScTabViewShell::GetSaveState( SfxItemSet& rSet )
if ( nWhich != SID_SAVEDOC || !GetViewData().GetDocShell()->IsDocShared() )
{
// get state from DocShell
- pDocSh->GetSlotState( nWhich, NULL, &rSet );
+ pDocSh->GetSlotState( nWhich, nullptr, &rSet );
}
nWhich = aIter.NextWhich();
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index fdeeda14016e..223e6062cd6a 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -96,7 +96,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
aRect.SetSize( aOleSize );
pClient->SetObjArea( aRect );
- static_cast<ScClient*>(pClient)->SetGrafEdit( NULL );
+ static_cast<ScClient*>(pClient)->SetGrafEdit( nullptr );
}
}
@@ -164,7 +164,7 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
aRect.SetSize( aOleSize );
pClient->SetObjArea( aRect );
- static_cast<ScClient*>(pClient)->SetGrafEdit( NULL );
+ static_cast<ScClient*>(pClient)->SetGrafEdit( nullptr );
nErr = pClient->DoVerb( nVerb );
bErrorShown = true;
@@ -221,7 +221,7 @@ ErrCode ScTabViewShell::DoVerb(long nVerb)
if (!pView)
return ERRCODE_SO_NOTIMPL; // should not be
- SdrOle2Obj* pOle2Obj = NULL;
+ SdrOle2Obj* pOle2Obj = nullptr;
ErrCode nErr = ERRCODE_NONE;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -383,7 +383,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
//! merge with ScViewFunc::PasteDataFormat (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE)?
ScDrawView* pDrView = GetScDrawView();
- SdrPageView* pPageView = pDrView ? pDrView->GetSdrPageView() : NULL;
+ SdrPageView* pPageView = pDrView ? pDrView->GetSdrPageView() : nullptr;
if(pPageView)
{
svx::ODataAccessDescriptor aDescriptor(pDescriptorItem->GetValue());
@@ -576,7 +576,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
break;
default:
// get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
}
nWhich = aIter.NextWhich();
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 67a73b90b428..bfe6d8e72164 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -123,7 +123,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
// so that it does not re appear for instance after a crash (#42341#).
if ( SC_MOD()->GetCurRefDlgId() != nSlotId )
- return NULL;
+ return nullptr;
if ( nCurRefDlgId != nSlotId )
{
@@ -131,7 +131,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
// -> lock the dispatcher for this view (modal mode)
GetViewData().GetDispatcher().Lock( true ); // lock is reset when closing dialog
- return NULL;
+ return nullptr;
}
VclPtr<SfxModelessDialog> pResult;
@@ -477,11 +477,11 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
condformat::dialog::ScCondFormatDialogType aDialogType;
// Get the pool item stored it by Conditional Format Manager Dialog.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt32 nItems(GetPool().GetItemCount2( SCITEM_STRING ));
for( sal_uInt32 nIter = 0; nIter < nItems; ++nIter )
{
- if( NULL != (pItem = GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
+ if( nullptr != (pItem = GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
{
if ( ScCondFormatDlg::ParseXmlString(
static_cast<const SfxStringItem*>(pItem)->GetValue(),
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index f8b8d5cd6d98..f2528e7fa02a 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -182,7 +182,7 @@ void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL
}
// single url in cell is shown in the dialog and replaced
- bSelectFirst = HasBookmarkAtCursor( NULL );
+ bSelectFirst = HasBookmarkAtCursor( nullptr );
pScMod->SetInputMode( SC_INPUT_TABLE );
}
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 132789c6d05f..cc64215a8696 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -76,7 +76,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
pDoc->GetName( nCurrentTab, aName );
bool bVisible=true;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FID_TABLE_VISIBLE, &pItem ) )
@@ -173,7 +173,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( !pDoc->IsDocEditable() )
break; // locked
- if ( pReqArgs != NULL ) // from basic
+ if ( pReqArgs != nullptr ) // from basic
{
bool bOk = false;
const SfxPoolItem* pTabItem;
@@ -318,7 +318,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
( pDoc->IsTabProtected( nTabNr ) || nTabSelCount > 1 ) )
break; // no rename
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
bool bDone = false;
const SfxPoolItem* pItem;
@@ -352,7 +352,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
OUString aName;
OUString aDlgTitle;
- const sal_Char* pHelpId = 0;
+ const sal_Char* pHelpId = nullptr;
switch ( nSlot )
{
@@ -425,7 +425,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
case FID_TAB_MOVE:
{
- if ( pDoc->GetChangeTrack() != NULL )
+ if ( pDoc->GetChangeTrack() != nullptr )
break; // if ChangeTracking is active, then no TabMove
bool bDoIt = false;
@@ -435,7 +435,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OUString aDocName;
OUString aTabName;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
SCTAB nTableCount = pDoc->GetTableCount();
const SfxPoolItem* pItem;
@@ -455,7 +455,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if (!aDocName.isEmpty())
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
- ScDocShell* pScSh = NULL;
+ ScDocShell* pScSh = nullptr;
sal_uInt16 i=0;
while ( pSh )
@@ -651,7 +651,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pDoc->IsTabProtected( nTabNr ) ) // ||nTabSelCount > 1
break;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
bool bDone = false;
const SfxPoolItem* pItem;
@@ -849,7 +849,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TAB_MOVE:
if ( !pDoc->IsDocEditable()
- || pDoc->GetChangeTrack() != NULL
+ || pDoc->GetChangeTrack() != nullptr
|| nTabCount > MAXTAB)
rSet.DisableItem( nWhich );
break;
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index a2ca96ec6883..6aa43f3c2ebd 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -254,7 +254,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint )
bool ScTabViewShell::HasAccessibilityObjects()
{
- return pAccessibilityBroadcaster != NULL;
+ return pAccessibilityBroadcaster != nullptr;
}
bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index a899178b50d5..6df608ecd656 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -295,11 +295,11 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
mpMarkData(new ScMarkData),
pDocShell ( pDocSh ),
- pDoc ( NULL ),
+ pDoc ( nullptr ),
pView ( pViewSh ),
pViewShell ( pViewSh ),
pOptions ( new ScViewOptions ),
- pSpellingView ( NULL ),
+ pSpellingView ( nullptr ),
aLogicMode ( MAP_100TH_MM ),
eDefZoomType( SvxZoomType::PERCENT ),
aDefZoomX ( 1,1 ),
@@ -344,7 +344,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
pThisTab = maTabData[nTabNo];
for (sal_uInt16 j=0; j<4; j++)
{
- pEditView[j] = NULL;
+ pEditView[j] = nullptr;
bEditActive[j] = false;
}
@@ -364,7 +364,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
while ( !pDoc->IsVisible(nTabNo) && pDoc->HasTable(nTabNo+1) )
{
++nTabNo;
- maTabData.push_back(NULL);
+ maTabData.push_back(nullptr);
}
maTabData[nTabNo] = new ScViewDataTable() ;
pThisTab = maTabData[nTabNo];
@@ -430,7 +430,7 @@ ScViewData::ScViewData( const ScViewData& rViewData ) :
pThisTab = maTabData[nTabNo];
for (sal_uInt16 j=0; j<4; j++)
{
- pEditView[j] = NULL;
+ pEditView[j] = nullptr;
bEditActive[j] = false;
}
@@ -454,7 +454,7 @@ ScDocument* ScViewData::GetDocument() const
return &pDocShell->GetDocument();
OSL_FAIL("no document on ViewData");
- return NULL;
+ return nullptr;
}
ScViewData::~ScViewData()
@@ -480,7 +480,7 @@ void ScViewData::UpdateCurrentTab()
void ScViewData::InsertTab( SCTAB nTab )
{
if( nTab >= static_cast<SCTAB>(maTabData.size()))
- maTabData.resize(nTab+1, NULL);
+ maTabData.resize(nTab+1, nullptr);
else
maTabData.insert( maTabData.begin() + nTab, nullptr );
CreateTabData( nTab );
@@ -492,10 +492,10 @@ void ScViewData::InsertTab( SCTAB nTab )
void ScViewData::InsertTabs( SCTAB nTab, SCTAB nNewSheets )
{
if( nTab+nNewSheets >= static_cast<SCTAB>(maTabData.size()))
- maTabData.resize(nTab+nNewSheets, NULL);
+ maTabData.resize(nTab+nNewSheets, nullptr);
else
{
- maTabData.insert( maTabData.begin() + nTab, nNewSheets, NULL );
+ maTabData.insert( maTabData.begin() + nTab, nNewSheets, nullptr );
}
for (SCTAB i = nTab; i < nTab + nNewSheets; ++i)
{
@@ -555,7 +555,7 @@ void ScViewData::MoveTab( SCTAB nSrcTab, SCTAB nDestTab )
{
if (nDestTab==SC_TAB_APPEND)
nDestTab = pDoc->GetTableCount() - 1;
- ScViewDataTable* pTab = NULL;
+ ScViewDataTable* pTab = nullptr;
if (nSrcTab < static_cast<SCTAB>(maTabData.size()))
{
pTab = maTabData[nSrcTab];
@@ -1383,7 +1383,7 @@ void ScViewData::EditGrowY( bool bInitial )
void ScViewData::ResetEditView()
{
- EditEngine* pEngine = NULL;
+ EditEngine* pEngine = nullptr;
for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
@@ -1408,7 +1408,7 @@ void ScViewData::KillEditView()
if (bEditActive[i])
pEditView[i]->GetEditEngine()->RemoveView(pEditView[i]);
delete pEditView[i];
- pEditView[i] = NULL;
+ pEditView[i] = nullptr;
}
}
@@ -1447,7 +1447,7 @@ void ScViewData::EnsureTabDataSize(size_t nSize)
if (nSize >= maTabData.size())
{
size_t n = nSize - maTabData.size() + 1;
- maTabData.insert(maTabData.end(), n, NULL);
+ maTabData.insert(maTabData.end(), n, nullptr);
}
}
@@ -1725,7 +1725,7 @@ bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
for (SCROW nRow = nY; nRow <= nY+nCountY-1; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowHidden(nRow, nTabNo, NULL, &nLastRow))
+ if (pDoc->RowHidden(nRow, nTabNo, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
@@ -1923,7 +1923,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
if ( nNewPosY > nOldPosY )
for ( i=nOldPosY; i<nNewPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ long nThis = pDoc->GetRowHeight( i, nTabNo, nullptr, &nHeightEndRow );
SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY -= nThis * nRows;
@@ -1932,7 +1932,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
else
for ( i=nNewPosY; i<nOldPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ long nThis = pDoc->GetRowHeight( i, nTabNo, nullptr, &nHeightEndRow );
SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY += nThis * nRows;
@@ -3073,7 +3073,7 @@ void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
while (rScrY <= nEndPixels && nRow <= nEndRow)
{
SCROW nHeightEndRow;
- sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, nullptr, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -3112,7 +3112,7 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
while (rScrY <= nEndPixels && nRow >= nStartRow)
{
SCROW nHeightStartRow;
- sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, nullptr);
if (nHeightStartRow < nStartRow)
nHeightStartRow = nStartRow;
if (!nHeight)
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 24dd690c9b41..843d4ce71c5e 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -483,7 +483,7 @@ bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
void ScViewFunc::EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr)
{
OUString aFormula = GetAutoSumFormula( rRangeList, bSubTotal, rAddr );
- EnterBlock( aFormula, NULL );
+ EnterBlock( aFormula, nullptr );
}
bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue )
@@ -764,7 +764,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
if (!aTester.NeedsObject())
{
aNewStr = aEngine.GetText();
- pData = NULL;
+ pData = nullptr;
}
}
@@ -956,7 +956,7 @@ void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint,
if ( pRepCol )
{
if ( pRepCol->isEmpty() )
- rDoc.SetRepeatColRange( nTab, NULL );
+ rDoc.SetRepeatColRange( nTab, nullptr );
else
if ( aRange.ParseAny( *pRepCol, &rDoc, aDetails ) & SCA_VALID )
rDoc.SetRepeatColRange( nTab, &aRange );
@@ -967,7 +967,7 @@ void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint,
if ( pRepRow )
{
if ( pRepRow->isEmpty() )
- rDoc.SetRepeatRowRange( nTab, NULL );
+ rDoc.SetRepeatRowRange( nTab, nullptr );
else
if ( aRange.ParseAny( *pRepRow, &rDoc, aDetails ) & SCA_VALID )
rDoc.SetRepeatRowRange( nTab, &aRange );
@@ -1445,7 +1445,7 @@ void ScViewFunc::FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool
else
aMarkRange = ScRange( GetViewData().GetCurX(), GetViewData().GetCurY(), nTab );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
{
@@ -1593,7 +1593,7 @@ void ScViewFunc::TransliterateText( sal_Int32 nType )
ScAutoFormatData* ScViewFunc::CreateAutoFormatData()
{
- ScAutoFormatData* pData = NULL;
+ ScAutoFormatData* pData = nullptr;
SCCOL nStartCol;
SCROW nStartRow;
SCTAB nStartTab;
@@ -1933,7 +1933,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
}
OUString aTargetValStr;
- if ( rParam.pStrTargetVal != NULL )
+ if ( rParam.pStrTargetVal != nullptr )
aTargetValStr = *(rParam.pStrTargetVal);
OUString aMsgStr;
@@ -2219,8 +2219,8 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
--nNewTab;
bool bWasLinked = false;
- ScDocument* pUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -2538,9 +2538,9 @@ void ScViewFunc::MoveTable(
{
ScDocument* pDoc = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScDocument* pDestDoc = NULL;
- ScDocShell* pDestShell = NULL;
- ScTabViewShell* pDestViewSh = NULL;
+ ScDocument* pDestDoc = nullptr;
+ ScDocShell* pDestShell = nullptr;
+ ScTabViewShell* pDestViewSh = nullptr;
bool bUndo (pDoc->IsUndoEnabled());
bool bRename = pNewTabName && !pNewTabName->isEmpty();
@@ -3033,7 +3033,7 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
aBoxItem.SetLine( &aLine, BOXLINE ); \
} \
else \
- aBoxItem.SetLine( NULL, BOXLINE ); \
+ aBoxItem.SetLine( nullptr, BOXLINE ); \
}
void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
@@ -3054,13 +3054,13 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
const ScPatternAttr* pSelAttrs = GetSelectionPattern();
const SfxItemSet& rSelItemSet = pSelAttrs->GetItemSet();
- const SfxPoolItem* pBorderAttr = NULL;
+ const SfxPoolItem* pBorderAttr = nullptr;
SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, true, &pBorderAttr );
- const SfxPoolItem* pTLBRItem = 0;
+ const SfxPoolItem* pTLBRItem = nullptr;
SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, true, &pTLBRItem );
- const SfxPoolItem* pBLTRItem = 0;
+ const SfxPoolItem* pBLTRItem = nullptr;
SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem );
// any of the lines visible?
@@ -3082,7 +3082,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
if( pBorderAttr )
{
- const SvxBorderLine* pBoxLine = NULL;
+ const SvxBorderLine* pBoxLine = nullptr;
SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem*>(pBorderAttr) );
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 95ae35f073f7..027f4f86ae40 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -111,7 +111,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, bool bIncludeObjects )
ScAddress aOldEnd( aRange.aEnd ); // combined cells in this range?
pDoc->ExtendMerge( aRange, true );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -249,7 +249,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
if ( bSysClip )
{
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
pClipDoc->ExtendMerge( aRange, true );
@@ -271,7 +271,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
}
pTransferObj->CopyToClipboard( GetActiveWin() );
- SC_MOD()->SetClipObject( pTransferObj, NULL );
+ SC_MOD()->SetClipObject( pTransferObj, nullptr );
}
bDone = true;
@@ -380,7 +380,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
}
pTransferObj->CopyToClipboard( GetActiveWin() ); // system clipboard
- SC_MOD()->SetClipObject( pTransferObj, NULL ); // internal clipboard
+ SC_MOD()->SetClipObject( pTransferObj, nullptr ); // internal clipboard
}
bSuccess = true;
@@ -416,7 +416,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
ScClipParam aClipParam(aRange, false);
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true);
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
pClipDoc->ExtendMerge( aRange, true );
ScDocShell* pDocSh = GetViewData().GetDocShell();
@@ -428,7 +428,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
}
}
- return NULL;
+ return nullptr;
}
// P A S T E
@@ -586,8 +586,8 @@ void ScViewFunc::PasteFromSystem()
void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
{
- ScTransferObj *pOwnClip=0;
- ScDrawTransferObj *pDrawClip=0;
+ ScTransferObj *pOwnClip=nullptr;
+ ScDrawTransferObj *pDrawClip=nullptr;
uno::Reference<lang::XUnoTunnel> xTunnel( rxTransferable, uno::UNO_QUERY );
if ( xTunnel.is() )
{
@@ -726,7 +726,7 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi )
bRet = PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
nPosX, nPosY,
- NULL, false, !bApi ); // allow warning dialog
+ nullptr, false, !bApi ); // allow warning dialog
if ( !bRet && !bApi )
ErrorMessage(STR_PASTE_ERROR);
@@ -891,7 +891,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (InsertDeleteFlags::OBJECTS|InsertDeleteFlags::NOTE) ) );
ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip
- ScDocument* pOrigClipDoc = NULL;
+ ScDocument* pOrigClipDoc = nullptr;
::std::unique_ptr< ScDocument > xTransClip;
if ( bTranspose )
{
@@ -918,7 +918,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
pClipDoc->TransposeClip( xTransClip.get(), nFlags, bAsLink );
pClipDoc = xTransClip.get();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
}
SCCOL nStartCol;
@@ -1179,11 +1179,11 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if (lcl_SelHasAttrib( pDoc, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, HASATTR_OVERLAPPED ))
{ // "Cell merge not possible if cells already merged"
ScDocAttrIterator aIter( pDoc, nStartTab, nStartCol, nStartRow, nUndoEndCol, nUndoEndRow );
- const ScPatternAttr* pPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
SCCOL nCol = -1;
SCROW nRow1 = -1;
SCROW nRow2 = -1;
- while ( ( pPattern = aIter.GetNext( nCol, nRow1, nRow2 ) ) != NULL )
+ while ( ( pPattern = aIter.GetNext( nCol, nRow1, nRow2 ) ) != nullptr )
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) );
const ScMergeFlagAttr* pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) );
@@ -1207,9 +1207,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRefUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRefUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if ( bRecord )
{
@@ -1273,7 +1273,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// copy normally (original range)
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags,
pRefUndoDoc, pClipDoc, true, false, bIncludeFiltered,
- bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) );
+ bSkipEmpty, (bMarkIsFiltered ? &aRangeList : nullptr) );
// adapt refs manually in case of transpose
if ( bTranspose && bCutMode && (nFlags & InsertDeleteFlags::CONTENTS) )
@@ -1307,13 +1307,13 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
AdjustBlockHeight(); // update row heights before pasting objects
::std::vector< OUString > aExcludedChartNames;
- SdrPage* pPage = NULL;
+ SdrPage* pPage = nullptr;
if ( nFlags & InsertDeleteFlags::OBJECTS )
{
ScDrawView* pScDrawView = GetScDrawView();
- SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
- pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : NULL );
+ SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : nullptr );
+ pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : nullptr );
if ( pPage )
{
ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
@@ -1342,7 +1342,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if ( bRecord )
{
- ScDocument* pRedoDoc = NULL;
+ ScDocument* pRedoDoc = nullptr;
// copy redo data after appearance of the first undo
// don't create Redo-Doc without RefUndoDoc
@@ -1571,7 +1571,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
aOptions.eMoveMode = eMoveMode;
ScUndoPaste* pUndo = new ScUndoPaste(pDocSh,
- aMarkedRange, aMark, pUndoDoc.release(), NULL, nFlags|nUndoFlags, NULL, false, &aOptions);
+ aMarkedRange, aMark, pUndoDoc.release(), nullptr, nFlags|nUndoFlags, nullptr, false, &aOptions);
if (bInsertCells)
pUndoMgr->AddUndoAction(new ScUndoWrapper(pUndo), true);
@@ -1689,7 +1689,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, (nFlags & ~InsertDeleteFlags::OBJECTS), NULL, pClipDoc,
+ *aRanges[i], aMark, (nFlags & ~InsertDeleteFlags::OBJECTS), nullptr, pClipDoc,
false, false, true, bSkipEmpty);
}
@@ -1707,7 +1707,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, InsertDeleteFlags::OBJECTS, NULL, pClipDoc,
+ *aRanges[i], aMark, InsertDeleteFlags::OBJECTS, nullptr, pClipDoc,
false, false, true, bSkipEmpty);
}
}
@@ -1731,7 +1731,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
aOptions.eMoveMode = eMoveMode;
ScUndoPaste* pUndo = new ScUndoPaste(
- pDocSh, aRanges, aMark, pUndoDoc.release(), NULL, nFlags|nUndoFlags, NULL, false, &aOptions);
+ pDocSh, aRanges, aMark, pUndoDoc.release(), nullptr, nFlags|nUndoFlags, nullptr, false, &aOptions);
pUndoMgr->AddUndoAction(pUndo);
pUndoMgr->LeaveListAction();
@@ -1918,9 +1918,9 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
if ( pDoc )
{
const bool bRecord( pDoc->IsUndoEnabled());
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRedoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRedoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
SCTAB nTab = GetViewData().GetTabNo();
SCTAB nStartTab = nTab;
SCTAB nEndTab = nTab;
@@ -1960,7 +1960,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nStartCol, nCurrentRow, nStartTab,
nUndoEndCol, nUndoEndRow, nEndTab, rMark,
pUndoDoc, pRedoDoc, nUndoFlags,
- pUndoData, NULL, NULL, NULL,
+ pUndoData, nullptr, nullptr, nullptr,
false ); // FALSE = Redo data not yet copied
pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true );
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 9db01ae474fd..199813fe1d49 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -113,7 +113,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
if (nEndRow > MAXROW)
nEndRow = MAXROW;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -146,7 +146,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
aDestMark.SetMarkArea( aMarkRange );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoPaste( pDocSh, aMarkRange, aDestMark,
- pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, NULL));
+ pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, nullptr));
}
}
@@ -205,7 +205,7 @@ void ScViewFunc::DoRefConversion( bool bRecord )
ScDocShell* pDocSh = GetViewData().GetDocShell();
bool bOk = false;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -309,7 +309,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
ScMarkData& rMark = GetViewData().GetMarkData();
ScSplitPos eWhich = GetViewData().GetActivePart();
EESpellState eState;
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
std::unique_ptr<ESelection> pEditSel;
std::unique_ptr<ScEditEngineDefaulter> pThesaurusEngine;
bool bIsEditMode = GetViewData().HasEditView(eWhich);
@@ -352,7 +352,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin());
pThesaurusEngine->SetSpeller(xSpeller);
MakeEditView(pThesaurusEngine.get(), nCol, nRow );
- const ScPatternAttr* pPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
std::unique_ptr<SfxItemSet> pEditDefaults(
new SfxItemSet(pThesaurusEngine->GetEmptyItemSet()));
pPattern = rDoc.GetPattern(nCol, nRow, nTab);
@@ -435,7 +435,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
ScDocument& rDoc = pDocSh->GetDocument();
ScMarkData& rMark = rViewData.GetMarkData();
ScSplitPos eWhich = rViewData.GetActivePart();
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
bool bIsEditMode = rViewData.HasEditView(eWhich);
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -465,8 +465,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
}
}
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRedoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRedoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -554,7 +554,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
// *** final cleanup *** --------------------------------------------------
- rViewData.SetSpellingView( NULL );
+ rViewData.SetSpellingView( nullptr );
KillEditView(true);
pEngine.reset();
pDocSh->PostPaintGridAll();
@@ -575,7 +575,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
if( ::avmedia::MediaWindow::isMediaURL( aStrURL, ""/*TODO?*/ ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL );
- return ( 0 != GetViewData().GetDispatcher().Execute(
+ return ( nullptr != GetViewData().GetDispatcher().Execute(
SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
&aMediaURLItem, 0L ) );
}
@@ -583,7 +583,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
if (!bLink) // for bLink only graphics or URL
{
// 1. can I open the file?
- const SfxFilter* pFlt = NULL;
+ const SfxFilter* pFlt = nullptr;
// search only for its own filters, without selection box (as in ScDocumentLoader)
SfxFilterMatcher aMatcher( ScDocShell::Factory().GetFilterContainer()->GetName() );
@@ -604,7 +604,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
// Open Asynchronously, because it can also happen from D&D
// and that is not so good for the MAC...
- return ( 0 != rDispatcher.Execute( SID_OPENDOC,
+ return ( nullptr != rDispatcher.Execute( SID_OPENDOC,
SfxCallMode::ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) );
}
}
@@ -722,7 +722,7 @@ void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& r
sal_Int32 nTxtLen = aEngine.GetTextLen(nPara);
ESelection aInsSel( nPara, nTxtLen, nPara, nTxtLen );
- if ( bTryReplace && HasBookmarkAtCursor( NULL ) )
+ if ( bTryReplace && HasBookmarkAtCursor( nullptr ) )
{
// if called from hyperlink slot and cell contains only a URL,
// replace old URL with new one
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 3e0f57302a82..260f4f8efa46 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -307,7 +307,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
// make sense to do it for other data types too.
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg(
- pFact->CreateScTextImportOptionsDlg(NULL));
+ pFact->CreateScTextImportOptionsDlg(nullptr));
if (pDlg->Execute() == RET_OK)
{
@@ -336,7 +336,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScAbstractDialogFactory* pFact =
ScAbstractDialogFactory::Create();
std::unique_ptr<AbstractScImportAsciiDlg> pDlg(
- pFact->CreateScImportAsciiDlg( NULL, OUString(), &aStrm,
+ pFact->CreateScImportAsciiDlg( nullptr, OUString(), &aStrm,
SC_PASTETEXT));
if (pDlg->Execute() == RET_OK)
@@ -492,7 +492,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScDocShellRef aDragShellRef( new ScDocShell );
aDragShellRef->DoInitNew();
- std::unique_ptr<FmFormModel> pModel(new FmFormModel( aPath, NULL, aDragShellRef ));
+ std::unique_ptr<FmFormModel> pModel(new FmFormModel( aPath, nullptr, aDragShellRef ));
pModel->GetItemPool().FreezeIdRanges();
xStm->Seek(0);
@@ -544,7 +544,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
{
ScRange aSource;
const ScExtDocOptions* pExtOpt = pInsDoc->GetExtDocOptions();
- const ScExtTabSettings* pTabSett = pExtOpt ? pExtOpt->GetTabSettings( nSrcTab ) : 0;
+ const ScExtTabSettings* pTabSett = pExtOpt ? pExtOpt->GetTabSettings( nSrcTab ) : nullptr;
if( pTabSett && pTabSett->maUsedArea.IsValid() )
{
aSource = pTabSett->maUsedArea;
@@ -693,7 +693,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
const OUString* pApp = &aStrs[0];
const OUString* pTopic = &aStrs[1];
const OUString* pItem = &aStrs[2];
- const OUString* pExtra = NULL;
+ const OUString* pExtra = nullptr;
if (aStrs.size() > 3)
pExtra = &aStrs[3];
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 79da9e04d826..8cf5de5673a0 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -93,7 +93,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
bool bNegativePage = GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() );
- SdrView* pDragEditView = NULL;
+ SdrView* pDragEditView = nullptr;
ScModule* pScMod = SC_MOD();
const ScDragData& rData = pScMod->GetDragData();
ScDrawTransferObj* pDrawTrans = rData.pDrawTransfer;
@@ -157,7 +157,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
SdrObject* pNeuObj=pObj->Clone();
- if (pNeuObj!=NULL)
+ if (pNeuObj!=nullptr)
{
pNeuObj->SetModel(pDrawModel);
pNeuObj->SetPage(pDestPage);
@@ -182,7 +182,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
ScDocument* pDocument = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr );
if ( pDocument && pDestPage && pModelObj && pDrawTrans )
{
const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
@@ -223,7 +223,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if ( !bSameDocClipboard )
GetViewData().GetDocument()->SetPastingDrawFromOtherDoc( true );
- pScDrawView->Paste(*pModel, aPos, NULL, nOptions, rSrcShellID, rDestShellID);
+ pScDrawView->Paste(*pModel, aPos, nullptr, nOptions, rSrcShellID, rDestShellID);
if ( !bSameDocClipboard )
GetViewData().GetDocument()->SetPastingDrawFromOtherDoc( false );
@@ -251,8 +251,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
ScDocument* pDocument = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
- ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( NULL );
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr );
+ ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( nullptr );
if ( pDocument && pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
{
const ScRangeListVector& rProtectedChartRangesVector(
@@ -390,7 +390,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
SdrPageView* pPageView = pScDrawView->GetSdrPageView();
if (pPageView)
{
- SdrObject* pPickObj = 0;
+ SdrObject* pPickObj = nullptr;
if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
{
const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 2bff93479c03..c5f6f8fda02c 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -662,7 +662,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
// undo
- EditTextObject* pUndoData = NULL;
+ EditTextObject* pUndoData = nullptr;
ScUndoEnterData::ValuesType aOldValues;
if (bRecord && !bSimple)
@@ -774,7 +774,7 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar
{
ScDocShell* pDocSh = rData.GetDocShell();
bool bSuccess = pDocSh->GetDocFunc().EnterMatrix(
- aRange, &rMark, NULL, rString, false, false, EMPTY_OUSTRING, eGram );
+ aRange, &rMark, nullptr, rString, false, false, EMPTY_OUSTRING, eGram );
if (bSuccess)
pDocSh->UpdateOle(&GetViewData());
}
@@ -1148,8 +1148,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
SCROW nEndRow = aMarkRange.aEnd.Row();
SCTAB nEndTab = aMarkRange.aEnd.Tab();
- ScUndoSelectionAttr* pUndoAttr = NULL;
- ScEditDataArray* pEditDataArray = NULL;
+ ScUndoSelectionAttr* pUndoAttr = nullptr;
+ ScEditDataArray* pEditDataArray = nullptr;
if (bRecord)
{
ScRange aCopyRange = aMarkRange;
@@ -1188,16 +1188,16 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
SCROW nRow = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo();
- EditTextObject* pOldEditData = NULL;
- EditTextObject* pNewEditData = NULL;
+ EditTextObject* pOldEditData = nullptr;
+ EditTextObject* pNewEditData = nullptr;
ScAddress aPos(nCol, nRow, nTab);
if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT)
{
const EditTextObject* pEditObj = rDoc.GetEditText(aPos);
- pOldEditData = pEditObj ? pEditObj->Clone() : NULL;
+ pOldEditData = pEditObj ? pEditObj->Clone() : nullptr;
rDoc.RemoveEditTextCharAttribs(aPos, rAttr);
pEditObj = rDoc.GetEditText(aPos);
- pNewEditData = pEditObj ? pEditObj->Clone() : NULL;
+ pNewEditData = pEditObj ? pEditObj->Clone() : nullptr;
}
aChangeRanges.Append(aPos);
@@ -1231,7 +1231,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
PropertyEntryVector_t aPropVector = rMap.getPropertyEntries();
for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SfxItemState::SET && pItem )
{
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
@@ -1280,7 +1280,7 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked()
// Don't use UnmarkFiltered in slot state functions, for performance reasons.
// The displayed state is always that of the whole selection including filtered rows.
- const ScStyleSheet* pSheet = NULL;
+ const ScStyleSheet* pSheet = nullptr;
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
ScMarkData& rMark = rViewData.GetMarkData();
@@ -1640,8 +1640,8 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
WaitObject aWait( GetFrameWin() ); // important for TrackFormulas in UpdateReference
- ScDocument* pUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1877,8 +1877,8 @@ void ScViewFunc::SetWidthOrHeight(
bFormula = rOpts.GetOption( VOPT_FORMULAS );
}
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
std::vector<sc::ColRowSpan> aUndoRanges;
if ( bRecord )
@@ -1945,7 +1945,7 @@ void ScViewFunc::SetWidthOrHeight(
for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow)
{
SCROW nLastRow = nRow;
- if (rDoc.RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (rDoc.RowHidden(nRow, nTab, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
@@ -2671,7 +2671,7 @@ bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
if ( pList->insert( pNewEntry ) )
bOk = true;
- pNewEntry = NULL; // never delete, insert took ownership
+ pNewEntry = nullptr; // never delete, insert took ownership
rDoc.CompileHybridFormula();
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index aba3a38b5e55..4f71d63bfc8e 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -256,7 +256,7 @@ void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc )
for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowFiltered(nRow, nTab, NULL, &nLastRow))
+ if (pDoc->RowFiltered(nRow, nTab, nullptr, &nLastRow))
{
// use nStartCol/nEndCol, so the multi mark area isn't extended to all columns
// (visible in repaint for indentation)
@@ -368,7 +368,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
bool ScViewUtil::IsFullScreen( SfxViewShell& rViewShell )
{
SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings();
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
bool bIsFullScreen = false;
if (rBindings.QueryState( SID_WIN_FULLSCREEN, pItem ) >= SfxItemState::DEFAULT)
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index f973ef3e2352..57b34dd08f29 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -70,7 +70,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(
SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocument* pDoc)
: ScAnyRefDlg(pB, pCW, pParent, "XMLSourceDialog",
"modules/scalc/ui/xmlsourcedialog.ui")
- , mpCurRefEntry(NULL)
+ , mpCurRefEntry(nullptr)
, mpDoc(pDoc)
, mbDlgLostFocus(false)
{
@@ -82,7 +82,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(
mpLbTree->set_width_request(aTreeSize.Width());
mpLbTree->set_height_request(aTreeSize.Height());
get(mpRefEdit, "edit");
- mpRefEdit->SetReferences(this, NULL);
+ mpRefEdit->SetReferences(this, nullptr);
get(mpRefBtn, "ref");
mpRefBtn->SetReferences(this, mpRefEdit);
get(mpBtnCancel, "cancel");
@@ -227,7 +227,7 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl)
{
- mpActiveEdit = NULL;
+ mpActiveEdit = nullptr;
if (pCtrl == mpRefEdit || pCtrl == mpRefBtn)
mpActiveEdit = mpRefEdit;
@@ -263,7 +263,7 @@ public:
SvTreeListEntry* getReferenceEntry(SvTreeListBox& rTree, SvTreeListEntry* pCurEntry)
{
SvTreeListEntry* pParent = rTree.GetParent(pCurEntry);
- SvTreeListEntry* pRefEntry = NULL;
+ SvTreeListEntry* pRefEntry = nullptr;
while (pParent)
{
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pParent);